-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
23 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export class InvalidMultiSendError extends Error { | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export class InvalidMultiSendError extends HttpException { | ||
constructor() { | ||
super( | ||
'Invalid multiSend call. The batch is not all execTransaction calls to same address.', | ||
HttpStatus.UNPROCESSABLE_ENTITY, | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export class InvalidTransferError extends Error { | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export class InvalidTransferError extends HttpException { | ||
constructor() { | ||
super( | ||
'Invalid transfer. The proposed transfer is not an execTransaction/multiSend to another party or createProxyWithNonce call.', | ||
HttpStatus.UNPROCESSABLE_ENTITY, | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
import { Hex } from 'viem'; | ||
|
||
export class RelayLimitReachedError extends Error { | ||
export class RelayLimitReachedError extends HttpException { | ||
constructor( | ||
readonly address: Hex, | ||
readonly current: number, | ||
readonly limit: number, | ||
) { | ||
super( | ||
`Relay limit reached for ${address} | current: ${current} | limit: ${limit}`, | ||
HttpStatus.TOO_MANY_REQUESTS, | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export class UnofficialMasterCopyError extends Error { | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export class UnofficialMasterCopyError extends HttpException { | ||
constructor() { | ||
super( | ||
'Safe attempting to relay is not official. Only official Safe singletons are supported.', | ||
HttpStatus.UNPROCESSABLE_ENTITY, | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export class UnofficialMultiSendError extends Error { | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export class UnofficialMultiSendError extends HttpException { | ||
constructor() { | ||
super( | ||
'MultiSend contract is not official. Only official MultiSend contracts are supported.', | ||
HttpStatus.UNPROCESSABLE_ENTITY, | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export class UnofficialProxyFactoryError extends Error { | ||
import { HttpException, HttpStatus } from '@nestjs/common'; | ||
|
||
export class UnofficialProxyFactoryError extends HttpException { | ||
constructor() { | ||
super( | ||
'ProxyFactory contract is not official. Only official ProxyFactory contracts are supported.', | ||
HttpStatus.UNPROCESSABLE_ENTITY, | ||
); | ||
} | ||
} |