# Offering Contract

## Address

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

## Summary

> **The Offering Contract defines the ruless of the offering for minting in the Otherworld Collection.**

* Defines the 'offering' details.
  * Offerings are included in one collection.
  * Defines the currency applied to the offering.
  * Defines the supply.
  * Defines prices.
  * Defines the maximum amount of supply that can be purchased in an account.
  * Defines the Provider supply.
  * Defines the Operator supply.
  * Defines the Associator supply.
  * Defines the Creator Supply.
  * Defines the DAO supply.
  * Defines the whitelist supply.
  * Defines the public supply.
* Defines the 'timestamp' details of the offering.
  * Defines the start time of the offering.
  * Defines the whitelist end time.
  * Defines the end time of the offering.
* Defines the 'whitelist' details of the offering.
  * Defines the root value of the Merkle tree to validate the whitelist.
* Defines the 'Minting Count' details of the offering.
  * Defines the total amount of minting.
  * Defines the Provider minting amount.
  * Defines the Operator minting amount.
  * Defines the Associator minting amount.
  * Defines the Creator minting amount.
  * Defines the DAO minting amount.
  * Defines the whitelist minting amount.
  * Defines the public minting amount.
  * Defines the remaining minting amount

## 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>

### Offering

<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>Collection ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Currency ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Price</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Account Max Supply</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Provider</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Operator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Associator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Creator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to DAO</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Whitelist</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Supply to Public</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

### Timestamp

<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>Offering ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Start Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Whitelist Expiration Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>End Timestamp</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

### Whitelist MerkleRoot

<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><option value="c35a3857e08a477fb94acf9edd5367dd" label="List (Address)" color="blue"></option><option value="550004a037ed4b84b72e8ec220c80d4a" label="Bytes" color="blue"></option></select></th></tr></thead><tbody><tr><td>Offering ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Merkle Root</td><td><span data-option="550004a037ed4b84b72e8ec220c80d4a">Bytes</span></td></tr></tbody></table>

### Minting Count

<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>Offering ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Total Minting</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Provider</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Operator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Associator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Creator</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By DAO</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Whitelist</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>By Public</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Remaining</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

## Interface

{% tabs %}
{% tab title="IOWOffering" %}

```solidity
interface IOWOffering {
    function addOffering(
        uint256 _collectionId,
        uint256 _currencyId,
        uint256 _supply,
        uint256 _price,
        uint256[6] calldata _supplyTo,
        uint256 _accountMaxSupply,
        uint256 _startTimestamp,
        uint256 _whitelistExpirationTimestamp,
        uint256 _endTimestamp
    ) external;

    function setOfferingCurrency(uint256 _offeringId, uint256 _currencyId)
        external;

    function setOfferingSupply(
        uint256 _offeringId,
        uint256 _supply,
        uint256[6] calldata _supplyTo
    ) external;

    function setOfferingAccountMaxSupply(
        uint256 _offeringId,
        uint256 _accountMaxSupply
    ) external;

    function setOfferingPrice(uint256 _offeringId, uint256 _price) external;

    function setOfferingTimestamp(
        uint256 _offeringId,
        uint256 _startTimestamp,
        uint256 _whitelistExpirationTimestamp,
        uint256 _endTimestamp
    ) external;

    function removeOffering(uint256 _offeringId) external;

    function isExistOfferingById(uint256 _offeringId)
        external
        view
        returns (bool);

    function getOfferingIdOfCollection(uint256 _collectionId)
        external
        view
        returns (uint256[] memory);

    function getOfferingOfCollection(uint256 _collectionId)
        external
        view
        returns (OfferingBase.Offering[] memory);

    function getOfferingById(uint256 _offeringId)
        external
        view
        returns (OfferingBase.Offering memory, OfferingBase.Timestamp memory);

    function getMintingCountByOfferingId(uint256 _offeringId)
        external
        view
        returns (OfferingBase.MintingCount memory);

    function getMintingCountByMintingType(
        uint256 _offeringId,
        OfferingBase.MintingType _type
    ) external view returns (uint256);

    function getAccountMintingCount(uint256 _offeringId, address _account)
        external
        view
        returns (uint256);

    function setMintingCount(
        uint256 _offeringId,
        uint256 _amount,
        OfferingBase.MintingType _type
    ) external;

    function setAccountMintingCount(
        uint256 _offeringId,
        uint256 _amount,
        address _account
    ) external;

    function setWhitelistMerkleRoot(uint256 _offeringId, bytes32 _merkleRoot)
        external;

    function getWhitelistMerkleRoot(uint256 _offeringId)
        external
        view
        returns (bytes32);

    function isWhitelist(
        uint256 _offeringId,
        address _account,
        bytes32[] calldata _merkleProof
    ) external view returns (bool);
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
