We already have the example code in Github, which require node.js as the runtime environment. The following commands setup node.js, install meterify
package and check out the example code in Github.
Please change the end point in meterifiedWeb3.js
to your own node or the official mainnet/testnet end points, which are:
mainnet: https://mainnet.meter.io:8667
Warringstakes tesnet: http://warringstakes.meter.io:8667
$ sudo apt install npm$ npm install meterify$ git clone https://github.com/meterio/hackathon-demo
$ node createAccount.js
Please be aware the above script creates the private/public key pair on the RPC end point. You should always run your own local node and connect to the local RPC end point for creating account due to security reasons.
Source Files
​createAccount.js​
​meterifiedWeb3.js​
​utils.js​
​package.json​
Run
​$ node createAccount.js​$ node sendTransaction.js​
Source Files
​createAccount.js​
​sendTransaction.js​
​meterifiedWeb3.js​
​utils.js​
​package.json​
Run
​$ node createAccount.js​$ node sendTransaction.js​$ node deployContract.js
Source Files
​createAccount.js​
​sendTransaction.js​
​deployContract.js​
​sample_token.sol​
​meterifiedWeb3.js​
​utils.js​
​package.json​
Run
$ node createAccount.js​$ node sendTransaction.js​$ node deployContract.js​$ node callContract.js
Source Files
​createAccount.js​
​sendTransaction.js​
​deployContract.js​
​callContract.js​
​sample_token.sol​
​meterifiedWeb3.js​
​utils.js​
​package.json​
Install
$ git clone https://github.com/meterio/hackathon-demo-react.git​$ cd hackathon-demo-react.git​$ npm install
Run
$ npm start