Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/contracts/interfaces/IBN254CertificateVerifier.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import "src/contracts/interfaces/ICrossChainRegistry.sol";
import "src/contracts/interfaces/IBaseCertificateVerifier.sol";
import "src/contracts/interfaces/IBN254TableCalculator.sol";
import {BN254} from "../libraries/BN254.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";
import "./IBN254TableCalculator.sol";
import "./IBaseCertificateVerifier.sol";

interface IBN254CertificateVerifierTypes is IBN254TableCalculatorTypes {
/**
Expand Down Expand Up @@ -42,7 +42,7 @@ interface IBN254CertificateVerifierEvents is IBN254CertificateVerifierTypes {
}

/// @notice An interface for verifying BN254 certificates
/// @notice This implements a base interface that all curve certificate verifiers (eg. BN254, ECDSA) must implement
/// @notice This implements the base `IBaseCertificateVerifier` interface
interface IBN254CertificateVerifier is IBN254CertificateVerifierEvents, IBaseCertificateVerifier {
/**
* @notice updates the operator table
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/interfaces/IBN254TableCalculator.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/BN254.sol";
import "src/contracts/libraries/OperatorSetLib.sol";
import {BN254} from "../libraries/BN254.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";

interface IBN254TableCalculatorTypes {
/**
Expand Down
26 changes: 9 additions & 17 deletions src/contracts/interfaces/IBaseCertificateVerifier.sol
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import "src/contracts/interfaces/ICrossChainRegistry.sol";
import "./ICrossChainRegistry.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";

interface IBaseCertificateVerifierTypes is ICrossChainRegistryTypes {
// TODO: use the `KeyType` from `KeyRegistrar`
/**
* @notice The type of key used by the operatorSet. An OperatorSet can
* only generate one Operator Table for an OperatorSet for a given OperatorKeyType.
*/
enum OperatorKeyType {
ECDSA,
BN254
}
}

interface IBaseCertificateVerifierEvents is IBaseCertificateVerifierTypes {
interface IBaseCertificateVerifierEvents {
/// @notice Emitted when the owner of an operatorSet is updated
event OperatorSetOwnerUpdated(OperatorSet operatorSet, address owner);

Expand All @@ -41,8 +29,12 @@ interface IBaseCertificateVerifierErrors {

/// @notice A base interface that verifies certificates for a given operatorSet
/// @notice This is a base interface that all curve certificate verifiers (eg. BN254, ECDSA) must implement
/// @dev A single `CertificateVerifier` can be used for ONLY 1 operatorSet
interface IBaseCertificateVerifier is IBaseCertificateVerifierEvents, IBaseCertificateVerifierErrors {
/// @dev A single `CertificateVerifier` can be used for multiple operatorSets, but a single key type
interface IBaseCertificateVerifier is
IBaseCertificateVerifierEvents,
IBaseCertificateVerifierErrors,
ICrossChainRegistryTypes
{
/// @notice the address of the owner of the OperatorSet
function getOperatorSetOwner(
OperatorSet memory operatorSet
Expand Down
6 changes: 3 additions & 3 deletions src/contracts/interfaces/ICrossChainRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";

interface IOperatorTableCalculator {
// TODO: implement, stub for now
Expand Down Expand Up @@ -91,7 +91,7 @@ interface ICrossChainRegistry is ICrossChainRegistryErrors, ICrossChainRegistryT
/**
* @notice Adds a chainID to the whitelist of chainIDs that can be transported to
* @param chainID the chainID to add to the whitelist
* @dev msg.sender must be UAM permissioned for operatorSet.avs
* @dev msg.sender must be the owner of the CrossChainRegistry
*/
function addChainIDToWhitelist(
uint32 chainID
Expand All @@ -100,7 +100,7 @@ interface ICrossChainRegistry is ICrossChainRegistryErrors, ICrossChainRegistryT
/**
* @notice Removes a chainID from the whitelist of chainIDs that can be transported to
* @param chainID the chainID to remove from the whitelist
* @dev msg.sender must be UAM permissioned for operatorSet.avs
* @dev msg.sender must be the owner of the CrossChainRegistry
*/
function removeChainIDFromWhitelist(
uint32 chainID
Expand Down
9 changes: 4 additions & 5 deletions src/contracts/interfaces/IECDSACertificateVerifier.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import "src/contracts/interfaces/ICrossChainRegistry.sol";
import "src/contracts/interfaces/IBaseCertificateVerifier.sol";
import "src/contracts/interfaces/IECDSATableCalculator.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";
import "./IBaseCertificateVerifier.sol";
import "./IECDSATableCalculator.sol";

interface IECDSACertificateVerifierTypes is IECDSATableCalculatorTypes {
/**
Expand All @@ -26,7 +25,7 @@ interface IECDSACertificateVerifierEvents is IECDSACertificateVerifierTypes {
}

/// @notice An interface for verifying ECDSA certificates
/// @notice This implements a base interface that all curve certificate verifiers (eg. BN254, ECDSA) must implement
/// @notice This implements the base `IBaseCertificateVerifier` interface
interface IECDSACertificateVerifier is IECDSACertificateVerifierEvents, IBaseCertificateVerifier {
/**
* @notice updates the operator table
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/interfaces/IECDSATableCalculator.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";

interface IECDSATableCalculatorTypes {
/**
Expand Down
12 changes: 6 additions & 6 deletions src/contracts/interfaces/IOperatorTableUpdater.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;

import "src/contracts/libraries/OperatorSetLib.sol";
import {OperatorSet} from "../libraries/OperatorSetLib.sol";

import "src/contracts/interfaces/IECDSATableCalculator.sol";
import "src/contracts/interfaces/IBN254TableCalculator.sol";
import "src/contracts/interfaces/IECDSACertificateVerifier.sol";
import "src/contracts/interfaces/IBN254CertificateVerifier.sol";
import "src/contracts/interfaces/ICrossChainRegistry.sol";
import "./IECDSATableCalculator.sol";
import "./IBN254TableCalculator.sol";
import "./IECDSACertificateVerifier.sol";
import "./IBN254CertificateVerifier.sol";
import "./ICrossChainRegistry.sol";

interface IOperatorTableUpdaterErrors {
/// @notice Thrown when the GlobalTableRoot update fails
Expand Down
Loading