> For the complete documentation index, see [llms.txt](https://otherworld-1.gitbook.io/protocol-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://otherworld-1.gitbook.io/protocol-1/smart-contracts/currency-contract.md).

# Currency Contract

## Address

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

## Summary

> **A currency contract defines the rules of tokens that can be used to conduct offerings and secondary transactions on Otherworld.**

* Defines the currency details.
  * Defines the FT contract (KIP-7) in currency units.
  * Currencies are divided into service currency and project currency.
  * The service currency can be used regardless of the project.
  * A project currency can only be used within a project to which you belong.

## Data

### Base

<table><thead><tr><th width="310.04311152764757">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>

### Currency

<table><thead><tr><th width="504.9670010728205">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>Project ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Token Contract</td><td><span data-option="c1cc68a96f1640d0b3ee6c54288abf06">Address</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="IOWCurrency" %}

```solidity
interface IOWCurrency {
    function addCurrency(uint256 _projectId, address _tokenContract) external;

    function setCurrencyProject(uint256 _currencyId, uint256 _projectId)
        external;

    function setCurrencyActive(uint256 _currencyId, bool _isActive) external;

    function setCurrencyTokenContract(
        uint256 _currencyId,
        address _tokenContract
    ) external;

    function isExistCurrencyById(uint256 _currencyId)
        external
        view
        returns (bool);

    function isExistCurrencyByToken(uint256 _projectId, address _tokenContract)
        external
        view
        returns (bool);

    function getCurrencyOfProject(uint256 _projectId)
        external
        view
        returns (CurrencyBase.Currency[] memory);

    function getActiveCurrencyIdOfProject(uint256 _projectId)
        external
        view
        returns (uint256[] memory);

    function getCurrencyById(uint256 _currencyId)
        external
        view
        returns (CurrencyBase.Currency memory);

    function getTokenContractByCurrencyId(uint256 _currencyId)
        external
        view
        returns (address);

    function isValidCurrency(uint256 _currencyId, uint256 _projectId)
        external
        view
        returns (bool);

    function isActiveCurrency(uint256 _currencyId) external view returns (bool);

    function isServiceCurrency(uint256 _currencyId)
        external
        view
        returns (bool);
}
```

{% endtab %}
{% endtabs %}
