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

# CallProxy

> CallProxy contract details - fields and functions.

Proxy to execute the other contract calls. This contract is used when a user requests transfer with specific call of other contract.

***

## Variables

### DEBRIDGE\_GATE\_ROLE

```solidity theme={null}
bytes32 public constant DEBRIDGE_GATE_ROLE;
```

Role allowed to withdraw fee

### submissionChainIdFrom

```solidity theme={null}
uint256 public submissionChainIdFrom;
```

Chain from which the current submission is received

### submissionNativeSender

```solidity theme={null}
bytes public submissionNativeSender;
```

Native sender of the current submission

***

## Functions

### initialize

```solidity theme={null}
function initialize() public
```

### call

```solidity theme={null}
function call(
    address _reserveAddress,
    address _receiver,
    bytes _data,
    uint256 _flags,
    bytes _nativeSender,
    uint256 _chainIdFrom
) external returns (bool _result)
```

Used for calls where native asset transfer is involved.

#### Parameters:

| Name             | Type    | Description                                             |
| ---------------- | ------- | ------------------------------------------------------- |
| \_reserveAddress | address | Receiver of the tokens if the call to \_receiver fails  |
| \_receiver       | address | Contract to be called                                   |
| \_data           | bytes   | Call data                                               |
| \_flags          | uint256 | Flags to change behavior; see Flags library for details |
| \_nativeSender   | bytes   | Native sender                                           |
| \_chainIdFrom    | uint256 | Id of a chain that originated the request               |

***

### callERC20

```solidity theme={null}
function callERC20(
    address _token,
    address _reserveAddress,
    address _receiver,
    bytes _data,
    uint256 _flags,
    bytes _nativeSender,
    uint256 _chainIdFrom
) external returns (bool _result)
```

Used for calls where ERC20 transfer is involved.

#### Parameters:

| Name             | Type    | Description                                             |
| ---------------- | ------- | ------------------------------------------------------- |
| \_token          | address | Asset address                                           |
| \_reserveAddress | address | Receiver of the tokens if the call to \_receiver fails  |
| \_receiver       | address | Contract to be called                                   |
| \_data           | bytes   | Call data                                               |
| \_flags          | uint256 | Flags to change behavior; see Flags library for details |
| \_nativeSender   | bytes   | Native sender                                           |
| \_chainIdFrom    | uint256 | Id of a chain that originated the request               |

***

### externalCall

```solidity theme={null}
function externalCall(
    address destination,
    uint256 value,
    bytes data,
    bytes _nativeSender,
    uint256 _chainIdFrom,
    bool storeSender
) internal returns (bool result)
```

***

### receive

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

***

### version

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

Get this contract's version
