Operation - OpenTrove
Key Steps
Chain and Account Validation:
Ensures the operation is being performed on a supported chain and that a wallet account is connected.
Set Referrer:
Optionally sets a referrer if one is provided, validating the referrer details.
Delegate Approval:
Check if the delegate is approved, and if not, perform the approval.
Collateral Checks:
Verifies the user has enough ERC20 token balance and allowance to proceed with opening a trove.
Open Trove:
Executes the transaction to open a trove, calculating the total debt amount based on the minting amount.
Usage
This function can be called with appropriate parameters to open a trove. It handles all necessary checks and operations to ensure the transaction is successfully executed.
Example
Last updated