Wallet creation

The web3j command-line tools allow us, among other features, to create wallets or send transactions. 

To create a new Ethereum account, run web3j wallet create. You'll be asked to provide a password (don't forget it) and then a location where you want to back up your account (wallet JSON file). At the end, you'll get a JSON file with a long name (you can change this) that carries lots of information, including the account address and private key:

Alternatively, instead of using web3j, you can export one of your Testnet accounts created in MetaMask or Geth.

In this project, we will be running our contract in the Testnet, therefore we need to supply test ethers to our freshly created account. To do that, we can use MetaMask to get free ethers and send them to our new account's address. Be careful, you should add 0x and wait until the transaction is confirmed, as shown here:

The account's address is saved inside the wallet's JSON file created earlier, with the address being the last part of the file's name.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset