Skip to content

Commit

Permalink
feat: add taiko explorer (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ape364 authored Jun 20, 2024
1 parent 340a303 commit 789320e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Supports blockchain explorers:
* [Arbiscan](https://docs.arbiscan.io/getting-started/endpoint-urls)
* [FtmScan](https://docs.ftmscan.com/getting-started/endpoint-urls)
* [Basescan](https://docs.basescan.org/getting-started/endpoint-urls)
* [Taikoscan](https://docs.taikoscan.io/getting-started/endpoint-urls)

## Installation

```sh
Expand Down
1 change: 1 addition & 0 deletions aioetherscan/url_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class UrlBuilder:
'base': ('basescan.org', 'ETH'),
'arbitrum': ('arbiscan.io', 'ETH'),
'fantom': ('ftmscan.com', 'FTM'),
'taiko': ('taikoscan.io', 'ETH'),
}

BASE_URL: str = None
Expand Down
5 changes: 5 additions & 0 deletions tests/test_url_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def test_filter_params(ub):
('arbitrum', 'goerli', 'https://api-goerli.arbiscan.io/api'),
('fantom', 'main', 'https://api.ftmscan.com/api'),
('fantom', 'testnet', 'https://api-testnet.ftmscan.com/api'),
('taiko', 'main', 'https://api.taikoscan.io/api'),
('taiko', 'hekla', 'https://api-hekla.taikoscan.io/api'),
],
)
def test_api_url(api_kind, network_name, expected):
Expand Down Expand Up @@ -85,6 +87,8 @@ def test_api_url(api_kind, network_name, expected):
('arbitrum', 'goerli', 'https://goerli.arbiscan.io'),
('fantom', 'main', 'https://ftmscan.com'),
('fantom', 'testnet', 'https://testnet.ftmscan.com'),
('taiko', 'main', 'https://taikoscan.io'),
('taiko', 'hekla', 'https://hekla.taikoscan.io'),
],
)
def test_base_url(api_kind, network_name, expected):
Expand All @@ -109,6 +113,7 @@ def test_invalid_api_kind():
('base', 'ETH'),
('arbitrum', 'ETH'),
('fantom', 'FTM'),
('taiko', 'ETH'),
],
)
def test_currency(api_kind, expected):
Expand Down

0 comments on commit 789320e

Please sign in to comment.