# download js dependencies
yarn
# build the program
anchor build
# copy the localnet program key & build it again
cp localnet-keys/LCCDPD5uq2QZMeHjd71unWu6nr8no9wwjcH3qMQwXXj.json target/deploy/carbon-keypair.json
anchor build
# start the test-validator on localnet
yarn localnet:start
# airdrop SOLs to the admin & user account
yarn localnet:airdrop
# run tests
yarn localnet:test
# run tests with skipping re-deployment of program
yarn localnet:testq
Deployment Checklist
Modify ADMIN_PUBKEY_STR, CARBON_CREDIT_NFT_URI, and EXPIRED_NFT_URI in programs/carbon/src/constants.rs file
Check the parameters of create_metadata_accounts function in programs/carbon/src/instructions/carbon_credit.rs file
Check the values of DataV2 in programs/carbon/src/instructions/expire_carbon_credit.rs file
Re-build the contract & deploy it
Run the init-config command with correct values
Versions
Anchor Version: 0.25.0, Solana Version: 1.13.2, Node version 16.14.2