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

# WethGate

> WethGate contract details - fields, functions, and events.

Upgradable contracts cannot receive ether via `transfer` because of increased `SLOAD` gas cost. We use this non-upgradeable contract as the recipient
and then immediately transfer to an upgradable contract. More details about this issue can be found
[here](https://forum.openzeppelin.com/t/openzeppelin-upgradeable-contracts-affected-by-istanbul-hardfork/1616).

***

## Variables

### weth

```solidity theme={null}
contract IWETH public weth;
```

Wrapped native token contract

***

## Functions

### constructor

```solidity theme={null}
function constructor(
    contract IWETH _weth
) public
```

### withdraw

```solidity theme={null}
function withdraw(
    address receiver,
    uint256 wad
) external
```

Transfer assets to a receiver.

#### Parameters:

| Name     | Type    | Description                          |
| -------- | ------- | ------------------------------------ |
| receiver | address | This address will receive a transfer |
| wad      | uint256 | Amount in wei                        |

***

### \_safeTransferETH

```solidity theme={null}
function _safeTransferETH(
    address _to,
    uint256 _value
) internal
```

### receive

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

### version

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

Get this contract's version

***

## Events

### Withdrawal

```solidity theme={null}
event Withdrawal(
    address receiver,
    uint256 wad
)
```

Emitted when any amount is withdrawn.
