-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.html
140 lines (102 loc) · 39.5 KB
/
index.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Universal ÐApp</title>
<script src="libs/jquery-2.1.3.min.js"></script>
<script src="libs/web3.min.js"></script>
<script src="libs/ethereumjs-vm.js"></script>
<script src="src/universal-dapp.js"></script>
<link rel="stylesheet" href="src/universal-dapp.css">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
body {
margin: 0;
padding: 2em;
font-family: monospace;
}
#info {
width: 50%;
float: left;
padding-right: 1em;
box-sizing: border-box;
margin-bottom: 2em;
}
#new {
min-width: 50%;
width: 50%;
float: right;
margin-top: 3em;
margin-bottom: 2em;
}
#new textarea {
height: 10em;
}
#dapps {
overflow: auto;
clear: both;
}
#dapps .udapp {
/*float: left;
width: 60em;*/
margin-right: 1em;
margin-bottom: 1em;
}
@media screen and (max-width: 600px) {
#info, #new {
width: 100%;
padding: 0;
float: none;
margin: 0;
margin-bottom: 1em;
}
#dapps .udapp {
width: 100%;
}
}
</style>
</head>
<body>
<div id="info">
<h1>Universal ÐApp</h1>
<p>Documentation / Source: <a href="https://github.com/d11e9/universal-dapp">https://github.com/d11e9/universal-dapp</a></p>
<p>A Universal Interface or (ÐApp) for contracts on the Ethereum blockchain. Best used in conjunction with a contract compiler like <a href="https://d11e9.github.io/browser-solidity">browser-solidity</a> or in cases where you already have an ABI and/or bytecode for an existing contract.</p>
<p>By default Universal ÐApp runs in a VM</p>
<p><label><input id="novm" type="checkbox" /> Use local Node (Warning! alpha software)</label></p>
</div>
<div id="new"></div>
<div id="dapps"></div>
<script>
$(function(){
var uDAppJson = [{"name":"AvatarRegistry","interface":"[{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItem\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItemPrev\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItemNext\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"avatar\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[{\"name\":\"contractAddress\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"createAvatar\",\"outputs\":[{\"name\":\"contractAddress\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deregister\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getHead\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getTail\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"}]\n","bytecode":"60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b612056806100406000396000f300606060405236156100ab576000357c01000000000000000000000000000000000000000000000000000000009004806314d8c981146100ad5780631a695230146100ea57806322fb3fb01461011157806341c0e1b51461014e578063438f503d1461016f5780634420e486146101ac5780635e5cd13a146101e9578063aff5edb114610220578063be1c766b14610241578063dc281aff14610262578063f8cdfbf814610299576100ab565b005b6100be600480359060200150610471565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fb6004803590602001506102d0565b6040518082815260200191505060405180910390f35b610122600480359060200150610533565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610159600450610362565b6040518082815260200191505060405180910390f35b6101806004803590602001506104d2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bd60048035906020015061064d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f4600450610594565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61022b600450610665565b6040518082815260200191505060405180910390f35b61024c60045061045f565b6040518082815260200191505060405180910390f35b61026d600450610401565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a4600450610430565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561035c5781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001905061035d565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103fd57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506103fe565b5b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061042d565b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061045c565b90565b6000600360005054905061046e565b90565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506104cd565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061052e565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061058f565b919050565b6000600060405161112c80610f2a833901809050604051809103906000f090508073ffffffffffffffffffffffffffffffffffffffff16631a69523033604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f115610002575050506040515150610642338261067a565b9150610649565b5090565b6000610659338361067a565b9050610660565b919050565b600061067033610944565b9050610677565b90565b600082600080600460005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff16141561093b578460046000506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060806040519081016040528060018152602001600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200185815260200150600460005060008773ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060008201518160000160006101000a81548160ff0219169083021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060608201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555090505084600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506003600081815054809291906001019190505550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156109315784600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b839250505061093e565b50505b92915050565b600081600180600460005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161415610f21578373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a6457600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b8373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b3857600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b600073ffffffffffffffffffffffffffffffffffffffff16600460005060008673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610cc057600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660046000506000600460005060008873ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b600073ffffffffffffffffffffffffffffffffffffffff16600460005060008673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610e4857600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660046000506000600460005060008873ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b600360008181505480929190600190039190505550600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006000820160006101000a81549060ff02191690556000820160016101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600192505050610f24565b50505b919050560060606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b6110ec806100406000396000f30060606040523615610074576000357c0100000000000000000000000000000000000000000000000000000000900480631a6952301461007657806341c0e1b51461009d57806347fca8d8146100be5780638eaa6ac0146100f5578063ba44593c1461011c578063f71f7a251461014957610074565b005b610087600480359060200150610176565b6040518082815260200191505060405180910390f35b6100a8600450610208565b6040518082815260200191505060405180910390f35b6100c96004506103f6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101066004803590602001506102a7565b6040518082815260200191505060405180910390f35b61013360048035906020018035906020015061036d565b6040518082815260200191505060405180910390f35b6101606004803590602001803590602001506102cf565b6040518082815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102025781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060019050610203565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102a357600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506102a4565b5b90565b6000600160005060008381526020019081526020016000206000505490506102ca565b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103665781600160005060008581526020019081526020016000206000508190555060016000506000848152602001908152602001600020600050549050610367565b5b92915050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103ef576103e8838373ffffffffffffffffffffffffffffffffffffffff166001026102cf565b90506103f0565b5b92915050565b60006000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561052357604051610bc380610529833901809050604051809103906000f090508073ffffffffffffffffffffffffffffffffffffffff16631a69523033604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051515061051a7f776f7400000000000000000000000000000000000000000000000000000000008261036d565b50809150610524565b5b5090560060606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b610b83806100406000396000f300606060405236156100ab576000357c01000000000000000000000000000000000000000000000000000000009004806314d8c981146100ad5780631a695230146100d457806322fb3fb0146100fb578063284cc0a914610138578063292493931461015f57806341c0e1b51461018c578063438f503d146101ad578063be1c766b146101ea578063ca4fffad1461020b578063dc281aff14610232578063f8cdfbf814610269576100ab565b005b6100be600480359060200150610441565b6040518082815260200191505060405180910390f35b6100e56004803590602001506102a0565b6040518082815260200191505060405180910390f35b61010c6004803590602001506104e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014960048035906020015061067d565b6040518082815260200191505060405180910390f35b6101766004803590602001803590602001506107d3565b6040518082815260200191505060405180910390f35b610197600450610332565b6040518082815260200191505060405180910390f35b6101be600480359060200150610485565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f560045061042f565b6040518082815260200191505060405180910390f35b61021c600480359060200150610547565b6040518082815260200191505060405180910390f35b61023d6004506103d1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610274600450610400565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561032c5781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001905061032d565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103cd57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506103ce565b5b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506103fd565b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061042c565b90565b6000600360005054905061043e565b90565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610480565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506104e1565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610542565b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561067757600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561062d57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600101919050555061063a565b6106388260016108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610678565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156107cd57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561076457600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600190039190505550610790565b61078e827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506107ce565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156108f857600460005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff16156108af5781600460005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050819055506108bb565b6108b983836108ff565b505b600460005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506108f9565b5b92915050565b60006000836000806000600460005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505414151415610b7957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925085600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550608060405190810160405280600181526020018481526020016000815260200186815260200150600460005060008873ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060008201518160000160006101000a81548160ff0219169083021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506060820151816002016000505590505085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506003600081815054809291906001019190505550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b6f5785600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b8493505050610b7c565b50505b509291505056"},{"name":"Avatar","interface":"[{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"createWoT\",\"outputs\":[{\"name\":\"wotContractAddress\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"bytes32\"}],\"name\":\"get\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"bytes32\"},{\"name\":\"val\",\"type\":\"address\"}],\"name\":\"set\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"key\",\"type\":\"bytes32\"},{\"name\":\"value\",\"type\":\"bytes32\"}],\"name\":\"set\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"type\":\"function\"}]\n","bytecode":"60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b6110ec806100406000396000f30060606040523615610074576000357c0100000000000000000000000000000000000000000000000000000000900480631a6952301461007657806341c0e1b51461009d57806347fca8d8146100be5780638eaa6ac0146100f5578063ba44593c1461011c578063f71f7a251461014957610074565b005b610087600480359060200150610176565b6040518082815260200191505060405180910390f35b6100a8600450610208565b6040518082815260200191505060405180910390f35b6100c96004506103f6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101066004803590602001506102a7565b6040518082815260200191505060405180910390f35b61013360048035906020018035906020015061036d565b6040518082815260200191505060405180910390f35b6101606004803590602001803590602001506102cf565b6040518082815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102025781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060019050610203565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102a357600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506102a4565b5b90565b6000600160005060008381526020019081526020016000206000505490506102ca565b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103665781600160005060008581526020019081526020016000206000508190555060016000506000848152602001908152602001600020600050549050610367565b5b92915050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103ef576103e8838373ffffffffffffffffffffffffffffffffffffffff166001026102cf565b90506103f0565b5b92915050565b60006000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561052357604051610bc380610529833901809050604051809103906000f090508073ffffffffffffffffffffffffffffffffffffffff16631a69523033604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051515061051a7f776f7400000000000000000000000000000000000000000000000000000000008261036d565b50809150610524565b5b5090560060606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b610b83806100406000396000f300606060405236156100ab576000357c01000000000000000000000000000000000000000000000000000000009004806314d8c981146100ad5780631a695230146100d457806322fb3fb0146100fb578063284cc0a914610138578063292493931461015f57806341c0e1b51461018c578063438f503d146101ad578063be1c766b146101ea578063ca4fffad1461020b578063dc281aff14610232578063f8cdfbf814610269576100ab565b005b6100be600480359060200150610441565b6040518082815260200191505060405180910390f35b6100e56004803590602001506102a0565b6040518082815260200191505060405180910390f35b61010c6004803590602001506104e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014960048035906020015061067d565b6040518082815260200191505060405180910390f35b6101766004803590602001803590602001506107d3565b6040518082815260200191505060405180910390f35b610197600450610332565b6040518082815260200191505060405180910390f35b6101be600480359060200150610485565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f560045061042f565b6040518082815260200191505060405180910390f35b61021c600480359060200150610547565b6040518082815260200191505060405180910390f35b61023d6004506103d1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610274600450610400565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561032c5781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001905061032d565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103cd57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506103ce565b5b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506103fd565b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061042c565b90565b6000600360005054905061043e565b90565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610480565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506104e1565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610542565b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561067757600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561062d57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600101919050555061063a565b6106388260016108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610678565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156107cd57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561076457600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600190039190505550610790565b61078e827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506107ce565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156108f857600460005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff16156108af5781600460005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050819055506108bb565b6108b983836108ff565b505b600460005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506108f9565b5b92915050565b60006000836000806000600460005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505414151415610b7957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925085600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550608060405190810160405280600181526020018481526020016000815260200186815260200150600460005060008873ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060008201518160000160006101000a81548160ff0219169083021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506060820151816002016000505590505085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506003600081815054809291906001019190505550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b6f5785600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b8493505050610b7c565b50505b509291505056"},{"name":"WoT (Web of Trust Node)","interface":"[{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItem\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItemPrev\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"down\",\"outputs\":[{\"name\":\"rating\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"int256\"}],\"name\":\"set\",\"outputs\":[{\"name\":\"rating\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"kill\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"getItemNext\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"id\",\"type\":\"address\"}],\"name\":\"up\",\"outputs\":[{\"name\":\"rating\",\"type\":\"int256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getHead\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getTail\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"}]\n","bytecode":"60606040525b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b610b83806100406000396000f300606060405236156100ab576000357c01000000000000000000000000000000000000000000000000000000009004806314d8c981146100ad5780631a695230146100d457806322fb3fb0146100fb578063284cc0a914610138578063292493931461015f57806341c0e1b51461018c578063438f503d146101ad578063be1c766b146101ea578063ca4fffad1461020b578063dc281aff14610232578063f8cdfbf814610269576100ab565b005b6100be600480359060200150610441565b6040518082815260200191505060405180910390f35b6100e56004803590602001506102a0565b6040518082815260200191505060405180910390f35b61010c6004803590602001506104e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014960048035906020015061067d565b6040518082815260200191505060405180910390f35b6101766004803590602001803590602001506107d3565b6040518082815260200191505060405180910390f35b610197600450610332565b6040518082815260200191505060405180910390f35b6101be600480359060200150610485565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f560045061042f565b6040518082815260200191505060405180910390f35b61021c600480359060200150610547565b6040518082815260200191505060405180910390f35b61023d6004506103d1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610274600450610400565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561032c5781600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001905061032d565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103cd57600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff600190506103ce565b5b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506103fd565b90565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061042c565b90565b6000600360005054905061043e565b90565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610480565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506104e1565b919050565b6000600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610542565b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561067757600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561062d57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600101919050555061063a565b6106388260016108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050549050610678565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156107cd57600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff161561076457600460005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060020160008181505480929190600190039190505550610790565b61078e827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6108ff565b505b600460005060008373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506107ce565b5b919050565b6000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156108f857600460005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060000160009054906101000a900460ff16156108af5781600460005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050600201600050819055506108bb565b6108b983836108ff565b505b600460005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505490506108f9565b5b92915050565b60006000836000806000600460005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000506002016000505414151415610b7957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925085600460005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550608060405190810160405280600181526020018481526020016000815260200186815260200150600460005060008873ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005060008201518160000160006101000a81548160ff0219169083021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506060820151816002016000505590505085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506003600081815054809291906001019190505550600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610b6f5785600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b8493505050610b7c565b50505b509291505056"}]
// var dapp = new UniversalDApp([{name: myName, interface: myABI, bytecode: myCode }])
// $('#dapps').append( dapp.render() )
// fill in some defaults for demo. this is not the way you would do it.
// in practice you would do it as in the comment above
function setup (novm, ev) {
if (novm) {
if (web3 && web3.currentProvider) delete web3.currentProvider;
var ok = confirm( "WARNING: Not using a VM, transactions will be sent to http://localhost:8545")
if (!ok) {
novm = false;
document.getElementById('novm').checked = novm;
return;
}
}
var dapp = new UniversalDApp([], { vm: !novm, removable: true, removable_instances: true});
$('#dapps').empty();
$('#new').empty().append( dapp.getABIInputForm( function(err, d){
console.log( d )
if (err) console.error( err )
else $('#dapps').append( d.render() )
}))
$('.udapp-setup .json').val( JSON.stringify( uDAppJson ) );
}
document.getElementById('novm').addEventListener( 'change', function(ev){
setup( ev.target.checked )
})
setup( document.getElementById('novm').checked );
});
</script>
</body>
</html>