Skip to content

[MOON-2092] Implement call state override for eth_call#163

Closed
nbaztec wants to merge 11 commits intomoonbeam-polkadot-v0.9.37from
nish-eth-call-state-override
Closed

[MOON-2092] Implement call state override for eth_call#163
nbaztec wants to merge 11 commits intomoonbeam-polkadot-v0.9.37from
nish-eth-call-state-override

Conversation

@nbaztec
Copy link
Copy Markdown

@nbaztec nbaztec commented Mar 7, 2023

Implements call state override for eth_call.

Comment thread client/rpc-core/src/types/call_request.rs Outdated
@nbaztec nbaztec marked this pull request as ready for review March 13, 2023 14:04
Comment thread client/rpc/src/lib.rs
B: BlockT,
C: StorageProvider<B, sc_service::TFullBackend<B>>,
{
type AddressMapping = M;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The presence of different address schemes introduces another generic parameter M to most of the service build code. We have the option to mark it as concrete in the EthDeps config struct to avoid that.

@nbaztec nbaztec changed the title [MOON-2092] Implement call state override for eth_call (WIP) [MOON-2092] Implement call state override for eth_call Mar 13, 2023
Comment thread client/rpc/src/lib.rs
/// Implements a default runtime storage override.
/// It assumes that the balances and nonces are stored in pallet `system.account`, and
/// have `nonce: Index` = `u32` for and `free: Balance` = `u128`.
pub struct DefaultEthereumRuntimeStorageOverride<M>(pub std::marker::PhantomData<M>);
Copy link
Copy Markdown
Author

@nbaztec nbaztec Mar 13, 2023

Choose a reason for hiding this comment

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

This default may or may not be super useful as we ourselves are using AccountId20 while frontier is targeting AccountId32. The basic pallet system override might be trivial to copy paste from the template instead.

Copy link
Copy Markdown

@librelois librelois left a comment

Choose a reason for hiding this comment

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

Great work, looks good to me, we just need to mimic the geth rpc api

Comment thread template/node/src/rpc/eth.rs Outdated
@librelois librelois closed this Mar 16, 2026
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.

2 participants