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

  contract IWETH public weth;

Wrapped native token contract

Functions

constructor

  function constructor(
            contract IWETH _weth
  ) public

withdraw

  function withdraw(
            address receiver,
            uint256 wad
  ) external

Transfer assets to a receiver.

Parameters:

NameTypeDescription

receiver

address

This address will receive a transfer.

wad

uint256

Amount in wei

_safeTransferETH

  function _safeTransferETH(
            address _to,
            uint256 _value
  ) internal

receive

  function receive(
  ) external

version

  function version(
  ) external returns (uint256)

Get this contract's version

Events

Withdrawal

  event Withdrawal(
        address receiver,
        uint256 wad
  )

Emitted when any amount is withdrawn.

Last updated