letmejustputthishere / chain-fusion-starter

starter template leveraging chain fusion technology to build EVM coprocessors on the Internet Computer Protocol
MIT License
21 stars 21 forks source link

Extend ic evm utils with already known tx status #38

Closed malteish closed 2 months ago

malteish commented 2 months ago

Motivation

Currently, the -32010 response from an rpc endpoint is interpreted as error within the ic-evm-utils library.

As discussed here, the -32010: AlreadyKnown response from an evm rpc endpoint is not a classical error. Rather, it signals that the exact transaction being pushed is in the mempool. The application should have the option to treat this status is an appropriate manner, for example:

Changes

  1. extend the status enum
  2. check for the error code and respond with the new status instead of an error in this specific case only
  3. update cargo.toml to actually use the local packages
letmejustputthishere commented 2 months ago

thanks for the changes!

i couldnt push to your remote so i create this branch instead https://github.com/letmejustputthishere/chain-fusion-starter/pull/40