added EthRTApiV5 ifaces (#5680)
This commit is contained in:
@@ -32,7 +32,7 @@ import type { BlockStats } from '@polkadot/types/interfaces/dev';
|
||||
import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
|
||||
import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
|
||||
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFeeHistory, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthReceiptV0, EthReceiptV3, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
|
||||
import type { EvmAccount, EvmCallInfo, EvmCreateInfo, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
|
||||
import type { EvmAccount, EvmCallInfo, EvmCallInfoV2, EvmCreateInfo, EvmCreateInfoV2, EvmLog, EvmVicinity, EvmWeightInfo, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
|
||||
import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles';
|
||||
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
|
||||
@@ -441,9 +441,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
EventRecord: EventRecord;
|
||||
EvmAccount: EvmAccount;
|
||||
EvmCallInfo: EvmCallInfo;
|
||||
EvmCallInfoV2: EvmCallInfoV2;
|
||||
EvmCreateInfo: EvmCreateInfo;
|
||||
EvmCreateInfoV2: EvmCreateInfoV2;
|
||||
EvmLog: EvmLog;
|
||||
EvmVicinity: EvmVicinity;
|
||||
EvmWeightInfo: EvmWeightInfo;
|
||||
ExecReturnValue: ExecReturnValue;
|
||||
ExecutorParam: ExecutorParam;
|
||||
ExecutorParams: ExecutorParams;
|
||||
|
||||
@@ -1,7 +1,273 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types/index.js';
|
||||
import type { DefinitionsCall, DefinitionsCallEntry } from '../../types/index.js';
|
||||
|
||||
const ethMethodsV4: DefinitionsCallEntry['methods'] = {
|
||||
account_basic: {
|
||||
description: 'Returns pallet_evm::Accounts by address.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
}
|
||||
],
|
||||
type: 'EvmAccount'
|
||||
},
|
||||
account_code_at: {
|
||||
description: 'For a given account address, returns pallet_evm::AccountCodes.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
author: {
|
||||
description: 'Returns the converted FindAuthor::find_author authority id.',
|
||||
params: [],
|
||||
type: 'H160'
|
||||
},
|
||||
call: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'to',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCallInfo, DispatchError>'
|
||||
},
|
||||
chain_id: {
|
||||
description: 'Returns runtime defined pallet_evm::ChainId.',
|
||||
params: [],
|
||||
type: 'u64'
|
||||
},
|
||||
create: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCreateInfo, DispatchError>'
|
||||
},
|
||||
current_all: {
|
||||
description: 'Return all the current data for a block in a single runtime call.',
|
||||
params: [],
|
||||
type: '(Option<BlockV2>, Option<Vec<EthReceiptV3>>, Option<Vec<EthTransactionStatus>>)'
|
||||
},
|
||||
current_block: {
|
||||
description: 'Return the current block.',
|
||||
params: [],
|
||||
type: 'BlockV2'
|
||||
},
|
||||
current_receipts: {
|
||||
description: 'Return the current receipt.',
|
||||
params: [],
|
||||
type: 'Option<Vec<EthReceiptV3>>'
|
||||
},
|
||||
current_transaction_statuses: {
|
||||
description: 'Return the current transaction status.',
|
||||
params: [],
|
||||
type: 'Option<Vec<EthTransactionStatus>>'
|
||||
},
|
||||
elasticity: {
|
||||
description: 'Return the elasticity multiplier.',
|
||||
params: [],
|
||||
type: 'Option<Permill>'
|
||||
},
|
||||
extrinsic_filter: {
|
||||
description: 'Receives a `Vec<OpaqueExtrinsic>` and filters all the ethereum transactions.',
|
||||
params: [
|
||||
{
|
||||
name: 'xts',
|
||||
type: 'Vec<Extrinsic>'
|
||||
}
|
||||
],
|
||||
type: 'Vec<TransactionV2>'
|
||||
},
|
||||
gas_price: {
|
||||
description: 'Returns FixedGasPrice::min_gas_price',
|
||||
params: [],
|
||||
type: 'u256'
|
||||
},
|
||||
storage_at: {
|
||||
description: 'For a given account address and index, returns pallet_evm::AccountStorages.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'index',
|
||||
type: 'u256'
|
||||
}
|
||||
],
|
||||
type: 'H256'
|
||||
}
|
||||
};
|
||||
|
||||
const ethMethodsV5: DefinitionsCallEntry['methods'] = {
|
||||
call: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'to',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCallInfoV2, DispatchError>'
|
||||
},
|
||||
create: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCreateInfoV2, DispatchError>'
|
||||
}
|
||||
};
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
ConvertTransactionRuntimeApi: [
|
||||
@@ -59,180 +325,16 @@ export const runtime: DefinitionsCall = {
|
||||
EthereumRuntimeRPCApi: [
|
||||
{
|
||||
methods: {
|
||||
account_basic: {
|
||||
description: 'Returns pallet_evm::Accounts by address.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
}
|
||||
],
|
||||
type: 'EvmAccount'
|
||||
},
|
||||
account_code_at: {
|
||||
description: 'For a given account address, returns pallet_evm::AccountCodes.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
}
|
||||
],
|
||||
type: 'Bytes'
|
||||
},
|
||||
author: {
|
||||
description: 'Returns the converted FindAuthor::find_author authority id.',
|
||||
params: [],
|
||||
type: 'H160'
|
||||
},
|
||||
call: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'to',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCallInfo, DispatchError>'
|
||||
},
|
||||
chain_id: {
|
||||
description: 'Returns runtime defined pallet_evm::ChainId.',
|
||||
params: [],
|
||||
type: 'u64'
|
||||
},
|
||||
create: {
|
||||
description: 'Returns a frame_ethereum::call response. If `estimate` is true,',
|
||||
params: [
|
||||
{
|
||||
name: 'from',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'data',
|
||||
type: 'Vec<u8>'
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'gasLimit',
|
||||
type: 'U256'
|
||||
},
|
||||
{
|
||||
name: 'maxFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'maxPriorityFeePerGas',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'nonce',
|
||||
type: 'Option<U256>'
|
||||
},
|
||||
{
|
||||
name: 'estimate',
|
||||
type: 'bool'
|
||||
},
|
||||
{
|
||||
name: 'accessList',
|
||||
type: 'Option<Vec<(H160, Vec<H256>)>>'
|
||||
}
|
||||
],
|
||||
type: 'Result<EvmCreateInfo, DispatchError>'
|
||||
},
|
||||
current_all: {
|
||||
description: 'Return all the current data for a block in a single runtime call.',
|
||||
params: [],
|
||||
type: '(Option<BlockV2>, Option<Vec<EthReceiptV3>>, Option<Vec<EthTransactionStatus>>)'
|
||||
},
|
||||
current_block: {
|
||||
description: 'Return the current block.',
|
||||
params: [],
|
||||
type: 'BlockV2'
|
||||
},
|
||||
current_receipts: {
|
||||
description: 'Return the current receipt.',
|
||||
params: [],
|
||||
type: 'Option<Vec<EthReceiptV3>>'
|
||||
},
|
||||
current_transaction_statuses: {
|
||||
description: 'Return the current transaction status.',
|
||||
params: [],
|
||||
type: 'Option<Vec<EthTransactionStatus>>'
|
||||
},
|
||||
elasticity: {
|
||||
description: 'Return the elasticity multiplier.',
|
||||
params: [],
|
||||
type: 'Option<Permill>'
|
||||
},
|
||||
extrinsic_filter: {
|
||||
description: 'Receives a `Vec<OpaqueExtrinsic>` and filters all the ethereum transactions.',
|
||||
params: [
|
||||
{
|
||||
name: 'xts',
|
||||
type: 'Vec<Extrinsic>'
|
||||
}
|
||||
],
|
||||
type: 'Vec<TransactionV2>'
|
||||
},
|
||||
gas_price: {
|
||||
description: 'Returns FixedGasPrice::min_gas_price',
|
||||
params: [],
|
||||
type: 'u256'
|
||||
},
|
||||
storage_at: {
|
||||
description: 'For a given account address and index, returns pallet_evm::AccountStorages.',
|
||||
params: [
|
||||
{
|
||||
name: 'address',
|
||||
type: 'H160'
|
||||
},
|
||||
{
|
||||
name: 'index',
|
||||
type: 'u256'
|
||||
}
|
||||
],
|
||||
type: 'H256'
|
||||
}
|
||||
...ethMethodsV4
|
||||
},
|
||||
version: 4
|
||||
},
|
||||
{
|
||||
methods: {
|
||||
...ethMethodsV4,
|
||||
...ethMethodsV5
|
||||
},
|
||||
version: 5
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -25,6 +25,20 @@ export default {
|
||||
usedGas: 'U256',
|
||||
logs: 'Vec<EvmLog>'
|
||||
},
|
||||
EvmCallInfoV2: {
|
||||
exitReason: 'ExitReason',
|
||||
value: 'Bytes',
|
||||
usedGas: 'U256',
|
||||
weightInfo: 'Option<EvmWeightInfo>',
|
||||
logs: 'Vec<EvmLog>'
|
||||
},
|
||||
EvmCreateInfoV2: {
|
||||
exitReason: 'ExitReason',
|
||||
value: 'H160',
|
||||
usedGas: 'U256',
|
||||
weightInfo: 'Option<EvmWeightInfo>',
|
||||
logs: 'Vec<EvmLog>'
|
||||
},
|
||||
EvmLog: {
|
||||
address: 'H160',
|
||||
topics: 'Vec<H256>',
|
||||
@@ -34,6 +48,13 @@ export default {
|
||||
gasPrice: 'u256',
|
||||
origin: 'H160'
|
||||
},
|
||||
EvmWeightInfo: {
|
||||
refTimeLimit: 'Option<u64>',
|
||||
proofSizeLimit: 'Option<u64>',
|
||||
refTimeUsage: 'Option<u64>',
|
||||
proofSizeUsage: 'Option<u64>'
|
||||
|
||||
},
|
||||
ExitError: {
|
||||
_enum: {
|
||||
StackUnderflow: 'Null',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Enum, Struct, Text, U256, Vec, u256 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Enum, Option, Struct, Text, U256, Vec, u256, u64 } from '@polkadot/types-codec';
|
||||
import type { H160, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name EvmAccount */
|
||||
@@ -18,6 +18,15 @@ export interface EvmCallInfo extends Struct {
|
||||
readonly logs: Vec<EvmLog>;
|
||||
}
|
||||
|
||||
/** @name EvmCallInfoV2 */
|
||||
export interface EvmCallInfoV2 extends Struct {
|
||||
readonly exitReason: ExitReason;
|
||||
readonly value: Bytes;
|
||||
readonly usedGas: U256;
|
||||
readonly weightInfo: Option<EvmWeightInfo>;
|
||||
readonly logs: Vec<EvmLog>;
|
||||
}
|
||||
|
||||
/** @name EvmCreateInfo */
|
||||
export interface EvmCreateInfo extends Struct {
|
||||
readonly exitReason: ExitReason;
|
||||
@@ -26,6 +35,15 @@ export interface EvmCreateInfo extends Struct {
|
||||
readonly logs: Vec<EvmLog>;
|
||||
}
|
||||
|
||||
/** @name EvmCreateInfoV2 */
|
||||
export interface EvmCreateInfoV2 extends Struct {
|
||||
readonly exitReason: ExitReason;
|
||||
readonly value: H160;
|
||||
readonly usedGas: U256;
|
||||
readonly weightInfo: Option<EvmWeightInfo>;
|
||||
readonly logs: Vec<EvmLog>;
|
||||
}
|
||||
|
||||
/** @name EvmLog */
|
||||
export interface EvmLog extends Struct {
|
||||
readonly address: H160;
|
||||
@@ -39,6 +57,14 @@ export interface EvmVicinity extends Struct {
|
||||
readonly origin: H160;
|
||||
}
|
||||
|
||||
/** @name EvmWeightInfo */
|
||||
export interface EvmWeightInfo extends Struct {
|
||||
readonly refTimeLimit: Option<u64>;
|
||||
readonly proofSizeLimit: Option<u64>;
|
||||
readonly refTimeUsage: Option<u64>;
|
||||
readonly proofSizeUsage: Option<u64>;
|
||||
}
|
||||
|
||||
/** @name ExitError */
|
||||
export interface ExitError extends Enum {
|
||||
readonly isStackUnderflow: boolean;
|
||||
|
||||
Reference in New Issue
Block a user