Skip to content

Commit

Permalink
refactor: multicall response
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 18, 2023
1 parent 31a7848 commit a832e42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/types/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export type MulticallContract<
}

export type MulticallResponse<
allowFailure extends boolean = true,
result = unknown,
error = unknown,
allowFailure extends boolean = true,
> = allowFailure extends true
?
| { error?: undefined; result: result; status: 'success' }
Expand Down Expand Up @@ -138,7 +138,6 @@ export type MulticallResults<
} = { error: Error; mutability: AbiStateMutability },
> = {
[index in keyof contracts]: MulticallResponse<
allowFailure,
ContractFunctionReturnType<
contracts[index],
options['mutability']
Expand All @@ -148,7 +147,8 @@ export type MulticallResults<
? unknown
: result
: unknown,
options['error']
options['error'],
allowFailure
>
}

Expand Down

0 comments on commit a832e42

Please sign in to comment.