aboutsummaryrefslogtreecommitdiffstats
path: root/example
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-31 11:09:48 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-31 11:09:48 +0800
commit0b82a05a75a0a7592e4fe391120f90d7cee495ac (patch)
treea4f308fe78c57d8118e91bda2d640f70ee135f23 /example
parent80c97ca21b168e7f94cae6333be5439b6db2fe1d (diff)
downloadgo-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar.gz
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar.bz2
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar.lz
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar.xz
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.tar.zst
go-tangerine-0b82a05a75a0a7592e4fe391120f90d7cee495ac.zip
events
Diffstat (limited to 'example')
-rw-r--r--example/event.html46
1 files changed, 45 insertions, 1 deletions
diff --git a/example/event.html b/example/event.html
index 8191dfd8f..239813268 100644
--- a/example/event.html
+++ b/example/event.html
@@ -27,25 +27,57 @@
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) {
+
+ });
+ };
+
+
// not valid
- // function test4() {
+ // function testX() {
// web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) {
// });
// };
@@ -63,5 +95,17 @@
<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>
</body>
</html>