UNPKG

@taquito/taquito

Version:

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

53 lines 1.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IncreasePaidStorageOperation = void 0; const operations_1 = require("./operations"); /** * * @description IncreasePaidStorageOperation provides utility functions to fetch a new operation of kind increase_paid_storage * */ class IncreasePaidStorageOperation 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 increasePaidStorageOp = Array.isArray(this.results) && this.results.find((op) => op.kind === 'increase_paid_storage'); const result = increasePaidStorageOp && increasePaidStorageOp.metadata && increasePaidStorageOp.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 fee() { return Number(this.params.fee); } get gasLimit() { return Number(this.params.gas_limit); } get storageLimit() { return Number(this.params.storage_limit); } get errors() { var _a; return (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.errors; } get consumedMilliGas() { var _a; return (_a = this.operationResults) === null || _a === void 0 ? void 0 : _a.consumed_milligas; } get amount() { return this.params.amount; } get destination() { return this.params.destination; } } exports.IncreasePaidStorageOperation = IncreasePaidStorageOperation; //# sourceMappingURL=increase-paid-storage-operation.js.map