-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: As a Dev, I want to have a minimal
IPortal
interface to facil…
…itate the creation of a `Portal` (#303) Co-authored-by: Satyajeet Kolhapure <kolhapure.satyajeet@gmail.com> Co-authored-by: Alain Nicolas <alain.nicolas@consensys.net>
- Loading branch information
1 parent
506c139
commit e644262
Showing
20 changed files
with
120 additions
and
43 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
contracts/src/portal/DefaultPortal.sol → contracts/src/DefaultPortal.sol
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.
4 changes: 2 additions & 2 deletions
4
contracts/src/example/MsgSenderModule.sol → .../src/examples/modules/MsgSenderModule.sol
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
4 changes: 2 additions & 2 deletions
4
contracts/src/example/PayableModule.sol → ...ts/src/examples/modules/PayableModule.sol
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
4 changes: 2 additions & 2 deletions
4
contracts/src/example/EASPortal.sol → contracts/src/examples/portals/EASPortal.sol
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,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.21; | ||
|
||
import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; | ||
|
||
/** | ||
* @title IPortal | ||
* @author Consensys | ||
* @notice This contract is the interface to be implemented by any Portal. | ||
* NOTE: A portal must implement this interface to registered on | ||
* the PortalRegistry contract. | ||
*/ | ||
interface IPortal is IERC165 { | ||
/** | ||
* @notice Get all the modules addresses used by the Portal | ||
* @return The list of modules addresses linked to the Portal | ||
*/ | ||
function getModules() external view returns (address[] memory); | ||
|
||
/** | ||
* @notice Defines the address of the entity issuing attestations to the subject | ||
* @dev We strongly encourage a reflection when implementing this method | ||
*/ | ||
function getAttester() external view returns (address); | ||
} |
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
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,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.21; | ||
|
||
import { IPortal } from "../../src/interface/IPortal.sol"; | ||
import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; | ||
|
||
contract IPortalImplementation is IPortal { | ||
function test() public {} | ||
|
||
function getModules() external pure override returns (address[] memory) { | ||
return new address[](0); | ||
} | ||
|
||
function getAttester() external view override returns (address) { | ||
return msg.sender; | ||
} | ||
|
||
function supportsInterface(bytes4 interfaceID) public pure override returns (bool) { | ||
return interfaceID == type(IPortal).interfaceId || interfaceID == type(IERC165).interfaceId; | ||
} | ||
} |
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