π₯οΈDeveloper Integration
Developer
Module Address: 0x9770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da3
To start deposit into Aries, you need to first register_user
/// Register the user and also create a default `Profile` with the given name.
/// We requires that a name is given instead of a default name such as "main" because it might be
/// possible for user to already have a `ResourceAccount` that collides with our default name.
public entry fun register_user(
account: &signer,
default_profile_name: vector<u8>
) /// Deposit funds into the Aries protocol, this can result in two scenarios:
///
/// 1. User has an existing `Coin0` loan: the amount will first used to repay the loan then the
/// remaining part contribute to the collateral.
///
/// 2. User doesn't have an existing loan: all the amount will be contributed to collateral.
///
/// When the amount is `u64::max`, we will repay all the debt without deposit to Aries. This is
/// so that we don't leave any dust when users try to repay all.
public entry fun deposit<Coin0>(
account: &signer,
profile_name: vector<u8>,
amount: u64,
repay_only: bool,
)Last updated
Was this helpful?