Skip to content

Commit fea699f

Browse files
fix(ci): replace rate-limited Infura with public RPC and fix type errors
- Switch PROVIDER_MAINNET fallback from Infura to ethereum.publicnode.com (Infura public key was hitting "Too Many Requests" rate limits) - Add dev/v4 and dev/v4-fin branches to CI triggers - Fix mypy errors: use str() for bytes fallback in token name/symbol decode, add type: ignore for web3 get_logs attribute Co-authored-by: Bob <bob@superuserlabs.org>
1 parent 4c0eb28 commit fea699f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: Test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ master, dev/v4, dev/v4-fin ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ master, dev/v4, dev/v4-fin ]
88

99
env:
10-
# Public key for PRs, plz don't abuse
11-
PROVIDER_MAINNET: ${{ secrets.MAINNET_PROVIDER || 'https://mainnet.infura.io/v3/42ffb4f2549c4a5fa3b5d6db70f6fad1' }}
10+
PROVIDER_MAINNET: ${{ secrets.MAINNET_PROVIDER || 'https://ethereum.publicnode.com' }}
1211
PROVIDER_ARBITRUM: 'https://rpc.ankr.com/arbitrum'
1312
PROVIDER_XDAI: 'https://rpc.ankr.com/gnosis'
1413

uniswap/uniswap4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,12 +1433,12 @@ def get_token(self, address: AddressLike, abi_name: str = "erc20") -> ERC20Token
14331433
try:
14341434
name = _name.decode()
14351435
except Exception:
1436-
name = _name
1436+
name = str(_name)
14371437
try:
14381438
symbol = _symbol.decode()
14391439
except Exception as e:
14401440
logger.warning(f"Error occurred while decoding symbol for {address}: {e}")
1441-
symbol = _symbol
1441+
symbol = str(_symbol)
14421442
return ERC20Token(symbol, address, name, decimals)
14431443

14441444
# Estimates slippage for the given amount of token0

uniswap/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def fetch_poolkey_data(
261261
# "fromBlock": str(start_block),
262262
# "toBlock": str(end_block),
263263
# }
264-
logs = pool_manager_contract.events.Initialize().get_logs(
264+
logs = pool_manager_contract.events.Initialize().get_logs( # type: ignore[attr-defined]
265265
fromBlock=start_block, toBlock=end_block
266266
)
267267
except Exception as e:

0 commit comments

Comments
 (0)