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

fix: optin oncomplete, assertions, method returns #311

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

iskysun96
Copy link

Proposed Changes

  • added allow_actions=["OptIn"] to the optin method decorator.
  • Multiple assertions added for access control
  • added returns on various methods
  • added allow_actions=['DeleteApplication'] to the delete method.

I didn't touch any of the output yet. Is there a workflow I can follow to regenerate the artifacts? Also are there any test files I need to edit?

achidlow and others added 30 commits September 3, 2024 17:12
… as no-ops, this is valid and can be useful in multiple inheritance scenarios
---------

note that this has been fixed over multiple previous commits, almost incidentally as part of the puyapy/puya split, this commit just adds tests that confirm the fix
…ith a ARC4Contract type now works for abimethods that have a return type
…rc4.arc4_update` now all support txn arguments
… argument should not be expected to be automatically tuple-packed
…gets now working correctly and takes that role instead
Co-authored-by: Daniel McGregor <[email protected]>
- output all source locations in MIR, even if they're synthetic
@achidlow
Copy link
Contributor

Thanks for the PR @iskysun96.

Changes look good, so just need to get the CI/CD passing.

First, you can run pre-commit on everything with pre-commit run --all-files to run ruff, black, and mypy. Looks like the only issue there is with formatting, so black should fix that up for you, and if you run it again all three should say "Passed".

The second thing is to update the outputs - we have a script that can do that, like so: ./scripts/compile_all_examples.py examples/auction. Alternatively, you can run all tests via pytest, this will show failures where there are output differences vs what is committed, so if you commit those and run again they should all pass.

@iskysun96
Copy link
Author

Thanks @achidlow. I ran pre-commit and the script you shared to compile the new auction contract.

Question. I ran pytest, and 700+ tests failed. Not sure what I am doing wrong.

@achidlow
Copy link
Contributor

I'm just guessing here, since I can't see the errors you got, but did you have localnet running?

Also you'll need to rebase your branch onto main before we can merge since there's been changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants