author liangqin.fan gmail import { Codec } from "as-scale-codec" ; export class FnParameters { private pos : i32 ; private datas : Array < u8 > ; constructor ( u ) { this . datas = u ; this . pos = 0 ; } get < T extends Codec > ( ) { let ins = instantiate < T > ( ) ; ins . populateFromBytes ( this . datas , this . pos ) ; this . pos += ins . encodedLength ( ) ; return ins ; } }