-
Notifications
You must be signed in to change notification settings - Fork 8
Refactor DryRunExecutor
#45
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
Conversation
…ate, remove the deprecated dry run mixins
…d... but still need the multidispatcher
* small typing fix + EncodingType * type ignores
CREATION_APP_CALL: Final[int] = 0 | ||
EXISTING_APP_CALL: Final[int] = 42 | ||
@dataclass(frozen=True) | ||
class DryRunTransactionParams: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New class
Co-authored-by: Hang Su <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good, I am going to take a final pass, if there's nothing off I notice, I will approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the last comment still holds, but once that is done, let's ship it.
The diff in
graviton/blackbox.py
is difficult to read through. Instead of looking at the diff, I encourage looking at the actual code. Additionally, this is a testing library, and therefore (IMO) we can gain most of the confidence by looking at the test results both here and in the companion pyteal PR.Former PR
#44
Issues Addressed
report()
#38DryRunExecutor
#40Summary of changes
graviton/blackbox.py
:class DryRunTransactionParams
for better grouping of some variablesclass DryRunExecutor
:dryrun_*
methods and consolidated functionality as follows:DryRunExecutor
object and callrun()
on it. Convenience methodsrun_one()
andrun_sequence()
are also provided, and these have better type guarantees.*_test.py
andquadratic_factoring_game.ipynb
- Migrating all the tests to userun_one()
andrun_sequence()
methods (except for the usage ofAbiContractExecutor.dry_run_on_sequence()
which remains unaffected)tests/unit/encode_test.py
test_executor_init
test_executor_prep
TODO's