Skip to content

Commit

Permalink
create nft minter inside destination receive
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginowine committed Dec 6, 2023
1 parent e7e9cad commit 532376d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
15 changes: 15 additions & 0 deletions contracts/CrossNftDestinationMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/O
import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";

contract MyNFT is ERC721URIStorage, OwnerIsCreator {
// string constant TOKEN_URI =
// "https://ipfs.io/ipfs/QmYuKY45Aq87LeL1R5dhb1hqHLp6ZFbJaCP8jxqKM1MX6y/babe_ruth_1.json";
uint256 internal tokenId;

constructor() ERC721("MyNFT", "MNFT"){}

function mint(address to, string memory TOKEN_URI) public onlyOwner {
_safeMint(to, tokenId);
_setTokenURI(tokenId, TOKEN_URI);
unchecked {
tokenId++;
}
}
}
contract CrossNftDestinationMinter is CCIPReceiver, OwnerIsCreator{
MyNFT public nft;
uint256 price;
Expand Down
21 changes: 0 additions & 21 deletions contracts/MyNFT.sol

This file was deleted.

0 comments on commit 532376d

Please sign in to comment.