coinbase / mesh-ethereum

Ethereum Mesh API Implementation
Apache License 2.0
102 stars 70 forks source link

ERC-20 tokens support #110

Open chernyshev opened 2 years ago

chernyshev commented 2 years ago

Is it possible to transfer ERC-20 tokens using the construction API of the rosetta-ethereum implementation?

shrimalmadhur commented 2 years ago

@chernyshev right now the current implementation doesn't support erc20 construction. We are working on a generic evm based sdk which will support ERC20 construction out of the box for most EVM based chains. We will open source that and replace the current rosetta-ethereum implementation with that once it is ready.

dvc94ch commented 2 years ago

not just that but as far as I can tell there is no way to construct a valid transaction period.

WARN [10-03|15:00:34.137] Served eth_sendRawTransaction            conn=[::1]:40180     reqid=31 duration="665.875µs" err="insufficient funds for gas * price + value"

if you try to add a transaction fee manually (like the suggested_fee object returned from construction/metadata returns) the payloads endpoint will fail to accept the transaction as it has an "invalid intent". if you do not supply a fee then the transaction gets rejected by geth when you try to submit it.

Is there an ETA on a working ethereum implementation?

dvc94ch commented 2 years ago

take it back. looks like the issue is that there is something wrong with my ecdsa recovery implementation. the recovered public key does not match the signing public key.

EDIT: found the problem. the payload returned by the rosetta api is prehashed