UNPKG

@neo-one/smart-contract-compiler

Version:

NEO•ONE TypeScript smart contract compiler.

21 lines (19 loc) 876 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Hash256From = void 0; const DiagnosticCode_1 = require("../../../../DiagnosticCode"); const DiagnosticMessage_1 = require("../../../../DiagnosticMessage"); const BuiltinMemberCall_1 = require("../../BuiltinMemberCall"); class Hash256From extends BuiltinMemberCall_1.BuiltinMemberCall { emitCall(sb, _func, node, options) { const address = sb.context.analysis.extractLiteralHash256(node); if (address === undefined) { sb.context.reportError(node, DiagnosticCode_1.DiagnosticCode.InvalidLiteral, DiagnosticMessage_1.DiagnosticMessage.InvalidHash256); return; } sb.emitPushBuffer(node, address); sb.emitHelper(node, options, sb.helpers.wrapBuffer); } } exports.Hash256From = Hash256From; //# sourceMappingURL=from.js.map