NFT smart contracts to create vouchers for tokens. The NFTs are issued on testnet as incentive for mainnet tokens.
Based on Foundry.
First, install foundry. The simplest option is using foundryup.
$ cast wallet import --interactive MY_WALLET_NAME
$ forge build
$ forge script script/VoucherNFT.s.sol:VoucherNFTScript --broadcast -vvvv --rpc-url reticulum --account MY_WALLET_NAME
$ forge test
This script transfers NFTs from a sender to multiple recipients.
First, setup the input data in script/inputData/transfer.json
including
- the NFT address
- sender
- list of recipients
Then, dry-run the script to check the simulated logs and on-chain traces:
$ forge script script/Transfer.s.sol -vvvv --rpc-url reticulum --account MY_WALLET_NAME
Check the output. If everything looks good, run it again with the --broadcast
and --slow
flags to submit the transactions on chain and wait for the server to update the nonce after each transaction:
$ forge script script/Transfer.s.sol -vvvv --rpc-url reticulum --account MY_WALLET_NAME --broadcast --slow
$ forge fmt
$ forge snapshot
$ anvil
$ cast <subcommand>
$ forge --help
$ anvil --help
$ cast --help