Depositing in Yearn

Getting the Wrap Calldata from Yearn:

In order to deposit or withdraw your components on Yearn, you will need to call the wrap (wrapWithEther) or unwrap (unwrapWithEther) functions on the WrapModule.

Select examples:

This is an example of what to pass into the wrap function for WBTC to yvWBTC.

/**
 * MANAGER-ONLY: Instructs the SetToken to wrap an underlying asset into a wrappedToken via a specified adapter.
 *
 * @param _setToken             Instance of the SetToken
 * @param _underlyingToken      Address of the component to be wrapped
 * @param _wrappedToken         Address of the desired wrapped token
 * @param _underlyingUnits      Quantity of underlying units in Position units
 * @param _integrationName      Name of wrap module integration (mapping on integration registry)
 */
function wrap(
    0xYourSetTokenAddress,
    0x2260fac5e5542a773aa44fbcfedf7c193bc2c599,
    0xA696a63cc78DfFa1a63E9E50587C197387FF6C7E,
    3000,
    YearnWrapAdapter
) 

Last updated