Digine-Labs / rosettanet

Ethereum <> Starknet RPC middleware.
MIT License
34 stars 26 forks source link

feat: Implement `eth_getBlockByNumber` method #64

Closed ermvrs closed 6 months ago

ermvrs commented 8 months ago

Description

https://github.com/keep-starknet-strange/rosettanet/blob/main/rpc-call-examples/eth_getBlockByNumber.hurl

If there is a way to get block data from the block number in starknet. Get block data and format output. Otherwise, return mock values.

Requirements

Completion Time

The issue is assumed to be completed in 5 days. If you need more time, please also specify that.

Akashneelesh commented 8 months ago

Hey @ermvrs , I'll take this up !!

ermvrs commented 8 months ago

Assigned

Akashneelesh commented 8 months ago

Hello @ermvrs there's already a method implemented for the same functionality (eth_blockNumber). I guess this can be closed.

ktarun1419 commented 7 months ago

hi @ermvrs Is this issue still relevant?

ermvrs commented 6 months ago

@Akashneelesh as I know you're too busy, i took this issue back from you

muheebyusufbaba1 commented 6 months ago

Can you assign this to me? @ermvrs

ermvrs commented 6 months ago

assigned

muheebyusufbaba1 commented 6 months ago

@ermvrs I started working on this already and I noticed something:

and those are the two methods available on Starknet to return block data. Comparing the response from the two rpc endpoints above, none of them seems to have enough data to return the expected object: image

Please how do you think I go about this? Or maybe there are other starknet RPC methods I am not aware of?

ermvrs commented 6 months ago

Please fill outputs with the values that exist on the starknet response and also if you can derive or calculate the value that fits into the response. Otherwise, if there is no chance to provide, then simply return a mock value that won't get the problem on ETH integration. Return default Ethereum values