Skip to main content

Solidity API

RelayPoolNativeGateway

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

EthTransferFailed

Error when ETH transfer fails

OnlyWethCanSendEth

Error when contract receives ETH from non-WETH address

RemainingEth

Error when ETH remains in contract after operation

SlippageExceeded

Error when slippage protection is triggered

WETH

The Wrapped ETH (WETH) contract Used to wrap/unwrap native ETH for pool operations

constructor

Initializes the gateway with the WETH contract address

Parameters

deposit

Deposits native ETH into a WETH-based pool Wraps ETH to WETH, then deposits to the pool with slippage protection

Parameters

Return Values

mint

Mints pool shares by depositing native ETH Wraps ETH, calculates shares, then mints with slippage protection

Parameters

Return Values

withdraw

Withdraws a specific amount of native ETH from a WETH-based pool Withdraws WETH from pool, unwraps to ETH, with slippage protection

Parameters

Return Values

redeem

Redeems pool shares for native ETH Redeems shares for WETH, unwraps to ETH, with slippage protection

Parameters

Return Values

safeTransferETH

Safely transfers ETH to an address Reverts if the ETH transfer fails

Parameters

receive

Receives ETH only from WETH contract Required for WETH unwrapping operations