locklift
Version:
Node JS framework for working with Ever contracts. Inspired by Truffle and Hardhat. Helps you to build, test, run and maintain your smart contracts.
40 lines (39 loc) • 1.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTracing = exports.Tracing = void 0;
const tracingInternal_1 = require("./tracingInternal");
class Tracing {
ever;
tracingInternal;
features;
network;
constructor(ever, tracingInternal, features, network) {
this.ever = ever;
this.tracingInternal = tracingInternal;
this.features = features;
this.network = network;
this.setContractLabels = tracingInternal.setContractLabels;
this.saveContract = tracingInternal.saveContract;
}
setContractLabels;
saveContract;
trace = async (transactionProm, config) => {
const finalizedTx = await this.features.waitFinalized(transactionProm);
return this.tracingInternal
.trace({ finalizedTx, ...config })
.then(traceTree => ({ ...finalizedTx.extTransaction, traceTree: traceTree }));
};
get allowedCodes() {
return this.tracingInternal.allowedCodes;
}
setAllowedCodes = (...params) => this.tracingInternal.setAllowedCodes(...params);
setAllowedCodesForAddress = (...params) => this.tracingInternal.setAllowedCodesForAddress(...params);
removeAllowedCodesForAddress = (...params) => this.tracingInternal.removeAllowedCodesForAddress(...params);
removeAllowedCodes = (...params) => this.tracingInternal.removeAllowedCodes(...params);
}
exports.Tracing = Tracing;
const createTracing = ({ ever, factory, features, tracingTransport, network, }) => {
const internalTracing = new tracingInternal_1.TracingInternal(ever, factory, tracingTransport, network);
return new Tracing(ever, internalTracing, features, network);
};
exports.createTracing = createTracing;