From 5bc9ee73b2a6c07b361710b0728ffbda681ff7e6 Mon Sep 17 00:00:00 2001 From: Andrey Kuznetsov Date: Thu, 15 Dec 2022 11:47:59 +0400 Subject: [PATCH] fix(contract): allow 16 calls in multicall (#1934) --- CHANGELOG.md | 1 + ethers-contract/src/multicall/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ead18b96..f1b26a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ between its right shift operator and standard library numeric types. - [#842](https://github.com/gakonst/ethers-rs/issues/842) Add support for I256 types in `parse_units` and `format_units`. Added `twos_complement` function for I256. +- [#1934](https://github.com/gakonst/ethers-rs/pull/1934) Allow 16 calls in multicall. ## ethers-contract-abigen diff --git a/ethers-contract/src/multicall/mod.rs b/ethers-contract/src/multicall/mod.rs index 4f304b18..8dd24542 100644 --- a/ethers-contract/src/multicall/mod.rs +++ b/ethers-contract/src/multicall/mod.rs @@ -608,7 +608,7 @@ impl Multicall { /// # } /// ``` pub async fn call(&self) -> Result { - assert!(self.calls.len() < 16, "Cannot decode more than 16 calls"); + assert!(self.calls.len() <= 16, "Cannot decode more than 16 calls"); let tokens = self.call_raw().await?; let tokens = vec![Token::Tuple(tokens)]; let data = D::from_tokens(tokens).map_err(ContractError::DetokenizationError)?;