-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check for plugin method collisions
test: adjust tests in light of new contract logic test: improve writing in state trees
- Loading branch information
Showing
11 changed files
with
88 additions
and
39 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
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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.18; | ||
|
||
import { IPRBProxyPlugin } from "../../../src/interfaces/IPRBProxyPlugin.sol"; | ||
|
||
contract PluginCollider is IPRBProxyPlugin { | ||
function methodList() external pure override returns (bytes4[] memory) { | ||
bytes4[] memory methods = new bytes4[](1); | ||
methods[0] = this.onAddictionFeesRefunded.selector; | ||
return methods; | ||
} | ||
|
||
/// @dev The selector for this method is 0x72eba203, which is the same as the selector for | ||
/// `onStreamCanceled(uint256,address,uint128,uint128)` | ||
function onAddictionFeesRefunded(uint248 loanId, int168, uint192 feeAmount, int248) external pure { | ||
loanId; | ||
feeAmount; | ||
} | ||
} |
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,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.18; | ||
|
||
import { IPRBProxyPlugin } from "../../../src/interfaces/IPRBProxyPlugin.sol"; | ||
|
||
contract PluginSablier is IPRBProxyPlugin { | ||
function methodList() external pure override returns (bytes4[] memory) { | ||
bytes4[] memory methods = new bytes4[](1); | ||
methods[0] = this.onStreamCanceled.selector; | ||
return methods; | ||
} | ||
|
||
/// @dev The 4-byte selector for this method is 0x72eba203. | ||
function onStreamCanceled(uint256, address, uint128, uint128) external pure { } | ||
} |
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
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
Oops, something went wrong.