Gateway contract for depositing and withdrawing native ETH to/from WETH-based RelayPools
Handles wrapping/unwrapping of ETH and provides slippage protection for all operations
Error when ETH transfer fails
Error when contract receives ETH from non-WETH address
Error when ETH remains in contract after operation
Error when slippage protection is triggered
The Wrapped ETH (WETH) contract
Used to wrap/unwrap native ETH for pool operations
Initializes the gateway with the WETH contract address
Name | Type | Description |
---|---|---|
wethAddress | address | Address of the Wrapped Native token contract |
Deposits native ETH into a WETH-based pool
Wraps ETH to WETH, then deposits to the pool with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to deposit into |
receiver | address | The address that will receive the pool shares |
minSharesOut | uint256 | Minimum amount of shares to receive (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares minted to the receiver |
Mints pool shares by depositing native ETH
Wraps ETH, calculates shares, then mints with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to mint shares from |
receiver | address | The address that will receive the pool shares |
minSharesOut | uint256 | Minimum amount of shares to receive (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares minted to the receiver |
Withdraws a specific amount of native ETH from a WETH-based pool
Withdraws WETH from pool, unwraps to ETH, with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to withdraw from |
assets | uint256 | Amount of native ETH to withdraw |
receiver | address | The address that will receive the native ETH |
maxSharesIn | uint256 | Maximum amount of shares to burn (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares burned |
Redeems pool shares for native ETH
Redeems shares for WETH, unwraps to ETH, with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to redeem from |
shares | uint256 | Amount of pool shares to redeem |
receiver | address | The address that will receive the native ETH |
minAssetsOut | uint256 | Minimum amount of ETH to receive (slippage protection) |
Name | Type | Description |
---|---|---|
assets | uint256 | The amount of native ETH sent to receiver |
Safely transfers ETH to an address
Reverts if the ETH transfer fails
Name | Type | Description |
---|---|---|
to | address | Recipient of the ETH transfer |
value | uint256 | Amount of ETH to transfer |
Receives ETH only from WETH contract
Required for WETH unwrapping operations
Gateway contract for depositing and withdrawing native ETH to/from WETH-based RelayPools
Handles wrapping/unwrapping of ETH and provides slippage protection for all operations
Error when ETH transfer fails
Error when contract receives ETH from non-WETH address
Error when ETH remains in contract after operation
Error when slippage protection is triggered
The Wrapped ETH (WETH) contract
Used to wrap/unwrap native ETH for pool operations
Initializes the gateway with the WETH contract address
Name | Type | Description |
---|---|---|
wethAddress | address | Address of the Wrapped Native token contract |
Deposits native ETH into a WETH-based pool
Wraps ETH to WETH, then deposits to the pool with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to deposit into |
receiver | address | The address that will receive the pool shares |
minSharesOut | uint256 | Minimum amount of shares to receive (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares minted to the receiver |
Mints pool shares by depositing native ETH
Wraps ETH, calculates shares, then mints with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to mint shares from |
receiver | address | The address that will receive the pool shares |
minSharesOut | uint256 | Minimum amount of shares to receive (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares minted to the receiver |
Withdraws a specific amount of native ETH from a WETH-based pool
Withdraws WETH from pool, unwraps to ETH, with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to withdraw from |
assets | uint256 | Amount of native ETH to withdraw |
receiver | address | The address that will receive the native ETH |
maxSharesIn | uint256 | Maximum amount of shares to burn (slippage protection) |
Name | Type | Description |
---|---|---|
shares | uint256 | The amount of pool shares burned |
Redeems pool shares for native ETH
Redeems shares for WETH, unwraps to ETH, with slippage protection
Name | Type | Description |
---|---|---|
pool | address | The address of the ERC4626 pool to redeem from |
shares | uint256 | Amount of pool shares to redeem |
receiver | address | The address that will receive the native ETH |
minAssetsOut | uint256 | Minimum amount of ETH to receive (slippage protection) |
Name | Type | Description |
---|---|---|
assets | uint256 | The amount of native ETH sent to receiver |
Safely transfers ETH to an address
Reverts if the ETH transfer fails
Name | Type | Description |
---|---|---|
to | address | Recipient of the ETH transfer |
value | uint256 | Amount of ETH to transfer |
Receives ETH only from WETH contract
Required for WETH unwrapping operations