DeFi Saver
Search
⌃K

YearnSupply

Description

Action ID: 0x7b4c8fad
Network mainnet: (Deployed address | Code)
Supplies tokens to Yearn vault

SDK Action

const yearnSupplyAction = new dfs.actions.yearn.YearnSupplyAction(token, amount, from, to);

Contract

This is a DFS STANDARD_ACTION.
The address from which we're pulling tokens must approve proxy
If amount is uint.max the whole balance is pulled and supplied
Input:
/// @param token The address of token to supply
/// @param amount Amount of token to supply
/// @param from The address from which to pull tokens from
/// @param to The address where received yTokens will be sent to
struct Params {
address token;
uint256 amount;
address from;
address to;
}
Return value:
return bytes32(amountReceived);
Events:
emit ActionEvent("YearnSupply", logData);
​
logger.logActionDirectEvent("YearnSupply", logData);