Skip to content

Commit

Permalink
docs: fix natspec for eta, done and planned
Browse files Browse the repository at this point in the history
  • Loading branch information
amusingaxl committed Jun 10, 2024
1 parent fc1f94c commit f70b604
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/EmergencyDropSpell.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract EmergencyDropSpell is EmergencySpellLike {
address public immutable action;
/// @notice The original spell action tag (i.e.: `extcodehash`).
bytes32 public immutable tag;
/// @notice The original spell expiry time.
/// @notice The original spell earliest execution time.
uint256 public immutable eta;
/// @notice The original spell encoded call.
bytes public sig;
Expand All @@ -76,7 +76,7 @@ contract EmergencyDropSpell is EmergencySpellLike {
* @param _usr The original spell action address.
* @param _tag The original spell action tag (i.e.: `extcodehash`).
* @param _fax The original spell encoded call.
* @param _eta The original spell expiry time.
* @param _eta The original spell earliest execution time.
*/
constructor(address _protego, address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta) {
protego = ProtegoLike(_protego);
Expand Down Expand Up @@ -109,12 +109,12 @@ contract EmergencyDropSpell is EmergencySpellLike {
return string(abi.encodePacked("MakerDAO Drop Spell: ", protego.id(action, tag, sig, eta)));
}

/// @notice Returns whether the original spell has been dropped or not.
/// @notice Returns true the original spell has been dropped or has never been planned.
function done() external view returns (bool) {
return !planned();
}

/// @notice Returns whether the original spell has been planned or not.
/// @notice Returns whether the original spell is currently planned or not.
function planned() public view returns (bool) {
return protego.planned(action, tag, sig, eta);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Protego.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ contract Protego {
* @param _usr The address of the scheduled spell.
* @param _tag The tag identifying the address.
* @param _fax The encoded call to be made in `_usr`.
* @param _eta The expiry date.
* @param _eta The earliest execution time.
* @return _spell The `EmergencyDropSpell` address.
*/
function deploy(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta) public returns (address _spell) {
Expand All @@ -62,7 +62,7 @@ contract Protego {
* @param _usr The address of the scheduled spell.
* @param _tag The tag identifying the address.
* @param _fax The encoded call to be made in `_usr`.
* @param _eta The expiry date.
* @param _eta The earliest execution time.
*/
function id(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta) public pure returns (bytes32) {
return keccak256(abi.encode(_usr, _tag, _fax, _eta));
Expand All @@ -73,7 +73,7 @@ contract Protego {
* @param _usr The address of the scheduled spell.
* @param _tag The tag identifying the address.
* @param _fax The encoded call to be made in `_usr`.
* @param _eta The expiry date.
* @param _eta The earliest execution time.
*/
function planned(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta) external view returns (bool) {
return planned(id(_usr, _tag, _fax, _eta));
Expand Down
2 changes: 1 addition & 1 deletion src/Protego.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract ProtegoTest is DssTest {
assertEq(protego.pause(), pause);
}

function testDeploySpell() public {
function testDeployDropSpell() public {
ConformingSpell badSpell = new ConformingSpell(pause, end);

assertFalse(
Expand Down

0 comments on commit f70b604

Please sign in to comment.