{"record":{"id":"8af4ab417ff22c16","repo":"ethereum/go-ethereum","slug":"invalid-address","errorCode":null,"errorMessage":"invalid address","messagePattern":"invalid address","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"internal/jsre/deps/web3.js","lineNumber":3943,"sourceCode":"        post.topics = [];\n    }\n    post.topics = post.topics.map(function(topic){\n        return utils.toAscii(topic);\n    });\n\n    return post;\n};\n\nvar inputAddressFormatter = function (address) {\n    var iban = new Iban(address);\n    if (iban.isValid() && iban.isDirect()) {\n        return '0x' + iban.address();\n    } else if (utils.isStrictAddress(address)) {\n        return address;\n    } else if (utils.isAddress(address)) {\n        return '0x' + address;\n    }\n    throw new Error('invalid address');\n};\n\n\nvar outputSyncingFormatter = function(result) {\n    if (!result) {\n        return result;\n    }\n\n    result.startingBlock = utils.toDecimal(result.startingBlock);\n    result.currentBlock = utils.toDecimal(result.currentBlock);\n    result.highestBlock = utils.toDecimal(result.highestBlock);\n    result.syncedAccounts = utils.toDecimal(result.syncedAccounts);\n    result.syncedAccountBytes = utils.toDecimal(result.syncedAccountBytes);\n    result.syncedBytecodes = utils.toDecimal(result.syncedBytecodes);\n    result.syncedBytecodeBytes = utils.toDecimal(result.syncedBytecodeBytes);\n    result.syncedStorage = utils.toDecimal(result.syncedStorage);\n    result.syncedStorageBytes = utils.toDecimal(result.syncedStorageBytes);\n    result.healedTrienodes = utils.toDecimal(result.healedTrienodes);","sourceCodeStart":3925,"sourceCodeEnd":3961,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/internal/jsre/deps/web3.js#L3925-L3961","documentation":"Error \"invalid address\" thrown in ethereum/go-ethereum.","triggerScenarios":"Calling web3.eth.sendTransaction, contract methods, or any formatter path that passes an address through inputAddressFormatter with a malformed, non-checksummed, or non-hex address string.","commonSituations":"DApp front ends passing user-typed addresses directly into transactions without validation or normalization.","solutions":["Validate the address before sending: it must be a 20-byte hex string, optionally 0x-prefixed, or a valid direct IBAN.","Use web3.isAddress(address) (or utils.isAddress) to check the value before calling inputAddressFormatter, and reject or normalize user input early.","Ensure checksum-cased addresses are correct; a mixed-case address with a bad EIP-55 checksum is rejected."],"exampleFix":"if (!web3.isAddress(to)) { throw new Error('bad recipient address'); }\nweb3.eth.sendTransaction({from: from, to: to, value: amount});","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}