zeta-chain / localnet

ZetaChain's local dev environment with connected EVM chains.
https://www.zetachain.com/docs/developers/tutorials/localnet/
MIT License
6 stars 2 forks source link

Balance doesn't change when calling `gateway.depositAndCall` #15

Closed fadeev closed 2 months ago

fadeev commented 2 months ago

After starting localnet and calling gateway.depositAndCall with 1000 ETH, the amount isn't deducted from the balance.

Using:

https://github.com/zeta-chain/example-contracts/blob/7bfeadb321db55aa669de4d981120801d526950b/universal/hello/tasks/interact.ts

To reproduce:

Localnet:

npx hardhat localnet
npx hardhat deploy --network localhost 
🔑 Using account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

🚀 Successfully deployed contract on localhost.
📜 Contract address: 0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82
npx hardhat deploy --network localhost --name RevertContract                
🔑 Using account: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

🚀 Successfully deployed contract on localhost.
📜 Contract address: 0x9A676e781A523b5d0C0e43731313A708CB607508
npx hardhat interact --name bob  --network localhost --revert-address 0x9A676e781A523b5d0C0e43731313A708CB607508 --revert-message 0x9A676e781A523b5d0C0e43731313A708CB607508 --amount 1000 --call-on-revert --contract 0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82
Contract on ZetaChain called from EVM with 1000 ETH
cast b -e 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
9989.874207424210671932
fadeev commented 2 months ago

@skosito