How to Supply
From Any Chain
Interface
Stargate v1
/**
* @notice Supplies an `amount` of `asset` into the reserve, receiving in return overlying rTokens.
* - E.g. User supplies 100 USDC and gets in return 100 rUSDC
* @dev Ensure that this contract has enough allowance to spend `asset` locally
* @param asset The local underlying asset to supply
* @param amount The amount to be supplied in local asset decimals
* @param onBehalfOf The address that will receive the rTokens on Pool Chain.
* Even if you will not transact on Pool Chain, it is recommended to set this
* to an address you can control.
* @param referralCode Referral code for integrators -- can safely set to 0
* @param stgParams Stargate v1 related bridge parameters
*/
function supply(
address asset,
uint256 amount,
address onBehalfOf,
uint16 referralCode,
StargateSupplyParams calldata stgParams
) external payable;Stargate v2
Example
Stargate v1
Stargate v2
Last updated