pub trait EthereumRuntimeRPCApi<Block: BlockT>: Core<Block> {
Show 27 methods // Provided methods fn chain_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<u64, ApiError> { ... } fn account_basic( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160 ) -> Result<Account, ApiError> { ... } fn gas_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<U256, ApiError> { ... } fn account_code_at( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160 ) -> Result<Vec<u8>, ApiError> { ... } fn author( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<H160, ApiError> { ... } fn storage_at( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160, index: U256 ) -> Result<H256, ApiError> { ... } fn call_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, gas_price: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError> { ... } fn call_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError> { ... } fn call_before_version_5( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError> { ... } fn call( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfoV2<Vec<u8>>, DispatchError>, ApiError> { ... } fn create_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, gas_price: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError> { ... } fn create_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError> { ... } fn create_before_version_5( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError> { ... } fn create( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfoV2<H160>, DispatchError>, ApiError> { ... } fn current_block_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV0>, ApiError> { ... } fn current_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV2>, ApiError> { ... } fn current_receipts_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV0>>, ApiError> { ... } fn current_receipts( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV3>>, ApiError> { ... } fn current_transaction_statuses( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<TransactionStatus>>, ApiError> { ... } fn current_all_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV0>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError> { ... } fn current_all_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError> { ... } fn current_all( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV3>>, Option<Vec<TransactionStatus>>), ApiError> { ... } fn extrinsic_filter_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<Vec<TransactionV0>, ApiError> { ... } fn extrinsic_filter( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<Vec<TransactionV2>, ApiError> { ... } fn elasticity( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Permill>, ApiError> { ... } fn gas_limit_multiplier_support( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(), ApiError> { ... } fn pending_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<(Option<BlockV2>, Option<Vec<TransactionStatus>>), ApiError> { ... }
}
Expand description

API necessary for Ethereum-compatibility layer.

Provided Methods§

source

fn chain_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<u64, ApiError>

Returns runtime defined pallet_evm::ChainId.

source

fn account_basic( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160 ) -> Result<Account, ApiError>

Returns pallet_evm::Accounts by address.

source

fn gas_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<U256, ApiError>

Returns FixedGasPrice::min_gas_price

source

fn account_code_at( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160 ) -> Result<Vec<u8>, ApiError>

For a given account address, returns pallet_evm::AccountCodes.

source

fn author( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<H160, ApiError>

Returns the converted FindAuthor::find_author authority id.

source

fn storage_at( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160, index: U256 ) -> Result<H256, ApiError>

For a given account address and index, returns pallet_evm::AccountStorages.

source

fn call_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, gas_price: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError>

👎Deprecated

Returns a frame_ethereum::call response. If estimate is true,

source

fn call_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError>

👎Deprecated
source

fn call_before_version_5( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfo<Vec<u8>>, DispatchError>, ApiError>

👎Deprecated
source

fn call( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, to: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfoV2<Vec<u8>>, DispatchError>, ApiError>

source

fn create_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, gas_price: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError>

👎Deprecated

Returns a frame_ethereum::create response.

source

fn create_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError>

👎Deprecated
source

fn create_before_version_5( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfo<H160>, DispatchError>, ApiError>

👎Deprecated
source

fn create( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, from: H160, data: Vec<u8>, value: U256, gas_limit: U256, max_fee_per_gas: Option<U256>, max_priority_fee_per_gas: Option<U256>, nonce: Option<U256>, estimate: bool, access_list: Option<Vec<(H160, Vec<H256>)>> ) -> Result<Result<ExecutionInfoV2<H160>, DispatchError>, ApiError>

source

fn current_block_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV0>, ApiError>

👎Deprecated

Return the current block. Legacy.

source

fn current_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV2>, ApiError>

Return the current block.

source

fn current_receipts_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV0>>, ApiError>

👎Deprecated

Return the current receipt.

source

fn current_receipts( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV3>>, ApiError>

Return the current receipt.

source

fn current_transaction_statuses( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<TransactionStatus>>, ApiError>

Return the current transaction status.

source

fn current_all_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV0>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError>

👎Deprecated

Return all the current data for a block in a single runtime call. Legacy.

source

fn current_all_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError>

👎Deprecated

Return all the current data for a block in a single runtime call.

source

fn current_all( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV3>>, Option<Vec<TransactionStatus>>), ApiError>

source

fn extrinsic_filter_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<Vec<TransactionV0>, ApiError>

👎Deprecated

Receives a Vec<OpaqueExtrinsic> and filters all the ethereum transactions. Legacy.

source

fn extrinsic_filter( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<Vec<TransactionV2>, ApiError>

Receives a Vec<OpaqueExtrinsic> and filters all the ethereum transactions.

source

fn elasticity( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Permill>, ApiError>

Return the elasticity multiplier.

source

fn gas_limit_multiplier_support( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(), ApiError>

Used to determine if gas limit multiplier for non-transactional calls (eth_call/estimateGas) is supported.

source

fn pending_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<(Option<BlockV2>, Option<Vec<TransactionStatus>>), ApiError>

Return the pending block.

Trait Implementations§

source§

impl<Block: BlockT> RuntimeApiInfo for dyn EthereumRuntimeRPCApi<Block>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 5u32

The version of the runtime api.

Implementors§