axonweb3 / axon

Axon is a Layer 2 framework of CKB with native cross-chain and interoperability.
https://axonweb3.io
MIT License
65 stars 39 forks source link

Duplicated calculation in `eth_estimateGas`. #1584

Closed yangby-cryptape closed 10 months ago

yangby-cryptape commented 11 months ago

Description

When call eth_estimateGas to estimate gas used, the gas calculation for create-tx, call-tx and tx.data are incorrect and duplicated.

https://github.com/axonweb3/axon/blob/f692b865bda85cbd0c8f028f8aca8ae0d793465b/core/executor/src/lib.rs#L81-L85

https://github.com/axonweb3/axon/blob/f692b865bda85cbd0c8f028f8aca8ae0d793465b/core/executor/src/lib.rs#L100


For Example


Appendix: More Unit Tests are Required