diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-31 23:02:16 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-31 23:02:16 +0800 |
commit | 3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca (patch) | |
tree | 11fc98b4f70b0f5b549cc463bb97f3a15764dae2 /example/event.html | |
parent | 2eedc330bfcb976b8eef2b6aee69e19430de1713 (diff) | |
parent | 688030ecb615cbf97c428cf1dd2e337380079168 (diff) | |
download | dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar.gz dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar.bz2 dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar.lz dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar.xz dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.tar.zst dexon-3cdf108057a6f0ce83bb3eb9d9b2804ae07956ca.zip |
Merge branch 'develop'
Diffstat (limited to 'example/event.html')
-rw-r--r-- | example/event.html | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/example/event.html b/example/event.html index 8191dfd8f..84d302437 100644 --- a/example/event.html +++ b/example/event.html @@ -27,25 +27,63 @@ var contract = web3.eth.contract(address, desc); function test1() { + // "{"topic":["0x83c9849c","0xc4d76332"],"address":"0x01"}" web3.eth.watch(contract).changed(function (res) { }); }; function test2() { + // "{"topic":["0x83c9849c"],"address":"0x01"}" web3.eth.watch(contract.Event).changed(function (res) { }); }; function test3() { + // "{"topic":["0x83c9849c"],"address":"0x01"}" contract.Event().changed(function (res) { }); }; + function test4() { + // "{"topic":["0x83c9849c","0000000000000000000000000000000000000000000000000000000000000045"],"address":"0x01"}" + contract.Event({a: 69}).changed(function (res) { + + }); + }; + + function test5() { + // "{"topic":["0x83c9849c",["0000000000000000000000000000000000000000000000000000000000000045","000000000000000000000000000000000000000000000000000000000000002a"]],"address":"0x01"}" + contract.Event({a: [69, 42]}).changed(function (res) { + + }); + }; + + function test6() { + // "{"topic":["0x83c9849c","000000000000000000000000000000000000000000000000000000000000001e"],"max":100,"address":"0x01"}" + contract.Event({a: 30}, {max: 100}).changed(function (res) { + + }); + }; + + function test7() { + // "{"topic":["0x83c9849c","000000000000000000000000000000000000000000000000000000000000001e"],"address":"0x01"}" + web3.eth.watch(contract.Event, {a: 30}).changed(function (res) { + + }); + }; + + function test8() { + // "{"topic":["0x83c9849c","000000000000000000000000000000000000000000000000000000000000001e"],"max":100,"address":"0x01"}" + web3.eth.watch(contract.Event, {a: 30}, {max: 100}).changed(function (res) { + + }); + }; + // not valid - // function test4() { + // function testX() { // web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) { // }); // }; @@ -63,5 +101,20 @@ <div> <button type="button" onClick="test3();">test3</button> </div> + <div> + <button type="button" onClick="test4();">test4</button> + </div> + <div> + <button type="button" onClick="test5();">test5</button> + </div> + <div> + <button type="button" onClick="test6();">test6</button> + </div> + <div> + <button type="button" onClick="test7();">test7</button> + </div> + <div> + <button type="button" onClick="test8();">test8</button> + </div> </body> </html> |