Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite293456

Browse files
committed
Added rudimentary support for ERC 1155 endpoint.
1 parent3a9035f commite293456

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

‎etherscan/enums/actions_enum.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class ActionsEnum:
5858
TOKEN_SUPPLY_HISTORY:str="tokensupplyhistory"
5959
TOKEN_SUPPLY:str="tokensupply"
6060
TOKENNFTTX:str="tokennfttx"
61+
TOKEN1155TX:str="token1155tx"
6162
TOKENTX:str="tokentx"
6263
TXLIST_INTERNAL:str="txlistinternal"
6364
TXLIST:str="txlist"

‎etherscan/modules/accounts.py‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,32 @@ def get_erc721_token_transfer_events_by_address_and_contract_paginated(
295295
)
296296
returnurl
297297

298+
299+
# Added by zmbbb: ERC 1155
300+
#
301+
# https://api.etherscan.io/api?module=account&action=token1155tx&address=0x057C2d080D30306EC2bf7Ae15232FbE96627B066&startblock=0&endblock=99999999&sort=asc&apikey=YourApiKeyToken
302+
303+
@staticmethod
304+
defget_erc1155_token_transfer_events_by_address(
305+
address:str,startblock:int,endblock:int,sort:str,
306+
)->str:
307+
url= (
308+
f"{fields.MODULE}"
309+
f"{modules.ACCOUNT}"
310+
f"{fields.ACTION}"
311+
f"{actions.TOKEN1155TX}"
312+
f"{fields.ADDRESS}"
313+
f"{address}"
314+
f"{fields.START_BLOCK}"
315+
f"{str(startblock)}"
316+
f"{fields.END_BLOCK}"
317+
f"{str(endblock)}"
318+
f"{fields.SORT}"
319+
f"{sort}"
320+
)
321+
returnurl
322+
323+
298324
@staticmethod
299325
defget_mined_blocks_by_address(address:str)->str:
300326
url= (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp