defi-kit 2.0.0 → 2.0.1
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.
- package/dist/arb1.js +20 -16
- package/dist/arb1.js.map +1 -1
- package/dist/arb1.mjs +1 -1
- package/dist/{chunk-AUSHK4AH.mjs → chunk-QN7LFK2K.mjs} +22 -17
- package/dist/{chunk-AUSHK4AH.mjs.map → chunk-QN7LFK2K.mjs.map} +1 -1
- package/dist/eth.js +20 -16
- package/dist/eth.js.map +1 -1
- package/dist/eth.mjs +1 -1
- package/dist/gno.js +20 -16
- package/dist/gno.js.map +1 -1
- package/dist/gno.mjs +1 -1
- package/package.json +1 -1
package/dist/arb1.mjs
CHANGED
|
@@ -25249,6 +25249,7 @@ var POSTER_ADDRESS = "0x000000000000cd17345801aa8147b8D3950260FF";
|
|
|
25249
25249
|
// src/export.ts
|
|
25250
25250
|
import {
|
|
25251
25251
|
Interface,
|
|
25252
|
+
Result,
|
|
25252
25253
|
hexlify,
|
|
25253
25254
|
isBytesLike
|
|
25254
25255
|
} from "ethers";
|
|
@@ -25285,7 +25286,8 @@ var decode = (transaction) => {
|
|
|
25285
25286
|
);
|
|
25286
25287
|
}
|
|
25287
25288
|
const contractInputsValues = asTxBuilderInputValues(
|
|
25288
|
-
iface.decodeFunctionData(functionFragment, transaction.data)
|
|
25289
|
+
iface.decodeFunctionData(functionFragment, transaction.data),
|
|
25290
|
+
functionFragment.inputs
|
|
25289
25291
|
);
|
|
25290
25292
|
return {
|
|
25291
25293
|
to: transaction.to,
|
|
@@ -25306,23 +25308,26 @@ var mapInputs = (inputs) => {
|
|
|
25306
25308
|
components: mapInputs(input.components)
|
|
25307
25309
|
}));
|
|
25308
25310
|
};
|
|
25309
|
-
var asTxBuilderInputValues = (result) => {
|
|
25311
|
+
var asTxBuilderInputValues = (result, params) => {
|
|
25310
25312
|
const object = {};
|
|
25311
|
-
for (const
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25313
|
+
for (const param of params) {
|
|
25314
|
+
const value = result[param.name];
|
|
25315
|
+
let serialized = value;
|
|
25316
|
+
if (typeof value === "string") {
|
|
25317
|
+
serialized = value;
|
|
25318
|
+
} else if (typeof value === "bigint" || typeof value === "number") {
|
|
25319
|
+
serialized = value.toString();
|
|
25320
|
+
} else if (isBytesLike(value)) {
|
|
25321
|
+
serialized = hexlify(value);
|
|
25322
|
+
} else if (value instanceof Result) {
|
|
25323
|
+
serialized = JSON.stringify(
|
|
25324
|
+
value,
|
|
25325
|
+
(_, v) => isBytesLike(v) ? hexlify(v) : typeof v === "bigint" ? v.toString() : v
|
|
25326
|
+
);
|
|
25327
|
+
} else {
|
|
25328
|
+
throw new Error(`Unexpected value type: ${typeof value}`);
|
|
25325
25329
|
}
|
|
25330
|
+
object[param.name] = serialized;
|
|
25326
25331
|
}
|
|
25327
25332
|
return object;
|
|
25328
25333
|
};
|
|
@@ -25337,4 +25342,4 @@ export {
|
|
|
25337
25342
|
createApply,
|
|
25338
25343
|
createExportToSafeTransactionBuilder
|
|
25339
25344
|
};
|
|
25340
|
-
//# sourceMappingURL=chunk-
|
|
25345
|
+
//# sourceMappingURL=chunk-QN7LFK2K.mjs.map
|