Skip to content

Commit b4100e7

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
Update code comments for contract publisher
1 parent 420a898 commit b4100e7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

contracts/ContractPublisher.sol

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ contract ContractPublisher is IContractPublisher, ERC2771Context, AccessControlE
1717
State variables
1818
//////////////////////////////////////////////////////////////*/
1919

20-
/// @dev Whether the registry is paused.
20+
/// @notice Whether the contract publisher is paused.
2121
bool public isPaused;
2222

2323
/*///////////////////////////////////////////////////////////////
@@ -102,7 +102,7 @@ contract ContractPublisher is IContractPublisher, ERC2771Context, AccessControlE
102102
Publish logic
103103
//////////////////////////////////////////////////////////////*/
104104

105-
/// @notice Let's an account publish a contract. The account must be approved by the publisher, or be the publisher.
105+
/// @notice Let's an account publish a contract.
106106
function publishContract(
107107
address _publisher,
108108
string memory _contractId,
@@ -135,7 +135,7 @@ contract ContractPublisher is IContractPublisher, ERC2771Context, AccessControlE
135135
emit ContractPublished(_msgSender(), _publisher, publishedContract);
136136
}
137137

138-
/// @notice Lets an account unpublish a contract and all its versions. The account must be approved by the publisher, or be the publisher.
138+
/// @notice Lets a publisher unpublish a contract and all its versions.
139139
function unpublishContract(address _publisher, string memory _contractId)
140140
external
141141
onlyPublisher(_publisher)
@@ -185,10 +185,12 @@ contract ContractPublisher is IContractPublisher, ERC2771Context, AccessControlE
185185
emit Paused(_pause);
186186
}
187187

188+
/// @dev ERC2771Context overrides
188189
function _msgSender() internal view virtual override(Context, ERC2771Context) returns (address sender) {
189190
return ERC2771Context._msgSender();
190191
}
191192

193+
/// @dev ERC2771Context overrides
192194
function _msgData() internal view virtual override(Context, ERC2771Context) returns (bytes calldata) {
193195
return ERC2771Context._msgData();
194196
}

contracts/interfaces/IContractPublisher.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ interface IContractPublisher {
8080
returns (CustomContractInstance memory published);
8181

8282
/**
83-
* @notice Let's an account publish a contract. The account must be approved by the publisher, or be the publisher.
83+
* @notice Let's an account publish a contract.
8484
*
8585
* @param publisher The address of the publisher.
8686
* @param contractId The identifier for a published contract (that can have multiple verisons).
@@ -100,7 +100,7 @@ interface IContractPublisher {
100100
) external;
101101

102102
/**
103-
* @notice Lets an account unpublish a contract and all its versions. The account must be approved by the publisher, or be the publisher.
103+
* @notice Lets a publisher unpublish a contract and all its versions.
104104
*
105105
* @param publisher The address of the publisher.
106106
* @param contractId The identifier for a published contract (that can have multiple verisons).
@@ -113,12 +113,12 @@ interface IContractPublisher {
113113
function setPublisherProfileUri(address publisher, string memory uri) external;
114114

115115
/**
116-
* @notice get the publisher profile uri
116+
* @notice Get the publisher profile uri for a given publisher.
117117
*/
118118
function getPublisherProfileUri(address publisher) external view returns (string memory uri);
119119

120120
/**
121-
* @notice Retrieve the published metadata URI from a compiler metadata URI
121+
* @notice Retrieve the published metadata URI from a compiler metadata URI.
122122
*/
123123
function getPublishedUriFromCompilerUri(string memory compilerMetadataUri)
124124
external

0 commit comments

Comments
 (0)