hoodrunio / explorer-backend

Backend app for Cosmos ecosystem explorer.
https://backend.testnet.run/
5 stars 1 forks source link

Evmos: EVM tx support #3

Open Errorist79 opened 1 year ago

berzanorg commented 1 year ago

We will use JSON RPC providers for this use case. When info about an EVM tx is requested, we will make a eth_getTransactionByHash request and get block height from the response. Block height will be used to get a list of transactions at that block. And we will try to find a Cosmos tx that matches. When we find one, everything will be done similar to how we do for Cosmos txs. Ex: curl https://eth.bd.evmos.org:8545/ -X POST -H "Content-Type:application/json" --data '{"method":"eth_getTransactionByHash","params":["0x1de597d422add3efcec6a774cd06cd6b6a3f058da2890e637055699cbfb455de"],"id":1,"jsonrpc":"2.0"}'