> 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/proxy-contract.md).

# Proxy Contract

## Address

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

## Summary

> Proxy contracts define contracts in Otherworld

* Defines the 'contract type' details.
  * Defines the type name.
  * A contract type can contain multiple contracts.
* Defines the 'contract' details.
  * Contracts are included in one contract type.
  * Defines the version.
  * Defines the contract address.

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

### Contract Type

<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>Name</td><td><span data-option="5a93deb4e03e4bb6b2cad62cef005788">String</span></td></tr></tbody></table>

### Contract

<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>Type ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Version</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Contract</td><td><span data-option="c1cc68a96f1640d0b3ee6c54288abf06">Address</span></td></tr><tr><td>Created Timestmap</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr></tbody></table>

## Event

### Contract Added

<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>Type ID</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>Version</td><td><span data-option="f59a4491161a4b9dbe758183bdcc8abe">Uint</span></td></tr><tr><td>OWContract</td><td><span data-option="c1cc68a96f1640d0b3ee6c54288abf06">Address</span></td></tr></tbody></table>

## Interface

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

```solidity
interface IOWProxy {
    function addContractType(string calldata _type) external;

    function setContractType(uint256 _typeId, string calldata _type) external;

    function removeContractType(uint256 _typeId) external;

    function isExistContractTypeById(uint256 _typeId)
        external
        view
        returns (bool);

    function isExistContractType(string calldata _type)
        external
        view
        returns (bool);

    function getContractTypeId(string calldata _type)
        external
        view
        returns (uint256);

    function getContractTypeById(uint256 _typeId)
        external
        view
        returns (string memory);

    function getContractTypeIds() external view returns (uint256[] memory);

    function getContractTypes() external view returns (string[] memory);

    function addContract(uint256 _typeId, address _OWContract) external;

    function setContract(
        uint256 _typeId,
        uint256 _version,
        address _OWContract
    ) external;

    function removeLatestContract(uint256 _typeId) external;

    function getOWContractByTypeId(uint256 _typeId, uint256 _version)
        external
        view
        returns (address);

    function isValidVersion(uint256 _typeId, uint256 _version)
        external
        view
        returns (bool);

    function getLatestVersion(uint256 _typeId) external view returns (uint256);

    function getOWContractByType(string calldata _type, uint256 _version)
        external
        view
        returns (address);

    function getContractOfType(uint256 _typeId)
        external
        view
        returns (address[] memory);
}
```

{% 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:

```
GET https://otherworld-1.gitbook.io/protocol-1/smart-contracts/proxy-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.
