classic-frontend icon indicating copy to clipboard operation
classic-frontend copied to clipboard

Hardcoded gas limit of 250000 makes transactions fail for more complex tokens such as Digix Gold Tokens

Open pascalvanhecke opened this issue 8 years ago • 0 comments

in

https://github.com/forkdelta/forkdelta.github.io/blob/4760275d2853dab199bd6b8da1cb87270852a63b/config/main.json

and

https://github.com/forkdelta/forkdelta.github.io/blob/71c508dbb6d21bf459bd051d34e39f5554645bac/config/testnet.json

the gas limits at line 18-22 are hardcoded at 250000

"gasApprove": 250000, "gasDeposit": 250000, "gasWithdraw": 250000, "gasTrade": 250000, "gasOrder": 250000,

For complex tokens like Digix Gold Tokens, this makes the transactions fail.

Example:

https://etherscan.io/tx/0x382b59f6bc625ef6d42e5913b034e17d7050eb826663050c0c2f70dbb07cc83e fails

But with a higher gas limit of 297745 the same transaction (slightly different second parameter, but that did not matter), the same transaction succeeds:

https://etherscan.io/tx/0xd2b1598590a5c25e9d6ae0767f9cd6ae885681b19ee028d4fe32d8329786a46a

Easy solution (not advisable): raise gaslimit for all tokens to 300 000. More complex solution: make gaslimit configurable per token, in other words, in https://github.com/forkdelta/forkdelta.github.io/blob/4760275d2853dab199bd6b8da1cb87270852a63b/config/main.json extra gas limit parameters per token should override the default gas limit.

pascalvanhecke avatar Apr 18 '18 23:04 pascalvanhecke