Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use boa provider instead of foundry #118

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: foundry-rs/foundry-toolchain@v1
- uses: ApeWorX/github-action@v3
with:
python-version: "3.11"
Expand All @@ -61,7 +60,7 @@ jobs:
with:
name: ape-build-folder
path: .build/
- run: pip install .
- run: pip install .[test]
- run: ape test -s

js-test:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ sdk/py/apepay/version.py
__pycache__
.hypothesis
dist/
*.egg-info

# Javascript
node_modules/
Expand Down
6 changes: 3 additions & 3 deletions ape-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: ApePay
plugins:
- name: arbitrum
- name: optimism
- name: foundry
- name: titanoboa
- name: vyper

compile:
output_extra:
- ABI # Output individial ABIs for the frontend.
- ABI # Output individual ABIs for the frontend.

ethereum:
local:
default_provider: foundry
default_provider: boa

deployments:
ethereum:
Expand Down
4 changes: 2 additions & 2 deletions bots/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def load_db(_):
@sm.on_stream_created(app)
async def grant_product(stream):
db[stream.id] = stream
print(f"provisioning products: {stream.products}")
print(f"provisioning products: {stream.products}") # noqa: T001
return stream.time_left


Expand All @@ -37,6 +37,6 @@ async def update_product_funding(stream):

@sm.on_stream_cancelled(app)
async def revoke_product(stream):
print(f"unprovisioning product for {stream.creator}")
print(f"unprovisioning product for {stream.creator}") # noqa: T001
db[stream.id] = None
return stream.time_left
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ readme = "README.md"
requires-python = ">=3.10,<4"

dependencies = [
"eth-ape>=0.8,<1",
"eth-ape>=0.8.24,<1",
"pydantic>=2.7,<3",
# NOTE: Pinning issue w/ Ape
"eth-typing<5",
]

[project.optional-dependencies]
Expand All @@ -33,7 +31,7 @@ lint = [
"apepay[bot]"
]
test = [
"ape-foundry",
"ape-titanoboa>=0.8.0a0",
]
dev = [
"apepay[bot,lint,test]"
Expand Down
2 changes: 1 addition & 1 deletion sdk/py/apepay/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self):

class NotEnoughAllowance(ApePayException, ValueError):
def __init__(self, manager: AddressType):
super().__init__(f"Not enough allownace, please approve {manager}")
super().__init__(f"Not enough allowance, please approve {manager}")


class StreamLifeInsufficient(ApePayException, ValueError):
Expand Down
Loading