meterify, an extended version of
npm. Then install the app prerequisites
index.js, and include the
web3requirements, then call the file with
nodeto test the connection to the testnet.
meterify.eth.accountspackage contains functions for generating accounts and signing transactions and data. Create an object, using Alice's and Bob's names as keys. Perform a loop on the object, calling the
createfunction. This will generate new local accounts that contain both a private key and a public key. Add each account to the object as is created.
meterify.eth.accountsalso contains an in memory wallet to store multiple accounts. Loop through the object returned by the
createAccountsfunction, and add Alice's and Bob's accounts to the wallet, using each account's private key.
sendTransactionmethod to create a function for sending some MTR and MTRG from Alice to Bob.
meterifyare Wei, where 1 MTR = 10e18 Wei. Note that the identifier code for MTR is
0000000000, while MTRG is
promiEventthat is considered resolved once the
contractReadywhen the contract is ready.
Stop Docker using
docker-compose.yml, stop repeated initialization and dependency installation by commenting out the following lines.