Closed jolestar closed 10 months ago
I define some ETH API in #174. We need to determine if we want to support Metamask and which APIs are required first. @yubing744
@jolestar I found the API used by the basic functions by debugging the MetaMask wallet:
Use Case | APIs Used |
---|---|
Query balance | eth_getBalance |
Query current Gas price | eth_gasPrice |
Send transaction | eth_sendRawTransaction , eth_estimateGas |
Check transaction status | eth_getTransactionByHash , eth_getTransactionReceipt |
Query smart contract state | eth_call |
Please help to mock these APIs and let MetaMask try to connect Rooch @yubing744
@jolestar I have mocked some APIs required by MetaMask, now we can configure the rooch server RPC address to MetaMask and initiate transactions.
Great, So the next task is to support the ETH signature and define a CallData standard, how to call a Move Function in ETH transaction's CallData?
Great, So the next task is to support the ETH signature and define a CallData standard, how to call a Move Function in ETH transaction's CallData?
OK, I'll look into it.
Great, So the next task is to support the ETH signature and define a CallData standard, how to call a Move Function in ETH transaction's CallData?
OK, I'll look into it.
You can split this feature into issues, and help record.
Great, So the next task is to support the ETH signature and define a CallData standard, how to call a Move Function in ETH transaction's CallData?
OK, I'll look into it.
You can split this feature into issues, and help record.
This task can be split into three subtasks:
The ETH signature and the MoveCallData encoding has been passed, and I will do the ETH address and Rooch address mapping below.
My idea is to automatically complete the creation and binding of the Rooch account on the first transaction.
Motivation
To enable ETH ecosystem users to use Rooch conveniently, we need to implement an ETH-compatible RPC proxy on top of an existing RPC service used by Rooch. This will enable ETH clients to interact with Rooch and use the features of a compatible Ethereum wallet.
The ETH-compatible RPC proxy
A proxy service would be developed to provide an interface between the Rooch RPC and the Ethereum client. The proxy would have to support the necessary methods used in ETH protocol such as account balance retrieval, transfers, smart contract calls, and ensure ETH client requests are received.
Transform the input and output formats.
As input and output formats used by the existing RPC may differ from those used in the ETH protocol, we need to develop a mechanism to transform input and output formats making them compatible with ETH protocol.
Ref: