diff --git a/src.ts/_tests/test-abi.ts b/src.ts/_tests/test-abi.ts index 88cf7df477..532c3a2f3f 100644 --- a/src.ts/_tests/test-abi.ts +++ b/src.ts/_tests/test-abi.ts @@ -151,9 +151,27 @@ describe("Test Interface", function() { assert.equal(log.args[0], "0x8ba1f109551bD432803012645Ac136ddd64DBA72"); assert.equal(log.args[1], "0xAC1639CF97a3A46D431e6d1216f576622894cBB5"); assert.equal(log.args[2], BigInt(234)); + + }); + + // See #4248 + it("formats JSON ABI parameters with default empty string for `name` key", function() { + assert.deepEqual(JSON.parse(iface.getFunction("balanceOf")!.format('json')), { + constant: false, + inputs: [ + { name: "owner", type: "address" } + ], + name: "balanceOf", + outputs: [ + { name: "", type: "uint256" } + ], + payable: false, + type: "function", + }); }); }); + describe("Tests Legacy ABI formats", function() { // See: #3932