Skip to content

Galactica-corp/nft-vouchers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT Vouchers

NFT smart contracts to create vouchers for tokens. The NFTs are issued on testnet as incentive for mainnet tokens.

Based on Foundry.

Usage

Install

First, install foundry. The simplest option is using foundryup.

Setup account for broadcasting by importing your private key

$ cast wallet import --interactive MY_WALLET_NAME

Build

$ forge build

Deploy NFT contracts

$ forge script script/VoucherNFT.s.sol:VoucherNFTScript --broadcast -vvvv --rpc-url reticulum --account MY_WALLET_NAME

Test

$ forge test

Transfer NFTs

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

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Cast

$ cast <subcommand>

Help

$ forge --help
$ anvil --help
$ cast --help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published