UNPKG

@newos/cli

Version:
19 lines 968 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const TransactionController_1 = __importDefault(require("../models/network/TransactionController")); const stdout_1 = __importDefault(require("../utils/stdout")); async function call({ proxyAddress, methodName, methodArgs, network, txParams, networkFile, }) { if (!proxyAddress) throw Error('A contract address must be specified.'); if (!methodName) throw Error('A method name must be specified.'); const controller = new TransactionController_1.default(txParams, network, networkFile); const returnedValue = await controller.callContractMethod(proxyAddress, methodName, methodArgs); if (returnedValue !== undefined) stdout_1.default(returnedValue); } exports.default = call; //# sourceMappingURL=call.js.map