This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(studio): Throw error for wrapped Multicall request when address …
…is invalid
- Loading branch information
1 parent
78adf7d
commit 0ae16a0
Showing
3 changed files
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export type MulticallWrappedInvalidAddressErrorType = MulticallWrappedInvalidAddressError & { | ||
name: 'MulticallWrappedInvalidAddressError'; | ||
}; | ||
|
||
type MulticallWrappedInvalidAddressErrorParams = { | ||
signature: string; | ||
args: any[]; | ||
stack?: string; | ||
}; | ||
|
||
export class MulticallWrappedInvalidAddressError extends Error { | ||
override name = 'MulticallWrappedInvalidAddressError'; | ||
stack?: string; | ||
|
||
constructor({ signature, args, stack }: MulticallWrappedInvalidAddressErrorParams) { | ||
const argsString = `[${args.map(v => JSON.stringify(v)).join(', ')}]`; | ||
super(`Multicall invalid address provided for method ${signature} with args ${argsString}`); | ||
this.stack = stack; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters