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 for transfer #6

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Add support for transfer #6

merged 2 commits into from
Feb 6, 2024

Conversation

montyly
Copy link
Member

@montyly montyly commented Jan 26, 2024

If there is no function name, we can make a ether transfer instead. Right now it uses .transfer, but we could use low level call instead?

In addition this PR add a general except Exception to prevent the tool from crashing on incorrect parsing

Copy link
Collaborator

@tuturu-tech tuturu-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Using a low-level call might be better in case the property failure relies on something being executed in the fallback function (Echidna doesn't currently support receive crytic/echidna#714).

I think we can merge this as a partial patch for Echidna after changing to low-level call and updating the template string. I'll create an issue so we can later add support for msg.data for the fallback and the same for Medusa

test_generator/templates/foundry_templates.py Outdated Show resolved Hide resolved
@tuturu-tech
Copy link
Collaborator

Refactored the PR to use low-level call instead and added a test to ensure the generated file can be compiled and that the property fails.

@tuturu-tech tuturu-tech merged commit a70083c into main Feb 6, 2024
6 checks passed
@tuturu-tech tuturu-tech deleted the support-transfer branch February 6, 2024 10:25
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