diff --git a/packages/types/src/augment/registry.ts b/packages/types/src/augment/registry.ts index a755f495e20e..1da67df52e79 100644 --- a/packages/types/src/augment/registry.ts +++ b/packages/types/src/augment/registry.ts @@ -14,7 +14,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, InstructionWeights, Limits, PrefabWasmModule, PrefabWasmModuleReserved, Schedule, ScheduleTo212, ScheduleTo258, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts'; +import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractInfo, ContractStorageKey, DeletedContract, Gas, HostFnWeights, HostFnWeightsTo264, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, PrefabWasmModuleReserved, 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 { DeployData, FundIndex, FundInfo, LastContribution } 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'; @@ -438,6 +438,7 @@ declare module '@polkadot/types/types/registry' { 'Option': Option; 'Option': Option; 'Option': Option; + 'Option': Option; 'Option': Option; 'Option': Option; 'Option': Option; @@ -493,6 +494,7 @@ declare module '@polkadot/types/types/registry' { 'Option': Option; 'Option': Option; 'Option': Option; + 'Option': Option; 'Option': Option; 'Option': Option; 'Option': Option; @@ -688,6 +690,7 @@ declare module '@polkadot/types/types/registry' { 'Option': Option; 'Option': Option; 'Option': Option; + 'Option': Option; 'Option': Option; 'Option': Option; 'Option': Option; @@ -1166,6 +1169,7 @@ declare module '@polkadot/types/types/registry' { 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; + 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; @@ -1221,6 +1225,7 @@ declare module '@polkadot/types/types/registry' { 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; + 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; @@ -1416,6 +1421,7 @@ declare module '@polkadot/types/types/registry' { 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; + 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; 'Vec': Vec; @@ -1894,6 +1900,7 @@ declare module '@polkadot/types/types/registry' { HeartbeatTo244: HeartbeatTo244; HostConfiguration: HostConfiguration; HostFnWeights: HostFnWeights; + HostFnWeightsTo264: HostFnWeightsTo264; HrmpChannel: HrmpChannel; HrmpChannelId: HrmpChannelId; HrmpOpenChannelRequest: HrmpOpenChannelRequest; @@ -1949,6 +1956,7 @@ declare module '@polkadot/types/types/registry' { LeasePeriod: LeasePeriod; LeasePeriodOf: LeasePeriodOf; Limits: Limits; + LimitsTo264: LimitsTo264; LocalValidationData: LocalValidationData; LockIdentifier: LockIdentifier; LookupSource: LookupSource; @@ -2144,6 +2152,7 @@ declare module '@polkadot/types/types/registry' { SchedulePriority: SchedulePriority; ScheduleTo212: ScheduleTo212; ScheduleTo258: ScheduleTo258; + ScheduleTo264: ScheduleTo264; Scheduling: Scheduling; Seal: Seal; SealV0: SealV0; diff --git a/packages/types/src/interfaces/contracts/definitions.ts b/packages/types/src/interfaces/contracts/definitions.ts index a26bbd057852..86beec74bb78 100644 --- a/packages/types/src/interfaces/contracts/definitions.ts +++ b/packages/types/src/interfaces/contracts/definitions.ts @@ -141,6 +141,53 @@ export default { trieId: 'TrieId' }, Gas: 'u64', + HostFnWeightsTo264: { + caller: 'Weight', + address: 'Weight', + gasLeft: 'Weight', + balance: 'Weight', + valueTransferred: 'Weight', + minimumBalance: 'Weight', + tombstoneDeposit: 'Weight', + rentAllowance: 'Weight', + blockNumber: 'Weight', + now: 'Weight', + weightToFee: 'Weight', + gas: 'Weight', + input: 'Weight', + inputPerByte: 'Weight', + return: 'Weight', + returnPerByte: 'Weight', + terminate: 'Weight', + restoreTo: 'Weight', + restoreToPerDelta: 'Weight', + random: 'Weight', + depositEvent: 'Weight', + depositEventPerTopic: 'Weight', + depositEventPerByte: 'Weight', + setRentAllowance: 'Weight', + setStorage: 'Weight', + setStoragePerByte: 'Weight', + clearStorage: 'Weight', + getStorage: 'Weight', + getStoragePerByte: 'Weight', + transfer: 'Weight', + call: 'Weight', + callTransferSurcharge: 'Weight', + callPerInputByte: 'Weight', + callPerOutputByte: 'Weight', + instantiate: 'Weight', + instantiatePerInputByte: 'Weight', + instantiatePerOutputByte: 'Weight', + hashSha2256: 'Weight', + hashSha2256PerByte: 'Weight', + hashKeccak256: 'Weight', + hashKeccak256PerByte: 'Weight', + hashBlake2256: 'Weight', + hashBlake2256PerByte: 'Weight', + hashBlake2128: 'Weight', + hashBlake2128PerByte: 'Weight' + }, HostFnWeights: { caller: 'Weight', address: 'Weight', @@ -159,7 +206,10 @@ export default { return: 'Weight', returnPerByte: 'Weight', terminate: 'Weight', + terminatePerCodeByte: 'Weight', restoreTo: 'Weight', + restoreToPerCallerCodeByte: 'Weight', + restoreToPerTombstoneCodeByte: 'Weight', restoreToPerDelta: 'Weight', random: 'Weight', depositEvent: 'Weight', @@ -173,10 +223,12 @@ export default { getStoragePerByte: 'Weight', transfer: 'Weight', call: 'Weight', + callPerCodeByte: 'Weight', callTransferSurcharge: 'Weight', callPerInputByte: 'Weight', callPerOutputByte: 'Weight', instantiate: 'Weight', + instantiatePerCodeByte: 'Weight', instantiatePerInputByte: 'Weight', instantiatePerOutputByte: 'Weight', hashSha2256: 'Weight', @@ -241,7 +293,7 @@ export default { i64rotl: 'u32', i64rotr: 'u32' }, - Limits: { + LimitsTo264: { eventTopics: 'u32', stackHeight: 'u32', globals: 'u32', @@ -252,6 +304,16 @@ export default { subjectLen: 'u32', codeSize: 'u32' }, + Limits: { + eventTopics: 'u32', + stackHeight: 'u32', + globals: 'u32', + parameters: 'u32', + memoryPages: 'u32', + tableSize: 'u32', + brTableSize: 'u32', + subjectLen: 'u32' + }, PrefabWasmModule: { scheduleVersion: 'Compact', initial: 'Compact', @@ -295,6 +357,13 @@ export default { enablePrintln: 'bool', maxSubjectLen: 'u32' }, + ScheduleTo264: { + version: 'u32', + enablePrintln: 'bool', + limits: 'LimitsTo264', + instructionWeights: 'InstructionWeights', + hostFnWeights: 'HostFnWeightsTo264' + }, Schedule: { version: 'u32', enablePrintln: 'bool', diff --git a/packages/types/src/interfaces/contracts/types.ts b/packages/types/src/interfaces/contracts/types.ts index ffa19813371e..bc68b002558e 100644 --- a/packages/types/src/interfaces/contracts/types.ts +++ b/packages/types/src/interfaces/contracts/types.ts @@ -115,6 +115,60 @@ export interface Gas extends u64 {} /** @name HostFnWeights */ export interface HostFnWeights extends Struct { + readonly caller: Weight; + readonly address: Weight; + readonly gasLeft: Weight; + readonly balance: Weight; + readonly valueTransferred: Weight; + readonly minimumBalance: Weight; + readonly tombstoneDeposit: Weight; + readonly rentAllowance: Weight; + readonly blockNumber: Weight; + readonly now: Weight; + readonly weightToFee: Weight; + readonly gas: Weight; + readonly input: Weight; + readonly inputPerByte: Weight; + readonly return: Weight; + readonly returnPerByte: Weight; + readonly terminate: Weight; + readonly terminatePerCodeByte: Weight; + readonly restoreTo: Weight; + readonly restoreToPerCallerCodeByte: Weight; + readonly restoreToPerTombstoneCodeByte: Weight; + readonly restoreToPerDelta: Weight; + readonly random: Weight; + readonly depositEvent: Weight; + readonly depositEventPerTopic: Weight; + readonly depositEventPerByte: Weight; + readonly setRentAllowance: Weight; + readonly setStorage: Weight; + readonly setStoragePerByte: Weight; + readonly clearStorage: Weight; + readonly getStorage: Weight; + readonly getStoragePerByte: Weight; + readonly transfer: Weight; + readonly call: Weight; + readonly callPerCodeByte: Weight; + readonly callTransferSurcharge: Weight; + readonly callPerInputByte: Weight; + readonly callPerOutputByte: Weight; + readonly instantiate: Weight; + readonly instantiatePerCodeByte: Weight; + readonly instantiatePerInputByte: Weight; + readonly instantiatePerOutputByte: Weight; + readonly hashSha2256: Weight; + readonly hashSha2256PerByte: Weight; + readonly hashKeccak256: Weight; + readonly hashKeccak256PerByte: Weight; + readonly hashBlake2256: Weight; + readonly hashBlake2256PerByte: Weight; + readonly hashBlake2128: Weight; + readonly hashBlake2128PerByte: Weight; +} + +/** @name HostFnWeightsTo264 */ +export interface HostFnWeightsTo264 extends Struct { readonly caller: Weight; readonly address: Weight; readonly gasLeft: Weight; @@ -227,6 +281,18 @@ export interface Limits extends Struct { readonly tableSize: u32; readonly brTableSize: u32; readonly subjectLen: u32; +} + +/** @name LimitsTo264 */ +export interface LimitsTo264 extends Struct { + readonly eventTopics: u32; + readonly stackHeight: u32; + readonly globals: u32; + readonly parameters: u32; + readonly memoryPages: u32; + readonly tableSize: u32; + readonly brTableSize: u32; + readonly subjectLen: u32; readonly codeSize: u32; } @@ -290,6 +356,15 @@ export interface ScheduleTo258 extends Struct { readonly maxSubjectLen: u32; } +/** @name ScheduleTo264 */ +export interface ScheduleTo264 extends Struct { + readonly version: u32; + readonly enablePrintln: bool; + readonly limits: LimitsTo264; + readonly instructionWeights: InstructionWeights; + readonly hostFnWeights: HostFnWeightsTo264; +} + /** @name SeedOf */ export interface SeedOf extends Hash {}