@kiroboio/fct-core
Version:
Kirobo.io FCT Core library
39 lines • 1.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Utils_020201 = void 0;
const tslib_1 = require("tslib");
const ethers_1 = require("ethers");
const helpers_1 = require("../../../helpers");
const Utils_1 = require("../oldVersion/Utils");
const FCT_BatchMultiSigCall_abi_json_1 = tslib_1.__importDefault(require("./abis/FCT_BatchMultiSigCall.abi.json"));
const IBatchMultiSigCall = new ethers_1.ethers.utils.Interface(FCT_BatchMultiSigCall_abi_json_1.default);
class Utils_020201 extends Utils_1.Utils_oldVersion {
getCalldataForActuator({ signatures, purgedFCT, investor, activator, externalSigners, variables, }) {
if (!this.FCT) {
throw new Error("FCT not found, should not be the case");
}
const signedFCT = (0, helpers_1.deepMerge)(this.FCT.export(), { signatures, externalSigners, variables });
return this.getCalldataForActuatorWithSignedFCT({
signedFCT,
purgedFCT,
investor,
activator,
version: this.FCT.version,
});
}
getCalldataForActuatorWithSignedFCT({ signedFCT, purgedFCT, investor, activator, version, }) {
version = version.startsWith("0x") ? version : `0x${version}`;
return IBatchMultiSigCall.encodeFunctionData("batchMultiSigCall", [
version.padEnd(66, "0"),
signedFCT,
purgedFCT,
investor,
activator,
]);
}
getBatchMultiSigCallABI() {
return IBatchMultiSigCall;
}
}
exports.Utils_020201 = Utils_020201;
//# sourceMappingURL=Utils.js.map