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
Currently there is a lot of duplicated code in the rpc v6, v7 and v8 sub packages. We should remove duplicated code (types, functions, tests) where possible. For example, the blockHashAndNumber function (and associated type BlockHashAndNumber) has not changed between v6, v7 and v8. This means that we can remove this function (and type) from v7 and v8, and have the top level handler use the code in v6 instead (specifically update the MethodsV0_8 and MethodsV0_7 functions). See this PR as an example. We should do this for all RPC methods. I would suggest doing the following:
Create a PR for each RPC method (this will make it easier to track changes, work on, and review)
If the RPC method has not changed between (eg) v6, v7 and v8, then we can just re-use the v6 code in v7 and v8. This means the corresponding code (function, types, tests) should be deleted in v7 and v8.
If the RPC function has changed, then we should not remove the function. However, if the associated type has not changed, then we should probably delete it.
To keep track of all the changes being made, and still to be made, to the RPC pkg, please add a new bullet point here and link the associated PR.
Currently there is a lot of duplicated code in the rpc
v6
,v7
andv8
sub packages. We should remove duplicated code (types, functions, tests) where possible. For example, theblockHashAndNumber
function (and associated typeBlockHashAndNumber
) has not changed betweenv6
,v7
andv8
. This means that we can remove this function (and type) fromv7
andv8
, and have the top level handler use the code inv6
instead (specifically update theMethodsV0_8
andMethodsV0_7
functions). See this PR as an example. We should do this for all RPC methods. I would suggest doing the following:v6
,v7
andv8
, then we can just re-use thev6
code inv7
andv8
. This means the corresponding code (function, types, tests) should be deleted inv7
andv8
.Remaining endpoints to check
starknet_getBlockWithReceiptsstarknet_getCompiledCasmstarknet_specVersionstarknet_subscribeEventsstarknet_subscribeTransactionStatusstarknet_getBlockWithTxsstarknet_getTransactionByHashstarknet_getTransactionReceiptstarknet_getBlockTransactionCountstarknet_getTransactionByBlockIdAndIndexstarknet_getStateUpdatestarknet_addInvokeTransactionstarknet_addDeployAccountTransactionstarknet_addDeclareTransactionstarknet_getTransactionStatusstarknet_callstarknet_estimateFeestarknet_estimateMessageFeestarknet_traceTransaction--> decided not to go for refactoring after all. Not exactly straightfoward.starknet_simulateTransactionsstarknet_traceBlockTransactionsjuno_subscribeNewHeads / starknet_subscribeNewHeadsjuno_unsubscribe / starknet_unsubscribeThe text was updated successfully, but these errors were encountered: