Trait fp_rpc::EthereumRuntimeRPCApi
source · 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§
sourcefn chain_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<u64, ApiError>
fn chain_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<u64, ApiError>
Returns runtime defined pallet_evm::ChainId.
sourcefn account_basic(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
address: H160
) -> Result<Account, ApiError>
fn account_basic( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, address: H160 ) -> Result<Account, ApiError>
Returns pallet_evm::Accounts by address.
sourcefn gas_price(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<U256, ApiError>
fn gas_price( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<U256, ApiError>
Returns FixedGasPrice::min_gas_price
sourcefn account_code_at(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
address: H160
) -> Result<Vec<u8>, ApiError>
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.
Returns the converted FindAuthor::find_author authority id.
sourcefn storage_at(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
address: H160,
index: U256
) -> Result<H256, ApiError>
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.
sourcefn 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_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>
Returns a frame_ethereum::call response. If estimate
is true,
sourcefn 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_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>
sourcefn 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_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>
sourcefn 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_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>
Returns a frame_ethereum::create response.
sourcefn 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_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>
sourcefn 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_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>
sourcefn current_block_before_version_2(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<BlockV0>, ApiError>
fn current_block_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV0>, ApiError>
Return the current block. Legacy.
sourcefn current_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<BlockV2>, ApiError>
fn current_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<BlockV2>, ApiError>
Return the current block.
sourcefn current_receipts_before_version_4(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<Vec<ReceiptV0>>, ApiError>
fn current_receipts_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV0>>, ApiError>
Return the current receipt.
sourcefn current_receipts(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<Vec<ReceiptV3>>, ApiError>
fn current_receipts( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<ReceiptV3>>, ApiError>
Return the current receipt.
sourcefn current_transaction_statuses(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<Vec<TransactionStatus>>, ApiError>
fn current_transaction_statuses( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Vec<TransactionStatus>>, ApiError>
Return the current transaction status.
sourcefn 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_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV0>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError>
Return all the current data for a block in a single runtime call. Legacy.
sourcefn 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_before_version_4( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV0>>, Option<Vec<TransactionStatus>>), ApiError>
Return all the current data for a block in a single runtime call.
fn current_all( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<(Option<BlockV2>, Option<Vec<ReceiptV3>>, Option<Vec<TransactionStatus>>), ApiError>
sourcefn 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_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, xts: Vec<<Block as BlockT>::Extrinsic> ) -> Result<Vec<TransactionV0>, ApiError>
Receives a Vec<OpaqueExtrinsic>
and filters all the ethereum transactions. Legacy.
sourcefn extrinsic_filter(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
xts: Vec<<Block as BlockT>::Extrinsic>
) -> Result<Vec<TransactionV2>, ApiError>
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.
sourcefn elasticity(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<Option<Permill>, ApiError>
fn elasticity( &self, __runtime_api_at_param__: <Block as BlockT>::Hash ) -> Result<Option<Permill>, ApiError>
Return the elasticity multiplier.
sourcefn gas_limit_multiplier_support(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash
) -> Result<(), ApiError>
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.
sourcefn pending_block(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
xts: Vec<<Block as BlockT>::Extrinsic>
) -> Result<(Option<BlockV2>, Option<Vec<TransactionStatus>>), 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>
Return the pending block.