diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-14 00:00:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-14 00:00:15 +0800 |
commit | 8305d409d2ca83583d9fa7e837ec0a46ce6ba78e (patch) | |
tree | 956c768957f56044113772a88a9cbe7de0ef9cf1 /cmd/mist/assets/examples | |
parent | b64ad7a2a6544564b68f362f18c70476310396d6 (diff) | |
parent | 5c251b69282b3992512d0c17ed0063f294a0e663 (diff) | |
download | dexon-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.gz dexon-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.tar.zst dexon-8305d409d2ca83583d9fa7e837ec0a46ce6ba78e.zip |
Merge branch 'develop' into miner
Diffstat (limited to 'cmd/mist/assets/examples')
-rw-r--r-- | cmd/mist/assets/examples/coin.html | 6 | ||||
-rw-r--r-- | cmd/mist/assets/examples/coin.js | 65 |
2 files changed, 70 insertions, 1 deletions
diff --git a/cmd/mist/assets/examples/coin.html b/cmd/mist/assets/examples/coin.html index bfc1b6e94..ca7a9c0dd 100644 --- a/cmd/mist/assets/examples/coin.html +++ b/cmd/mist/assets/examples/coin.html @@ -79,6 +79,12 @@ contract.received({from: eth.coinbase}).changed(function() { refresh(); }); + + var ev = contract.SingleTransact({}) + ev.watch(function(log) { + someElement.innerHTML += "tnaheousnthaoeu"; + }); + eth.watch('chain').changed(function() { refresh(); }); diff --git a/cmd/mist/assets/examples/coin.js b/cmd/mist/assets/examples/coin.js index ada9d196c..d69af5dcb 100644 --- a/cmd/mist/assets/examples/coin.js +++ b/cmd/mist/assets/examples/coin.js @@ -1 +1,64 @@ -var contract = web3.eth.contractFromAbi([{"constant":false,"inputs":[{"name":"_h","type":"hash256"}],"name":"confirm","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"_r","type":"hash256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"kill","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"changeOwner","outputs":[],"type":"function"},{"inputs":[{"indexed":false,"name":"value","type":"uint256"}],"name":"CashIn","type":"event"},{"inputs":[{"indexed":true,"name":"out","type":"string32"},{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"}],"name":"SingleTransact","type":"event"},{"inputs":[{"indexed":true,"name":"out","type":"string32"},{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"hash256"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"}],"name":"MultiTransact","type":"event"}]); +var contract = web3.eth.contractFromAbi([ + { + "constant":false, + "inputs":[ + {"name":"_h","type":"hash256"} + ], + "name":"confirm", + "outputs":[], + "type":"function" + },{ + "constant":false, + "inputs":[ + {"name":_to,"type":"address"}, + {"name":"_value","type":"uint256"}, + {"name":"_data","type":"bytes"} + ], + "name":"execute", + "outputs":[ + {"name":"_r","type":"hash256"} + ], + "type":"function" + },{ + "constant":false, + "inputs":[ + {"name":"_to","type":"address"} + ],"name":"kill", + "outputs":[], + "type":"function" + },{ + "constant":false, + "inputs":[ + {"name":"_from","type":"address"}, + {"name":"_to","type":"address"} + ], + "name":"changeOwner", + "outputs":[], + "type":"function" + },{ + "inputs":[ + {"indexed":false,"name":"value","type":"uint256"} + ], + "name":"CashIn", + "type":"event" + },{ + "inputs":[ + {"indexed":true,"name":"out","type":"string32"}, + {"indexed":false,"name":"owner","type":"address"}, + {"indexed":false,"name":"value","type":"uint256"}, + {"indexed":false,"name":"to","type":"address"} + ], + "name":"SingleTransact", + "type":"event" + },{ + "inputs":[ + {"indexed":true,"name":"out","type":"string32"}, + {"indexed":false,"name":"owner","type":"address"}, + {"indexed":false,"name":"operation","type":"hash256"}, + {"indexed":false,"name":"value","type":"uint256"}, + {"indexed":false,"name":"to","type":"address"} + ], + "name":"MultiTransact", + "type":"event" + } +]); |