Align RPCs with Substrate master (#3493)
* Align RPCs with Substrate master * Build interfaces, apply fixes * Metadata v13 changes
This commit is contained in:
@@ -10,7 +10,7 @@ import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { ContractCallRequest, ContractExecResult } from '@polkadot/types/interfaces/contracts';
|
||||
import type { ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
|
||||
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
|
||||
import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
@@ -20,7 +20,7 @@ import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
import type { ReadProof, RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
|
||||
|
||||
declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
@@ -128,6 +128,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
* Returns the value under a specified storage key in a contract
|
||||
**/
|
||||
getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* Instantiate a new contract
|
||||
**/
|
||||
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; endowment?: any; gasLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
/**
|
||||
* Returns the projected time a given contract will be able to sustain paying its rent
|
||||
**/
|
||||
@@ -442,6 +446,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
* Subscribes to storage changes for the provided keys
|
||||
**/
|
||||
subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;
|
||||
/**
|
||||
* Provides a way to trace the re-execution of a single block
|
||||
**/
|
||||
traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;
|
||||
};
|
||||
syncstate: {
|
||||
/**
|
||||
@@ -510,6 +518,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
* Remove a reserved peer
|
||||
**/
|
||||
removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;
|
||||
/**
|
||||
* Returns the list of reserved peers
|
||||
**/
|
||||
reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;
|
||||
/**
|
||||
* Resets the log filter to Substrate defaults
|
||||
**/
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
|
||||
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractInfo, ContractStorageKey, DeletedContract, Gas, HostFnWeights, HostFnWeightsTo264, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractInfo, ContractInstantiateResult, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import type { ContractConstructorSpec, ContractContractSpec, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpec, ContractEventSpec, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpec, ContractMessageSpec, ContractProject, ContractProjectContract, ContractProjectSource, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||
@@ -47,7 +47,7 @@ import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, Sch
|
||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
|
||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
||||
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
@@ -225,6 +225,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<BlockHash>': Option<BlockHash>;
|
||||
'Option<BlockLength>': Option<BlockLength>;
|
||||
'Option<BlockNumber>': Option<BlockNumber>;
|
||||
'Option<BlockTrace>': Option<BlockTrace>;
|
||||
'Option<BlockTraceEvent>': Option<BlockTraceEvent>;
|
||||
'Option<BlockTraceEventData>': Option<BlockTraceEventData>;
|
||||
'Option<BlockTraceSpan>': Option<BlockTraceSpan>;
|
||||
'Option<BlockWeights>': Option<BlockWeights>;
|
||||
'Option<BodyId>': Option<BodyId>;
|
||||
'Option<BodyPart>': Option<BodyPart>;
|
||||
@@ -285,6 +289,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<ContractExecResultTo255>': Option<ContractExecResultTo255>;
|
||||
'Option<ContractExecResultTo260>': Option<ContractExecResultTo260>;
|
||||
'Option<ContractInfo>': Option<ContractInfo>;
|
||||
'Option<ContractInstantiateResult>': Option<ContractInstantiateResult>;
|
||||
'Option<ContractLayoutArray>': Option<ContractLayoutArray>;
|
||||
'Option<ContractLayoutCell>': Option<ContractLayoutCell>;
|
||||
'Option<ContractLayoutEnum>': Option<ContractLayoutEnum>;
|
||||
@@ -404,6 +409,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<EvmAccount>': Option<EvmAccount>;
|
||||
'Option<EvmLog>': Option<EvmLog>;
|
||||
'Option<EvmVicinity>': Option<EvmVicinity>;
|
||||
'Option<ExecReturnValue>': Option<ExecReturnValue>;
|
||||
'Option<ExitError>': Option<ExitError>;
|
||||
'Option<ExitFatal>': Option<ExitFatal>;
|
||||
'Option<ExitReason>': Option<ExitReason>;
|
||||
@@ -512,6 +518,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<Index>': Option<Index>;
|
||||
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
|
||||
'Option<IndividualExposure>': Option<IndividualExposure>;
|
||||
'Option<InstantiateRequest>': Option<InstantiateRequest>;
|
||||
'Option<InstantiateReturnValue>': Option<InstantiateReturnValue>;
|
||||
'Option<InstructionWeights>': Option<InstructionWeights>;
|
||||
'Option<InvalidDisputeStatementKind>': Option<InvalidDisputeStatementKind>;
|
||||
'Option<InvalidTransaction>': Option<InvalidTransaction>;
|
||||
@@ -725,6 +733,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<Releases>': Option<Releases>;
|
||||
'Option<Remark>': Option<Remark>;
|
||||
'Option<Renouncing>': Option<Renouncing>;
|
||||
'Option<RentProjection>': Option<RentProjection>;
|
||||
'Option<ReportedRoundStates>': Option<ReportedRoundStates>;
|
||||
'Option<Reporter>': Option<Reporter>;
|
||||
'Option<ReportIdOf>': Option<ReportIdOf>;
|
||||
@@ -861,6 +870,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<Timepoint>': Option<Timepoint>;
|
||||
'Option<TokenError>': Option<TokenError>;
|
||||
'Option<TombstoneContractInfo>': Option<TombstoneContractInfo>;
|
||||
'Option<TraceBlockResponse>': Option<TraceBlockResponse>;
|
||||
'Option<TraceError>': Option<TraceError>;
|
||||
'Option<TransactionPriority>': Option<TransactionPriority>;
|
||||
'Option<TransactionValidityError>': Option<TransactionValidityError>;
|
||||
'Option<TransientValidationData>': Option<TransientValidationData>;
|
||||
@@ -1043,6 +1054,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<BlockHash>': Vec<BlockHash>;
|
||||
'Vec<BlockLength>': Vec<BlockLength>;
|
||||
'Vec<BlockNumber>': Vec<BlockNumber>;
|
||||
'Vec<BlockTrace>': Vec<BlockTrace>;
|
||||
'Vec<BlockTraceEvent>': Vec<BlockTraceEvent>;
|
||||
'Vec<BlockTraceEventData>': Vec<BlockTraceEventData>;
|
||||
'Vec<BlockTraceSpan>': Vec<BlockTraceSpan>;
|
||||
'Vec<BlockWeights>': Vec<BlockWeights>;
|
||||
'Vec<BodyId>': Vec<BodyId>;
|
||||
'Vec<BodyPart>': Vec<BodyPart>;
|
||||
@@ -1103,6 +1118,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<ContractExecResultTo255>': Vec<ContractExecResultTo255>;
|
||||
'Vec<ContractExecResultTo260>': Vec<ContractExecResultTo260>;
|
||||
'Vec<ContractInfo>': Vec<ContractInfo>;
|
||||
'Vec<ContractInstantiateResult>': Vec<ContractInstantiateResult>;
|
||||
'Vec<ContractLayoutArray>': Vec<ContractLayoutArray>;
|
||||
'Vec<ContractLayoutCell>': Vec<ContractLayoutCell>;
|
||||
'Vec<ContractLayoutEnum>': Vec<ContractLayoutEnum>;
|
||||
@@ -1222,6 +1238,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<EvmAccount>': Vec<EvmAccount>;
|
||||
'Vec<EvmLog>': Vec<EvmLog>;
|
||||
'Vec<EvmVicinity>': Vec<EvmVicinity>;
|
||||
'Vec<ExecReturnValue>': Vec<ExecReturnValue>;
|
||||
'Vec<ExitError>': Vec<ExitError>;
|
||||
'Vec<ExitFatal>': Vec<ExitFatal>;
|
||||
'Vec<ExitReason>': Vec<ExitReason>;
|
||||
@@ -1330,6 +1347,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<Index>': Vec<Index>;
|
||||
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
|
||||
'Vec<IndividualExposure>': Vec<IndividualExposure>;
|
||||
'Vec<InstantiateRequest>': Vec<InstantiateRequest>;
|
||||
'Vec<InstantiateReturnValue>': Vec<InstantiateReturnValue>;
|
||||
'Vec<InstructionWeights>': Vec<InstructionWeights>;
|
||||
'Vec<InvalidDisputeStatementKind>': Vec<InvalidDisputeStatementKind>;
|
||||
'Vec<InvalidTransaction>': Vec<InvalidTransaction>;
|
||||
@@ -1543,6 +1562,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<Releases>': Vec<Releases>;
|
||||
'Vec<Remark>': Vec<Remark>;
|
||||
'Vec<Renouncing>': Vec<Renouncing>;
|
||||
'Vec<RentProjection>': Vec<RentProjection>;
|
||||
'Vec<ReportedRoundStates>': Vec<ReportedRoundStates>;
|
||||
'Vec<Reporter>': Vec<Reporter>;
|
||||
'Vec<ReportIdOf>': Vec<ReportIdOf>;
|
||||
@@ -1679,6 +1699,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<Timepoint>': Vec<Timepoint>;
|
||||
'Vec<TokenError>': Vec<TokenError>;
|
||||
'Vec<TombstoneContractInfo>': Vec<TombstoneContractInfo>;
|
||||
'Vec<TraceBlockResponse>': Vec<TraceBlockResponse>;
|
||||
'Vec<TraceError>': Vec<TraceError>;
|
||||
'Vec<TransactionPriority>': Vec<TransactionPriority>;
|
||||
'Vec<TransactionValidityError>': Vec<TransactionValidityError>;
|
||||
'Vec<TransientValidationData>': Vec<TransientValidationData>;
|
||||
@@ -1861,6 +1883,10 @@ declare module '@polkadot/types/types/registry' {
|
||||
BlockHash: BlockHash;
|
||||
BlockLength: BlockLength;
|
||||
BlockNumber: BlockNumber;
|
||||
BlockTrace: BlockTrace;
|
||||
BlockTraceEvent: BlockTraceEvent;
|
||||
BlockTraceEventData: BlockTraceEventData;
|
||||
BlockTraceSpan: BlockTraceSpan;
|
||||
BlockWeights: BlockWeights;
|
||||
BodyId: BodyId;
|
||||
BodyPart: BodyPart;
|
||||
@@ -1921,6 +1947,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ContractExecResultTo255: ContractExecResultTo255;
|
||||
ContractExecResultTo260: ContractExecResultTo260;
|
||||
ContractInfo: ContractInfo;
|
||||
ContractInstantiateResult: ContractInstantiateResult;
|
||||
ContractLayoutArray: ContractLayoutArray;
|
||||
ContractLayoutCell: ContractLayoutCell;
|
||||
ContractLayoutEnum: ContractLayoutEnum;
|
||||
@@ -2040,6 +2067,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
EvmAccount: EvmAccount;
|
||||
EvmLog: EvmLog;
|
||||
EvmVicinity: EvmVicinity;
|
||||
ExecReturnValue: ExecReturnValue;
|
||||
ExitError: ExitError;
|
||||
ExitFatal: ExitFatal;
|
||||
ExitReason: ExitReason;
|
||||
@@ -2148,6 +2176,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
Index: Index;
|
||||
IndicesLookupSource: IndicesLookupSource;
|
||||
IndividualExposure: IndividualExposure;
|
||||
InstantiateRequest: InstantiateRequest;
|
||||
InstantiateReturnValue: InstantiateReturnValue;
|
||||
InstructionWeights: InstructionWeights;
|
||||
InvalidDisputeStatementKind: InvalidDisputeStatementKind;
|
||||
InvalidTransaction: InvalidTransaction;
|
||||
@@ -2361,6 +2391,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
Releases: Releases;
|
||||
Remark: Remark;
|
||||
Renouncing: Renouncing;
|
||||
RentProjection: RentProjection;
|
||||
ReportedRoundStates: ReportedRoundStates;
|
||||
Reporter: Reporter;
|
||||
ReportIdOf: ReportIdOf;
|
||||
@@ -2497,6 +2528,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
Timepoint: Timepoint;
|
||||
TokenError: TokenError;
|
||||
TombstoneContractInfo: TombstoneContractInfo;
|
||||
TraceBlockResponse: TraceBlockResponse;
|
||||
TraceError: TraceError;
|
||||
TransactionPriority: TransactionPriority;
|
||||
TransactionValidityError: TransactionValidityError;
|
||||
TransientValidationData: TransientValidationData;
|
||||
|
||||
@@ -24,6 +24,22 @@ export default {
|
||||
],
|
||||
type: 'ContractExecResult'
|
||||
},
|
||||
instantiate: {
|
||||
description: 'Instantiate a new contract',
|
||||
params: [
|
||||
{
|
||||
name: 'request',
|
||||
type: 'InstantiateRequest'
|
||||
},
|
||||
{
|
||||
name: 'at',
|
||||
type: 'BlockHash',
|
||||
isHstoric: true,
|
||||
isOptional: true
|
||||
}
|
||||
],
|
||||
type: 'ContractInstantiateResult'
|
||||
},
|
||||
getStorage: {
|
||||
description: 'Returns the value under a specified storage key in a contract',
|
||||
params: [
|
||||
@@ -141,6 +157,10 @@ export default {
|
||||
pairCount: 'u32',
|
||||
trieId: 'TrieId'
|
||||
},
|
||||
ExecReturnValue: {
|
||||
flags: 'u32',
|
||||
data: 'Bytes'
|
||||
},
|
||||
Gas: 'u64',
|
||||
HostFnWeightsTo264: {
|
||||
caller: 'Weight',
|
||||
@@ -243,6 +263,25 @@ export default {
|
||||
hashBlake2128PerByte: 'Weight',
|
||||
rentParams: 'Weight'
|
||||
},
|
||||
InstantiateRequest: {
|
||||
origin: 'AccountId',
|
||||
endowment: 'Balance',
|
||||
gasLimit: 'Gas',
|
||||
code: 'Bytes',
|
||||
data: 'Bytes',
|
||||
salt: 'Bytes'
|
||||
},
|
||||
ContractInstantiateResult: {
|
||||
_enum: {
|
||||
Ok: 'InstantiateReturnValue',
|
||||
Err: 'Null'
|
||||
}
|
||||
},
|
||||
InstantiateReturnValue: {
|
||||
result: 'ExecReturnValue',
|
||||
accountId: 'AccountId',
|
||||
rentProjection: 'Option<RentProjection>'
|
||||
},
|
||||
InstructionWeights: {
|
||||
i64const: 'u32',
|
||||
i64load: 'u32',
|
||||
@@ -326,6 +365,12 @@ export default {
|
||||
code: 'Bytes',
|
||||
originalCodeLen: 'u32'
|
||||
},
|
||||
RentProjection: {
|
||||
_enum: {
|
||||
EvictionAt: 'BlockNumber',
|
||||
NoEviction: 'Null'
|
||||
}
|
||||
},
|
||||
ScheduleTo212: {
|
||||
version: 'u32',
|
||||
putCodePerByteCost: 'Gas',
|
||||
|
||||
@@ -102,6 +102,13 @@ export interface ContractInfo extends Enum {
|
||||
readonly asTombstone: TombstoneContractInfo;
|
||||
}
|
||||
|
||||
/** @name ContractInstantiateResult */
|
||||
export interface ContractInstantiateResult extends Enum {
|
||||
readonly isOk: boolean;
|
||||
readonly asOk: InstantiateReturnValue;
|
||||
readonly isErr: boolean;
|
||||
}
|
||||
|
||||
/** @name ContractStorageKey */
|
||||
export interface ContractStorageKey extends U8aFixed {}
|
||||
|
||||
@@ -111,6 +118,12 @@ export interface DeletedContract extends Struct {
|
||||
readonly trieId: TrieId;
|
||||
}
|
||||
|
||||
/** @name ExecReturnValue */
|
||||
export interface ExecReturnValue extends Struct {
|
||||
readonly flags: u32;
|
||||
readonly data: Bytes;
|
||||
}
|
||||
|
||||
/** @name Gas */
|
||||
export interface Gas extends u64 {}
|
||||
|
||||
@@ -219,6 +232,23 @@ export interface HostFnWeightsTo264 extends Struct {
|
||||
readonly hashBlake2128PerByte: Weight;
|
||||
}
|
||||
|
||||
/** @name InstantiateRequest */
|
||||
export interface InstantiateRequest extends Struct {
|
||||
readonly origin: AccountId;
|
||||
readonly endowment: Balance;
|
||||
readonly gasLimit: Gas;
|
||||
readonly code: Bytes;
|
||||
readonly data: Bytes;
|
||||
readonly salt: Bytes;
|
||||
}
|
||||
|
||||
/** @name InstantiateReturnValue */
|
||||
export interface InstantiateReturnValue extends Struct {
|
||||
readonly result: ExecReturnValue;
|
||||
readonly accountId: AccountId;
|
||||
readonly rentProjection: Option<RentProjection>;
|
||||
}
|
||||
|
||||
/** @name InstructionWeights */
|
||||
export interface InstructionWeights extends Struct {
|
||||
readonly i64const: u32;
|
||||
@@ -310,6 +340,13 @@ export interface PrefabWasmModule extends Struct {
|
||||
readonly originalCodeLen: u32;
|
||||
}
|
||||
|
||||
/** @name RentProjection */
|
||||
export interface RentProjection extends Enum {
|
||||
readonly isEvictionAt: boolean;
|
||||
readonly asEvictionAt: BlockNumber;
|
||||
readonly isNoEviction: boolean;
|
||||
}
|
||||
|
||||
/** @name Schedule */
|
||||
export interface Schedule extends Struct {
|
||||
readonly version: u32;
|
||||
|
||||
@@ -352,10 +352,51 @@ export default {
|
||||
'unsubscribeStorage'
|
||||
],
|
||||
type: 'StorageChangeSet'
|
||||
},
|
||||
traceBlock: {
|
||||
description: 'Provides a way to trace the re-execution of a single block',
|
||||
params: [
|
||||
{
|
||||
name: 'block',
|
||||
type: 'Hash'
|
||||
},
|
||||
{
|
||||
name: 'targets',
|
||||
type: 'Option<Text>'
|
||||
},
|
||||
{
|
||||
name: 'storageKeys',
|
||||
type: 'Option<Text>'
|
||||
}
|
||||
],
|
||||
type: 'TraceBlockResponse'
|
||||
}
|
||||
},
|
||||
types: {
|
||||
ApiId: '[u8; 8]',
|
||||
BlockTrace: {
|
||||
blockHash: 'Text',
|
||||
parentHash: 'Text',
|
||||
tracingTargets: 'Text',
|
||||
storageKeys: 'Text',
|
||||
spans: 'Vec<BlockTraceSpan>',
|
||||
events: 'Vec<BlockTraceEvent>'
|
||||
},
|
||||
BlockTraceEvent: {
|
||||
target: 'Text',
|
||||
data: 'BlockTraceEventData',
|
||||
parentId: 'Option<u64>'
|
||||
},
|
||||
BlockTraceEventData: {
|
||||
stringValues: 'HashMap<Text, Text>'
|
||||
},
|
||||
BlockTraceSpan: {
|
||||
id: 'u64',
|
||||
parentId: 'Option<u64>',
|
||||
name: 'Text',
|
||||
target: 'Text',
|
||||
wasm: 'bool'
|
||||
},
|
||||
KeyValueOption: '(StorageKey, Option<StorageData>)',
|
||||
ReadProof: {
|
||||
at: 'Hash',
|
||||
@@ -374,6 +415,15 @@ export default {
|
||||
StorageChangeSet: {
|
||||
block: 'Hash',
|
||||
changes: 'Vec<KeyValueOption>'
|
||||
},
|
||||
TraceBlockResponse: {
|
||||
_enum: {
|
||||
TraceError: 'TraceError',
|
||||
BlockTrace: 'BlockTrace'
|
||||
}
|
||||
},
|
||||
TraceError: {
|
||||
error: 'Text'
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,13 +1,44 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Option, StorageKey, Struct, Text, U8aFixed, Vec, u32 } from '@polkadot/types';
|
||||
import type { Bytes, Enum, HashMap, Option, StorageKey, Struct, Text, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { Hash, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name ApiId */
|
||||
export interface ApiId extends U8aFixed {}
|
||||
|
||||
/** @name BlockTrace */
|
||||
export interface BlockTrace extends Struct {
|
||||
readonly blockHash: Text;
|
||||
readonly parentHash: Text;
|
||||
readonly tracingTargets: Text;
|
||||
readonly storageKeys: Text;
|
||||
readonly spans: Vec<BlockTraceSpan>;
|
||||
readonly events: Vec<BlockTraceEvent>;
|
||||
}
|
||||
|
||||
/** @name BlockTraceEvent */
|
||||
export interface BlockTraceEvent extends Struct {
|
||||
readonly target: Text;
|
||||
readonly data: BlockTraceEventData;
|
||||
readonly parentId: Option<u64>;
|
||||
}
|
||||
|
||||
/** @name BlockTraceEventData */
|
||||
export interface BlockTraceEventData extends Struct {
|
||||
readonly stringValues: HashMap<Text, Text>;
|
||||
}
|
||||
|
||||
/** @name BlockTraceSpan */
|
||||
export interface BlockTraceSpan extends Struct {
|
||||
readonly id: u64;
|
||||
readonly parentId: Option<u64>;
|
||||
readonly name: Text;
|
||||
readonly target: Text;
|
||||
readonly wasm: bool;
|
||||
}
|
||||
|
||||
/** @name KeyValueOption */
|
||||
export interface KeyValueOption extends ITuple<[StorageKey, Option<StorageData>]> {}
|
||||
|
||||
@@ -37,4 +68,17 @@ export interface StorageChangeSet extends Struct {
|
||||
readonly changes: Vec<KeyValueOption>;
|
||||
}
|
||||
|
||||
/** @name TraceBlockResponse */
|
||||
export interface TraceBlockResponse extends Enum {
|
||||
readonly isTraceError: boolean;
|
||||
readonly asTraceError: TraceError;
|
||||
readonly isBlockTrace: boolean;
|
||||
readonly asBlockTrace: BlockTrace;
|
||||
}
|
||||
|
||||
/** @name TraceError */
|
||||
export interface TraceError extends Struct {
|
||||
readonly error: Text;
|
||||
}
|
||||
|
||||
export type PHANTOM_STATE = 'state';
|
||||
|
||||
@@ -107,6 +107,11 @@ export default {
|
||||
],
|
||||
type: 'Text'
|
||||
},
|
||||
reservedPeers: {
|
||||
description: 'Returns the list of reserved peers',
|
||||
params: [],
|
||||
type: 'Vec<Text>'
|
||||
},
|
||||
nodeRoles: {
|
||||
description: 'Returns the roles the node is running as',
|
||||
params: [],
|
||||
|
||||
Reference in New Issue
Block a user