@@ -12,7 +12,6 @@ describe('api', function () {
12
12
done ( ) ;
13
13
} ) ;
14
14
} ) ;
15
-
16
15
/**
17
16
* @deprecated by Etherscan
18
17
* https://etherscan.io/apis#tokens
@@ -29,20 +28,14 @@ describe('api', function () {
29
28
// done();
30
29
// });
31
30
// });
32
-
33
31
it ( 'tokenbalance by address' , function ( done ) {
34
32
var api = init ( ) ;
35
- var supply = api . account . tokenbalance (
36
- '0xe04f27eb70e025b78871a2ad7eabe85e61212761' ,
37
- false ,
38
- '0x57d90b64a1a57749b0f932f1a3395792e12e7055'
39
- ) ;
33
+ var supply = api . account . tokenbalance ( '0xe04f27eb70e025b78871a2ad7eabe85e61212761' , false , '0x57d90b64a1a57749b0f932f1a3395792e12e7055' ) ;
40
34
supply . then ( function ( res ) {
41
35
assert . ok ( res ) ;
42
36
done ( ) ;
43
37
} ) ;
44
38
} ) ;
45
-
46
39
it ( 'txlist' , function ( done ) {
47
40
var api = init ( ) ;
48
41
var txlist = api . account . txlist ( '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae' ) ;
@@ -51,7 +44,6 @@ describe('api', function () {
51
44
done ( ) ;
52
45
} ) ;
53
46
} ) ;
54
-
55
47
it ( 'txlistinternal by hash' , function ( done ) {
56
48
var api = init ( ) ;
57
49
var txlist = api . account . txlistinternal ( '0x40eb908387324f2b575b4879cd9d7188f69c8fc9d87c901b9e2daaea4b442170' ) ;
@@ -60,12 +52,8 @@ describe('api', function () {
60
52
assert . ok ( res ) ;
61
53
done ( ) ;
62
54
} )
63
- . catch ( function ( error ) {
64
- console . log ( 'REALY ERROR!!!!!????' ) ;
65
- done ( error ) ;
66
- } ) ;
55
+ . catch ( done ) ;
67
56
} ) ;
68
-
69
57
it ( 'txlistinternal by address' , function ( done ) {
70
58
var api = init ( ) ;
71
59
var txlist = api . account . txlistinternal ( null , '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae' ) ;
@@ -74,7 +62,6 @@ describe('api', function () {
74
62
done ( ) ;
75
63
} ) ;
76
64
} ) ;
77
-
78
65
it ( 'balance' , function ( done ) {
79
66
var api = init ( ) ;
80
67
var balance = api . account . balance ( '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae' ) ;
@@ -92,7 +79,6 @@ describe('api', function () {
92
79
} ) ;
93
80
} ) ;
94
81
} ) ;
95
-
96
82
describe ( 'stats' , function ( ) {
97
83
it ( 'ethsupply' , function ( done ) {
98
84
var api = init ( ) ;
@@ -102,7 +88,6 @@ describe('api', function () {
102
88
done ( ) ;
103
89
} ) ;
104
90
} ) ;
105
-
106
91
it ( 'tokensupply by tokenname' , function ( done ) {
107
92
var api = init ( ) ;
108
93
var supply = api . stats . tokensupply ( 'MKR' ) ;
@@ -111,7 +96,6 @@ describe('api', function () {
111
96
done ( ) ;
112
97
} ) ;
113
98
} ) ;
114
-
115
99
it ( 'tokensupply by address' , function ( done ) {
116
100
var api = init ( ) ;
117
101
var supply = api . stats . tokensupply ( null , '0x57d90b64a1a57749b0f932f1a3395792e12e7055' ) ;
@@ -120,7 +104,6 @@ describe('api', function () {
120
104
done ( ) ;
121
105
} ) . catch ( done ) ;
122
106
} ) ;
123
-
124
107
it ( 'ethprice' , function ( done ) {
125
108
var api = init ( ) ;
126
109
var price = api . stats . ethprice ( ) ;
@@ -130,7 +113,6 @@ describe('api', function () {
130
113
} ) . catch ( done ) ;
131
114
} ) ;
132
115
} ) ;
133
-
134
116
it ( 'block.getblockreward' , function ( done ) {
135
117
var api = init ( ) ;
136
118
var blockreward = api . block . getblockreward ( ) ;
@@ -139,7 +121,6 @@ describe('api', function () {
139
121
done ( ) ;
140
122
} ) ;
141
123
} ) ;
142
-
143
124
it ( 'transaction.getstatus' , function ( done ) {
144
125
var api = init ( ) ;
145
126
var status = api . transaction . getstatus ( '0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a' ) ;
@@ -148,7 +129,6 @@ describe('api', function () {
148
129
done ( ) ;
149
130
} ) ;
150
131
} ) ;
151
-
152
132
xit ( 'contract.getabi' , function ( done ) {
153
133
var api = init ( ) ;
154
134
var abi = api . contract . getabi ( '0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413' ) ;
@@ -157,8 +137,6 @@ describe('api', function () {
157
137
done ( ) ;
158
138
} ) ;
159
139
} ) ;
160
-
161
-
162
140
describe ( 'proxy' , function ( ) {
163
141
it ( 'proxy.eth_blockNumber' , function ( done ) {
164
142
var api = init ( ) ;
@@ -168,8 +146,6 @@ describe('api', function () {
168
146
done ( ) ;
169
147
} ) ;
170
148
} ) ;
171
-
172
-
173
149
it ( 'proxy.eth_getBlockByNumber' , function ( done ) {
174
150
var api = init ( ) ;
175
151
var res = api . proxy . eth_getBlockByNumber ( '0x10d4f' ) ;
@@ -178,8 +154,6 @@ describe('api', function () {
178
154
done ( ) ;
179
155
} ) ;
180
156
} ) ;
181
-
182
-
183
157
it ( 'proxy.eth_getUncleByBlockNumberAndIndex' , function ( done ) {
184
158
var api = init ( ) ;
185
159
var res = api . proxy . eth_getUncleByBlockNumberAndIndex ( '0x210A9B' , '0x0' ) ;
@@ -188,7 +162,6 @@ describe('api', function () {
188
162
done ( ) ;
189
163
} ) ;
190
164
} ) ;
191
-
192
165
it ( 'proxy.eth_getBlockTransactionCountByNumber' , function ( done ) {
193
166
var api = init ( ) ;
194
167
var res = api . proxy . eth_getBlockTransactionCountByNumber ( '0x10FB78' ) ;
@@ -197,19 +170,14 @@ describe('api', function () {
197
170
done ( ) ;
198
171
} ) ;
199
172
} ) ;
200
-
201
173
it ( 'proxy.eth_getTransactionByHash' , function ( done ) {
202
174
var api = init ( ) ;
203
- var res = api . proxy . eth_getTransactionByHash (
204
- '0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1'
205
- ) ;
175
+ var res = api . proxy . eth_getTransactionByHash ( '0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1' ) ;
206
176
res . then ( function ( res ) {
207
177
assert . ok ( res ) ;
208
178
done ( ) ;
209
179
} ) ;
210
180
} ) ;
211
-
212
-
213
181
it ( 'proxy.eth_getTransactionByBlockNumberAndIndex' , function ( done ) {
214
182
var api = init ( ) ;
215
183
var res = api . proxy . eth_getTransactionByBlockNumberAndIndex ( '0x10d4f' , '0x0' ) ;
@@ -218,7 +186,6 @@ describe('api', function () {
218
186
done ( ) ;
219
187
} ) ;
220
188
} ) ;
221
-
222
189
it ( 'proxy.eth_getTransactionCount' , function ( done ) {
223
190
var api = init ( ) ;
224
191
var res = api . proxy . eth_getTransactionCount ( '0x2910543af39aba0cd09dbb2d50200b3e800a63d2' ) ;
@@ -227,7 +194,6 @@ describe('api', function () {
227
194
done ( ) ;
228
195
} ) ;
229
196
} ) ;
230
-
231
197
xit ( 'proxy.eth_sendRawTransaction' , function ( done ) {
232
198
var api = init ( ) ;
233
199
var res = api . proxy . eth_sendRawTransaction ( '0xf904808000831cfde080' ) ;
@@ -236,18 +202,14 @@ describe('api', function () {
236
202
done ( ) ;
237
203
} ) ;
238
204
} ) ;
239
-
240
205
it ( 'proxy.eth_getTransactionReceipt' , function ( done ) {
241
206
var api = init ( ) ;
242
- var res = api . proxy . eth_getTransactionReceipt (
243
- '0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1'
244
- ) ;
207
+ var res = api . proxy . eth_getTransactionReceipt ( '0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1' ) ;
245
208
res . then ( function ( res ) {
246
209
assert . ok ( res ) ;
247
210
done ( ) ;
248
211
} ) ;
249
212
} ) ;
250
-
251
213
it ( 'proxy.eth_call' , function ( done ) {
252
214
var api = init ( ) ;
253
215
var res = api . proxy . eth_call (
@@ -260,7 +222,6 @@ describe('api', function () {
260
222
done ( ) ;
261
223
} ) ;
262
224
} ) ;
263
-
264
225
it ( 'proxy.eth_getCode' , function ( done ) {
265
226
var api = init ( ) ;
266
227
var res = api . proxy . eth_getCode ( '0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c' , 'latest' ) ;
@@ -269,7 +230,6 @@ describe('api', function () {
269
230
done ( ) ;
270
231
} ) ;
271
232
} ) ;
272
-
273
233
it ( 'proxy.eth_getStorageAt' , function ( done ) {
274
234
var api = init ( ) ;
275
235
var res = api . proxy . eth_getStorageAt ( '0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd' , '0x0' , 'latest' ) ;
@@ -278,7 +238,6 @@ describe('api', function () {
278
238
done ( ) ;
279
239
} ) ;
280
240
} ) ;
281
-
282
241
it ( 'proxy.eth_gasPrice' , function ( done ) {
283
242
var api = init ( ) ;
284
243
var res = api . proxy . eth_gasPrice ( ) ;
@@ -287,7 +246,6 @@ describe('api', function () {
287
246
done ( ) ;
288
247
} ) ;
289
248
} ) ;
290
-
291
249
xit ( 'proxy.eth_estimateGas' , function ( done ) {
292
250
var api = init ( ) ;
293
251
var res = api . proxy . eth_estimateGas (
0 commit comments