# Milestone Contract

## Address

> Address : (not yet deployed)\
> on Klaytn Blockchain Main-net

## Summary

> **Milestone contracts define milestones for projects provided to Otherworld.**

* Defines the milestone details.
  * Milestones are included in one universe.
  * A milestone can contain multiple comments.
  * Defines the current progress of the milestone.
  * Defines the current progress of the milestone.
  * Defines the metadata URL for the milestone.
* Defines the comment details.
  * Comments are included in one milestone.
  * Defines the metadata URL of the comment.

## Data

### Base

<table><thead><tr><th width="648.1098140836807">Name</th><th width="150">Type<select><option value="f59a4491161a4b9dbe758183bdcc8abe" label="Uint" color="blue"></option><option value="e60501f3a0c44f8b8e12409d4cb13cea" label="Boolean" color="blue"></option><option value="c1cc68a96f1640d0b3ee6c54288abf06" label="Address" color="blue"></option><option value="5a93deb4e03e4bb6b2cad62cef005788" label="String" color="blue"></option><option value="989f2aed8ec847658e1f3262650032fb" label="List (Uint)" color="blue"></option></select></th></tr></thead><tbody><tr><td>Created Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

### Milestone

<table><thead><tr><th width="319.3912577073985">Name</th><th width="150">Type<select><option value="f59a4491161a4b9dbe758183bdcc8abe" label="Uint" color="blue"></option><option value="e60501f3a0c44f8b8e12409d4cb13cea" label="Boolean" color="blue"></option><option value="c1cc68a96f1640d0b3ee6c54288abf06" label="Address" color="blue"></option><option value="5a93deb4e03e4bb6b2cad62cef005788" label="String" color="blue"></option><option value="b97b905bb0a844919c6c31611e10771d" label="List (Uint)" color="blue"></option></select></th></tr></thead><tbody><tr><td>ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Universe ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Metadata URL</td><td><span data-option="5a93deb4e03e4bb6b2cad62cef005788">String</span></td></tr><tr><td>State</td><td><span data-option="5a93deb4e03e4bb6b2cad62cef005788">String</span></td></tr><tr><td>Progressing</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Is Active</td><td><span data-option="e60501f3a0c44f8b8e12409d4cb13cea">Boolean</span></td></tr><tr><td>Updated Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Created Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

### Comment

<table><thead><tr><th width="319.3912577073985">Name</th><th width="150">Type<select><option value="f59a4491161a4b9dbe758183bdcc8abe" label="Uint" color="blue"></option><option value="e60501f3a0c44f8b8e12409d4cb13cea" label="Boolean" color="blue"></option><option value="c1cc68a96f1640d0b3ee6c54288abf06" label="Address" color="blue"></option><option value="5a93deb4e03e4bb6b2cad62cef005788" label="String" color="blue"></option><option value="b97b905bb0a844919c6c31611e10771d" label="List (Uint)" color="blue"></option></select></th></tr></thead><tbody><tr><td>ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Milestone ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Metadata URL</td><td><span data-option="5a93deb4e03e4bb6b2cad62cef005788">String</span></td></tr><tr><td>Is Active</td><td><span data-option="e60501f3a0c44f8b8e12409d4cb13cea">Boolean</span></td></tr><tr><td>Created Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

## Interface

{% tabs %}
{% tab title="IOWMilestone" %}
```solidity
interface IOWMilestone {
    function addMilestone(uint256 _universeId, string calldata _URL) external;

    function setMilestoneURL(uint256 _milestoneId, string calldata _URL)
        external;

    function setMilestoneUniverse(uint256 _milestoneId, uint256 _universeId)
        external;

    function setMilestoneState(
        uint256 _milestoneId,
        MilestoneBase.MilestoneState _state
    ) external;

    function setMilestoneProgressing(uint256 _milestoneId, uint8 _progressing)
        external;

    function setMilestoneActive(uint256 _milestoneId, bool _isActive) external;

    function isExistMilestoneById(uint256 _milestoneId)
        external
        view
        returns (bool);

    function getMilestoneById(uint256 _milestoneId)
        external
        view
        returns (MilestoneBase.Milestone memory);

    function getMilestoneOfUniverse(uint256 _universeId)
        external
        view
        returns (MilestoneBase.Milestone[] memory);

    function addComment(uint256 _milestoneId, string calldata _URL) external;

    function setCommentURL(uint256 _commentId, string calldata _URL) external;

    function setCommentMilestone(uint256 _commentId, uint256 _milestoneId)
        external;

    function setCommentActive(uint256 _commentId, bool _isActive) external;

    function isExistCommentById(uint256 _commentId)
        external
        view
        returns (bool);

    function getCommentById(uint256 _commentId)
        external
        view
        returns (MilestoneBase.Comment memory);

    function getCommentOfMilestone(uint256 _milestoneId)
        external
        view
        returns (MilestoneBase.Comment[] memory);

    function setBaseURI(string calldata _baseURI) external;

    function getBaseURI() external view returns (string memory);
}
```
{% endtab %}
{% endtabs %}
