author liangqin.fan gmail import { AccountId , Bool , Int8 , PackedStorableArray , ScaleString , SpreadStorableMap , StorableArray , StorableMap , UInt128 } from "ask-lang" ; @ storage class ArrayTypes { @ packed ( capacity = 100 ) i8Arr : PackedStorableArray < Int8 > ; } @ contract export class MapUsages { protected arr : ArrayTypes ; constructor ( ) { this . arr = new ArrayTypes ( ) ; } @ message set ( index , value ) { this . arr . i8Arr [ index ] = new Int8 ( value ) ; } @ message ( mutates = false ) get ( index ) { return this . arr . i8Arr [ index ] . unwrap ( ) ; } @ message remove ( index ) { return this . arr . i8Arr . delete ( index ) ; } @ message push ( value ) { return this . arr . i8Arr . push ( new Int8 ( value ) ) ; } @ message pushAccountId ( account ) { let map = new SpreadStorableMap < AccountId , Bool > ( ) ; } }