diff --git a/packages/types-augment/src/registry/interfaces.ts b/packages/types-augment/src/registry/interfaces.ts index b33f1ac2fa..51a6cf6127 100644 --- a/packages/types-augment/src/registry/interfaces.ts +++ b/packages/types-augment/src/registry/interfaces.ts @@ -27,7 +27,7 @@ import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, De 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, 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 { 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 { 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 { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset'; @@ -387,6 +387,8 @@ declare module '@polkadot/types/types/registry' { EthHeader: EthHeader; EthLog: EthLog; EthReceipt: EthReceipt; + EthReceiptV0: EthReceiptV0; + EthReceiptV3: EthReceiptV3; EthRichBlock: EthRichBlock; EthRichHeader: EthRichHeader; EthStorageProof: EthStorageProof; diff --git a/packages/types/src/interfaces/eth/definitions.ts b/packages/types/src/interfaces/eth/definitions.ts index 7bbc0c19ae..53fc20ab0c 100644 --- a/packages/types/src/interfaces/eth/definitions.ts +++ b/packages/types/src/interfaces/eth/definitions.ts @@ -257,6 +257,9 @@ const types: DefinitionsTypes = objectSpread({}, V0, V1, V2, { logsBloom: 'EthBloom', statusCode: 'Option' }, + // not convinced, however the original commit matches, so... (maybe V3 is incorrect?) + EthReceiptV0: 'EthReceipt', + EthReceiptV3: 'EthReceipt', EthStorageProof: { key: 'U256', value: 'U256', diff --git a/packages/types/src/interfaces/eth/runtime.ts b/packages/types/src/interfaces/eth/runtime.ts index b8bc5305d6..6f48e6ba88 100644 --- a/packages/types/src/interfaces/eth/runtime.ts +++ b/packages/types/src/interfaces/eth/runtime.ts @@ -142,11 +142,41 @@ export const runtime: DefinitionsCall = { ], type: 'Result' }, + current_all: { + description: 'Return all the current data for a block in a single runtime call.', + params: [], + type: '(Option, Option>, Option>)' + }, current_block: { description: 'Return the current block.', params: [], type: 'BlockV2' }, + current_receipts: { + description: 'Return the current receipt.', + params: [], + type: 'Option>' + }, + current_transaction_statuses: { + description: 'Return the current transaction status.', + params: [], + type: 'Option>' + }, + elasticity: { + description: 'Return the elasticity multiplier.', + params: [], + type: 'Option' + }, + extrinsic_filter: { + description: 'Receives a `Vec` and filters all the ethereum transactions.', + params: [ + { + name: 'xts', + type: 'Vec' + } + ], + type: 'Vec' + }, gas_price: { description: 'Returns FixedGasPrice::min_gas_price', params: [], @@ -168,8 +198,6 @@ export const runtime: DefinitionsCall = { } }, version: 4 - // TODO This is _very_ incomplete, missing everything from this point onwards is missing - - // https://github.com/paritytech/frontier/blob/87e60b9b67ab31f4ea7285c949997337bb76ffd0/primitives/rpc/src/lib.rs#L131 } ] }; diff --git a/packages/types/src/interfaces/eth/types.ts b/packages/types/src/interfaces/eth/types.ts index b91d1b4bae..0111a2947c 100644 --- a/packages/types/src/interfaces/eth/types.ts +++ b/packages/types/src/interfaces/eth/types.ts @@ -223,6 +223,12 @@ export interface EthReceipt extends Struct { readonly statusCode: Option; } +/** @name EthReceiptV0 */ +export interface EthReceiptV0 extends EthReceipt {} + +/** @name EthReceiptV3 */ +export interface EthReceiptV3 extends EthReceipt {} + /** @name EthRichBlock */ export interface EthRichBlock extends Struct { readonly blockHash: Option;