You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this project, we are aiming to develop an intermediate client that parses inputs and forwards calls to Starknet RPCs and also formats returning data to fit Ethereum RPC outputs. We can develop this project in two stages. In the first one, we can call MVP, it works with excluded write calls (sendTransaction, sendRawTransaction). In the second part, we can add this feature, this separation because additional security is needed for that part as well, also stability can be done in this part.
With this project done, we achieve native Ethereum libraries, protocols will be able to integrate into starknet without any changes on their side.
The table below shows how we implement data transformation i/o between Ethereum RPC and Starknet RPC. Table derived from starkness-specs.
Ethereum Method
How to Implement
eth_blockNumber
Returns starknet block number. Formatted exact same Ethereum output.
eth_chainId
Returns chain id as same as Ethereum. SN_MAIN value.
eth_getBlockByNumber
Formats starknet_getBlockByNumber into Ethereums output. Blank or null non-existent properties.
eth_getBlockTransactionCountByHash
Formats starknet-related output into Ethereum.
eth_getBlockTransactionCountByNumber
Formats starknet-related output into Ethereum.
eth_getTransactionByBlockHashAndIndex
Formats starknet-related output into Ethereum.
eth_getTransactionByBlockNumberAndIndex
Formats starknet-related output into Ethereum.
eth_pendingTransactions
Formats starknet-related output into Ethereum.
eth_getBlockByHash
Formats starknet-related output into Ethereum.
eth_protocolVersion
Formats starknet-related output into Ethereum.
eth_syncing
Formats starknet-related output into Ethereum.
eth_getStorageAt
The returned object will be exactly the same. Pad felts to provide 256-bit output.
eth_getTransactionByHash
Formats starknet-related output into Ethereum.
eth_getTransactionReceipt
Formats starknet-related output into Ethereum.
eth_getCode
Class hash can be returned. Will return exact same output as Ethereum with nulled, non-existent properties and padded felts.
eth_sendTransaction
Just input formatting and forward to starknet rpc. [NOT SURE]
eth_sendRawTransaction
Just input formatting and forward to starknet rpc. [NOT SURE]
Most of the rpc calls can be implemented with minimal formatting on both the input and output sides. Personally, call and send transactions are the most challenging ones. However, Starknet allows us to get abi from rpc call, so we know how to format contract calls without abi, it allows us to re-design input according to target contracts input from Ethereum input.
For development tech, we can use NodeJS or Rust. I don't think stability will be a huge problem here however, this project is just an intermediate client. There won't be block processes, so NodeJS can be enough and easy to maintain. Rust will be more robust.
I don't have an opinion on tech side, but if we go with NodeJS project will be completed faster compared that Rust
The text was updated successfully, but these errors were encountered:
In this project, we are aiming to develop an intermediate client that parses inputs and forwards calls to Starknet RPCs and also formats returning data to fit Ethereum RPC outputs. We can develop this project in two stages. In the first one, we can call MVP, it works with excluded write calls (sendTransaction, sendRawTransaction). In the second part, we can add this feature, this separation because additional security is needed for that part as well, also stability can be done in this part.
With this project done, we achieve native Ethereum libraries, protocols will be able to integrate into starknet without any changes on their side.
The table below shows how we implement data transformation i/o between Ethereum RPC and Starknet RPC. Table derived from starkness-specs.
Most of the rpc calls can be implemented with minimal formatting on both the input and output sides. Personally, call and send transactions are the most challenging ones. However, Starknet allows us to get abi from rpc call, so we know how to format contract calls without abi, it allows us to re-design input according to target contracts input from Ethereum input.
For development tech, we can use NodeJS or Rust. I don't think stability will be a huge problem here however, this project is just an intermediate client. There won't be block processes, so NodeJS can be enough and easy to maintain. Rust will be more robust.
I don't have an opinion on tech side, but if we go with NodeJS project will be completed faster compared that Rust
The text was updated successfully, but these errors were encountered: