Skip to content

Commit

Permalink
feat: brownie 1.20.3 disables eager caching
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Nov 9, 2024
1 parent 64744b5 commit 71c1a4e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ RUN apt-get update && \
apt-get install -y gcc git
ADD requirements.txt ./
RUN mkdir -p /install
# NOTE: We have to do this to force pyyaml to install
RUN pip3 install --prefix=/install "Cython<3.0" "pyyaml==5.4.1" --no-build-isolation
RUN pip3 install --prefix=/install -r requirements.txt

FROM python:3.10.12-slim
Expand Down
1 change: 1 addition & 0 deletions brownie-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ networks:
default: mainnet

autofetch_sources: false
eager_caching: false

compiler:
evm_version: london
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eth-brownie>=1.19.3
eth-brownie>=1.20.3
click>=7.1.2
tabulate>=0.8.7
joblib>=1.0.1
Expand All @@ -7,24 +7,24 @@ fastapi>=0.63.0
uvicorn>=0.13.4
sqlmodel>=0.0.4
psycopg2-binary>=2.8.5
tokenlists>=0.1.0b0,<0.1.1
tokenlists>=0.1.7,<0.2
aiofiles>=0.6.0
semantic-version>=2.8.5
boto3==1.17.88
boto3>=1.34,<1.35
rich>=12.6.0
matplotlib>=3.6.1
msgspec>=0.18.5
pandas>=1.3.0
pony>=0.7.16
sqlalchemy>=1.4.41
sentry-sdk==2.8.0
sentry-sdk>=2.1.1,<2.2
pytest-bdd>=5.0.0
dank_mids==4.20.93
eth_retry>=0.1.19
eth-hash[pysha3]
ez-a-sync==0.22.3
python-telegram-bot==13.15
ypricemagic>=3.4.6
git+https://www.github.com/BobTheBuidler/eth-portfolio@98613afaef2beb020e2412574d9a68e2d1a6186c
git+https://www.github.com/BobTheBuidler/ypricemagic@temp
git+https://www.github.com/BobTheBuidler/eth-portfolio@ypm-3.6.1
git+https://www.github.com/BobTheBuidler/toolcache@e37b53cec64556d2b35df66767fca4c8f366a2fa
memray
10 changes: 5 additions & 5 deletions tests/prices/test_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def convex_gauge_map():
def curve_tvl_api():
data = requests.get('https://api.curve.fi/api/getTVL').json()
return {
web3.toChecksumAddress(pool['pool_address']): pool['balance']
web3.to_checksum_address(pool['pool_address']): pool['balance']
for pool in data['data']['allPools']
}

Expand Down Expand Up @@ -390,8 +390,8 @@ def test_curve_lp_price_oracle_historical(name):
if name in ['linkusd']:
pytest.xfail('no active market')

token = web3.toChecksumAddress(pooldata[name]['lp_token_address'])
swap = web3.toChecksumAddress(pooldata[name]['swap_address'])
token = web3.to_checksum_address(pooldata[name]['lp_token_address'])
swap = web3.to_checksum_address(pooldata[name]['swap_address'])
deploy = contract_creation_block(swap)

abnormal_start_blocks = {
Expand Down Expand Up @@ -423,7 +423,7 @@ def test_curve_total_value(name, curve_tvl_api):
if name in ['linkusd']:
pytest.xfail('no active market')

pool = web3.toChecksumAddress(pooldata[name]['swap_address'])
pool = web3.to_checksum_address(pooldata[name]['swap_address'])
tvl = curve.curve.get_tvl(pool)
print(name, tvl)
assert tvl
Expand All @@ -435,7 +435,7 @@ def test_curve_total_value(name, curve_tvl_api):
@pytest.mark.parametrize('name', pooldata)
def test_get_balances_fallback(name):
registry_deploy = 12195750
pool = web3.toChecksumAddress(pooldata[name]['swap_address'])
pool = web3.to_checksum_address(pooldata[name]['swap_address'])
if contract_creation_block(pool) > registry_deploy:
pytest.skip('not applicable to pools deployed after test block')
if curve.curve.get_factory(pool):
Expand Down
2 changes: 1 addition & 1 deletion yearn/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __call__(self, *args, **kwargs):
@eth_retry.auto_retry
def contract(address: AddressOrContract) -> Contract:
with _contract_lock:
address = web3.toChecksumAddress(str(address))
address = web3.to_checksum_address(str(address))

if chain.id in PREFER_INTERFACE:
if address in PREFER_INTERFACE[chain.id]:
Expand Down

0 comments on commit 71c1a4e

Please sign in to comment.