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 ethPublic Ankr RPC node is used.
3. What actions were added in usdc.act.ts
create-accounts: Generatefooandbaraccounts (address+private key)set-balance: Modify the EVM storage inUSDCcontract to set the balance for the addressfooto have50_000$transfer-balance: Execute normal transaction to transfer the balance fromfootobar
4. How we test the actions in usdc.spec.ts
create-accounts: Execute action and check the outputset-balance: Execute action and use0xwebcli to check thefoobalancetransfer-balance: Execute action and use0xwebcli to ensurefoobalance is empty, but thebaraddress 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