IWrappedNative

Git Source

Title: Wrapped native token interface

Author: Malda Protocol

Minimal interface used to wrap/unwrap native tokens (e.g., WETH)

Functions

deposit

Wraps native ETH into WETH

function deposit() external payable;

transfer

Transfers wrapped native tokens

function transfer(address to, uint256 value) external returns (bool);

Parameters

NameTypeDescription
toaddressReceiver address
valueuint256Amount to transfer

Returns

NameTypeDescription
<none>boolWhether the transfer succeeded

withdraw

Unwraps wrapped native tokens back to the native coin

function withdraw(uint256 amount) external;

Parameters

NameTypeDescription
amountuint256Amount to unwrap