-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructions.txt
30 lines (24 loc) · 968 Bytes
/
instructions.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
node_modules/.bin/ganache-cli
node_modules/.bin/solcjs --bin --abi Record.sol
Run in node in a node window
Web3 = require('web3')
web3 = new Web3("http://localhost:8545")
web3.eth.getAccounts(console.log)
bytecode = fs.readFileSync('Record_sol_Record.bin').toString()
abi = JSON.parse(fs.readFileSync('Record_sol_Record.abi').toString())
deployedContract = new web3.eth.Contract(abi)
authIDs=['deptcse','ogapstamu']
deployedContract.deploy({
data: bytecode,
arguments: [authIDs.map(name => web3.utils.asciiToHex(name))]
}).send({
from: '0x232183981a0bd076cf24e9c4081f4914a954e7b2',
gas: 1500000,
gasPrice: web3.utils.toWei('0.00003', 'ether')
}).then((newContractInstance) => {
deployedContract.options.address = newContractInstance.options.address
console.log(newContractInstance.options.address)
});
0xD957b6c533459a66981eEAF01cb7699fdEc9b061
git config --global user.name "phoenix1712"
git config --global user.email "[email protected]"