This repo is meant to serve as an example of how to:
- Use Foundry to test your smart contracts at lightning speed
- GitHub action to run your test cases in a private network
- Use Hardhat to deploy your smart contracts and interact with it
Make sure you have installed:
git clone [email protected]:glifio/wfil.git
cd wfil
npm i
forge test
- Import a private key into your
hardhat.config.ts
file - Run
npx hardhat get-addrs
to get your addresses. NOTE - if you see anactor not found
error, this means that you need to visit the Wallaby faucet and bless yourself with some funds. - Deploy your contracts to wallaby via:
npm run deploy
(note, if you see an error about "please check your node synced status", it's likely the network has reset since you last deployed. Please delete thedeployments
directory and try again.) - Try out some tasks!:
npx hardhat name --contract <0x-contract-address>
npx hardhat deposit --contract <0x-contract-address> --amount <amount-in-eth>
npx hardhat transfer --contract <0x-contract-address> --amount <amount-in-eth> --to <actor-id-hex>
npx hardhat balanceOf --contract <0x-contract-address> --actor <actor-id-hex>
npx hardhat totalSupply --contract <0x-contract-address>
npx hardhat decodeParams --params <base64-params> --return <base64-return>