-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.log
34 lines (34 loc) · 817 Bytes
/
console.log
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
34
let address = "0xed6367b2b7e1f0a33cecd2d3b56fc6667a14e4a9"
let abi = [
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "truite",
"type": "uint32"
}
],
"name": "TruiteFired",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "emitTruite",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]
web3.version
let contract = web3.eth.contract(abi)
let instance = contract.at(address)
instance.emitTruite(console.log)