WrapAndSupply
State Variables
wrappedNative
IWrappedNative public immutable wrappedNative;
Functions
constructor
constructor(address _wrappedNative);
wrapAndSupplyOnHostMarket
Wraps a native coin into its wrapped version and supplies on a host market
function wrapAndSupplyOnHostMarket(address mToken, address receiver, uint256 minAmount) external payable;
Parameters
Name | Type | Description |
---|---|---|
mToken | address | The market address |
receiver | address | The mToken receiver |
minAmount | uint256 |
wrapAndSupplyOnExtensionMarket
Wraps a native coin into its wrapped version and supplies on an extension market
function wrapAndSupplyOnExtensionMarket(address mTokenGateway, address receiver, bytes4 selector) external payable;
Parameters
Name | Type | Description |
---|---|---|
mTokenGateway | address | The market address |
receiver | address | The receiver |
selector | bytes4 | The host chain function selector |
_wrap
function _wrap() private returns (uint256);
Events
WrappedAndSupplied
event WrappedAndSupplied(address indexed sender, address indexed receiver, address indexed market, uint256 amount);
Errors
WrapAndSupply_AddressNotValid
error WrapAndSupply_AddressNotValid();
WrapAndSupply_AmountNotValid
error WrapAndSupply_AmountNotValid();