> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://otherworld-1.gitbook.io/protocol-1/smart-contracts/currency-contract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
