Skip to content
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

feat(rpc): add eth_multicallV1 #5596

Closed

Conversation

DoTheBestToGetTheBest
Copy link
Contributor

ref : #5586

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks pretty good already.

we also want this in the EthApi traits in the rpc-api crate

@DoTheBestToGetTheBest
Copy link
Contributor Author

this looks pretty good already.

we also want this in the EthApi traits in the rpc-api crate

ty lot

@DoTheBestToGetTheBest
Copy link
Contributor Author

@mattsse does this look better?

multicall_bundle: Bundle,
state_context: Option<StateContext>,
mut state_override: Option<StateOverride>,
) -> EthResult<Vec<EthCallResponse>> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just the same as call_many?

so atm we don't need this function and can reuse call_many instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just the same as call_many?

so atm we don't need this function and can reuse call_many instead

hey ty for your review, you means i should directly call the function call_many inside this function ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, at least for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, at least for now

ty so much, very greatful from your part all these review. should be fine now

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR does not implement eth_multicallV1 according to the spec, please, re-read the spec or let smb else pick up the issue

Comment on lines +43 to +45
/// Executes complex RPC calls to Ethereum nodes

pub async fn eth_multicall_v1(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Executes complex RPC calls to Ethereum nodes
pub async fn eth_multicall_v1(
/// Executes complex RPC calls to Ethereum nodes.
/// Ref: <https://github.com/ethereum/execution-apis/pull/484>
pub async fn eth_multicall_v1(

@@ -18,6 +18,15 @@ pub trait EthApi {
#[method(name = "protocolVersion")]
async fn protocol_version(&self) -> RpcResult<U64>;

/// Executes complex RPC calls to Ethereum nodes
#[method(name = "ethMulticallV1")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsonrpc method names are case sensitive and eth prefix is already specified on the trait

Suggested change
#[method(name = "ethMulticallV1")]
#[method(name = "multicallV1")]

@@ -51,6 +51,17 @@ where
EthApiSpec::protocol_version(self).await.to_rpc_result()
}

/// Handler for ! `eth_MultiCallV1`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Handler for ! `eth_MultiCallV1`
/// Handler for ! `eth_multicallV1`

@onbjerg onbjerg changed the title feat(rpc) protoype a new rpc api endpoint feat(rpc): add eth_multicallv1 Dec 18, 2023
@onbjerg onbjerg changed the title feat(rpc): add eth_multicallv1 feat(rpc): add eth_multicallV1 Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants