-
Notifications
You must be signed in to change notification settings - Fork 366
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
Document multi-issuer contracts according to NatSpec guidelines #274
Conversation
contracts/minting/MasterMinter.sol
Outdated
@@ -24,6 +24,10 @@ pragma solidity ^0.4.24; | |||
|
|||
import "./MintController.sol"; | |||
|
|||
/** | |||
* @title MasterMinter | |||
* @dev Default implementation of the MintController contract. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contracts/minting/MintController.sol
Outdated
@@ -28,12 +28,17 @@ import "openzeppelin-solidity/contracts/math/SafeMath.sol"; | |||
|
|||
/** | |||
* @title MintController | |||
* @dev allows control of configure/remove minter by different addresses | |||
* | |||
* @dev Implementation of the abstract Controller contract, in which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@notice The MintController contract manages minters for a contract that implements the MinterManagerInterface. It lets the owner designate certain addresses as controllers, and these controllers then manage the minters by adding and removing minters, as well as modifying their minting allowance. A controller may manage exactly one minter, but the same minter address may be managed by multiple controllers.
@dev MintController inherits from the Controller contract. It treats the Controller workers as minters.
contracts/minting/MintController.sol
Outdated
*/ | ||
contract MintController is Controller { | ||
using SafeMath for uint256; | ||
|
||
/** | ||
* @title MinterManagementInterface | ||
* @dev Interface for managing the allowances of minters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dev MintController calls the minterManager to execute/record the minter management tasks, as well as to query the status of a minter address.
// can be used for managing minters with different contracts. | ||
/** | ||
* @title MinterManagementInterface | ||
* @dev Interface for managing the allowances of minters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@notice A contract the implements the MinterManagementInterface has external functions for adding and removing minters and modifying their allowances. An example of such a contract is the FiatTokenV1 contract that
implements USDC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to NatSpec, the @notice function describes the functional behavior observed by the caller, while @dev explain design/architectural decisions to the developer. We should use the @notice with every function. (In most cases, this means replacing the existing @dev tag with @notice). The @dev tag can be added occasionally to explain how we implemented the @notice behavior.
@mirathewhite Thanks for the suggestions! I added all of them. |
No description provided.