Meterify Code Examples
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
Warringstakes tesnet: http://testnet.meter.io
$ 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
Run
$ node createAccount.js
$ node sendTransaction.js
Source Files
Run
$ node createAccount.js
$ node sendTransaction.js
$ node deployContract.js
Source Files
Run
$ node createAccount.js
$ node sendTransaction.js
$ node deployContract.js
$ node callContract.js
Source Files
Install
$ git clone https://github.com/meterio/hackathon-demo-react.git
$ cd hackathon-demo-react.git
$ npm install
Run
$ npm start