diff --git a/evm/src/NttManager/ManagerBase.sol b/evm/src/NttManager/ManagerBase.sol index 3e6228df6..0539537a7 100644 --- a/evm/src/NttManager/ManagerBase.sol +++ b/evm/src/NttManager/ManagerBase.sol @@ -218,7 +218,9 @@ abstract contract ManagerBase is function transferOwnership( address newOwner ) public override onlyOwner { - // TODO: Just delete this function and let the Ownable one be called directly? + // It's intentional (at this time) that we are not transferring the endpoint admin. + // The endpoint functions are all called by the NttManager, which means the admin + // must remain the NttManager. super.transferOwnership(newOwner); } @@ -354,6 +356,7 @@ abstract contract ManagerBase is assert(this.mode() == mode); assert(this.chainId() == chainId); assert(this.endpoint() == endpoint); + assert(this.executor() == executor); } function _checkThresholdInvariants() internal view { diff --git a/evm/src/NttManager/NttManager.sol b/evm/src/NttManager/NttManager.sol index 78f9f3fb8..824155d3e 100644 --- a/evm/src/NttManager/NttManager.sol +++ b/evm/src/NttManager/NttManager.sol @@ -656,12 +656,13 @@ contract NttManager is INttManager, RateLimiter, ManagerBase { args.amount.untrim(tokenDecimals()), args.epTotalPriceQuote, args.recipientChain, - args.sequence, - payloadHash + args.sequence ); uint128 gasLimit = peerData.gasLimit; if (gasLimit == 0) { + // The gas limit can only be zero when a contract has been migrated from an older version, + // where the gasLimit was not defined in the manager peer struct and was not set during the upgrade. revert InvalidGasLimitZero(args.recipientChain); } diff --git a/evm/src/interfaces/INttManager.sol b/evm/src/interfaces/INttManager.sol index 57e67f37a..2e8cf2781 100644 --- a/evm/src/interfaces/INttManager.sol +++ b/evm/src/interfaces/INttManager.sol @@ -18,7 +18,7 @@ interface INttManager is IManagerBase { /// @notice Emitted when a message is sent from the nttManager. /// @dev Topic0 - /// 0x75eb8927cc7c4810b30fa2e8011fce37da6da7d18eb82c642c367ae4445c3625. + /// 0xe54e51e42099622516fa3b48e9733581c9dbdcb771cafb093f745a0532a35982. /// @param recipient The recipient of the message. /// @param refundAddress The address on the destination chain to which the /// refund of unused gas will be paid @@ -32,8 +32,7 @@ interface INttManager is IManagerBase { uint256 amount, uint256 fee, uint16 recipientChain, - uint64 msgSequence, - bytes32 msgHash + uint64 msgSequence ); /// @notice Emitted when a message is sent from the nttManager. diff --git a/evm/src/libraries/TransceiverHelpers.sol b/evm/src/libraries/TransceiverHelpers.sol index 038b8ed92..44906ae4d 100644 --- a/evm/src/libraries/TransceiverHelpers.sol +++ b/evm/src/libraries/TransceiverHelpers.sol @@ -32,15 +32,3 @@ function countSetBits( return count; } - -// @dev Count the number of set bits in a uint128 -function countSetBits128( - uint128 x -) pure returns (uint8 count) { - while (x != 0) { - x &= x - 1; - count++; - } - - return count; -} diff --git a/evm/test/interfaces/ITransceiverReceiver.sol b/evm/test/interfaces/ITransceiverReceiver.sol deleted file mode 100644 index 68e71bfb7..000000000 --- a/evm/test/interfaces/ITransceiverReceiver.sol +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-License-Identifier: Apache 2 -pragma solidity >=0.8.8 <0.9.0; - -interface IAdapterReceiver { - function receiveMessage( - bytes memory encodedMessage - ) external; -} diff --git a/evm/test/libraries/TransceiverHelpers.sol b/evm/test/libraries/TransceiverHelpers.sol index 66a9573e9..ce62ab5e4 100644 --- a/evm/test/libraries/TransceiverHelpers.sol +++ b/evm/test/libraries/TransceiverHelpers.sol @@ -206,11 +206,11 @@ library TransceiverHelpersLib { for (uint256 idx = 0; idx < events.length; ++idx) { if ( events[idx].topics[0] - == bytes32(0x75eb8927cc7c4810b30fa2e8011fce37da6da7d18eb82c642c367ae4445c3625) + == bytes32(0xe54e51e42099622516fa3b48e9733581c9dbdcb771cafb093f745a0532a35982) && events[idx].emitter == nttManager ) { - (,,, uint64 sequence,) = - abi.decode(events[idx].data, (uint256, uint256, uint16, uint64, bytes32)); + (,,, uint64 sequence) = + abi.decode(events[idx].data, (uint256, uint256, uint16, uint64)); if (sequence == nttSeqNo) { // The next event in the log should be from the executor