0

Here we see:

mainnet = 0
if mainnet:
    dummy_address = "1111111111111111111114oLvT2"
else:
    dummy_address = "mfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8"

What is this? No explanation is given. Can I create my own dummy address? What is this doing exactly, with some detail?

1

1111111111111111111114oLvT2 is the P2PKH address derived from a HASH160 consisting of all 0s.

mfWxJ45yp2SFn7UciZyNpvDKrzbhyfKrY8 is the same P2PKH address, but in its testnet encoding.

These are well known burn addresses, and any coins sent to either of them will be permanently lost. The example you linked uses them as they are easy to search for (which I don't really follow - any known address is easy to search for). You should replace them with an address for which you have the private key in your own code.

  • Can you elaborate on the last sentence, please? Why do I need to do that? Does it relate to this? – Lance Pollard Oct 28 at 10:49

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.