# IPeripheryPaymentsExtended

Functions to ease deposits and withdrawals of SEI and tokens

### Functions <a href="#functions" id="functions"></a>

#### unwrapWSEI <a href="#unwrapwsei" id="unwrapwsei"></a>

Unwraps the contract's WSEI balance and sends it to msg.sender as SEI.

*The amountMinimum parameter prevents malicious contracts from stealing WSEI from users.*

```solidity
function unwrapWSEI(uint256 amountMinimum) external payable;
```

**Parameters**

| Name            | Type      | Description                          |
| --------------- | --------- | ------------------------------------ |
| `amountMinimum` | `uint256` | The minimum amount of WSEI to unwrap |

#### wrapSEI <a href="#wrapsei" id="wrapsei"></a>

Wraps the contract's SEI balance into WSEI

*The resulting WSEI is custodied by the router, thus will require further distribution*

```solidity
function wrapSEI(uint256 value) external payable;
```

**Parameters**

| Name    | Type      | Description               |
| ------- | --------- | ------------------------- |
| `value` | `uint256` | The amount of SEI to wrap |

#### sweepToken <a href="#sweeptoken" id="sweeptoken"></a>

Transfers the full amount of a token held by this contract to msg.sender

*The amountMinimum parameter prevents malicious contracts from stealing the token from users*

```solidity
function sweepToken(address token, uint256 amountMinimum) external payable;
```

**Parameters**

| Name            | Type      | Description                                                               |
| --------------- | --------- | ------------------------------------------------------------------------- |
| `token`         | `address` | The contract address of the token which will be transferred to msg.sender |
| `amountMinimum` | `uint256` | The minimum amount of token required for a transfer                       |

#### pull <a href="#pull" id="pull"></a>

Transfers the specified amount of a token from the msg.sender to address(this)

```solidity
function pull(address token, uint256 value) external payable;
```

**Parameters**

| Name    | Type      | Description       |
| ------- | --------- | ----------------- |
| `token` | `address` | The token to pull |
| `value` | `uint256` | The amount to pay |


---

# 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.dragonswap.app/dragonswap/resources/developer-resources/smart-contracts/dragonswapv2/smart-router/interfaces/iperipherypaymentsextended.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.
