diff --git a/providers/package.json b/providers/package.json index 33af8175e..06d0737c1 100644 --- a/providers/package.json +++ b/providers/package.json @@ -1,6 +1,6 @@ { "name": "ethers-providers", - "version": "2.1.10", + "version": "2.1.11", "description": "Service provider for Ethereum wallet library.", "bugs": { "url": "http://github.com/ethers-io/ethers.js/issues", diff --git a/providers/provider.js b/providers/provider.js index a330630e3..039d63490 100644 --- a/providers/provider.js +++ b/providers/provider.js @@ -188,6 +188,12 @@ function checkTransaction(transaction) { transaction.gasLimit = transaction.gas; } + // Some clients (TestRPC) do strange things like return 0x0 for the + // 0 address; correct this to be a real address + if (transaction.to && utils.bigNumberify(transaction.to).isZero) { + transaction.to = '0x0000000000000000000000000000000000000000'; + } + // Rename input to data if (transaction.input != null && transaction.data == null) { transaction.data = transaction.input;