This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
Expose New call_raw
API that permits MultiCalls without Detokenization
#915
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.
Motivation
Multicall's
add_call
method is capped at 16 calls due to detokenization (tuple) contraints. Such a cap may force users to make more calls than necessary.References: #900
Solution
Expose a new
call_raw
method on the MultiCall interface that skips detokenization. Thecall
method can then wrapcall_raw
to avoid code duplication and add in the detokenization.Additional Notes
call
, only a simple test was added forcall_raw
. This may need to be improved.add_call
tocall
. As it's a panic, it is not likely to cause issues in current deployments; however, it may be worth pointing out in Changelog in case anyone relied upon it.multicall_aggregate
did not appear to be compatible with ganache ^7.0.0 as they assumed default accounts were seeded with 100 ether, not 1000 ether. Changes were made tospawn
to accommodate thiscall_raw
andcall
; however, formatting still needs to be checkedPR Checklist