UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

24 lines (22 loc) 942 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvocationIsCallerHelper = void 0; const constants_1 = require("../../constants"); const Helper_1 = require("../Helper"); class InvocationIsCallerHelper extends Helper_1.Helper { emit(sb, node, optionsIn) { if (!optionsIn.pushValue) { return; } const options = sb.pushValueOptions(optionsIn); sb.emitHelper(node, options, sb.helpers.getGlobalProperty({ property: constants_1.GlobalProperty.CallingScriptHash })); sb.emitSysCall(node, 'System.ExecutionEngine.GetEntryScriptHash'); sb.emitOp(node, 'EQUAL'); sb.emitSysCall(node, 'Neo.Runtime.GetTrigger'); sb.emitPushInt(node, 0x00); sb.emitOp(node, 'NUMEQUAL'); sb.emitOp(node, 'BOOLOR'); } } exports.InvocationIsCallerHelper = InvocationIsCallerHelper; //# sourceMappingURL=InvocationIsCallerHelper.js.map