Skip to content

Instantly share code, notes, and snippets.

@d-smith
Last active November 7, 2023 15:48
Show Gist options
  • Save d-smith/5f250311c460ae9757178bfaa0c50919 to your computer and use it in GitHub Desktop.
Save d-smith/5f250311c460ae9757178bfaa0c50919 to your computer and use it in GitHub Desktop.
Some misc for working with cobra cli, sqlite3, foundry, etc

Create the db in the cmd directory sqlite3 attestor.db < att.sql

To do some FiddyCent token operations, run scripts\deploy-details.sh to get the contract address and an export command. Run the export command, then play with the contract.

cast call $FIDDY_CENT "totalSupply()(uint256)"  --rpc-url  http://127.0.0.1:8545

cast send $FIDDY_CENT "transfer(address,uint256)" --private-key $DEPLOYER_KEY $ACCT1 50

cast call $FIDDY_CENT "balanceOf(address)" $ACCT1

cast call $MB_FIDDY_CENT "totalSupply()(uint256)" --rpc-url  http://127.0.0.1:9933

cast call $MB_FIDDY_CENT "balanceOf(address)" $MB_ACCT1 --rpc-url  http://127.0.0.1:9933

cast send $MB_FIDDY_CENT "transfer(address,uint256)" --private-key $MB_DEPLOYER_KEY $MB_ACCT1 50 --rpc-url  http://127.0.0.1:9933

Bootstrapping the project: forge init cctp-lite-2

OpenZeppelin dependencies: forge install OpenZeppelin/openzeppelin-contracts

Updating foundry tool - foundryup

Adding cli commands: cobra-cli add command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment