Skip to content
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

Add Data Registry Upgrade #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions contracts/dlp/DataLiquidityPoolImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ contract DataLiquidityPoolImplementation is
*/
event TeePoolUpdated(address newTeePool);

/**
* @notice Triggered when the dataRegistry has been updated
*
* @param newDataRegistry new data registry
*/
event DataRegistryUpdated(address newDataRegistry);

error FileAlreadyAdded();
error InvalidScore();
error InvalidAttestator();
Expand Down Expand Up @@ -250,6 +257,17 @@ contract DataLiquidityPoolImplementation is
emit TeePoolUpdated(newTeePool);
}

/**
* @notice Updates the dataRegistry
*
* @param newDataRegistry new data registry
*/
function updateDataRegistry(address newDataRegistry) external override onlyOwner {
dataRegistry = IDataRegistry(newDataRegistry);

emit DataRegistryUpdated(newDataRegistry);
}

/**
* @notice Updates the proofInstruction
*
Expand Down
1 change: 1 addition & 0 deletions contracts/dlp/interfaces/IDataLiquidityPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ interface IDataLiquidityPool {
function unpause() external;
function updateFileRewardFactor(uint256 newFileRewardFactor) external;
function updateTeePool(address newTeePool) external;
function updateDataRegistry(address newDataRegistry) external;
function updateProofInstruction(string calldata newProofInstruction) external;
function updatePublicKey(string calldata newProofInstruction) external;
function requestReward(uint256 registryFileId, uint256 proofIndex) external;
Expand Down