This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
Add ExpanderEntryPoint
to avoid solidity abi
#590
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dependent PR
This PR depends on #584.
After that's merged, toggle the target branch back and forth or push an empty commit to fix the diff. (Preview of this PR's changes.)
What is this PR doing?
Before:
Explorer link
After:
Explorer link
This is achieved by using
ExpanderEntryPoint
which usesfallback()
in order to accept calldata bytes directly. This is superior to a function that takes abytes
argument, because the solidity ABI adds a surprising amount of stuff to encode that:bytes
argumentbytes
argumentBy using
fallback()
, we just accept the raw calldata directly. No method ID necessary. There is no calldata offset because we just get the full calldata unmodified. The length doesn't need to be encoded because there's an EVM instruction to get the calldata length. And the padding simply isn't needed.How can these changes be manually tested?
(Replicating this test isn't required.)
Register the source BLS key and address and destination address, and do an ETH transfer. View the calldata in the block explorer (or otherwise) and confirm it's under 100 bytes.
Does this PR resolve or contribute to any issues?
Resolves #589.
Checklist
Guidelines
resolve conversation
button is for reviewers, not authors