Skip to content

Commit f8244d8

Browse files
Use _safeMint as suggested by the OZ _mint warning
This means the `onERC721Received` hook will be called.
1 parent f048cbd commit f8244d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/protocol/BridgedERC721.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ contract BridgedERC721 is ERC721, BridgedTokenBase, IMintableERC721 {
1919

2020
/// @inheritdoc IMintableERC721
2121
function mint(address to, uint256 tokenId) external onlyOwner {
22-
_mint(to, tokenId);
22+
_safeMint(to, tokenId);
2323
}
2424

2525
/// @dev Mints a token with custom URI
2626
/// @param to Address to mint the token to
2727
/// @param tokenId Token ID to mint
2828
/// @param tokenURI_ Custom URI for this token
2929
function mintWithURI(address to, uint256 tokenId, string memory tokenURI_) external onlyOwner {
30-
_mint(to, tokenId);
30+
_safeMint(to, tokenId);
3131
_setTokenURI(tokenId, tokenURI_);
3232
}
3333

0 commit comments

Comments
 (0)