IAssetManager
Command line reference for interacting with FAssets AssetManager contract.
Sourced from IAssetManager.sol on GitHub.
Information
getSettings
Returns the complete asset manager settings as the AssetManagerSettings struct.
You can find detailed explanations of each parameter in the FAssets Operational Parameters documentation.
function getSettings()
external view
returns (AssetManagerSettings.Data memory);
getAgentInfo
Returns detailed information about an agent as the AgentInfo struct.
Need to provide the agent vault address.
function getAgentInfo(address _agentVault)
external view
returns (AgentInfo.Info memory);
getCollateralTypes
Returns the list of all available and deprecated tokens used for collateral types in the FAssets system.
Returns:
CollateralType.Data: Array of collateral type data structures containing information about each supported collateral token.
function getCollateralTypes()
external view
returns (CollateralType.Data[] memory);
collateralReservationFee
Returns the collateral reservation fee amount.
Parameters:
_lots: The number of lots for which to reserve collateral.
Returns:
_reservationFeeNATWei: The amount of reservation fee in NAT wei.
function collateralReservationFee(
uint256 _lots
) external view returns (uint256 _reservationFeeNATWei);
collateralReservationInfo
Returns the data about the collateral reservation for an ongoing minting. Note: once the minting is executed or defaulted, the collateral reservation is deleted and this method fails.
Parameters:
_collateralReservationId: The collateral reservation ID, as used for executing or defaulting the minting.
function collateralReservationInfo(uint256 _collateralReservationId)
external view
returns (CollateralReservationInfo.Data memory);
fAsset
Returns the FAsset token contract (ERC-20) that is managed by this asset manager instance.
Returns:
IERC20: The address of the FAsset token contract.
function fAsset()
external view
returns (IERC20);
Direct Minting Settings
directMintingPaymentAddress
Gets the XRPL address of the core vault. This is the payment address to which the underlying assets must be sent for direct minting.
function directMintingPaymentAddress()
external view
returns (string memory);
getDirectMintingMinimumFeeUBA
Returns the minimum direct minting fee in UBA.
function getDirectMintingMinimumFeeUBA()
external view
returns (uint256);
getDirectMintingFeeBIPS
Returns the direct minting fee in BIPS.
function getDirectMintingFeeBIPS()
external view
returns (uint256);
getDirectMintingExecutorFeeUBA
Returns the direct minting executor fee in UBA.
function getDirectMintingExecutorFeeUBA()
external view
returns (uint256);
getDirectMintingOthersCanExecuteAfterSeconds
Returns the length of the preferred-executor exclusivity window for direct minting, in seconds.
When a direct minting specifies a preferred executor — either through a tag bound on the IMintingTagManager or through the 48-byte memo format — only that executor may finalize the minting until this number of seconds has elapsed since the underlying payment.
After the window expires, anyone can call executeDirectMinting to finalize the request.
If the minting is delayed by rate limits, the exclusivity window restarts from the DirectMintingDelayed event's executionAllowedAt timestamp.
function getDirectMintingOthersCanExecuteAfterSeconds()
external view
returns (uint256);
getDirectMintingHourlyLimitUBA
Returns the hourly direct minting limit in UBA.
function getDirectMintingHourlyLimitUBA()
external view
returns (uint256);
getDirectMintingDailyLimitUBA
Returns the daily direct minting limit in UBA.
function getDirectMintingDailyLimitUBA()
external view
returns (uint256);
getDirectMintingHourlyLimiterState
Returns the raw state of the hourly direct-minting rate limiter.
Returns:
_windowStartTimestamp: Unix timestamp when the current hourly window started, snapped to a multiple ofwindowSizeSeconds(UTC hour boundaries)._mintedInCurrentWindow: Amount minted in the current window, denominated in AMG. Multiply byassetMintingGranularityUBAto convert to UBA.
The value is only updated on the next limiter write, so consumers that need a live view should advance the window off-chain — see the Check Direct Minting Limits guide.
function getDirectMintingHourlyLimiterState()
external view
returns (uint64 _windowStartTimestamp, uint64 _mintedInCurrentWindow);
getDirectMintingDailyLimiterState
Returns the raw state of the daily direct-minting rate limiter.
Returns:
_windowStartTimestamp: Unix timestamp when the current daily window started, snapped to 00:00 UTC._mintedInCurrentWindow: Amount minted in the current window, denominated in AMG. Multiply byassetMintingGranularityUBAto convert to UBA.
The value is only updated on the next limiter write, so consumers that need a live view should advance the window off-chain — see the Check Direct Minting Limits guide.
function getDirectMintingDailyLimiterState()
external view
returns (uint64 _windowStartTimestamp, uint64 _mintedInCurrentWindow);
getDirectMintingsUnblockUntilTimestamp
Returns the Unix timestamp until which the direct-minting rate limiter is bypassed.
While block.timestamp is below this value, the hourly and daily caps are not enforced and queued mintings can execute without delay.
Governance sets this via unblockDirectMintingsUntil to drain a backlog after manual review; the value is 0 when the limiter is active.
function getDirectMintingsUnblockUntilTimestamp()
external view
returns (uint256);
getDirectMintingLargeMintingThresholdUBA
Returns the threshold above which direct minting is considered large, in UBA.
function getDirectMintingLargeMintingThresholdUBA()
external view
returns (uint256);
getDirectMintingLargeMintingDelaySeconds
Returns the delay in seconds applied to large direct mintings.
function getDirectMintingLargeMintingDelaySeconds()
external view
returns (uint256);
assetMintingGranularityUBA
Returns the asset minting granularity — the smallest unit of FAsset stored internally within this asset manager instance.
The direct-minting rate limiter stores mintedInCurrentWindow as uint64 AMG (asset minting granularity) for cheap on-chain storage.
Multiplying the limiter state by assetMintingGranularityUBA rebases it into UBA so it can be compared against the UBA-denominated hourly and daily caps.
function assetMintingGranularityUBA()
external view
returns (uint256);
getDirectMintingFeeReceiver
Returns the address that receives direct minting fees.
function getDirectMintingFeeReceiver()
external view
returns (address);
Redeem With Tag Settings
getMintingTagManager
Returns the minting tag manager contract address. To interact with it, use the IMintingTagManager reference.
function getMintingTagManager()
external view
returns (address);
Agents
getAllAgents
Returns the list of all agents.
Parameters:
_start: First index to return from the available agent's list._end: End index (one above last) to return from the available agent's list.
Returns:
_agents: The list of agents between the_startand_endindexes._totalLength: The total length of the all agents list.
function getAllAgents(uint256 _start, uint256 _end)
external view
returns (address[] memory _agents, uint256 _totalLength);
getAvailableAgentsList
Returns the list of available agents.
Parameters:
_start: Starting index to return from the available agent's list (inclusive)._end: Ending index to return from the available agent's list (exclusive).
Returns:
_agents: The list of available agents between the_startand_endindexes._totalLength: The total length of the available agents list.
function getAvailableAgentsList(uint256 _start, uint256 _end)
external view
returns (address[] memory _agents, uint256 _totalLength);
getAvailableAgentsDetailedList
Returns the list of available agents with extra information about agents like fee, minimum collateral ratio and available collateral (in lots).
Parameters:
_start: Starting index to return from the available agent's list (inclusive)._end: Ending index to return from the available agent's list (exclusive).
Returns:
_agents: The list of available agents with extra information._totalLength: The total length of the available agents list.
function getAvailableAgentsDetailedList(uint256 _start, uint256 _end)
external view
returns (AvailableAgentInfo.Data[] memory _agents, uint256 _totalLength);
Redemption Queue
redemptionQueue
Returns the redemption queue in the form of an array of RedemptionTicketInfo structs.
Parameters:
_firstRedemptionTicketId: The ticket id to start listing from; if0, starts from the beginning._pageSize: The maximum number of redemption tickets to return.
Returns:
_queue: The (part of) redemption queue; maximum length is _pageSize._nextRedemptionTicketId: Works as a cursor - if the_pageSizeis reached and there are more tickets, it is the first ticket id not returned; if the end is reached, it is 0.
function redemptionQueue(
uint256 _firstRedemptionTicketId,
uint256 _pageSize
) external view
returns (RedemptionTicketInfo.Data[] memory _queue, uint256 _nextRedemptionTicketId);
agentRedemptionQueue
Returns the redemption queue for specific agent in the form of an array of RedemptionTicketInfo structs.
Parameters:
_agentVault: The agent vault address of the queried agent._firstRedemptionTicketId: The ticket id to start listing from; if0, starts from the beginning._pageSize: The maximum number of redemption tickets to return.
Returns:
_queue: The (part of) the redemption queue; maximum length is _pageSize._nextRedemptionTicketId: Works as a cursor - if the_pageSizeis reached and there are more tickets, it is the first ticket id not returned; if the end is reached, it is 0.
function agentRedemptionQueue(
address _agentVault,
uint256 _firstRedemptionTicketId,
uint256 _pageSize
) external view
returns (RedemptionTicketInfo.Data[] memory _queue, uint256 _nextRedemptionTicketId);
Collateral Reservation
reserveCollateral
Reserves collateral for minting FAssets. Before paying underlying assets for minting, the minter must reserve collateral and pay a collateral reservation fee.
Parameters:
_agentVault: Agent vault address._lots: Number of lots for which to reserve collateral._maxMintingFeeBIPS: Maximum minting fee (BIPS) that can be charged by the agent - best practice is to copy the current agent's published fee; used to prevent agent from front-running reservation request and increasing fee._executor: Account that is allowed to execute minting (besides minter and agent).
function reserveCollateral(
address _agentVault,
uint256 _lots,
uint256 _maxMintingFeeBIPS,
address payable _executor
) external payable;
Execute Minting
executeMinting
After obtaining proof of underlying payment, the minter calls this method to finish the minting and collect the minted FAssets.
Note: May only be called by:
- The minter (creator of the collateral reservation request).
- The executor appointed by the minter.
- The agent owner (owner of the agent vault in the collateral reservation).
Parameters:
_payment: Proof of the underlying payment (must contain exactvalue + feeamount and correct payment reference)._collateralReservationId: Collateral reservation ID.
function executeMinting(
IPayment.Proof calldata _payment,
uint256 _collateralReservationId
) external nonReentrant;
Execute Direct Minting
executeDirectMinting
Finalizes direct minting: mints FAssets to the recipient encoded in the XRPL payment (destination tag or memo), using an attestation that the underlying was paid to the FAsset Core Vault.
Who may call, executor preference and timeouts, fees, and rate limits are described in Direct minting and in getDirectMintingOthersCanExecuteAfterSeconds.
Parameters:
_payment: XRP payment proof data (IXRPPayment.Proof) for the FDC-verified payment that satisfies the direct-minting rules.
function executeDirectMinting(IXRPPayment.Proof calldata _payment)
external payable;
Redemption
redeem
Redeem number of lots of FAssets.
Returns the actual redeemed amount.
Parameters:
_lots: Number of lots to redeem._redeemerUnderlyingAddressString: The address to which the agent must transfer underlying amount._executor: The account that is allowed to execute redemption default (besides redeemer and agent).
function redeem(
uint256 _lots,
string memory _redeemerUnderlyingAddressString,
address payable _executor
) external payable
returns (uint256 _redeemedAmountUBA);
redeemAmount
Redeem up to _amountUBA FAssets, like redeem, but accepts an arbitrary amount in UBA instead of whole lots and does not require a destination tag.
The redeemAmount function enforces a minimum redemption size minimumRedeemAmount.
In some cases, not all sent FAssets can be redeemed (for example, if there are insufficient tickets or the maximum ticket limit has been reached).
In that case, only part of the approved assets are burned and redeemed, and the redeemer can call this method again for the remaining amount.
The RedemptionAmountIncomplete event is emitted with the remaining amount.
Parameters:
_amountUBA: Amount of redeemer's FAssets that will be burned (this is not the received amount; redemption fee is subtracted)._redeemerUnderlyingAddressString: Address to which the agent must transfer the underlying amount._executor: Account that can execute redemption default (besides redeemer and agent).
Returns:
_redeemedAmountUBA: Actual redeemed amount; may be less than requested when ticket availability or ticket limits apply.
function redeemAmount(
uint256 _amountUBA,
string memory _redeemerUnderlyingAddressString,
address payable _executor
) external payable
returns (uint256 _redeemedAmountUBA);
redeemWithTag
Redeem up to _amountUBA FAssets and require a destination tag in the redemption XRPL payment.
In some cases, not all sent FAssets can be redeemed (for example, if there are insufficient tickets or the maximum ticket limit has been reached).
In that case, only part of the approved assets are burned and redeemed, and the redeemer can call this method again for the remaining amount.
The RedemptionAmountIncomplete event is emitted with the remaining amount.
Parameters:
_amountUBA: Amount of redeemer's FAssets that will be burned (this is not the received amount; redemption fee is subtracted)._redeemerUnderlyingAddressString: Address to which the agent must transfer the underlying amount._executor: Account that can execute redemption default (besides redeemer and agent)._destinationTag: Destination tag required in redemption payment (XRP only; must fit in 32 bits for now).
Returns:
_redeemedAmountUBA: Actual redeemed amount; may be less than requested when ticket availability or ticket limits apply.
function redeemWithTag(
uint256 _amountUBA,
string memory _redeemerUnderlyingAddressString,
address payable _executor,
uint256 _destinationTag
) external payable
returns (uint256 _redeemedAmountUBA);
minimumRedeemAmountUBA
Minimum amount in UBA for redemption with tag.
Redemption requests with smaller amounts are rejected.
This governance-configured minimum applies to both redeemAmount and redeemWithTag functions.
function minimumRedeemAmountUBA()
external view
returns (uint256);
redemptionPaymentDefault
If the agent fails to transfer the redeemed underlying assets in a timely manner, the redeemer or appointed executor can invoke this method and receive payment in collateral. The agent can also call default if the redeemer is unresponsive to payout the redeemer and free the remaining collateral.
Parameters:
_proof: Proof that the agent did not pay with correct payment reference on the underlying chain._redemptionRequestId: ID of an existing redemption request.
function redemptionPaymentDefault(
IReferencedPaymentNonexistence.Proof calldata _proof,
uint256 _redemptionRequestId
) external;
Core Vault Settings
Reference for managing and interacting with FAssets ICoreVaultSettings contract which is inherited by the IAssetManager contract.
Sourced from ICoreVaultSettings.sol on GitHub.
getCoreVaultManager
Returns the core vault manager address. To interact with the Core Vault manager reference the Core Vault Manager contract.
function getCoreVaultManager()
external view
returns (address);
getCoreVaultDonationTag
Returns the destination tag used for donations to the core vault payment address.
function getCoreVaultDonationTag()
external view
returns (uint256);
getCoreVaultMinimumAmountLeftBIPS
Returns the minimum amount of minting left on agent's address after transfer to core vault.
function getCoreVaultMinimumAmountLeftBIPS()
external view
returns (uint256);
getCoreVaultTransferTimeExtensionSeconds
Returns the extra time for an agent's transfer to the core vault.
function getCoreVaultTransferTimeExtensionSeconds()
external view
returns (uint256);
getCoreVaultTransferFeeBIPS
Returns the fee paid by agent for transfer to the core vault.
function getCoreVaultTransferFeeBIPS()
external view
returns (uint256);
getCoreVaultMinimumRedeemLots
Returns the minimum number of lots that a direct redemption from core vault can take.
function getCoreVaultMinimumRedeemLots()
external view
returns (uint256);
getCoreVaultRedemptionFeeBIPS
Returns the fee paid by the redeemer for direct redemptions from the core vault.
function getCoreVaultRedemptionFeeBIPS()
external view
returns (uint256);