oasisprotocol / oasis-web3-gateway

Web3 Gateway for the Oasis SDK EVM ParaTime module.
GNU General Public License v3.0
27 stars 16 forks source link

sapphire-localnet: -amount broken #585

Open matevz opened 1 week ago

matevz commented 1 week ago
SUMMARY

Reported by @csillag:

oa@matevz-oa:~/playground$ docker run -it -p8545:8545 -p8546:8546 -e OASIS_NODE_LOG_LEVEL=debug -e LOG__LEVEL=debug ghcr.io/oasisprotocol/sapphire-localnet -amount 10 -test-mnemonic
sapphire-localnet 2024-06-17-gitb807232 (oasis-core: 24.0-gitfb49717, sapphire-paratime: 0.7.3-testnet, oasis-web3-gateway: 5.1.0-gitb807232)

 * Starting oasis-net-runner with sapphire...
 * Waiting for Postgres to start.....
 * Waiting for Oasis node to start...
 * Starting oasis-web3-gateway...
 * Bootstrapping network (this might take a minute).
 * Waiting for nodes to be ready....
 * Setting epoch to 1...
 * Waiting for key manager to generate ephemeral secret....
 * Setting epoch to 2...
 * Waiting for key manager......
 * Populating accounts...

panic: can't deposit: client: transaction check failed: runtime error: module: consensus code: 5 message: consensus: amount not representable

goroutine 1 [running]:
main.main()
        /go/oasis-web3-gateway/docker/common/oasis-deposit/main.go:273 +0x1005

I think we need to bump the oasis-sdk Go bindings in the deposit helper.

kostko commented 1 week ago

Is the amount passed as an argument in base units and 10 is less than 1 consensus layer base unit so you cannot deposit such a small amount? Try increasing the amount ;)