-
Notifications
You must be signed in to change notification settings - Fork 628
Create IHookMetadata #382
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
base: main
Are you sure you want to change the base?
Create IHookMetadata #382
Changes from 4 commits
4021ce3
ac79dcf
c93d4b8
ecedc53
f8cd75c
2115888
c57b25b
7e78c5c
2c91c7b
2a0c75a
53d62fa
9b080fb
da33a30
a27cb9c
a5f5003
b371d61
3df37ea
0fbc8b4
f941f1e
67f11d7
735033e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| interface IHookMetadata { | ||
| /// @notice Represents the auditor | ||
| /// @param name The name of the auditor. | ||
| /// @param uri The URI with additional information about the auditor. | ||
| /// @param authors List of authors responsible for the audit. | ||
| struct Auditor { | ||
| string name; | ||
| string uri; | ||
| string[] authors; | ||
| } | ||
|
|
||
|
|
||
| /// @notice Represents a summary of the audit. | ||
| /// @param auditor The auditor who performed the audit. | ||
| /// @param issuedAt The timestamp at which the audit was issued. | ||
| /// @param ercs List of ERC standards that were covered in the audit. | ||
| /// @param bytecodeHash Hash of the audited smart contract bytecode. | ||
| /// @param auditHash Hash of the audit document. | ||
| /// @param auditUri URI with additional information or the full audit report. | ||
| struct AuditSummary { | ||
| Auditor auditor; | ||
| uint256 issuedAt; | ||
| uint256[] ercs; | ||
| bytes32 bytecodeHash; | ||
|
||
| bytes32 auditHash; | ||
| string auditUri; | ||
| } | ||
|
|
||
|
|
||
| /// @notice Defines different types of signature standards. | ||
| enum SignatureType { | ||
| SECP256K1, | ||
| BLS, | ||
| ERC1271, | ||
| SECP256R1 | ||
| } | ||
|
|
||
| /// @notice Represents a cryptographic signature. | ||
| /// @param signatureType The type of the signature (e.g., SECP256K1, BLS, etc.). | ||
| /// @param data The actual signature data. | ||
| struct Signature { | ||
| SignatureType signatureType; | ||
|
||
| bytes data; | ||
| } | ||
|
|
||
| /// @notice Represents a signed audit summary. | ||
| /// @param summary The audit summary being signed. | ||
| /// @param signedAt Timestamp indicating when the audit summary was signed. | ||
| /// @param auditorSignature Signature of the auditor for authenticity. | ||
| struct SignedAuditSummary { | ||
| AuditSummary summary; | ||
| uint256 signedAt; | ||
| Signature auditorSignature; | ||
| } | ||
|
|
||
| /// @notice Returns the name of the hook. | ||
| /// @return The hook's name as a string. | ||
| function name() external view returns (string memory); | ||
|
|
||
| /// @notice Returns the repository URI for the smart contract code. | ||
| /// @return The repository URI. | ||
| function repository() external view returns (string memory); | ||
|
|
||
| /// @notice Returns the URI for the hook's logo. | ||
| /// @return The logo URI. | ||
| function logoURI() external view returns (string memory); | ||
|
|
||
| /// @notice Returns the URI for the hook's website. | ||
| /// @return The website URI. | ||
| function websiteURI() external view returns (string memory); | ||
|
|
||
| /// @notice Returns a description of the hook. | ||
| /// @return The hook's description. | ||
| function description() external view returns (string memory); | ||
|
|
||
| /// @notice Returns the version of the hook. | ||
| /// @return The version identifier as bytes32. | ||
| function version() external view returns (bytes32); | ||
|
|
||
| /// @notice Returns all audit records of the hook. | ||
| /// @return An array of SignedAuditSummary structs containing audit summary and signature details. | ||
| function audits() external view returns (SignedAuditSummary[] memory); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.