-
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.
Handle
createProxyWithNonce
relay limiting (#1115)
This adds relay limiting for `createProxyWithNonce` calls. It verifies the calldata and extracts the proposed owners. --- * Handle `multiSend` relay limiting * Add comment * Add an leverage `isCall` method to `AbiDecoder` * Handle `createProxyWithNonce` relay limiting * Simplify helpers and remove comments * Fix lint * Add return type * Remove duplicate decoding
- Loading branch information
Showing
6 changed files
with
165 additions
and
5 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
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
14 changes: 14 additions & 0 deletions
14
src/domain/relay/contracts/proxy-factory-decoder.helper.ts
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,14 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { parseAbi } from 'viem'; | ||
import { AbiDecoder } from '@/domain/alerts/contracts/abi-decoder.helper'; | ||
|
||
const PROXY_FACTORY_ABI = parseAbi([ | ||
'function createProxyWithNonce(address _singleton, bytes memory initializer, uint256 saltNonce)', | ||
]); | ||
|
||
@Injectable() | ||
export class ProxyFactoryDecoder extends AbiDecoder<typeof PROXY_FACTORY_ABI> { | ||
constructor() { | ||
super(PROXY_FACTORY_ABI); | ||
} | ||
} |
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