simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
441 stars 270 forks source link

Test Net #224

Closed rennylangat closed 2 years ago

rennylangat commented 2 years ago

How can I create a wallet address that is not on mainnet? I would like to run it on Rinkeby Test net for development purposes first before transferring to mainnet. Is it possible?

simolus3 commented 2 years ago

Obviously you won't be able to transfer a wallet - transactions that happened on Rinkeby didn't happen on main. From my (amateurish) knowledge, re-using a private key and address between Rinkeby and the mainnet shouldn't be a problem (?), but I'd definitely recommend to keep them entirely separate to be sure.

However, you can just pick a random private key, compute the corresponding address and use that on Rinkeby. The mechanisms are the same. You'd also have to configure your Web3Client to talk to a node on Rinkeby instead of main (just pick a different URI).

rennylangat commented 2 years ago

Is there a way this process can be automated? Such that the wallet generated is automatically one in test net. Say the app is in test flight and you need to simulate a real life scenario of how two or more users will send and receive ETH