Skip to content

Commit f2a4972

Browse files
committed
returnValues to be an array not an array in array#
1 parent 97530a2 commit f2a4972

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,4 @@ https://github.com/joshstevens19/ethereum-multicall/issues
282282
283283
TO FIX BEFORE PUBLISH:
284284
285-
- Allow call to pass in a single without forcing array
286285
- Ability to type cast the references

ethereum-multicall-1.0.0.tgz

15.8 KB
Binary file not shown.

src/models/call-return-context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { CallContext } from './call-context';
22

33
export interface CallReturnContext extends CallContext {
4-
returnValues: Result;
4+
// tslint:disable-next-line: no-any
5+
returnValues: any[];
56
/**
67
* This stats if it could decode the result or not
78
*/

src/multicall.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ export class Multicall {
130130

131131
returnObjectResult.callsReturnContext.push(
132132
Utils.deepClone<CallReturnContext>({
133-
returnValues: decodedReturnValue,
133+
// ethers put the result of the decode in an array
134+
returnValues: decodedReturnValue[0],
134135
decoded: true,
135136
reference: originalContractCallMethodContext.reference,
136137
methodName: originalContractCallMethodContext.methodName,

0 commit comments

Comments
 (0)