diff --git a/solidity/contracts/token/HypERC721.sol b/solidity/contracts/token/HypERC721.sol index defcf9f238d..ced9020b828 100644 --- a/solidity/contracts/token/HypERC721.sol +++ b/solidity/contracts/token/HypERC721.sol @@ -19,6 +19,9 @@ contract HypERC721 is ERC721EnumerableUpgradeable, TokenRouter { * @param _mintAmount The amount of NFTs to mint to `msg.sender`. * @param _name The name of the token. * @param _symbol The symbol of the token. + * @param _hook The post-dispatch hook contract. + @param _interchainSecurityModule The interchain security module contract. + @param _owner The this contract. */ function initialize( uint256 _mintAmount, @@ -28,14 +31,11 @@ contract HypERC721 is ERC721EnumerableUpgradeable, TokenRouter { address _interchainSecurityModule, address _owner ) external initializer { - address owner = msg.sender; - _transferOwnership(owner); - + _MailboxClient_initialize(_hook, _interchainSecurityModule, _owner); __ERC721_init(_name, _symbol); for (uint256 i = 0; i < _mintAmount; i++) { - _safeMint(owner, i); + _safeMint(msg.sender, i); } - _MailboxClient_initialize(_hook, _interchainSecurityModule, _owner); } function balanceOf( diff --git a/solidity/contracts/token/HypERC721Collateral.sol b/solidity/contracts/token/HypERC721Collateral.sol index 1319b735b7a..720eebd9746 100644 --- a/solidity/contracts/token/HypERC721Collateral.sol +++ b/solidity/contracts/token/HypERC721Collateral.sol @@ -21,6 +21,12 @@ contract HypERC721Collateral is TokenRouter { wrappedToken = IERC721(erc721); } + /** + * @notice Initializes the Hyperlane router + * @param _hook The post-dispatch hook contract. + @param _interchainSecurityModule The interchain security module contract. + @param _owner The this contract. + */ function initialize( address _hook, address _interchainSecurityModule, diff --git a/solidity/contracts/token/HypNative.sol b/solidity/contracts/token/HypNative.sol index 115df1a2dd2..b8c6d68223e 100644 --- a/solidity/contracts/token/HypNative.sol +++ b/solidity/contracts/token/HypNative.sol @@ -20,6 +20,12 @@ contract HypNative is TokenRouter { constructor(address _mailbox) TokenRouter(_mailbox) {} + /** + * @notice Initializes the Hyperlane router + * @param _hook The post-dispatch hook contract. + @param _interchainSecurityModule The interchain security module contract. + @param _owner The this contract. + */ function initialize( address _hook, address _interchainSecurityModule,