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/eth.js
CHANGED
|
@@ -25308,7 +25308,8 @@ var decode = (transaction) => {
|
|
|
25308
25308
|
);
|
|
25309
25309
|
}
|
|
25310
25310
|
const contractInputsValues = asTxBuilderInputValues(
|
|
25311
|
-
iface.decodeFunctionData(functionFragment, transaction.data)
|
|
25311
|
+
iface.decodeFunctionData(functionFragment, transaction.data),
|
|
25312
|
+
functionFragment.inputs
|
|
25312
25313
|
);
|
|
25313
25314
|
return {
|
|
25314
25315
|
to: transaction.to,
|
|
@@ -25329,23 +25330,26 @@ var mapInputs = (inputs) => {
|
|
|
25329
25330
|
components: mapInputs(input.components)
|
|
25330
25331
|
}));
|
|
25331
25332
|
};
|
|
25332
|
-
var asTxBuilderInputValues = (result) => {
|
|
25333
|
+
var asTxBuilderInputValues = (result, params) => {
|
|
25333
25334
|
const object = {};
|
|
25334
|
-
for (const
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25344
|
-
|
|
25345
|
-
|
|
25346
|
-
|
|
25347
|
-
|
|
25335
|
+
for (const param of params) {
|
|
25336
|
+
const value = result[param.name];
|
|
25337
|
+
let serialized = value;
|
|
25338
|
+
if (typeof value === "string") {
|
|
25339
|
+
serialized = value;
|
|
25340
|
+
} else if (typeof value === "bigint" || typeof value === "number") {
|
|
25341
|
+
serialized = value.toString();
|
|
25342
|
+
} else if ((0, import_ethers11.isBytesLike)(value)) {
|
|
25343
|
+
serialized = (0, import_ethers11.hexlify)(value);
|
|
25344
|
+
} else if (value instanceof import_ethers11.Result) {
|
|
25345
|
+
serialized = JSON.stringify(
|
|
25346
|
+
value,
|
|
25347
|
+
(_, v) => (0, import_ethers11.isBytesLike)(v) ? (0, import_ethers11.hexlify)(v) : typeof v === "bigint" ? v.toString() : v
|
|
25348
|
+
);
|
|
25349
|
+
} else {
|
|
25350
|
+
throw new Error(`Unexpected value type: ${typeof value}`);
|
|
25348
25351
|
}
|
|
25352
|
+
object[param.name] = serialized;
|
|
25349
25353
|
}
|
|
25350
25354
|
return object;
|
|
25351
25355
|
};
|