Skip to main content

OsTokenConfig

Git Source ↗

Inherits: Ownable2Step ↗, IOsTokenConfig

Configuration for minting and liquidating OsToken shares

State Variables​

_maxPercent​

uint256 private constant _maxPercent = 1e18

_disabledLiqThreshold​

uint256 private constant _disabledLiqThreshold = type(uint64).max

redeemer​

The address of the OsToken redeemer

address public override redeemer

_defaultConfig​

Config private _defaultConfig

_vaultConfigs​

mapping(address vault => Config config) private _vaultConfigs

Functions​

constructor​

Constructor

constructor(address _owner, Config memory defaultConfig, address _redeemer) Ownable(msg.sender);

Parameters

NameTypeDescription
_owneraddressThe address of the contract owner
defaultConfigConfigThe OsToken default configuration
_redeemeraddressThe address of the redeemer

getConfig​

Returns the OsToken minting and liquidating configuration values for the vault

function getConfig(address vault) external view override returns (Config memory config);

Parameters

NameTypeDescription
vaultaddressThe address of the vault to get the config for

Returns

NameTypeDescription
configConfigThe OsToken config for the vault

setRedeemer​

Sets the OsToken redeemer address. Can only be called by the owner.

function setRedeemer(address newRedeemer) public override onlyOwner;

Parameters

NameTypeDescription
newRedeemeraddressThe address of the new redeemer

updateConfig​

Updates the OsToken minting and liquidating configuration values. Can only be called by the owner.

function updateConfig(address vault, Config memory config) public override onlyOwner;

Parameters

NameTypeDescription
vaultaddressThe address of the vault. Set to zero address to update the default config.
configConfigThe new OsToken configuration