# DexPlatform

Smart contract used for setting initial data when deploying new account or pair.

### **`constructor`**

```
constructor(TvmCell code, uint32 version, address vault, address send_gas_to) public
```

Initializes DexPlatform contract if the message sender is root or does the transfer to `send_gas_to` address.

**Parameters:**

| Name          | Type    | Description                                                 |
| ------------- | ------- | ----------------------------------------------------------- |
| code          | TvmCell | Code to be set for this version                             |
| version       | uint32  | Current version of DexPlatform                              |
| vault         | address | Vault address                                               |
| send\_gas\_to | address | Address where to send gas spent by calling contract methods |

### **`_initialize`**

```
function _initialize(TvmCell code, uint32 version, address vault, address send_gas_to) private
```

Initializes DexPlatform contract, stores parameters in TvmBuilder, sets current code and runs onCodeUpgrade from new code.

**Parameters:**

| Name          | Type    | Description                                                 |
| ------------- | ------- | ----------------------------------------------------------- |
| code          | TvmCell | Code to be set for this version                             |
| version       | uint32  | Current version of DexPlatform                              |
| vault         | address | Vault address                                               |
| send\_gas\_to | address | Address where to send gas spent by calling contract methods |


---

# 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://docs.flatqube.io/integrate/smart-contracts/dexplatform.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.
