WithdrawalManager (Cyclical)
\
Functions
addShares
addShares
Add shares to the withdrawal manager.
Parameters:
0
shares_
uint256
uint256
Amount of shares to add.
1
owner_
address
address
Address of the owner of shares.
\
asset
asset
Gets the asset address used in this withdrawal manager.
Return Values:
0
asset_
address
address
Address of the asset.
\
cycleConfigs
cycleConfigs
Gets the configuration for a given config id.
Parameters:
0
``
uint256
uint256
Return Values:
0
initialCycleId
uint64
uint64
Identifier of the first withdrawal cycle using this configuration.
1
initialCycleTime
uint64
uint64
Timestamp of the first withdrawal cycle using this configuration.
2
cycleDuration
uint64
uint64
Duration of the withdrawal cycle.
3
windowDuration
uint64
uint64
Duration of the withdrawal window.
\
exitCycleId
exitCycleId
Gets the id of the cycle that account can exit on.
Parameters:
0
``
address
address
Return Values:
0
uint256
uint256
\
factory
factory
The address of the proxy factory.
Return Values:
0
factory_
address
address
\
getConfigAtId
getConfigAtId
Gets the configuration of a given cycle id.
Parameters:
0
cycleId_
uint256
uint256
The id of the cycle.
Return Values:
0
config_
tuple
struct IMapleWithdrawalManagerStorage.CycleConfig
The configuration info corresponding to the cycle.
\
getCurrentConfig
getCurrentConfig
Gets the configuration of the current cycle id.
Return Values:
0
config_
tuple
struct IMapleWithdrawalManagerStorage.CycleConfig
The configuration info corresponding to the cycle.
\
getCurrentCycleId
getCurrentCycleId
Gets the id of the current cycle.
Return Values:
0
cycleId_
uint256
uint256
\
getRedeemableAmounts
getRedeemableAmounts
Gets the shares and assets that are redeemable for a given user.
Parameters:
0
lockedShares_
uint256
uint256
The amount of shares that are locked.
1
owner_
address
address
The owner of the shares.
Return Values:
0
redeemableShares_
uint256
uint256
The amount of shares that are redeemable based on current liquidity.
1
resultingAssets_
uint256
uint256
The corresponding amount of assets that can be redeemed using the shares.
2
partialLiquidity_
bool
bool
Boolean indicating if there is enough liquidity to facilitate a full redemption.
\
getWindowAtId
getWindowAtId
Gets the timestamps of the beginning and end of the withdrawal window for a given cycle.
Parameters:
0
cycleId_
uint256
uint256
The id of the current cycle.
Return Values:
0
windowStart_
uint256
uint256
The timestamp of the beginning of the cycle, which is the same as the beginning of the withdrawal window.
1
windowEnd_
uint256
uint256
The timestamp of the end of the withdrawal window.
\
getWindowStart
getWindowStart
Gets the timestamp of the beginning of the withdrawal window for a given cycle.
Parameters:
0
cycleId_
uint256
uint256
The id of the current cycle.
Return Values:
0
windowStart_
uint256
uint256
The timestamp of the beginning of the cycle, which is the same as the beginning of the withdrawal window.
\
globals
globals
Gets the address of globals.
Return Values:
0
globals_
address
address
The address of globals.
\
governor
governor
Gets the address of the governor.
Return Values:
0
governor_
address
address
The address of the governor.
\
implementation
implementation
The address of the implementation contract being proxied.
Return Values:
0
implementation_
address
address
\
isInExitWindow
isInExitWindow
Checks if an account is included in an exit window.
Parameters:
0
owner_
address
address
The address of the share owners to check.
Return Values:
0
isInExitWindow_
bool
bool
A boolean indicating whether or not the account is in an exit window.
\
latestConfigId
latestConfigId
Gets the most recent configuration id.
Return Values:
0
uint256
uint256
\
lockedLiquidity
lockedLiquidity
Gets the total amount of funds that need to be locked to fulfill exits.
Return Values:
0
lockedLiquidity_
uint256
uint256
The amount of locked liquidity.
\
lockedShares
lockedShares
Gets the amount of locked shares for an account.
Parameters:
0
``
address
address
Return Values:
0
uint256
uint256
\
migrate
migrate
Modifies the proxy's storage by delegate-calling a migrator contract with some arguments. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
0
migrator_
address
address
The address of a migrator contract.
1
arguments_
bytes
bytes
Some encoded arguments to use for the migration.
\
pool
pool
Gets the address of the pool associated with this withdrawal manager.
Return Values:
0
address
address
\
poolDelegate
poolDelegate
Gets the pool delegate address.
Return Values:
0
poolDelegate_
address
address
Address of the pool delegate.
\
poolManager
poolManager
Gets the address of the pool manager associated with this withdrawal manager.
Return Values:
0
address
address
\
previewRedeem
previewRedeem
Gets the amount of shares that can be redeemed.
Parameters:
0
owner_
address
address
The address to check the redemption for.
1
shares_
uint256
uint256
The amount of requested shares to redeem.
Return Values:
0
redeemableShares_
uint256
uint256
The amount of shares that can be redeemed.
1
resultingAssets_
uint256
uint256
The amount of assets that will be returned for `redeemableShares`.
\
previewWithdraw
previewWithdraw
Gets the amount of shares that can be withdrawn.
Parameters:
0
owner_
address
address
The address to check the withdrawal for.
1
assets_
uint256
uint256
The amount of requested shares to withdraw.
Return Values:
0
redeemableAssets_
uint256
uint256
The amount of assets that can be withdrawn.
1
resultingShares_
uint256
uint256
The amount of shares that will be burned.
\
processExit
processExit
Process the exit of an account.
Parameters:
0
requestedShares_
uint256
uint256
Amount of initially requested shares.
1
owner_
address
address
Address of the account which will be processed for exit.
Return Values:
0
redeemableShares_
uint256
uint256
1
resultingAssets_
uint256
uint256
\
removeShares
removeShares
Remove shares to the withdrawal manager.
Parameters:
0
shares_
uint256
uint256
Amount of shares to remove.
1
owner_
address
address
Address of the owner of shares.
Return Values:
0
sharesReturned_
uint256
uint256
\
setExitConfig
setExitConfig
Sets up a new exit configuration.
Parameters:
0
cycleDuration_
uint256
uint256
The total duration, in seconds, of a withdrawal cycle.
1
windowDuration_
uint256
uint256
The duration, in seconds, of the withdrawal window.
\
setImplementation
setImplementation
Modifies the proxy's implementation address.
Parameters:
0
implementation_
address
address
\
totalCycleShares
totalCycleShares
Gets the amount of shares for a cycle.
Parameters:
0
``
uint256
uint256
Return Values:
0
uint256
uint256
\
upgrade
upgrade
Upgrades a contract implementation to a specific version. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
Parameters:
0
version_
uint256
uint256
1
arguments_
bytes
bytes
Some encoded arguments to use for the upgrade.
\
Events
ConfigurationUpdated
ConfigurationUpdated
Parameters:
0
configId_
uint256
uint256
1
initialCycleId_
uint64
uint64
2
initialCycleTime_
uint64
uint64
3
cycleDuration_
uint64
uint64
4
windowDuration_
uint64
uint64
\
Upgraded
Upgraded
The instance was upgraded.
Parameters:
0
toVersion_
uint256
uint256
The new version of the loan.
1
arguments_
bytes
bytes
The upgrade arguments, if any.
\
WithdrawalCancelled
WithdrawalCancelled
Parameters:
0
account_
address
address
\
WithdrawalProcessed
WithdrawalProcessed
Parameters:
0
account_
address
address
1
sharesToRedeem_
uint256
uint256
2
assetsToWithdraw_
uint256
uint256
\
WithdrawalUpdated
WithdrawalUpdated
Parameters:
0
account_
address
address
1
lockedShares_
uint256
uint256
2
windowStart_
uint64
uint64
3
windowEnd_
uint64
uint64
\
Last updated