-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move plugins and permissions to registry
feat: add "getPluginByProxy" getter feat: add "getPermissionByProxy" getter refactor: delete annex refactor: delete 'system' scripts refactor: get rid of proxy storage refactor: rename getters refactor: rename "selector" param to "method" test: update tests in light of new contract API
- Loading branch information
Showing
60 changed files
with
644 additions
and
688 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,28 +1,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.19 <0.9.0; | ||
|
||
import { IPRBProxy } from "../src/interfaces/IPRBProxy.sol"; | ||
import { IPRBProxyAnnex } from "../src/interfaces/IPRBProxyAnnex.sol"; | ||
import { IPRBProxyRegistry } from "../src/interfaces/IPRBProxyRegistry.sol"; | ||
|
||
import { BaseScript } from "./Base.s.sol"; | ||
|
||
/// @notice Bootstraps the proxy system by giving permission to an envoy and installing a plugin. | ||
/// @notice Permits an envoy to delegate call to a target contract. | ||
contract SetPermission is BaseScript { | ||
function run( | ||
IPRBProxy proxy, | ||
IPRBProxyAnnex annex, | ||
address target | ||
) | ||
public | ||
broadcaster | ||
returns (bytes memory response) | ||
{ | ||
// ABI encode the call to `setPermission`. | ||
function run(IPRBProxyRegistry registry, address target, bool permission) public broadcaster { | ||
address envoy = vm.addr(vm.deriveKey(mnemonic, 1)); | ||
bool permission = true; | ||
bytes memory data = abi.encodeCall(annex.setPermission, (envoy, target, permission)); | ||
|
||
// Execute the call to the annex. | ||
response = proxy.execute(address(annex), data); | ||
registry.setPermission({ envoy: envoy, target: target, permission: permission }); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.