The goal of this contract is managing an NFT mint where the mint is paid in native currency but the cost of one NFT is always 100$. This example is intended to be run on Aptos testnet because it depends on Pyth and Wormhole existing onchain.
- Use
aptos initwith rest_url :https://testnet.aptoslabs.com/and faucethttps://faucet.testnet.aptoslabs.comto generate a new keypair. - Use a faucet to airdrop testnet APT to your newly created account by calling
aptos account fund-with-faucet --account default. If this doesn't work, I have had success importing my private key from.aptos/config.yamlinto Petra and clicking the airdrop button. Otherwise send APT from another account. - Get your account address from
.aptos/config.yamland replacemint_nft="_"bymint_nft="<ADDRESS>"inMove.toml aptos move compileaptos move publish
- In
app/src/App.tsxreplaceconst MINT_NFT_MODULE = "_"byconst MINT_NFT_MODULE = "<ADDRESS>"the address of your module from above. npm installnpm run start- Go to
http://localhost:3000/in your browser and use Petra wallet to transact with the app.