This git repository serves the purpose of providing example and facilitating continuous integration (CI) for:
Further reading https://dev.kit.eco/ethereum-autogenerated-typescript-classes-to-read-and-write-contracts-private-state-variables
$ npm i 0xweb -g
$ 0xweb init --hardhat
$ 0xweb i 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --name USDC --chain eth
Public Ankr RPC node is used.
3. What actions were added in usdc.act.ts
create-accounts
: Generatefoo
andbar
accounts (address+private key)set-balance
: Modify the EVM storage inUSDC
contract to set the balance for the addressfoo
to have50_000$
transfer-balance
: Execute normal transaction to transfer the balance fromfoo
tobar
4. How we test the actions in usdc.spec.ts
create-accounts
: Execute action and check the outputset-balance
: Execute action and use0xweb
cli to check thefoo
balancetransfer-balance
: Execute action and use0xweb
cli to ensurefoo
balance is empty, but thebar
address has funds
5. What actions were added in dump.act.ts
deploy original and configure
: Deploy first contract and manually set new valuesdump original contract
: Dump first contract's storageshould redeploy contract
: Deploy second contract, which storage remains initialshould restore from dump
: Restores the contracts storage from dump
6. How we test the actions in dump.spec.ts
- Check values of the original contracts
- Dumps original contract and checks the JSON data
- Restore the dump to a new contract and verify the data on-chain