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; }