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

Variables

weth

1
contract IWETH public weth;
Copied!
Wrapped native token contract

Functions

constructor

1
function constructor(
2
contract IWETH _weth
3
) public
Copied!

withdraw

1
function withdraw(
2
address receiver,
3
uint256 wad
4
) external
Copied!
Transfer assets to a receiver.

Parameters:

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

_safeTransferETH

1
function _safeTransferETH(
2
address _to,
3
uint256 _value
4
) internal
Copied!

receive

1
function receive(
2
) external
Copied!

version

1
function version(
2
) external returns (uint256)
Copied!
Get this contract's version

Events

Withdrawal

1
event Withdrawal(
2
address receiver,
3
uint256 wad
4
)
Copied!
Emitted when any amount is withdrawn.