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

Add support to analyse and-or-! connected equations #132

Merged
merged 5 commits into from
Jan 26, 2023

Conversation

S3v3ru5
Copy link
Contributor

@S3v3ru5 S3v3ru5 commented Jan 18, 2023

Fixes issues #90, #95

It is common to use logical operators to validate multiple fields at a time. examples include:

txn RekeyTo
global ZeroAddress
==
txn CloseRemainderTo
global ZeroAddress
==
&&
txn AssetCloseTo
global ZeroAddress
&&
assert
txn OnCompletion
int UpdateApplication
==
txn OnCompletion
int DeleteApplication
==
||
!                                  // txn is not UpdateApplication or DeleteApplication.
assert

More complex patterns could be used to perform transaction field validations. This PR adds support to infer information about interested fields when the comparison equations are combined using logical operators &&, ||, and !.

@S3v3ru5
Copy link
Contributor Author

S3v3ru5 commented Jan 18, 2023

Builds on #131

Vara Prasad Bandaru and others added 3 commits January 24, 2023 15:04
Update txn field analysis to use comparison-return pattern
Update MissingFeeCheck detector to use transaction field analysis
@montyly montyly merged commit a2239f0 into dev-upd-fee-analysis Jan 26, 2023
@montyly montyly deleted the dev-and-or-expr branch January 26, 2023 14:01
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.

2 participants