mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10823 from DmytroShalaiev/DmytroShalaiev-events-doc-fix
Update events doc
This commit is contained in:
commit
1df284733e
@ -93,10 +93,10 @@ The use in the JavaScript API is as follows:
|
|||||||
var ClientReceipt = web3.eth.contract(abi);
|
var ClientReceipt = web3.eth.contract(abi);
|
||||||
var clientReceipt = ClientReceipt.at("0x1234...ab67" /* address */);
|
var clientReceipt = ClientReceipt.at("0x1234...ab67" /* address */);
|
||||||
|
|
||||||
var event = clientReceipt.Deposit();
|
var depositEvent = clientReceipt.Deposit();
|
||||||
|
|
||||||
// watch for changes
|
// watch for changes
|
||||||
event.watch(function(error, result){
|
depositEvent.watch(function(error, result){
|
||||||
// result contains non-indexed arguments and topics
|
// result contains non-indexed arguments and topics
|
||||||
// given to the `Deposit` call.
|
// given to the `Deposit` call.
|
||||||
if (!error)
|
if (!error)
|
||||||
@ -105,7 +105,7 @@ The use in the JavaScript API is as follows:
|
|||||||
|
|
||||||
|
|
||||||
// Or pass a callback to start watching immediately
|
// Or pass a callback to start watching immediately
|
||||||
var event = clientReceipt.Deposit(function(error, result) {
|
var depositEvent = clientReceipt.Deposit(function(error, result) {
|
||||||
if (!error)
|
if (!error)
|
||||||
console.log(result);
|
console.log(result);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user