Skip to content

Commit e53477d

Browse files
committed
Support for Polygon / Configurable PREFIX
Adds config files for Polygon and Mumbai (Polygon testnet). Also change in etherscan.py to support networks using other etherscan domain instead of `etherscan.io`.
1 parent e059d7c commit e53477d

File tree

6 files changed

+775
-4
lines changed

6 files changed

+775
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ docs
1515

1616
# eggs
1717
*egg*
18+
19+
logs/

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ In `bash`, test that everything looks OK on your end using your `YOUR_API_KEY` (
173173

174174
``` bash
175175
bash run_tests.sh YOUR_API_KEY
176+
177+
# If you want to run tests on specific networks
178+
export TEST_ON_NETS="POLYGON,MUMBAI"
179+
bash run_tests.sh YOUR_API_KEY
176180
````
177181

178182
This will regenerate the logs under `logs/` with the most recent results and the timestamp of the execution.

etherscan/configs/MUMBAI-stable.json

Lines changed: 301 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,301 @@
1+
{
2+
"_PREFIX": "https://api-testnet.polygonscan.com/api?",
3+
"get_proxy_block_number": {
4+
"module": "proxy",
5+
"kwargs": {}
6+
},
7+
"get_proxy_block_by_number": {
8+
"module": "proxy",
9+
"kwargs": {
10+
"tag": "0x10d4f"
11+
}
12+
},
13+
"get_proxy_uncle_by_block_number_and_index": {
14+
"module": "proxy",
15+
"kwargs": {
16+
"tag": "0x4d50e2",
17+
"index": "0x0"
18+
}
19+
},
20+
"get_proxy_block_transaction_count_by_number": {
21+
"module": "proxy",
22+
"kwargs": {
23+
"tag": "0x10FB78"
24+
}
25+
},
26+
"get_proxy_transaction_by_hash": {
27+
"module": "proxy",
28+
"kwargs": {
29+
"txhash": "0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1"
30+
}
31+
},
32+
"get_proxy_transaction_by_block_number_and_index": {
33+
"module": "proxy",
34+
"kwargs": {
35+
"tag": "0x43195c",
36+
"index": "0x0"
37+
}
38+
},
39+
"get_proxy_transaction_count": {
40+
"module": "proxy",
41+
"kwargs": {
42+
"address": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2"
43+
}
44+
},
45+
"get_proxy_transaction_receipt": {
46+
"module": "proxy",
47+
"kwargs": {
48+
"txhash": "0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1"
49+
}
50+
},
51+
"get_proxy_call": {
52+
"module": "proxy",
53+
"kwargs": {
54+
"to": "0xAEEF46DB4855E25702F8237E8f403FddcaF931C0",
55+
"data": "0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724"
56+
}
57+
},
58+
"get_proxy_code_at": {
59+
"module": "proxy",
60+
"kwargs": {
61+
"address": "0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c"
62+
}
63+
},
64+
"get_proxy_storage_position_at": {
65+
"module": "proxy",
66+
"kwargs": {
67+
"position": "0x0",
68+
"address": "0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd"
69+
}
70+
},
71+
"get_proxy_gas_price": {
72+
"module": "proxy",
73+
"kwargs": {}
74+
},
75+
"get_proxy_est_gas": {
76+
"module": "proxy",
77+
"kwargs": {
78+
"data": "0x4e71d92d",
79+
"to": "0xf0160428a8552ac9bb7e050d90eeade4ddd52843",
80+
"value": "0xff22",
81+
"gas_price": "0x51da038cc",
82+
"gas": "0x5f5e0ff"
83+
}
84+
},
85+
"get_block_reward_by_block_number": {
86+
"module": "blocks",
87+
"kwargs": {
88+
"block_no": "2165403"
89+
}
90+
},
91+
"get_est_block_countdown_time_by_block_number": {
92+
"module": "blocks",
93+
"kwargs": {
94+
"block_no": "99999999"
95+
}
96+
},
97+
"get_block_number_by_timestamp": {
98+
"module": "blocks",
99+
"kwargs": {
100+
"timestamp": "1578638524",
101+
"closest": "before"
102+
}
103+
},
104+
"get_total_eth_supply": {
105+
"module": "stats",
106+
"kwargs": {}
107+
},
108+
"get_eth_last_price": {
109+
"module": "stats",
110+
"kwargs": {}
111+
},
112+
"_get_eth_nodes_size": {
113+
"module": "stats",
114+
"kwargs": {
115+
"start_date": "2019-02-01",
116+
"end_date": "2019-02-28",
117+
"client_type": "geth",
118+
"sync_mode": "default",
119+
"sort": "asc"
120+
}
121+
},
122+
"get_total_supply_by_contract_address": {
123+
"module": "tokens",
124+
"kwargs": {
125+
"contract_address": "0x57d90b64a1a57749b0f932f1a3395792e12e7055"
126+
}
127+
},
128+
"get_acc_balance_by_token_and_contract_address": {
129+
"module": "tokens",
130+
"kwargs": {
131+
"contract_address": "0x57d90b64a1a57749b0f932f1a3395792e12e7055",
132+
"address": "0xe04f27eb70e025b78871a2ad7eabe85e61212761"
133+
}
134+
},
135+
"get_contract_abi": {
136+
"module": "contracts",
137+
"kwargs": {
138+
"address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
139+
}
140+
},
141+
"get_contract_source_code": {
142+
"module": "contracts",
143+
"kwargs": {
144+
"address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
145+
}
146+
},
147+
"get_contract_execution_status": {
148+
"module": "transactions",
149+
"kwargs": {
150+
"txhash": "0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a"
151+
}
152+
},
153+
"get_tx_receipt_status": {
154+
"module": "transactions",
155+
"kwargs": {
156+
"txhash": "0x513c1ba0bebf66436b5fed86ab668452b7805593c05073eb2d51d3a52f480a76"
157+
}
158+
},
159+
"get_eth_balance": {
160+
"module": "accounts",
161+
"kwargs": {
162+
"address": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a"
163+
}
164+
},
165+
"get_eth_balance_multiple": {
166+
"module": "accounts",
167+
"kwargs": {
168+
"addresses": [
169+
"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
170+
"0x63a9975ba31b0b9626b34300f7f627147df1f526",
171+
"0x198ef1ec325a96cc354c7266a038be8b5c558f67"
172+
]
173+
}
174+
},
175+
"get_normal_txs_by_address": {
176+
"module": "accounts",
177+
"kwargs": {
178+
"address": "0x539fe6aD90931e02F902618d0e33D326F670B89C",
179+
"startblock": 0,
180+
"endblock": 99999999,
181+
"sort": "asc"
182+
}
183+
},
184+
"get_normal_txs_by_address_paginated": {
185+
"module": "accounts",
186+
"kwargs": {
187+
"address": "0x539fe6aD90931e02F902618d0e33D326F670B89C",
188+
"startblock": 0,
189+
"endblock": 99999999,
190+
"page": 1,
191+
"offset": 10,
192+
"sort": "asc"
193+
}
194+
},
195+
"get_internal_txs_by_address": {
196+
"module": "accounts",
197+
"kwargs": {
198+
"address": "0xaaad7966ebe0663b8c9c6f683fb9c3e66e03467f",
199+
"startblock": 23799593,
200+
"endblock": 23799593,
201+
"sort": "asc"
202+
}
203+
},
204+
"get_internal_txs_by_address_paginated": {
205+
"module": "accounts",
206+
"kwargs": {
207+
"address": "0xaaad7966ebe0663b8c9c6f683fb9c3e66e03467f",
208+
"startblock": 23799593,
209+
"endblock": 23799593,
210+
"page": 1,
211+
"offset": 10,
212+
"sort": "asc"
213+
}
214+
},
215+
"get_internal_txs_by_txhash": {
216+
"module": "accounts",
217+
"kwargs": {
218+
"txhash": "0xad550ebc0f2473e3b5af8d1d30b093749cb2835bf21ed340e976b1ec25276b04"
219+
}
220+
},
221+
"get_internal_txs_by_block_range_paginated": {
222+
"module": "accounts",
223+
"kwargs": {
224+
"startblock": 0,
225+
"endblock": 2702578,
226+
"page": 1,
227+
"offset": 10,
228+
"sort": "asc"
229+
}
230+
},
231+
"get_erc20_token_transfer_events_by_address": {
232+
"module": "accounts",
233+
"kwargs": {
234+
"address": "0xa991b15e414ddfa78b0df1f7af6b3cf2023c738d",
235+
"startblock": 0,
236+
"endblock": 999999999,
237+
"sort": "asc"
238+
}
239+
},
240+
"get_erc20_token_transfer_events_by_contract_address_paginated": {
241+
"module": "accounts",
242+
"kwargs": {
243+
"contract_address": "0x8fe80f7ca77daa68b059f8b3e29e1c5d962f01e7",
244+
"page": 1,
245+
"offset": 100,
246+
"sort": "asc"
247+
}
248+
},
249+
"get_erc20_token_transfer_events_by_address_and_contract_paginated": {
250+
"module": "accounts",
251+
"kwargs": {
252+
"contract_address": "0x8fe80f7ca77daa68b059f8b3e29e1c5d962f01e7",
253+
"address": "0xa991b15e414ddfa78b0df1f7af6b3cf2023c738d",
254+
"page": 1,
255+
"offset": 100,
256+
"sort": "asc"
257+
}
258+
},
259+
"get_erc721_token_transfer_events_by_address": {
260+
"module": "accounts",
261+
"kwargs": {
262+
"address": "0x57e05dba059a8ff2777408e9e1f3c517c20fc719",
263+
"startblock": 0,
264+
"endblock": 999999999,
265+
"sort": "asc"
266+
}
267+
},
268+
"get_erc721_token_transfer_events_by_contract_address_paginated": {
269+
"module": "accounts",
270+
"kwargs": {
271+
"contract_address": "0x953067757ec1b3a859f80ae15269f95430e72e69",
272+
"page": 1,
273+
"offset": 100,
274+
"sort": "asc"
275+
}
276+
},
277+
"get_erc721_token_transfer_events_by_address_and_contract_paginated": {
278+
"module": "accounts",
279+
"kwargs": {
280+
"contract_address": "0x953067757ec1b3a859f80ae15269f95430e72e69",
281+
"address": "0x57e05dba059a8ff2777408e9e1f3c517c20fc719",
282+
"page": 1,
283+
"offset": 100,
284+
"sort": "asc"
285+
}
286+
},
287+
"get_mined_blocks_by_address": {
288+
"module": "accounts",
289+
"kwargs": {
290+
"address": "0x0000000000000000000000000000000000000000"
291+
}
292+
},
293+
"get_mined_blocks_by_address_paginated": {
294+
"module": "accounts",
295+
"kwargs": {
296+
"address": "0x0000000000000000000000000000000000000000",
297+
"page": 1,
298+
"offset": 100
299+
}
300+
}
301+
}

0 commit comments

Comments
 (0)