import { hex2VarBytes , num2hexstring , StringReader } from '../utils' ; export enum VmType { NativeVM = 0xFF , NEOVM = 0x80 , WASMVM = 0x90 } deprecated export class VmCode { static deserialize ( sr ) { const vmcode = new VmCode ( ) ; const type = parseInt ( sr . read ( 1 ) , 16 ) ; const code = sr . readNextBytes ( ) ; vmcode . vmType = type ; vmcode . code = code ; return vmcode ; } vmType : VmType ; code : string ; serialize ( ) { let result = '' ; result += num2hexstring ( this . vmType ) ; result += hex2VarBytes ( this . code ) ; return result ; } }