Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/types/src/augment/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -438,6 +438,7 @@ declare module '@polkadot/types/types/registry' {
'Option<HeartbeatTo244>': Option<HeartbeatTo244>;
'Option<HostConfiguration>': Option<HostConfiguration>;
'Option<HostFnWeights>': Option<HostFnWeights>;
'Option<HostFnWeightsTo264>': Option<HostFnWeightsTo264>;
'Option<HrmpChannel>': Option<HrmpChannel>;
'Option<HrmpChannelId>': Option<HrmpChannelId>;
'Option<HrmpOpenChannelRequest>': Option<HrmpOpenChannelRequest>;
Expand Down Expand Up @@ -493,6 +494,7 @@ declare module '@polkadot/types/types/registry' {
'Option<LeasePeriod>': Option<LeasePeriod>;
'Option<LeasePeriodOf>': Option<LeasePeriodOf>;
'Option<Limits>': Option<Limits>;
'Option<LimitsTo264>': Option<LimitsTo264>;
'Option<LocalValidationData>': Option<LocalValidationData>;
'Option<LockIdentifier>': Option<LockIdentifier>;
'Option<LookupSource>': Option<LookupSource>;
Expand Down Expand Up @@ -688,6 +690,7 @@ declare module '@polkadot/types/types/registry' {
'Option<SchedulePriority>': Option<SchedulePriority>;
'Option<ScheduleTo212>': Option<ScheduleTo212>;
'Option<ScheduleTo258>': Option<ScheduleTo258>;
'Option<ScheduleTo264>': Option<ScheduleTo264>;
'Option<Scheduling>': Option<Scheduling>;
'Option<Seal>': Option<Seal>;
'Option<SealV0>': Option<SealV0>;
Expand Down Expand Up @@ -1166,6 +1169,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<HeartbeatTo244>': Vec<HeartbeatTo244>;
'Vec<HostConfiguration>': Vec<HostConfiguration>;
'Vec<HostFnWeights>': Vec<HostFnWeights>;
'Vec<HostFnWeightsTo264>': Vec<HostFnWeightsTo264>;
'Vec<HrmpChannel>': Vec<HrmpChannel>;
'Vec<HrmpChannelId>': Vec<HrmpChannelId>;
'Vec<HrmpOpenChannelRequest>': Vec<HrmpOpenChannelRequest>;
Expand Down Expand Up @@ -1221,6 +1225,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<LeasePeriod>': Vec<LeasePeriod>;
'Vec<LeasePeriodOf>': Vec<LeasePeriodOf>;
'Vec<Limits>': Vec<Limits>;
'Vec<LimitsTo264>': Vec<LimitsTo264>;
'Vec<LocalValidationData>': Vec<LocalValidationData>;
'Vec<LockIdentifier>': Vec<LockIdentifier>;
'Vec<LookupSource>': Vec<LookupSource>;
Expand Down Expand Up @@ -1416,6 +1421,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<SchedulePriority>': Vec<SchedulePriority>;
'Vec<ScheduleTo212>': Vec<ScheduleTo212>;
'Vec<ScheduleTo258>': Vec<ScheduleTo258>;
'Vec<ScheduleTo264>': Vec<ScheduleTo264>;
'Vec<Scheduling>': Vec<Scheduling>;
'Vec<Seal>': Vec<Seal>;
'Vec<SealV0>': Vec<SealV0>;
Expand Down Expand Up @@ -1894,6 +1900,7 @@ declare module '@polkadot/types/types/registry' {
HeartbeatTo244: HeartbeatTo244;
HostConfiguration: HostConfiguration;
HostFnWeights: HostFnWeights;
HostFnWeightsTo264: HostFnWeightsTo264;
HrmpChannel: HrmpChannel;
HrmpChannelId: HrmpChannelId;
HrmpOpenChannelRequest: HrmpOpenChannelRequest;
Expand Down Expand Up @@ -1949,6 +1956,7 @@ declare module '@polkadot/types/types/registry' {
LeasePeriod: LeasePeriod;
LeasePeriodOf: LeasePeriodOf;
Limits: Limits;
LimitsTo264: LimitsTo264;
LocalValidationData: LocalValidationData;
LockIdentifier: LockIdentifier;
LookupSource: LookupSource;
Expand Down Expand Up @@ -2144,6 +2152,7 @@ declare module '@polkadot/types/types/registry' {
SchedulePriority: SchedulePriority;
ScheduleTo212: ScheduleTo212;
ScheduleTo258: ScheduleTo258;
ScheduleTo264: ScheduleTo264;
Scheduling: Scheduling;
Seal: Seal;
SealV0: SealV0;
Expand Down
71 changes: 70 additions & 1 deletion packages/types/src/interfaces/contracts/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -241,7 +293,7 @@ export default {
i64rotl: 'u32',
i64rotr: 'u32'
},
Limits: {
LimitsTo264: {
eventTopics: 'u32',
stackHeight: 'u32',
globals: 'u32',
Expand All @@ -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<u32>',
initial: 'Compact<u32>',
Expand Down Expand Up @@ -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',
Expand Down
75 changes: 75 additions & 0 deletions packages/types/src/interfaces/contracts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 {}

Expand Down