-
Notifications
You must be signed in to change notification settings - Fork 552
Problem: etherjs smartcontract cannot change state #257
Comments
I think it's due to incorrect gas estimation on Tharsis Which is just slightly larger than 21000 and is unlikely enough |
thanks, i'll check |
what's the result of transaction, not included in block? any error message? |
tx included to the block,
|
working after giving gas options
|
So I think the estimateGas part needs improvement? |
yes,i'm checking estimate gas source |
the gasLimit is not a number you can just randomly set.. so the providers (truffle/etherjs) should read it from ABI. In ABI there should be a valued defined by the compiler. if there's no findings from ABI, then it should read from remote (via then the value is set before sending the tx |
You can set the gasLimit to a very high number (100000..000). This will avoid "out of gas" error in most cases However validator nodes may reject to enclose this tx into any block |
I think the |
@yijiasu-crypto I afraid I DID try @leejw51crypto 's contract using both metamask+remix and ethers.js, both are getting incorrect gas estimation (metamask relies on |
i checked with ganache, ethermint
i'm wondering why , with default setting, etherjs cannot succeed |
i'm inspecting this
|
interesting
it works if Gas is given by rpc argument, always works.(if amount is correct), |
wow, the value is very correct!
put log to check value :-)
|
Solution: increase base gas to make similar with ethereum
submitted pr |
fixed by |
cannot change the state of the smart contract
src:
https://github.com/leejw51crypto/ethermint.git
branch: etherjs
folder: mytest/mytest
how to reproduce
env variable for testing
MYMNEMONICS <- your mnemonics
when run with ganache
when run with ethermint
The text was updated successfully, but these errors were encountered: