Skip to content

Commit

Permalink
fix: foundry and alchemy
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdang committed Oct 12, 2023
1 parent f5b1e4d commit cb47135
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ jobs:

- name: Run Tests
run: pytest -n 0 -s --cov
env:
WEB3_ALCHEMY_PROJECT_ID: ${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}
2 changes: 1 addition & 1 deletion ape_safe/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def post_signature(
class MockSafeClient(BaseSafeClient, ManagerAccessMixin):
def __init__(self, contract: ContractInstance):
self.contract = contract
self.transactions: Union[SafeTx, SafeTxID, SafeApiTxData] = {}
self.transactions: Dict[Union[SafeTx, SafeTxID], SafeApiTxData] = {}
self.transactions_by_nonce: Dict[int, List[SafeTxID]] = {}

@property
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
include_package_data=True,
install_requires=[
"eth-ape>=0.6.11,<0.7.0",
"ape-alchemy>=0.6.5,<0.7.0",
"ape-foundry>=0.6.17,<0.7.0",
"eip712>=0.2.0,<0.3.0",
"requests>=2.31.0,<3",
"pydantic", # Use same version as eth-ape
Expand Down
18 changes: 18 additions & 0 deletions tests/ape-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ethereum:
mainnnet:
default_provider: alchemy
local:
default_provider: foundry

foundry:
fork:
ethereum:
mainnet:
upstream_provider: alchemy
block_number: 15776634
goerli:
upstream_provider: alchemy
block_number: 7849922
sepolia:
upstream_provider: alchemy
block_number: 3091950
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ def vault(deployer, token):
@pytest.fixture
def foundry(networks):
with networks.ethereum.local.use_provider("foundry") as provider:
yield provider
yield provider
1 change: 0 additions & 1 deletion tests/test_multisend.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from ape import networks

from ape_safe import MultiSend
from ape_safe.exceptions import SafeLogicError
Expand Down

0 comments on commit cb47135

Please sign in to comment.