UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

48 lines (46 loc) 1.57 kB
import { TypedHelper } from '../types'; export class UnwrapKeyStructuredStorageHelper extends TypedHelper { emit(sb, node, optionsIn) { const options = sb.pushValueOptions(optionsIn); const unwrapArray = (innerOptions) => { sb.emitHelper(node, innerOptions, sb.helpers.unwrapArray); }; const wrapArray = () => { sb.emitPushInt(node, 1); sb.emitOp(node, 'PACK'); }; sb.emitHelper(node, options, sb.helpers.forBuiltinType({ type: this.type, knownType: this.knownType, array: unwrapArray, map: wrapArray, set: wrapArray, boolean: wrapArray, buffer: wrapArray, null: wrapArray, number: wrapArray, object: wrapArray, string: wrapArray, symbol: wrapArray, undefined: wrapArray, arrayStorage: wrapArray, mapStorage: wrapArray, setStorage: wrapArray, error: wrapArray, forwardValue: wrapArray, iteratorResult: wrapArray, iterable: wrapArray, iterableIterator: wrapArray, transaction: wrapArray, output: wrapArray, attribute: wrapArray, input: wrapArray, account: wrapArray, asset: wrapArray, contract: wrapArray, header: wrapArray, block: wrapArray, })); } } //# sourceMappingURL=UnwrapKeyStructuredStorageHelper.js.map