-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIGit.sol
46 lines (36 loc) · 1.41 KB
/
IGit.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { IDiamondWritable } from '@solidstate/contracts/proxy/diamond/writable/IDiamondWritable.sol';
/**
* @title Basic Git Implementation for an Upgrades and Presets Package Store Diamond
* @notice This contract allows reading and writing to the upgrades and presets store. It will not
* act as a borrowed facet, but as a native facet to the Storage Diamond.
* @dev This contract remains a facet to allow future upgrades of the Git system this diamond
* will use. For more context on how this Git system can work under the hood, see Storage.sol.
*/
interface IGit {
event Committed (
address owner,
string name,
address upgrade
);
/**
* @notice commit an upgrade / preset to the sender's git repo under 'name'
*/
function commit(
string calldata name,
IDiamondWritable.FacetCut[] calldata cuts,
address target,
bytes calldata data
) external returns (address);
/**
* @notice fetch the latest upgrade / preset commit at the owner's repo name
*/
function latest(
address owner,
string memory name
) external view returns (address);
function unsubscribe(address account, string memory repo, address user) external;
function subscribe(address account, string memory repo, address user) external;
function isSubscriber(address account, string memory repo, address user) external view returns (bool);
}