@harmoniclabs/buildooor 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -345,6 +345,8 @@ var TxBuilder = /** @class */ (function () {
|
|
|
345
345
|
Math.max(0, Math.min(otps.nScriptExecitionRounds, maxRound))
|
|
346
346
|
: defaultRounds);
|
|
347
347
|
var _loop_1 = function (round) {
|
|
348
|
+
cek.resetBudget();
|
|
349
|
+
cek.resetLogs();
|
|
348
350
|
prevFee = fee;
|
|
349
351
|
var _d = (0, toOnChain_1.getTxInfos)(tx, this_1.genesisInfos), txInfosV1 = _d.v1, txInfosV2 = _d.v2, txInfosV3 = _d.v3;
|
|
350
352
|
var totExBudget = new plutus_machine_1.ExBudget({ mem: 0, cpu: 0 });
|
|
@@ -15,7 +15,7 @@ function sortUTxO(a, b) {
|
|
|
15
15
|
return ord;
|
|
16
16
|
}
|
|
17
17
|
function getTxInfos(transaction, genesisInfos) {
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
19
19
|
var tx = transaction.body, witnesses = transaction.witnesses;
|
|
20
20
|
function redeemerToDataPair(rdmr, version) {
|
|
21
21
|
return new plutus_data_1.DataPair((0, getSpendingPurposeData_1.getSpendingPurposeData)(rdmr, tx, version), rdmr.data.clone());
|
|
@@ -58,7 +58,7 @@ function getTxInfos(transaction, genesisInfos) {
|
|
|
58
58
|
]);
|
|
59
59
|
}
|
|
60
60
|
catch ( // input or output can't be v1 (inline datums etc...)
|
|
61
|
-
|
|
61
|
+
_5) { // input or output can't be v1 (inline datums etc...)
|
|
62
62
|
v1 = undefined;
|
|
63
63
|
}
|
|
64
64
|
var v2 = undefined;
|
|
@@ -91,7 +91,7 @@ function getTxInfos(transaction, genesisInfos) {
|
|
|
91
91
|
new plutus_data_1.DataConstr(0, [txIdData.clone()])
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
catch (
|
|
94
|
+
catch (_6) {
|
|
95
95
|
v2 = undefined;
|
|
96
96
|
}
|
|
97
97
|
var v3 = new plutus_data_1.DataConstr(0, // PTxInfo; only costructor
|
|
@@ -120,14 +120,24 @@ function getTxInfos(transaction, genesisInfos) {
|
|
|
120
120
|
datumsData,
|
|
121
121
|
// id
|
|
122
122
|
txIdData,
|
|
123
|
-
//
|
|
124
|
-
new plutus_data_1.DataMap(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
// votes
|
|
124
|
+
new plutus_data_1.DataMap((_2 = (_1 = (_0 = tx.votingProcedures) === null || _0 === void 0 ? void 0 : _0.procedures) === null || _1 === void 0 ? void 0 : _1.map(function (_a) {
|
|
125
|
+
var voter = _a.voter, votes = _a.votes;
|
|
126
|
+
return new plutus_data_1.DataPair(voter.toData("v3"), new plutus_data_1.DataMap(votes.map(function (_a) {
|
|
127
|
+
var govActionId = _a.govActionId, vote = _a.vote;
|
|
128
|
+
return new plutus_data_1.DataPair(govActionId.toData("v3"), new plutus_data_1.DataConstr(vote.vote, []));
|
|
129
|
+
})));
|
|
130
|
+
})) !== null && _2 !== void 0 ? _2 : []),
|
|
131
|
+
// proposals
|
|
132
|
+
new plutus_data_1.DataList((_4 = (_3 = tx.proposalProcedures) === null || _3 === void 0 ? void 0 : _3.map(function (prop) { return prop.toData("v3"); })) !== null && _4 !== void 0 ? _4 : []),
|
|
133
|
+
// currentTreasury
|
|
134
|
+
tx.currentTreasuryValue !== undefined
|
|
135
|
+
? new plutus_data_1.DataConstr(0, [new plutus_data_1.DataI(tx.currentTreasuryValue)])
|
|
136
|
+
: new plutus_data_1.DataConstr(1, []),
|
|
137
|
+
// treasuryDonation
|
|
138
|
+
tx.donation !== undefined
|
|
139
|
+
? new plutus_data_1.DataConstr(0, [new plutus_data_1.DataI(tx.donation)])
|
|
140
|
+
: new plutus_data_1.DataConstr(1, [])
|
|
131
141
|
]);
|
|
132
142
|
return { v1: v1, v2: v2, v3: v3 };
|
|
133
143
|
}
|