-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prepare for Testing the ABI-Router in PyTeal #49
Conversation
…ate, remove the deprecated dry run mixins
…d... but still need the multidispatcher
* small typing fix + EncodingType * type ignores
@@ -92,186 +90,6 @@ def test_encode_abi(): | |||
) | |||
|
|||
|
|||
NONSENSE = "not a valid signature" |
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.
Moved to new test file executor_test.py
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.
wip
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.
I think abi_strategy.py
looks neat, looking into sim.py
and related test. Hopefully we can wrap this up this week
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.
I finished my pass on sim.py
, should be almost good to go, some TODOs in code (mostly comments and documentation) need to be done.
@@ -308,10 +308,9 @@ def msg(): | |||
err\ opcode # pyteal generated err's ok | |||
| assert\ failed\ pc= # pyteal generated assert's ok | |||
| invalid\ ApplicationArgs\ index # failing because an app arg wasn't provided | |||
| extract\ range\ beyond\ length\ of\ string # failing because couldn't extract when omitted final arg or jammed in tuple | |||
| extraction\ end\ 16\ is\ beyond\ length # failing because couldn't extract when omitted final arg or jammed in tuple |
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.
error messages have changed
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.
I am leaning towards approving and merging, just one question on hypothesis and related TODO, but I don't expect we will take any action here (for it would be non trivial).
TODO: when incorporating hypothesis strategies, we'll need a more holistic | ||
approach that looks at relationships amongst various args. | ||
Current approach only looks at each argument as a completely independent entity. |
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.
no action needed, I see hypothesis cross the PR, together with TODO, are you referring to hypothesis https://hypothesis.readthedocs.io/en/latest/data.html?
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.
Yes. Here's a nice video intro about it: https://www.youtube.com/watch?v=mkgd9iOiICc&ab_channel=ArjanCodes
Summary of changes
class ABIMethodCallStrategy
(formerlyclass ABIContractExecutor
):graviton/abi_strategy.py
(fromgraviton/blackbox.py
)validate_inputs()
dryrun_sequence()
get()
num_args()
class Simulation
ingraviton/sim.py
. See below for usage example.tests/integration/abi_router_test.py
which contains some tests formerly intests/integration/abi_test.py
but which are -as you might guess- all about testing theRouter
DryRunInspector
'serror()
anderror_message()
which recently brokePyTeal Sibling PR
algorand/pyteal#634
TODO
Figure out the actual PR referenced above and in the CHANGELOG