From f7563d9f27650837b04cc83e4d1320ad8f537e5b Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 4 Sep 2020 14:28:53 +0200 Subject: [PATCH] Support new contracts Schedule --- .../src/interfaces/contracts/definitions.ts | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/packages/types/src/interfaces/contracts/definitions.ts b/packages/types/src/interfaces/contracts/definitions.ts index cfab63e3297a..23aacd1032b9 100644 --- a/packages/types/src/interfaces/contracts/definitions.ts +++ b/packages/types/src/interfaces/contracts/definitions.ts @@ -133,7 +133,7 @@ export default { enablePrintln: 'bool', maxSubjectLen: 'u32' }, - Schedule: { + ScheduleTo258: { version: 'u32', putCodePerByteCost: 'Gas', growMemCost: 'Gas', @@ -151,6 +151,63 @@ export default { enablePrintln: 'bool', maxSubjectLen: 'u32' }, + 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', + enablePrintln: 'bool', + maxEventTopics: 'u32', + maxStackHeight: 'u32', + maxMemoryPages: 'u32', + maxTableSize: 'u32', + maxSubjectLen: 'u32', + maxCodeSize: 'u32' + }, SeedOf: 'Hash', TombstoneContractInfo: 'Hash', TrieId: 'Bytes'