UNPKG

@taquito/taquito

Version:

High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.

57 lines (56 loc) 2.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SmartRollupExecuteOutboxMessageOperation = void 0; const rpc_1 = require("@taquito/rpc"); const operations_1 = require("./operations"); /** * * @description SmartRollupExecuteOutboxMessage Operation provides utility to fetch properties for Operation of kind SmartRollupExecuteOutboxMessage * */ class SmartRollupExecuteOutboxMessageOperation extends operations_1.Operation { constructor(hash, params, source, raw, results, context) { super(hash, raw, results, context); this.params = params; this.source = source; } get operationResults() { const smartRollupExecuteOutboxMessageOp = Array.isArray(this.results) && this.results.find((op) => op.kind === rpc_1.OpKind.SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE); const result = smartRollupExecuteOutboxMessageOp && smartRollupExecuteOutboxMessageOp.metadata && smartRollupExecuteOutboxMessageOp.metadata.operation_result; return result ? result : undefined; } get status() { var _a, _b; return (_b = (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.status) !== null && _b !== void 0 ? _b : 'unknown'; } get rollup() { return this.params.rollup; } get cementedCommitment() { return this.params.cemented_commitment; } get outputProof() { return this.params.output_proof; } get fee() { return Number(this.params.fee); } get gasLimit() { return Number(this.params.gas_limit); } get storageLimit() { return Number(this.params.storage_limit); } get consumedMilliGas() { var _a; return (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.consumed_milligas; } get errors() { var _a; return (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.errors; } } exports.SmartRollupExecuteOutboxMessageOperation = SmartRollupExecuteOutboxMessageOperation;