From 97f22f0d1d1958b48be1181896048a5c1e356818 Mon Sep 17 00:00:00 2001 From: tn00378077 Date: Mon, 29 May 2023 15:45:31 +0800 Subject: [PATCH] Add get_erc20_token_transfer_events_by_contract_address_block_based. --- etherscan/configs/GOERLI-stable.json | 9 +++++++++ etherscan/configs/MAIN-stable.json | 9 +++++++++ etherscan/modules/accounts.py | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/etherscan/configs/GOERLI-stable.json b/etherscan/configs/GOERLI-stable.json index 4dbe408..7cdc064 100644 --- a/etherscan/configs/GOERLI-stable.json +++ b/etherscan/configs/GOERLI-stable.json @@ -246,6 +246,15 @@ "sort": "asc" } }, + "get_erc20_token_transfer_events_by_contract_address_block_based": { + "module": "accounts", + "kwargs": { + "contract_address": "0x2ac3c1d3e24b45c6c310534bc2dd84b5ed576335", + "startblock": 0, + "endblock": 999999999, + "sort": "asc" + } + }, "get_erc20_token_transfer_events_by_contract_address_paginated": { "module": "accounts", "kwargs": { diff --git a/etherscan/configs/MAIN-stable.json b/etherscan/configs/MAIN-stable.json index 272ed0b..5142e3c 100644 --- a/etherscan/configs/MAIN-stable.json +++ b/etherscan/configs/MAIN-stable.json @@ -255,6 +255,15 @@ "sort": "asc" } }, + "get_erc20_token_transfer_events_by_contract_address_block_based": { + "module": "accounts", + "kwargs": { + "contract_address": "0x8707a5bf4c2842d46b31a405ba41b858c0f876c4", + "startblock": 0, + "endblock": 999999999, + "sort": "asc" + } + }, "get_erc20_token_transfer_events_by_address_and_contract_paginated": { "module": "accounts", "kwargs": { diff --git a/etherscan/modules/accounts.py b/etherscan/modules/accounts.py index 831b90d..e55c3e1 100644 --- a/etherscan/modules/accounts.py +++ b/etherscan/modules/accounts.py @@ -189,6 +189,28 @@ def get_erc20_token_transfer_events_by_address( ) return url + @staticmethod + def get_erc20_token_transfer_events_by_contract_address_block_based( + contract_address: str, startblock: int, endblock: int, sort: str + ) -> str: + + url = ( + f"{fields.MODULE}" + f"{modules.ACCOUNT}" + f"{fields.ACTION}" + f"{actions.TOKENTX}" + f"{fields.CONTRACT_ADDRESS}" + f"{contract_address}" + f"{fields.START_BLOCK}" + f"{str(startblock)}" + f"{fields.END_BLOCK}" + f"{str(endblock)}" + f"{fields.SORT}" + f"{sort}" + ) + + return url + @staticmethod def get_erc20_token_transfer_events_by_contract_address_paginated( contract_address: str, page: int, offset: int, sort: str pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy