From 25af4b449e22b6e94369f8180ba9f206d3bf9010 Mon Sep 17 00:00:00 2001 From: kwingram25 Date: Tue, 11 Jun 2019 14:28:23 +0200 Subject: [PATCH] lastWrite (#985) --- packages/types/src/type/ContractInfo.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/types/src/type/ContractInfo.ts b/packages/types/src/type/ContractInfo.ts index 9313ef2939..e7a59de22f 100644 --- a/packages/types/src/type/ContractInfo.ts +++ b/packages/types/src/type/ContractInfo.ts @@ -4,6 +4,7 @@ import { assert } from '@polkadot/util'; +import Option from '../codec/Option'; import Bytes from '../primitive/Bytes'; import Enum from '../codec/Enum'; import Struct from '../codec/Struct'; @@ -23,7 +24,8 @@ export class AliveContractInfo extends Struct { storageSize: U64, codeHash: CodeHash, rentAllowance: Balance, - deductBlock: BlockNumber + deductBlock: BlockNumber, + lastWrite: Option.with(BlockNumber) }, value); } @@ -35,6 +37,10 @@ export class AliveContractInfo extends Struct { return this.get('deductBlock') as BlockNumber; } + get lastWrite (): Option { + return this.get('lastWrite') as Option; + } + get rentAllowance (): Balance { return this.get('rentAllowance') as Balance; }