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
Update Scheduler
  • Loading branch information
jacogr committed Oct 9, 2020
commit 1e88486575d295174bd2dda9c613055cb50c21ed
2 changes: 1 addition & 1 deletion packages/api/src/augment/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ declare module '@polkadot/api/types/submittable' {
*
* The schedule must have a greater version than the stored schedule.
**/
updateSchedule: AugmentedSubmittable<(schedule: Schedule | { version?: any; opCostGrowMem?: any; opCostRegular?: any; apiCostCaller?: any; apiCostAddress?: any; apiCostGasLeft?: any; apiCostBalance?: any; apiCostValueTransferred?: any; apiCostMinimumBalance?: any; apiCostTombstoneDeposit?: any; apiCostRentAllowance?: any; apiCostBlockNumber?: any; apiCostNow?: any; apiCostWeightToFee?: any; apiCostGas?: any; apiCostInput?: any; apiCostInputPerByte?: any; apiCostReturn?: any; apiCostReturnPerByte?: any; apiCostTerminate?: any; apiCostRestoreTo?: any; apiCostRestoreToPer_delta?: any; apiCostRandom?: any; apiCostDepositEvent?: any; apiCostDepositEventPerTopic?: any; apiCostDepositEventPerByte?: any; apiCostSetRentAllowance?: any; apiCostSetStorage?: any; apiCostSetStoragePerByte?: any; apiCostClearStorage?: any; apiCostGetStorage?: any; apiCostGetStoragePerByte?: any; apiCostTransfer?: any; apiCostCall?: any; apiCostCallTransferSurcharge?: any; apiCostCallPerInputByte?: any; apiCostCallPerOutputByte?: any; apiCostInstantiate?: any; apiCostInstantiatePerInputByte?: any; apiCostInstantiatePerOutputByte?: any; apiCostHashSha2256?: any; apiCostHashSha2256PerByte?: any; apiCostHashKeccak256?: any; apiCostHashKeccak256PerByte?: any; apiCostHashBlake2256?: any; apiCostHashBlake2256PerByte?: any; apiCostHashBlake2128?: any; apiCostHashBlake2128PerByte?: any; enablePrintln?: any; maxEventTopics?: any; maxStackHeight?: any; maxMemoryPages?: any; maxTableSize?: any; maxSubjectLen?: any; maxCodeSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
updateSchedule: AugmentedSubmittable<(schedule: Schedule | { version?: any; instructionWeights?: any; hostFnWeights?: any; enablePrintln?: any; maxEventTopics?: any; maxStackHeight?: any; maxMemoryPages?: any; maxTableSize?: any; maxSubjectLen?: any; maxCodeSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
};
council: {
[key: string]: SubmittableExtrinsicFunction<ApiType>;
Expand Down
8 changes: 7 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 { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
import { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
import { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultSuccess, ContractExecResultSuccessTo255, ContractExecResultTo255, ContractInfo, ContractStorageKey, Gas, PrefabWasmModule, PrefabWasmModuleReserved, Schedule, ScheduleTo212, ScheduleTo258, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultSuccess, ContractExecResultSuccessTo255, ContractExecResultTo255, ContractInfo, ContractStorageKey, Gas, HostFnWeights, InstructionWeights, PrefabWasmModule, PrefabWasmModuleReserved, Schedule, ScheduleTo212, ScheduleTo258, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import { 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';
import { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
import { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
Expand Down Expand Up @@ -498,6 +498,12 @@ declare module '@polkadot/types/types/registry' {
'Compact<Gas>': Compact<Gas>;
'Option<Gas>': Option<Gas>;
'Vec<Gas>': Vec<Gas>;
HostFnWeights: HostFnWeights;
'Option<HostFnWeights>': Option<HostFnWeights>;
'Vec<HostFnWeights>': Vec<HostFnWeights>;
InstructionWeights: InstructionWeights;
'Option<InstructionWeights>': Option<InstructionWeights>;
'Vec<InstructionWeights>': Vec<InstructionWeights>;
PrefabWasmModule: PrefabWasmModule;
'Option<PrefabWasmModule>': Option<PrefabWasmModule>;
'Vec<PrefabWasmModule>': Vec<PrefabWasmModule>;
Expand Down
100 changes: 53 additions & 47 deletions packages/types/src/interfaces/contracts/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,57 @@ export default {
},
ContractStorageKey: '[u8; 32]',
Gas: 'u64',
HostFnWeights: {
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'
},
InstructionWeights: {
growMem: 'Weight',
regular: 'Weight'
},
PrefabWasmModule: {
scheduleVersion: 'Compact<u32>',
initial: 'Compact<u32>',
Expand Down Expand Up @@ -152,53 +203,8 @@ export default {
},
Schedule: {
version: 'u32',
opCostGrowMem: 'Weight',
opCostRegular: 'Weight',
apiCostCaller: 'Weight',
apiCostAddress: 'Weight',
apiCostGasLeft: 'Weight',
apiCostBalance: 'Weight',
apiCostValueTransferred: 'Weight',
apiCostMinimumBalance: 'Weight',
apiCostTombstoneDeposit: 'Weight',
apiCostRentAllowance: 'Weight',
apiCostBlockNumber: 'Weight',
apiCostNow: 'Weight',
apiCostWeightToFee: 'Weight',
apiCostGas: 'Weight',
apiCostInput: 'Weight',
apiCostInputPerByte: 'Weight',
apiCostReturn: 'Weight',
apiCostReturnPerByte: 'Weight',
apiCostTerminate: 'Weight',
apiCostRestoreTo: 'Weight',
apiCostRestoreToPer_delta: 'Weight',
apiCostRandom: 'Weight',
apiCostDepositEvent: 'Weight',
apiCostDepositEventPerTopic: 'Weight',
apiCostDepositEventPerByte: 'Weight',
apiCostSetRentAllowance: 'Weight',
apiCostSetStorage: 'Weight',
apiCostSetStoragePerByte: 'Weight',
apiCostClearStorage: 'Weight',
apiCostGetStorage: 'Weight',
apiCostGetStoragePerByte: 'Weight',
apiCostTransfer: 'Weight',
apiCostCall: 'Weight',
apiCostCallTransferSurcharge: 'Weight',
apiCostCallPerInputByte: 'Weight',
apiCostCallPerOutputByte: 'Weight',
apiCostInstantiate: 'Weight',
apiCostInstantiatePerInputByte: 'Weight',
apiCostInstantiatePerOutputByte: 'Weight',
apiCostHashSha2256: 'Weight',
apiCostHashSha2256PerByte: 'Weight',
apiCostHashKeccak256: 'Weight',
apiCostHashKeccak256PerByte: 'Weight',
apiCostHashBlake2256: 'Weight',
apiCostHashBlake2256PerByte: 'Weight',
apiCostHashBlake2128: 'Weight',
apiCostHashBlake2128PerByte: 'Weight',
instructionWeights: 'InstructionWeights',
hostFnWeights: 'HostFnWeights',
enablePrintln: 'bool',
maxEventTopics: 'u32',
maxStackHeight: 'u32',
Expand Down
104 changes: 57 additions & 47 deletions packages/types/src/interfaces/contracts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,61 @@ export interface ContractStorageKey extends U8aFixed {}
/** @name Gas */
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 restoreTo: 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 callTransferSurcharge: Weight;
readonly callPerInputByte: Weight;
readonly callPerOutputByte: Weight;
readonly instantiate: 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 InstructionWeights */
export interface InstructionWeights extends Struct {
readonly growMem: Weight;
readonly regular: Weight;
}

/** @name PrefabWasmModule */
export interface PrefabWasmModule extends Struct {
readonly scheduleVersion: Compact<u32>;
Expand All @@ -83,53 +138,8 @@ export interface PrefabWasmModuleReserved extends Option<Null> {}
/** @name Schedule */
export interface Schedule extends Struct {
readonly version: u32;
readonly opCostGrowMem: Weight;
readonly opCostRegular: Weight;
readonly apiCostCaller: Weight;
readonly apiCostAddress: Weight;
readonly apiCostGasLeft: Weight;
readonly apiCostBalance: Weight;
readonly apiCostValueTransferred: Weight;
readonly apiCostMinimumBalance: Weight;
readonly apiCostTombstoneDeposit: Weight;
readonly apiCostRentAllowance: Weight;
readonly apiCostBlockNumber: Weight;
readonly apiCostNow: Weight;
readonly apiCostWeightToFee: Weight;
readonly apiCostGas: Weight;
readonly apiCostInput: Weight;
readonly apiCostInputPerByte: Weight;
readonly apiCostReturn: Weight;
readonly apiCostReturnPerByte: Weight;
readonly apiCostTerminate: Weight;
readonly apiCostRestoreTo: Weight;
readonly apiCostRestoreToPer_delta: Weight;
readonly apiCostRandom: Weight;
readonly apiCostDepositEvent: Weight;
readonly apiCostDepositEventPerTopic: Weight;
readonly apiCostDepositEventPerByte: Weight;
readonly apiCostSetRentAllowance: Weight;
readonly apiCostSetStorage: Weight;
readonly apiCostSetStoragePerByte: Weight;
readonly apiCostClearStorage: Weight;
readonly apiCostGetStorage: Weight;
readonly apiCostGetStoragePerByte: Weight;
readonly apiCostTransfer: Weight;
readonly apiCostCall: Weight;
readonly apiCostCallTransferSurcharge: Weight;
readonly apiCostCallPerInputByte: Weight;
readonly apiCostCallPerOutputByte: Weight;
readonly apiCostInstantiate: Weight;
readonly apiCostInstantiatePerInputByte: Weight;
readonly apiCostInstantiatePerOutputByte: Weight;
readonly apiCostHashSha2256: Weight;
readonly apiCostHashSha2256PerByte: Weight;
readonly apiCostHashKeccak256: Weight;
readonly apiCostHashKeccak256PerByte: Weight;
readonly apiCostHashBlake2256: Weight;
readonly apiCostHashBlake2256PerByte: Weight;
readonly apiCostHashBlake2128: Weight;
readonly apiCostHashBlake2128PerByte: Weight;
readonly instructionWeights: InstructionWeights;
readonly hostFnWeights: HostFnWeights;
readonly enablePrintln: bool;
readonly maxEventTopics: u32;
readonly maxStackHeight: u32;
Expand Down