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: default call transactions would not get prepared when sender is a contract #2508

Merged
merged 4 commits into from
Feb 16, 2025

Conversation

antazoey
Copy link
Member

What I did

it is difficult to test this without a provider that can handle impersonated accounts (can't wait for boa to be part of ape core).
but if your account is a contract and you call a fallback method on another contract, the transaction would never get prepared causing you to have to manually specify nonce= and everything else you neeed.

How I did it

  • move prepare_transaction() to BaseAddress class.
  • if the given sender isnt an account but is base-address, still do the prepare_transaction() part.

How to verify it

I had to add exception kwarg to SignatureError so i can at least verify the txn data is now populated.
I also confirmed with breakpoint and it unblocks me someplace else too. added a test.

Checklist

  • All changes are completed
  • Change is covered in tests
  • Documentation is complete

@antazoey antazoey changed the title fix: default calls transactions would not get prepared when sender is a contract fix: default call transactions would not get prepared when sender is a contract Feb 16, 2025
@antazoey antazoey force-pushed the feat/improve-imp-act-msg branch from 10de569 to eae7665 Compare February 16, 2025 00:22
@antazoey antazoey merged commit ced89ab into ApeWorX:main Feb 16, 2025
18 checks passed
@antazoey antazoey deleted the feat/improve-imp-act-msg branch February 16, 2025 19:38
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