We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a71f518 commit 0078e02Copy full SHA for 0078e02
packages/abi/src.ts/interface.ts
@@ -462,6 +462,14 @@ export class Interface {
462
return keccak256(hexlify(value));
463
}
464
465
+ if (param.type === "bool" && typeof(value) === "boolean") {
466
+ value = (value ? "0x01": "0x00");
467
+ }
468
+
469
+ if (param.type.match(/^u?int/)) {
470
+ value = BigNumber.from(value).toHexString();
471
472
473
// Check addresses are valid
474
if (param.type === "address") { this._abiCoder.encode( [ "address" ], [ value ]); }
475
return hexZeroPad(hexlify(value), 32);
0 commit comments