diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol index c5630766e9e..ac12f6376aa 100644 --- a/packages/protocol/contracts/bridge/Bridge.sol +++ b/packages/protocol/contracts/bridge/Bridge.sol @@ -476,16 +476,11 @@ contract Bridge is EssentialContract, IBridge { /// @notice Returns invocation delay values. /// @dev Bridge contract deployed on L1 shall use a non-zero value for better /// security. - /// @return invocationDelay_ The minimal delay in second before a message can be executed since - /// and the time it was received on the this chain. - /// @return invocationExtraDelay_ The extra delay in second (to be added to invocationDelay) if - /// the transactor is not the preferredExecutor who proved this message. - function getInvocationDelays() - public - view - virtual - returns (uint256 invocationDelay_, uint256 invocationExtraDelay_) - { + /// @return The minimal delay in second before a message can be executed since and the time it + /// was received on the this chain. + /// @return The extra delay in second (to be added to invocationDelay) if the transactor is not + /// the preferredExecutor who proved this message. + function getInvocationDelays() public view virtual returns (uint256, uint256) { if (LibNetwork.isEthereumMainnetOrTestnet(block.chainid)) { // For Taiko mainnet and public testnets // 384 seconds = 6.4 minutes = one ethereum epoch diff --git a/packages/protocol/contracts/common/AddressResolver.sol b/packages/protocol/contracts/common/AddressResolver.sol index 13dd1caad0f..dc46ac55f42 100644 --- a/packages/protocol/contracts/common/AddressResolver.sol +++ b/packages/protocol/contracts/common/AddressResolver.sol @@ -26,6 +26,7 @@ abstract contract AddressResolver is IAddressResolver, Initializable { _; } + /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } diff --git a/packages/protocol/contracts/tokenvault/BaseVault.sol b/packages/protocol/contracts/tokenvault/BaseVault.sol index 859fcea2d6c..dda43b3d78c 100644 --- a/packages/protocol/contracts/tokenvault/BaseVault.sol +++ b/packages/protocol/contracts/tokenvault/BaseVault.sol @@ -36,8 +36,9 @@ abstract contract BaseVault is /// @notice Checks if the contract supports the given interface. /// @param _interfaceId The interface identifier. /// @return true if the contract supports the interface, false otherwise. - function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) { - return _interfaceId == type(IRecallableSender).interfaceId; + function supportsInterface(bytes4 _interfaceId) public pure virtual override returns (bool) { + return _interfaceId == type(IRecallableSender).interfaceId + || _interfaceId == type(IMessageInvocable).interfaceId; } /// @notice Returns the name of the vault. diff --git a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol index e0b1fcbf606..efbf1c5774d 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol @@ -130,6 +130,7 @@ contract BridgedERC1155 is EssentialContract, IERC1155MetadataURIUpgradeable, ER bytes memory /*_data*/ ) internal + view override { if (_to == address(this)) revert BTOKEN_CANNOT_RECEIVE(); diff --git a/packages/protocol/contracts/tokenvault/BridgedERC20.sol b/packages/protocol/contracts/tokenvault/BridgedERC20.sol index a3d24beae44..0692fc5aa72 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC20.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC20.sol @@ -76,7 +76,7 @@ contract BridgedERC20 is /// @notice Set the snapshoter address. /// @param _snapshooter snapshooter address. - function setSnapshoter(address _snapshooter) external onlyOwner { + function setSnapshooter(address _snapshooter) external onlyOwner { snapshooter = _snapshooter; } diff --git a/packages/protocol/contracts/tokenvault/BridgedERC721.sol b/packages/protocol/contracts/tokenvault/BridgedERC721.sol index c1af503c777..9c0975c3de3 100644 --- a/packages/protocol/contracts/tokenvault/BridgedERC721.sol +++ b/packages/protocol/contracts/tokenvault/BridgedERC721.sol @@ -121,6 +121,7 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable { uint256 /*_batchSize*/ ) internal + view override { if (_to == address(this)) revert BTOKEN_CANNOT_RECEIVE(); diff --git a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol index d171a307860..7fd55468306 100644 --- a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol +++ b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol @@ -190,7 +190,7 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable { /// @return true if supports, else otherwise. function supportsInterface(bytes4 interfaceId) public - view + pure override(BaseVault, ERC1155ReceiverUpgradeable) returns (bool) {