Skip to content

Commit

Permalink
Fix according to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ltyu committed Mar 27, 2024
1 parent 05790e3 commit f032ab7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solidity/contracts/token/HypERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions solidity/contracts/token/HypERC721Collateral.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions solidity/contracts/token/HypNative.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f032ab7

Please sign in to comment.