-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement eth_simulateV1 #8281
Comments
Hey, I am interested to try my luck creating PR on this issue . I wanted to understand various things :
Thanks |
great! this doesn't require any offchain components, I think we can start with type bindings for the endpoint, then the trait function and then try to implement the described logic. |
So do we end up with the following somewhere? use serde_derive::Deserialize;
use serde_derive::Serialize;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Root {
pub jsonrpc: String,
pub id: i64,
pub method: String,
pub params: (Params, String),
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Params {
pub block_state_calls: Vec<BlockStateCall>,
pub trace_transfers: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BlockStateCall {
pub state_overrides: StateOverrides,
pub calls: Vec<Call>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StateOverrides {
#[serde(rename = "0xc000000000000000000000000000000000000000")]
pub n0xc000000000000000000000000000000000000000: n0xc000000000000000000000000000000000000000,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct n0xc000000000000000000000000000000000000000 {
pub balance: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Call {
pub from: String,
pub to: String,
pub value: String,
} |
Apologies for delay as I had issues running reth on limited specs laptop and thanks @rupam-04 for reaching out. This is a correct description of traits although what I also added is to develop the traits while taking also the pre implemented types (i.e |
feel free to continue your work on this, I just subscribed to this issue as it looked interesting to me. I am looking forward to how you implement the whole thing. |
hey, If you are interested in joining eth_simulatev1:s implementers call, we have a meeting every Monday. You can find the meeting in the Ethereum Protocol Calls calendar |
Thanks @KillariDev I will be there to resolve my queries. |
Describe the feature
ref ethereum/execution-apis#484
this should be similar to
eth_callMany
reth/crates/rpc/rpc/src/eth/api/call.rs
Lines 81 to 83 in 79d505a
and/or
trace_callMany
reth/crates/rpc/rpc/src/trace.rs
Lines 127 to 131 in 79d505a
Additional context
No response
The text was updated successfully, but these errors were encountered: