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(contract): allow 16 calls in multicall #1934

Merged
merged 1 commit into from
Dec 15, 2022
Merged

Conversation

onsails
Copy link
Contributor

@onsails onsails commented Dec 9, 2022

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@@ -608,7 +608,7 @@ impl<M: Middleware> Multicall<M> {
/// # }
/// ```
pub async fn call<D: Detokenize>(&self) -> Result<D, M> {
assert!(self.calls.len() < 16, "Cannot decode more than 16 calls");
assert!(self.calls.len() <= 16, "Cannot decode more than 16 calls");
Copy link
Owner

@gakonst gakonst Dec 15, 2022

Choose a reason for hiding this comment

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

OK this should be fine due to this line https://github.com/gakonst/ethers-rs/blob/master/ethers-core/src/abi/tokens.rs#L130 and this https://github.com/gakonst/ethers-rs/blob/master/ethers-core/src/abi/tokens.rs#L341. Would be nicer if we did this with a const generic somehow so we're not bound to any number of tokens. Even better if we had an ability to return things of unknown length.

Copy link
Contributor Author

@onsails onsails Dec 15, 2022

Choose a reason for hiding this comment

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

I have propotypes for both, will prepare another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gakonst gakonst merged commit 5bc9ee7 into gakonst:master Dec 15, 2022
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.

None yet

2 participants