-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTRUCTION.txt
33 lines (23 loc) · 1011 Bytes
/
INSTRUCTION.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
https://rinkeby.infura.io/14470f78e2cc459d877bb629fdc5703a
[Full Link from Infura]
https://rinkeby.infura.io/v3/14470f78e2cc459d877bb629fdc5703a
[Voting contract address]
0x12123b59E6437E487ce69E59fF5a636B261E8758
[Agrichain Contract Address]
https://rinkeby.etherscan.io/address/0xb8Ebea87fF6cB183Bea5c5C75a5923EeDb261d2e
[Rinkeby Admin Account Address]
https://rinkeby.etherscan.io/address/0x2d62771cb1bbb9fc81289276014b76954a57b648
[Get Started with Web3]
var Web3 = require('web3')
var web3 = new Web3([LINK-TO-RPC]);
[Get Balance]
web3.eth.getBalance([Address], (err, wei)=>{balance = web3.utils.fromWei(wei, 'ether')})
[Create New Account]
web3.eth.accounts.create()
{ address: '0x74768cF88BC8a4cd033d9136fbF5720Fa7d0ba21',
privateKey: '0xc25af6e6bf6790558aad8beda7056fc63bfd7a4c1f68b5bf31ca7daaf307aba8',
signTransaction: [Function: signTransaction],
sign: [Function: sign],
encrypt: [Function: encrypt] }
[Smart-Contract Address]
var contract = new web3.eth.Contract(abi, contractAddr)