UNPKG

@harmoniclabs/plu-ts-onchain

Version:

An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript

14 lines (13 loc) 786 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.peqUnit = void 0; var IR_1 = require("../../../../IR/index.js"); var type_system_1 = require("../../../type_system/index.js"); var addApplications_1 = require("../../builtins/addApplications.js"); var Term_1 = require("../../../Term/index.js"); /** we could use `mkNilData` builtin to check if we actually have units but we likely dont want the execution to fail by calling `peqUnit` so this is just a dummy function that always retuns true. */ exports.peqUnit = (0, addApplications_1.addApplications)(new Term_1.Term((0, type_system_1.fn)([type_system_1.unit, type_system_1.unit], type_system_1.bool), function (_dbn) { return new IR_1.IRHoisted(new IR_1.IRFunc(2, IR_1.IRConst.bool(true))); }));