File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,15 @@ eth-test.js - passes
4
4
index-test.js - passes
5
5
methods-test.js - passes
6
6
Testnet:
7
+ ``` javascript
8
+ var api = init (' YourApiKeyToken' ,' testnet' );
7
9
testnet- balance- test .js - passes
8
-
10
+ testnet- eth- test .js - passes
11
+ ```
9
12
10
13
11
14
12
15
Testnet data:
13
16
address = '0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae' - this is test account with balance
17
+ address with mined blocks - 0x3D6F8823Ad21CD299814B62D198d9001E67E20B3 - because there
18
+ are no bloks mined by default address in testnet (return empty message, see reference in test).
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+ const assert = require ( 'chai' ) . assert ;
3
+ const init = require ( '../.' ) . init ;
4
+ describe ( 'proxy' , function ( ) {
5
+ it ( 'eth.getminedblocks' , function ( done ) {
6
+ var api = init ( 'YourApiKeyToken' , 'testnet' ) ;
7
+ //In testnet there are no mined blocks by this account
8
+ //reference - https://testnet.etherscan.io/api?module=account&action=getminedblocks&address=0x9dd134d14d1e65f84b706d6f205cd5b1cd03a46b&blocktype=blocks&apikey=YourApiKeyToken
9
+ // var txlist = api.account.getminedblocks('0x9dd134d14d1e65f84b706d6f205cd5b1cd03a46b');
10
+ // will use other address instead
11
+ var txlist = api . account . getminedblocks ( '0x3D6F8823Ad21CD299814B62D198d9001E67E20B3' ) ;
12
+ txlist . then ( function ( res ) {
13
+ assert . ok ( res ) ;
14
+ done ( ) ;
15
+ } ) ;
16
+ } ) ;
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments