1

0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa is the address for kovan DAI. However this is an actual address on the ethereum mainnet. How is this possible? How is the private key for this address accessible by an address holder?

0

Every possible combination of 40 hexadecimal characters is a valid Ethereum address.

The fact that an address holds Ether, doesn't mean that someone has its private key.

It only means that someone has transferred Ether to that address.

You can simply check how many transactions have been executed by an address:

const Web3 = require("web3");

const INFURA_PROJECT_ID = "...";
const ETHEREUM_ADDRESS = "0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa";

async function run() {
    for (const network of ["mainnet", "ropsten", "rinkeby", "kovan"]) {
        const web3 = new Web3(`https://${network}.infura.io/v3/${INFURA_PROJECT_ID}`);
        const nonce = await web3.eth.getTransactionCount(ETHEREUM_ADDRESS);
        console.log(network, nonce);
        if (web3.currentProvider.disconnect)
            web3.currentProvider.disconnect();
    }
}

run();

And see that no transaction has ever been executed by that address on mainnet:

mainnet 0
ropsten 0
rinkeby 0
kovan 1
4
  • Yeah that I know. But the difference is that the address is a contract on kovan and a regular address in mainnet. – Deval Khandelwal Jan 3 at 4:38
  • @DevalKhandelwal: Sorry, I've misread your question. See updated answer above. – goodvibration Jan 3 at 7:36
  • Okay. I did not see that there were no outgoing transactions. Looks like some devs didn't change network before interacting with the address. – Deval Khandelwal Jan 6 at 16:23
  • @DevalKhandelwal: So does that answer your question then? – goodvibration Jan 6 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.