Skip to content
🚧 Under Development! May be incomplete.Some pages/links may be incomplete or subject to change.

HoneyFactoryReader

0xAd1782b2a7020631249031618fB1Bd09CD926b31 | ABI JSON

The Honey Factory Reader contract is responsible for providing previews of minting/redeeming HONEY.

Functions

previewMint

Get the amount of Honey that can be minted with the given ERC20.

solidity
function previewMint(address asset, uint256 amount) external view returns (uint256 honeyAmount);

Parameters

NameTypeDescription
assetaddressThe ERC20 to mint with.
amountuint256The amount of ERC20 to mint with.

Returns

NameTypeDescription
honeyAmountuint256The amount of Honey that can be minted.

previewRedeem

Get the amount of ERC20 that can be redeemed with the given Honey.

solidity
function previewRedeem(address asset, uint256 honeyAmount) external view returns (uint256);

Parameters

NameTypeDescription
assetaddressThe ERC20 to redeem.
honeyAmountuint256The amount of Honey to redeem.

Returns

NameTypeDescription
<none>uint256The amount of ERC20 that can be redeemed.

previewRequiredCollateral

Previews the amount of ERC20 required to mint an exact amount of honey.

solidity
function previewRequiredCollateral(
    address asset,
    uint256 exactHoneyAmount
)
    external
    view
    returns (uint256[] memory res);

Parameters

NameTypeDescription
assetaddressThe ERC20 asset to use.
exactHoneyAmountuint256The exact amount of honey to mint.

previewRedeemBasketMode

Previews the amount of ERC20 assets that can be redeemed from honey.

solidity
function previewRedeemBasketMode(uint256 honeyAmount) external view returns (uint256[] memory res);

Parameters

NameTypeDescription
honeyAmountuint256The amount of honey to use for redeeming collaterals.

Returns

NameTypeDescription
resuint256[]The amount of ERC20 assets that can be redeemed.

previewHoneyToRedeem

Previews the amount of honey required to redeem an exact amount of target ERC20 asset.

solidity
function previewHoneyToRedeem(address asset, uint256 exactAmount) external view returns (uint256);

Parameters

NameTypeDescription
assetaddressThe ERC20 asset to receive.
exactAmountuint256The exact amount of assets to receive.