> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SimpleFeeProxy

> SimpleFeeProxy contract details - fields and functions.

Helper to withdraw fees from DeBridgeGate and transfer them to a treasury.

***

## Variables

### debridgeGate

```solidity theme={null}
contract IDeBridgeGate public debridgeGate;
```

DeBridgeGate address

### treasury

```solidity theme={null}
address public treasury;
```

Treasury address

***

## Functions

### initialize

```solidity theme={null}
function initialize(
    contract IDeBridgeGate _debridgeGate,
    address _treasury
) public
```

### pause

```solidity theme={null}
function pause() external
```

### unpause

```solidity theme={null}
function unpause() external
```

### setDebridgeGate

```solidity theme={null}
function setDebridgeGate(
    contract IDeBridgeGate _debridgeGate
) external
```

### setTreasury

```solidity theme={null}
function setTreasury(
    address _treasury
) external
```

### withdrawFee

```solidity theme={null}
function withdrawFee(
    address _tokenAddress
) external
```

Transfer collected fees for a token to the treasury.

#### Parameters:

| Name           | Type    | Description                             |
| -------------- | ------- | --------------------------------------- |
| \_tokenAddress | address | Address of a deToken on a current chain |

***

### withdrawNativeFee

```solidity theme={null}
function withdrawNativeFee() external
```

Transfer collected fees for a native token to the treasury.

### receive

```solidity theme={null}
function receive() external
```

### getbDebridgeId

```solidity theme={null}
function getbDebridgeId(
    uint256 _chainId,
    bytes _tokenAddress
) public returns (bytes32)
```

Calculates asset identifier.

#### Parameters:

| Name           | Type    | Description                              |
| -------------- | ------- | ---------------------------------------- |
| \_chainId      | uint256 | Current chain id.                        |
| \_tokenAddress | bytes   | Address of the asset on the other chain. |

***

### getDebridgeId

```solidity theme={null}
function getDebridgeId(
    uint256 _chainId,
    address _tokenAddress
) public returns (bytes32)
```

Calculates asset identifier.

#### Parameters:

| Name           | Type    | Description                              |
| -------------- | ------- | ---------------------------------------- |
| \_chainId      | uint256 | Current chain id.                        |
| \_tokenAddress | address | Address of the asset on the other chain. |

***

### getChainId

```solidity theme={null}
function getChainId() public returns (uint256 cid)
```

Get current chain id.

***

### \_safeTransferETH

```solidity theme={null}
function _safeTransferETH(
    address to,
    uint256 value
) internal
```

Transfer ETH to an address, revert if it fails.

#### Parameters:

| Name  | Type    | Description               |
| ----- | ------- | ------------------------- |
| to    | address | recipient of the transfer |
| value | uint256 | the amount to send        |

***

### version

```solidity theme={null}
function version() external returns (uint256)
```

Get this contract's version
