👩‍💻
Unlockd Developers Docs
Unlockd for Devs V2
Unlockd for Devs V2
  • Introduction
  • ⚙️Core
    • Unlockd
    • BaseCore
    • BaseCoreModule
  • ⚙️Modules
    • Installer
    • Manager
    • Action
    • SellNow
    • BuyNow
    • Market
    • Auction
  • 🆕Vault and Tokens
    • UTokenVault
    • BaseToken
    • ScaledToken
    • WethGateway
  • 🆕Adapters and Strategies
    • ReservoirAdapter
    • MaxApyStrategy
  • 🆕Storage
    • CoreStorage
    • UVaultStorage
  • 📔Deployed Contracts
    • Ethereum Sepolia
    • Ethereum Mainnet
  • 📫Unlockd Account (Wallet)
    • Introduction
    • Architecture
    • DelegationWalletFactory
    • DelegationWalletRegistry
    • DelegationOwner
    • GuardOwner
    • ProtocolOwner
    • TransactionGuard
    • DelegationRecipes
    • AllowedControllers
    • Deployed Contracts
      • Ethereum Sepolia (Testnet)
  • 🧰SDK
    • Typescript Package
    • SDK Docs
  • 🤝DEVELOPERS HELP
    • Best Practices
    • Security and Risk Management
    • Github
    • Bug Bounty - ACTIVE
Powered by GitBook
On this page
  • Key functions:
  • Parameters:
  • Parameters:
  • Parameters:
  • Parameters:
  1. Vault and Tokens

WethGateway

WETHGateway.sol is a contract that serves as a gateway for wrapping and unwrapping ETH and interacting with WETH (Wrapped ETH) within the Unlockd Protocol.

Key functions:

function authorizeProtocol(
    address uTokenVault
) external onlyOwner

Authorizes the Unlockd Protocol to interact with the WETH contract.

Parameters:

uTokenVault: The address of the UTokenVault contract.


function depositETH(address onBehalfOf) external payable override

Deposits ETH and mints corresponding WETH tokens.

Parameters:

onBehalfOf: The address to deposit ETH on behalf of.


function withdrawETH(uint256 amount, address to) external override

Withdraws WETH tokens and receives ETH.

Parameters:

amount: The amount of WETH to withdraw.

to: The address to receive the withdrawn ETH.


function emergencyTokenTransfer(
    address token, 
    address to, 
    uint256 amount
) external onlyOwner

Performs an emergency transfer of ERC20 tokens.

Parameters:

token: The address of the token to transfer.

to: The recipient address of the token transfer.

amount: The amount of tokens to transfer.


function emergencyEtherTransfer(
    address to, 
    uint256 amount
) external onlyOwner

Performs an emergency transfer of ETH.

Parameters:

to: The recipient address of the ETH transfer.

amount: The amount of ETH to transfer.


function getWETHAddress() external view returns (address)

Returns the address of the WETH contract.

PreviousScaledTokenNextReservoirAdapter

Last updated 1 year ago

🆕