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

feat: decode multisend payload and add calls from it #59

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

banteg
Copy link
Contributor

@banteg banteg commented Jun 12, 2024

What I did

add MultiSend.add_from_calldata that decodes a multisend payload and adds it as calls.

i've also added a test to demonstrate it encodes back to the same calldata.

How I did it

im treating the data as a buffer since the data encoding uses a length prefix. when the buffer is exhausted, we have decoded all calls.

How to verify it

read the encoding spec here https://etherscan.io/address/0x40A2aCCbd92BCA938b02010E17A5b8929b49130D#code

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@fubuloubu fubuloubu merged commit 3cdb092 into ApeWorX:main Jun 12, 2024
13 checks passed
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