thetatoken / theta-eth-rpc-adaptor

An adaptor that translates the Theta RPC APIs to the Ethereum RPC APIs
https://docs.thetatoken.org/
24 stars 11 forks source link

eth_call for non-latest block returns wrong info #32

Open jamison-phillips opened 2 years ago

jamison-phillips commented 2 years ago

The eth_call rpc call has a parameter (the "default block parameter", which is supposed to apply to eth_call, and four other functions, as detailed at https://eth.wiki/json-rpc/API) to specify for which block the data should be supplied, but the data returned is always for the latest block, unlike other chains' EVMs. For some number of recent blocks, the eth_getBalance function works properly when specifying the block number.

Having this function supported is needed to properly synchronize the state as of a specific recent point in time.

jieyilong commented 2 years ago

Thanks for reporting the issue! eth_call for a non-lastest block is not supported yet in the current version. We'll look into this feature for future releases.