Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: Test

on:
push:
branches: [ master ]
branches: [ master, dev/v4, dev/v4-fin ]
pull_request:
branches: [ master ]
branches: [ master, dev/v4, dev/v4-fin ]

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

jobs:
Expand Down
10 changes: 7 additions & 3 deletions uniswap/uniswap4.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,12 +1433,16 @@ def get_token(self, address: AddressLike, abi_name: str = "erc20") -> ERC20Token
try:
name = _name.decode()
except Exception:
name = _name
name = str(_name)
try:
symbol = _symbol.decode()
except Exception as e:
logger.warning(f"Error occurred while decoding symbol for {address}: {e}")
symbol = _symbol
logger.warning(
"Error occurred while decoding symbol for %s: %s",
_addr_to_str(address),
e,
)
symbol = str(_symbol)
return ERC20Token(symbol, address, name, decimals)

# Estimates slippage for the given amount of token0
Expand Down
2 changes: 1 addition & 1 deletion uniswap/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def fetch_poolkey_data(
# "fromBlock": str(start_block),
# "toBlock": str(end_block),
# }
logs = pool_manager_contract.events.Initialize().get_logs(
logs = pool_manager_contract.events.Initialize().get_logs( # type: ignore[attr-defined]
fromBlock=start_block, toBlock=end_block
)
except Exception as e:
Expand Down
Loading