From ff4087652054bd7d232130a17bd9c54192614a37 Mon Sep 17 00:00:00 2001 From: Nicholas Addison Date: Thu, 3 Oct 2024 21:37:11 +1000 Subject: [PATCH] Generated latest LidoARM contract diagram --- docs/LidoARMPublicSquashed.svg | 102 ++++++++++----------- docs/LidoARMSquashed.svg | 159 ++++++++++++++++----------------- 2 files changed, 130 insertions(+), 131 deletions(-) diff --git a/docs/LidoARMPublicSquashed.svg b/docs/LidoARMPublicSquashed.svg index db25cb9..05d651d 100644 --- a/docs/LidoARMPublicSquashed.svg +++ b/docs/LidoARMPublicSquashed.svg @@ -32,57 +32,57 @@   withdrawsClaimable: uint128 <<AbstractARM>>   nextWithdrawalIndex: uint128 <<AbstractARM>>   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> -   feeCollector: address <<AbstractARM>> -   fee: uint16 <<AbstractARM>> -   feesAccrued: uint112 <<AbstractARM>> -   lastAvailableAssets: uint128 <<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>> -    collectFees(): (fees: uint256) <<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>> FeeCalculated(newFeesAccrued: uint256, assetIncrease: 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>> -    totalAssets(): uint256 <<AbstractARM>> -    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>> -    convertToAssets(shares: uint256): (assets: uint256) <<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>> +    totalAssets(): uint256 <<AbstractARM>> +    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>> +    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>> +    collectFees(): (fees: uint256) <<AbstractARM>> +    feesAccrued(): (fees: uint256) <<AbstractARM>> +    _feesAccrued(): (fees: uint256, newAvailableAssets: uint256) <<AbstractARM>> diff --git a/docs/LidoARMSquashed.svg b/docs/LidoARMSquashed.svg index 1a2c8bf..eedba41 100644 --- a/docs/LidoARMSquashed.svg +++ b/docs/LidoARMSquashed.svg @@ -4,46 +4,45 @@ - - + + 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>> -   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> -   feeCollector: address <<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: uint128 <<AbstractARM>> +   withdrawsClaimed: uint128 <<AbstractARM>> +   withdrawsClaimable: uint128 <<AbstractARM>> +   nextWithdrawalIndex: uint128 <<AbstractARM>> +   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>>   fee: uint16 <<AbstractARM>> -   feesAccrued: uint112 <<AbstractARM>> -   lastAvailableAssets: uint128 <<AbstractARM>> +   lastAvailableAssets: int128 <<AbstractARM>> +   feeCollector: address <<AbstractARM>>   liquidityProviderController: address <<AbstractARM>>   steth: IERC20 <<LidoLiquidityManager>>   weth: IWETH <<LidoLiquidityManager>> @@ -67,51 +66,51 @@    _liquidityAvailable(): uint256 <<AbstractARM>>    _availableAssets(): uint256 <<AbstractARM>>    _externalWithdrawQueue(): uint256 <<LidoARM>> -    _accruePerformanceFee() <<AbstractARM>> -    _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>> -    collectFees(): (fees: uint256) <<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>> FeeCalculated(newFeesAccrued: uint256, assetIncrease: 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>> -    totalAssets(): uint256 <<AbstractARM>> -    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>> -    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>> +    _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>> +    totalAssets(): uint256 <<AbstractARM>> +    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>> +    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>> +    collectFees(): (fees: uint256) <<AbstractARM>> +    feesAccrued(): (fees: uint256) <<AbstractARM>> +    _feesAccrued(): (fees: uint256, newAvailableAssets: uint256) <<AbstractARM>>