-
Notifications
You must be signed in to change notification settings - Fork 4k
feat: IERC165 support on SaferSafes #17864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
460cc72
feat: IERC165 support
JosepBove f528f46
fixes
JosepBove 73d2cd2
fmt
JosepBove 8c9771a
fix: maurelian's feedback
JosepBove 121d398
feat: matt's review
JosepBove 9b040a2
fix: conflicts
JosepBove d5afef1
fix: pre-pr
JosepBove 279b11c
Merge branch 'develop' into jb/ierc165-safer-safes
JosepBove 420682e
fix: semver
JosepBove File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
packages/contracts-bedrock/interfaces/safe/ITransactionGuard.sol
This file contains hidden or 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,41 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import { Enum } from "safe-contracts/common/Enum.sol"; | ||
| import { IERC165 } from "safe-contracts/interfaces/IERC165.sol"; | ||
|
|
||
| /// @title ITransactionGuard Interface | ||
| interface ITransactionGuard is IERC165 { | ||
| /// @notice Checks the transaction details. | ||
| /// @dev The function needs to implement transaction validation logic. | ||
| /// @param to The address to which the transaction is intended. | ||
| /// @param value The native token value of the transaction in Wei. | ||
| /// @param data The transaction data. | ||
| /// @param operation Operation type (0 for `CALL`, 1 for `DELEGATECALL`). | ||
| /// @param safeTxGas Gas used for the transaction. | ||
| /// @param baseGas The base gas for the transaction. | ||
| /// @param gasPrice The price of gas in Wei for the transaction. | ||
| /// @param gasToken The token used to pay for gas. | ||
| /// @param refundReceiver The address which should receive the refund. | ||
| /// @param signatures The signatures of the transaction. | ||
| /// @param msgSender The address of the message sender. | ||
| function checkTransaction( | ||
| address to, | ||
| uint256 value, | ||
| bytes memory data, | ||
| Enum.Operation operation, | ||
| uint256 safeTxGas, | ||
| uint256 baseGas, | ||
| uint256 gasPrice, | ||
| address gasToken, | ||
| address payable refundReceiver, | ||
| bytes memory signatures, | ||
| address msgSender | ||
| ) external; | ||
|
|
||
| /// @notice Checks after execution of the transaction. | ||
| /// @dev The function needs to implement a check after the execution of the transaction. | ||
| /// @param hash The hash of the executed transaction. | ||
| /// @param success The status of the transaction execution. | ||
| function checkAfterExecution(bytes32 hash, bool success) external; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
|
JosepBove marked this conversation as resolved.
|
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.