diff --git a/docs/LidoARMPublicSquashed.svg b/docs/LidoARMPublicSquashed.svg index 05d651d..d29df4c 100644 --- a/docs/LidoARMPublicSquashed.svg +++ b/docs/LidoARMPublicSquashed.svg @@ -27,56 +27,56 @@   token1: IERC20 <<AbstractARM>>   traderate0: uint256 <<AbstractARM>>   traderate1: uint256 <<AbstractARM>> -   withdrawsQueued: uint128 <<AbstractARM>> -   withdrawsClaimed: uint128 <<AbstractARM>> -   withdrawsClaimable: uint128 <<AbstractARM>> -   nextWithdrawalIndex: uint128 <<AbstractARM>> -   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> -   fee: uint16 <<AbstractARM>> -   lastAvailableAssets: int128 <<AbstractARM>> -   feeCollector: address <<AbstractARM>> -   liquidityProviderController: address <<AbstractARM>> -   steth: IERC20 <<LidoLiquidityManager>> -   weth: IWETH <<LidoLiquidityManager>> -   withdrawalQueue: IStETHWithdrawal <<LidoLiquidityManager>> -   outstandingEther: uint256 <<LidoLiquidityManager>> - -External: -    <<payable>> null() <<LidoLiquidityManager>> -    owner(): address <<Ownable>> -    setOwner(newOwner: address) <<onlyOwner>> <<Ownable>> -    setOperator(newOperator: address) <<onlyOwner>> <<OwnableOperable>> -    swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, amountOutMin: uint256, to: address) <<AbstractARM>> -    swapExactTokensForTokens(amountIn: uint256, amountOutMin: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> -    swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, amountInMax: uint256, to: address) <<AbstractARM>> -    swapTokensForExactTokens(amountOut: uint256, amountInMax: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> -    setPrices(buyT1: uint256, sellT1: uint256) <<onlyOperatorOrOwner>> <<AbstractARM>> -    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>> -    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> -    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>> -    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>> -    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> -    setLiquidityProviderController(_liquidityProviderController: address) <<onlyOwner>> <<AbstractARM>> -    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> -    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> -    requestStETHWithdrawalForETH(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> -    claimStETHWithdrawalForWETH(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> -    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _liquidityProviderController: address) <<initializer>> <<LidoARM>> -Public: -    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> -    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> -    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> -    <<event>> Deposit(owner: address, assets: uint256, shares: uint256) <<AbstractARM>> -    <<event>> RedeemRequested(withdrawer: address, requestId: uint256, assets: uint256, queued: uint256, claimTimestamp: uint256) <<AbstractARM>> -    <<event>> RedeemClaimed(withdrawer: address, requestId: uint256, assets: uint256) <<AbstractARM>> -    <<event>> FeeCollected(feeCollector: address, fee: uint256) <<AbstractARM>> -    <<event>> FeeUpdated(fee: uint256) <<AbstractARM>> -    <<event>> FeeCollectorUpdated(newFeeCollector: address) <<AbstractARM>> -    <<event>> LiquidityProviderControllerUpdated(liquidityProviderController: address) <<AbstractARM>> -    <<modifier>> onlyOwner() <<Ownable>> -    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> -    constructor() <<Ownable>> -    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address) <<LidoARM>> +   withdrawsQueued: uint120 <<AbstractARM>> +   withdrawsClaimed: uint120 <<AbstractARM>> +   nextWithdrawalIndex: uint16 <<AbstractARM>> +   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> +   fee: uint16 <<AbstractARM>> +   lastAvailableAssets: int128 <<AbstractARM>> +   feeCollector: address <<AbstractARM>> +   liquidityProviderController: address <<AbstractARM>> +   steth: IERC20 <<LidoLiquidityManager>> +   weth: IWETH <<LidoLiquidityManager>> +   withdrawalQueue: IStETHWithdrawal <<LidoLiquidityManager>> +   outstandingEther: uint256 <<LidoLiquidityManager>> + +External: +    <<payable>> null() <<LidoLiquidityManager>> +    owner(): address <<Ownable>> +    setOwner(newOwner: address) <<onlyOwner>> <<Ownable>> +    setOperator(newOperator: address) <<onlyOwner>> <<OwnableOperable>> +    swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, amountOutMin: uint256, to: address) <<AbstractARM>> +    swapExactTokensForTokens(amountIn: uint256, amountOutMin: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> +    swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, amountInMax: uint256, to: address) <<AbstractARM>> +    swapTokensForExactTokens(amountOut: uint256, amountInMax: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> +    setPrices(buyT1: uint256, sellT1: uint256) <<onlyOperatorOrOwner>> <<AbstractARM>> +    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>> +    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>> +    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> +    setLiquidityProviderController(_liquidityProviderController: address) <<onlyOwner>> <<AbstractARM>> +    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> +    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> +    requestStETHWithdrawalForETH(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> +    claimStETHWithdrawalForWETH(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> +    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _liquidityProviderController: address) <<initializer>> <<LidoARM>> +Public: +    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> +    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> +    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> +    <<event>> Deposit(owner: address, assets: uint256, shares: uint256) <<AbstractARM>> +    <<event>> RedeemRequested(withdrawer: address, requestId: uint256, assets: uint256, queued: uint256, claimTimestamp: uint256) <<AbstractARM>> +    <<event>> RedeemClaimed(withdrawer: address, requestId: uint256, assets: uint256) <<AbstractARM>> +    <<event>> FeeCollected(feeCollector: address, fee: uint256) <<AbstractARM>> +    <<event>> FeeUpdated(fee: uint256) <<AbstractARM>> +    <<event>> FeeCollectorUpdated(newFeeCollector: address) <<AbstractARM>> +    <<event>> LiquidityProviderControllerUpdated(liquidityProviderController: address) <<AbstractARM>> +    <<modifier>> onlyOwner() <<Ownable>> +    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> +    constructor() <<Ownable>> +    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address) <<LidoARM>> +    isClaimable(requestId: uint256): bool <<AbstractARM>>    totalAssets(): uint256 <<AbstractARM>>    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>>    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>> diff --git a/docs/LidoARMSquashed.svg b/docs/LidoARMSquashed.svg index eedba41..1c1ba98 100644 --- a/docs/LidoARMSquashed.svg +++ b/docs/LidoARMSquashed.svg @@ -4,41 +4,40 @@ - - + + UmlClassDiagram - + 14 - -LidoARM -../src/contracts/LidoARM.sol - -Private: -   _gap: uint256[49] <<OwnableOperable>> -   _gap: uint256[42] <<AbstractARM>> -   _gap: uint256[49] <<LidoLiquidityManager>> -Internal: -   OWNER_SLOT: bytes32 <<Ownable>> -   MIN_TOTAL_SUPPLY: uint256 <<AbstractARM>> -   DEAD_ACCOUNT: address <<AbstractARM>> -Public: -   operator: address <<OwnableOperable>> -   MAX_PRICE_DEVIATION: uint256 <<AbstractARM>> -   PRICE_SCALE: uint256 <<AbstractARM>> -   CLAIM_DELAY: uint256 <<AbstractARM>> -   FEE_SCALE: uint256 <<AbstractARM>> -   liquidityAsset: address <<AbstractARM>> -   token0: IERC20 <<AbstractARM>> -   token1: IERC20 <<AbstractARM>> -   traderate0: uint256 <<AbstractARM>> -   traderate1: uint256 <<AbstractARM>> -   withdrawsQueued: uint128 <<AbstractARM>> -   withdrawsClaimed: uint128 <<AbstractARM>> -   withdrawsClaimable: uint128 <<AbstractARM>> -   nextWithdrawalIndex: uint128 <<AbstractARM>> + +LidoARM +../src/contracts/LidoARM.sol + +Private: +   _gap: uint256[49] <<OwnableOperable>> +   _gap: uint256[42] <<AbstractARM>> +   _gap: uint256[49] <<LidoLiquidityManager>> +Internal: +   OWNER_SLOT: bytes32 <<Ownable>> +   MIN_TOTAL_SUPPLY: uint256 <<AbstractARM>> +   DEAD_ACCOUNT: address <<AbstractARM>> +Public: +   operator: address <<OwnableOperable>> +   MAX_PRICE_DEVIATION: uint256 <<AbstractARM>> +   PRICE_SCALE: uint256 <<AbstractARM>> +   CLAIM_DELAY: uint256 <<AbstractARM>> +   FEE_SCALE: uint256 <<AbstractARM>> +   liquidityAsset: address <<AbstractARM>> +   token0: IERC20 <<AbstractARM>> +   token1: IERC20 <<AbstractARM>> +   traderate0: uint256 <<AbstractARM>> +   traderate1: uint256 <<AbstractARM>> +   withdrawsQueued: uint120 <<AbstractARM>> +   withdrawsClaimed: uint120 <<AbstractARM>> +   nextWithdrawalIndex: uint16 <<AbstractARM>>   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>>   fee: uint16 <<AbstractARM>>   lastAvailableAssets: int128 <<AbstractARM>> @@ -62,49 +61,49 @@    _swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, to: address): (amountOut: uint256) <<AbstractARM>>    _swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, to: address): (amountIn: uint256) <<AbstractARM>>    _setTraderates(_baseToTokenRate: uint256, _tokenToBaseRate: uint256) <<AbstractARM>> -    _updateWithdrawalQueueLiquidity() <<AbstractARM>> -    _liquidityAvailable(): uint256 <<AbstractARM>> -    _availableAssets(): uint256 <<AbstractARM>> -    _externalWithdrawQueue(): uint256 <<LidoARM>> -    _setFee(_fee: uint256) <<AbstractARM>> -    _setFeeCollector(_feeCollector: address) <<AbstractARM>> -    _initLidoLiquidityManager() <<LidoLiquidityManager>> -External: -    <<payable>> null() <<LidoLiquidityManager>> -    owner(): address <<Ownable>> -    setOwner(newOwner: address) <<onlyOwner>> <<Ownable>> -    setOperator(newOperator: address) <<onlyOwner>> <<OwnableOperable>> -    swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, amountOutMin: uint256, to: address) <<AbstractARM>> -    swapExactTokensForTokens(amountIn: uint256, amountOutMin: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> -    swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, amountInMax: uint256, to: address) <<AbstractARM>> -    swapTokensForExactTokens(amountOut: uint256, amountInMax: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> -    setPrices(buyT1: uint256, sellT1: uint256) <<onlyOperatorOrOwner>> <<AbstractARM>> -    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>> -    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> -    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>> -    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>> -    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> -    setLiquidityProviderController(_liquidityProviderController: address) <<onlyOwner>> <<AbstractARM>> -    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> -    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> -    requestStETHWithdrawalForETH(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> -    claimStETHWithdrawalForWETH(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> -    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _liquidityProviderController: address) <<initializer>> <<LidoARM>> -Public: -    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> -    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> -    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> -    <<event>> Deposit(owner: address, assets: uint256, shares: uint256) <<AbstractARM>> -    <<event>> RedeemRequested(withdrawer: address, requestId: uint256, assets: uint256, queued: uint256, claimTimestamp: uint256) <<AbstractARM>> -    <<event>> RedeemClaimed(withdrawer: address, requestId: uint256, assets: uint256) <<AbstractARM>> -    <<event>> FeeCollected(feeCollector: address, fee: uint256) <<AbstractARM>> -    <<event>> FeeUpdated(fee: uint256) <<AbstractARM>> -    <<event>> FeeCollectorUpdated(newFeeCollector: address) <<AbstractARM>> -    <<event>> LiquidityProviderControllerUpdated(liquidityProviderController: address) <<AbstractARM>> -    <<modifier>> onlyOwner() <<Ownable>> -    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> -    constructor() <<Ownable>> -    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address) <<LidoARM>> +    _liquidityAvailable(): uint256 <<AbstractARM>> +    _availableAssets(): uint256 <<AbstractARM>> +    _externalWithdrawQueue(): uint256 <<LidoARM>> +    _setFee(_fee: uint256) <<AbstractARM>> +    _setFeeCollector(_feeCollector: address) <<AbstractARM>> +    _initLidoLiquidityManager() <<LidoLiquidityManager>> +External: +    <<payable>> null() <<LidoLiquidityManager>> +    owner(): address <<Ownable>> +    setOwner(newOwner: address) <<onlyOwner>> <<Ownable>> +    setOperator(newOperator: address) <<onlyOwner>> <<OwnableOperable>> +    swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, amountOutMin: uint256, to: address) <<AbstractARM>> +    swapExactTokensForTokens(amountIn: uint256, amountOutMin: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> +    swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, amountInMax: uint256, to: address) <<AbstractARM>> +    swapTokensForExactTokens(amountOut: uint256, amountInMax: uint256, path: address[], to: address, deadline: uint256): (amounts: uint256[]) <<AbstractARM>> +    setPrices(buyT1: uint256, sellT1: uint256) <<onlyOperatorOrOwner>> <<AbstractARM>> +    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>> +    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>> +    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> +    setLiquidityProviderController(_liquidityProviderController: address) <<onlyOwner>> <<AbstractARM>> +    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> +    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> +    requestStETHWithdrawalForETH(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> +    claimStETHWithdrawalForWETH(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoLiquidityManager>> +    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _liquidityProviderController: address) <<initializer>> <<LidoARM>> +Public: +    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> +    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> +    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> +    <<event>> Deposit(owner: address, assets: uint256, shares: uint256) <<AbstractARM>> +    <<event>> RedeemRequested(withdrawer: address, requestId: uint256, assets: uint256, queued: uint256, claimTimestamp: uint256) <<AbstractARM>> +    <<event>> RedeemClaimed(withdrawer: address, requestId: uint256, assets: uint256) <<AbstractARM>> +    <<event>> FeeCollected(feeCollector: address, fee: uint256) <<AbstractARM>> +    <<event>> FeeUpdated(fee: uint256) <<AbstractARM>> +    <<event>> FeeCollectorUpdated(newFeeCollector: address) <<AbstractARM>> +    <<event>> LiquidityProviderControllerUpdated(liquidityProviderController: address) <<AbstractARM>> +    <<modifier>> onlyOwner() <<Ownable>> +    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> +    constructor() <<Ownable>> +    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address) <<LidoARM>> +    isClaimable(requestId: uint256): bool <<AbstractARM>>    totalAssets(): uint256 <<AbstractARM>>    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>>    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>>