import { ByteArray } from "as-scale-codec" ; import { Storage , Utils } from "subsembly-core" ; descritption export namespace GrandpaStorageEntries { } description export class Grandpa { public static readonly GRANDPA_AUTHORITIES : string = ":grandpa_authorities" ; description static _authorities ( ) { const entry = Storage . get ( Utils . stringsToBytes ( [ this . GRANDPA_AUTHORITIES ] , false ) ) ; const auths = entry . isSome ( ) ? ( < ByteArray > entry . unwrap ( ) ) . unwrap ( ) : [ 0 ] ; return auths ; } description param auths static _setAuthorities ( auths ) { Storage . set ( Utils . stringsToBytes ( [ this . GRANDPA_AUTHORITIES ] , false ) , auths ) ; } }