Skip to main content

IAssetManager

Command line reference for managing and interacting with FAssets IAssetManager.

Sourced from IAssetManager.sol on GitHub.

Functions

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.

You can find detailed explanations of each agent parameter in the FAssets Operational Parameters documentation.

function getAgentInfo(address _agentVault)
external view
returns (AgentInfo.Info memory);

collateralReservationFee

Returns the collateral reservation fee amount that has to be passed to the reserveCollateral method. Returns the amount in NAT wei.

Parameters:

  • _lots: The number of lots for which to reserve collateral

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)
  • _minterUnderlyingAddresses: Array of minter's underlying addresses - needed only if handshake is required
function reserveCollateral(
address _agentVault,
uint256 _lots,
uint256 _maxMintingFeeBIPS,
address payable _executor,
string[] calldata _minterUnderlyingAddresses
) external payable;

approveCollateralReservation

Agent approves the collateral reservation request after checking the minter's identity.

Parameters:

  • _collateralReservationId: Collateral reservation ID
function approveCollateralReservation(
uint256 _collateralReservationId
) external notEmergencyPaused;

rejectCollateralReservation

Agent rejects the collateral reservation request after checking the minter's identity. The collateral reservation fee is returned to the minter.

Parameters:

  • _collateralReservationId: Collateral reservation ID
function rejectCollateralReservation(
uint256 _collateralReservationId
) external nonReentrant;

cancelCollateralReservation

Minter cancels the collateral reservation request if the agent didn't respond in time. The collateral reservation fee is returned to the minter.

Parameters:

  • _collateralReservationId: Collateral reservation ID
function cancelCollateralReservation(
uint256 _collateralReservationId
) external nonReentrant;

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);

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 exact value + fee amount and correct payment reference)
  • _collateralReservationId: Collateral reservation ID
function executeMinting(
IPayment.Proof calldata _payment,
uint256 _collateralReservationId
) external nonReentrant;

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);

redemptionQueue

Returns the redemption queue in the form of an array of RedemptionTicketInfo structs.

Parameters:

  • _firstRedemptionTicketId: the ticket id to start listing from; if 0, 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 _pageSize is 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; if 0, 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 _pageSize is 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);