Skip to content
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

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

3lpsy
Copy link
Contributor

@3lpsy 3lpsy commented Feb 15, 2022

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. The call method can then wrap call_raw to avoid code duplication and add in the detokenization.

Additional Notes

  • While current tests should ensure no regressions for call, only a simple test was added for call_raw. This may need to be improved.
  • The 16 call limit panic is moved from add_call to call. 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.
  • The test cases for 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 to spawn to accommodate this
  • Documentation was added / modified for call_raw and call; however, formatting still needs to be checked

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

… `call` wrap around `call_raw` permitting user to handle detokenization themselves if they wish
…informs the user of their responsibility to detokenize results
Copy link
Collaborator

@roynalnaruto roynalnaruto left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

nice work!

@gakonst gakonst merged commit e3f0621 into gakonst:master Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants