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

# IMarketplace.sol

```solidity
// SPDX-License-Identifier: MIT
pragma solidity =0.8.17;

interface IMarketplace {
    event TreasuryWalletSet(
        address oldTreasuryWallet,
        address newTreasuryWallet
    );

    event FeeWalletSet(address oldFeeWallet, address newFeeWallet);

    event RewardsClaimed(address indexed receiver, uint256 reward);

    event AssetBought(
        address indexed oldOwner,
        address indexed newOwner,
        uint256 id
    );

    event InitialFeeSet(uint256 oldFee, uint256 newFee);

    event BuyingFeeSet(uint256 oldFee, uint256 newFee);

    event AssetSettled(address indexed owner, uint256 assetId);

    event AssetRelisted(uint256 assetId, uint256 salePrice);

    error UnsupportedInterface();

    function createAsset(
        address owner,
        uint256 mainId,
        uint256 price,
        uint256 apr,
        uint256 dueDate
    ) external;

    function batchCreateAsset(
        address[] calldata owners,
        uint256[] calldata mainIds,
        uint256[] calldata prices,
        uint256[] calldata aprs,
        uint256[] calldata dueDates
    ) external;

    function settleAsset(uint256 assetId) external;

    function buy(uint256 assetId) external;

    function batchBuy(uint256[] calldata assetIds) external;

    function relist(uint256 assetId, uint256 salePrice) external;

    function claimReward(uint256 assetId) external;
    
    function setInitialFee(uint256 initialFee_) external;

    function setBuyingFee(uint256 buyingFee_) external;

    function setTreasuryWallet(address newTreasuryWallet) external;

    function setFeeWallet(address newFeeWallet) external;

    function counterOffer(
        address owner,
        address offeror,
        uint256 offerPrice,
        uint256 assetId,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function getAssetCollection() external view returns (address);

    function getStableToken() external view returns (address);

    function getTreasuryWallet() external view returns (address);

    function getFeeWallet() external view returns (address);

    function nonces(address owner) external view returns (uint256);

    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function getInitialFee() external view returns (uint256);

    function getBuyingFee() external view returns (uint256);
}
```


---

# 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://polytrade.gitbook.io/rwa-marketplace/smart-contracts/imarketplace.sol.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.
