From ce9cf60eb92bd7f2b9b07dd673fd9955cbf0b14f Mon Sep 17 00:00:00 2001 From: Nicholas Addison Date: Mon, 14 Oct 2024 21:05:57 +1100 Subject: [PATCH] Generated latest LidoARM contract diagrams --- docs/LidoARMPublicSquashed.svg | 139 +++++++++++++++++---------------- docs/LidoARMSquashed.svg | 129 +++++++++++++++--------------- 2 files changed, 137 insertions(+), 131 deletions(-) diff --git a/docs/LidoARMPublicSquashed.svg b/docs/LidoARMPublicSquashed.svg index 2bf4713..917334b 100644 --- a/docs/LidoARMPublicSquashed.svg +++ b/docs/LidoARMPublicSquashed.svg @@ -4,79 +4,86 @@ - - + + UmlClassDiagram - + 15 - -LidoARM -../src/contracts/LidoARM.sol - -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>> -   feeCollector: address <<AbstractARM>> -   capManager: address <<AbstractARM>> -   steth: IERC20 <<LidoARM>> -   weth: IWETH <<LidoARM>> -   withdrawalQueue: IStETHWithdrawal <<LidoARM>> -   lidoWithdrawalQueueAmount: uint256 <<LidoARM>> - -External: -    <<payable>> null() <<LidoARM>> -    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>> -    setCapManager(_capManager: address) <<onlyOwner>> <<AbstractARM>> -    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> -    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> -    feesAccrued(): (fees: uint256) <<AbstractARM>> -    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _capManager: address) <<initializer>> <<LidoARM>> -    requestStETHWithdrawalForETH(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> -    claimStETHWithdrawalForWETH(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<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>> CapManagerUpdated(capManager: address) <<AbstractARM>> + +LidoARM +../src/contracts/LidoARM.sol + +Public: +   operator: address <<OwnableOperable>> +   MAX_CROSS_PRICE_DEVIATION: uint256 <<AbstractARM>> +   PRICE_SCALE: uint256 <<AbstractARM>> +   FEE_SCALE: uint256 <<AbstractARM>> +   liquidityAsset: address <<AbstractARM>> +   baseAsset: address <<AbstractARM>> +   token0: IERC20 <<AbstractARM>> +   token1: IERC20 <<AbstractARM>> +   claimDelay: uint256 <<AbstractARM>> +   traderate0: uint256 <<AbstractARM>> +   traderate1: uint256 <<AbstractARM>> +   crossPrice: uint256 <<AbstractARM>> +   withdrawsQueued: uint128 <<AbstractARM>> +   withdrawsClaimed: uint128 <<AbstractARM>> +   nextWithdrawalIndex: uint256 <<AbstractARM>> +   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> +   fee: uint16 <<AbstractARM>> +   lastAvailableAssets: int128 <<AbstractARM>> +   feeCollector: address <<AbstractARM>> +   capManager: address <<AbstractARM>> +   steth: IERC20 <<LidoARM>> +   weth: IWETH <<LidoARM>> +   lidoWithdrawalQueue: IStETHWithdrawal <<LidoARM>> +   lidoWithdrawalQueueAmount: uint256 <<LidoARM>> + +External: +    <<payable>> null() <<LidoARM>> +    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>> +    setCrossPrice(newCrossPrice: uint256) <<onlyOwner>> <<AbstractARM>> +    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> +    deposit(assets: uint256, receiver: address): (shares: uint256) <<AbstractARM>> +    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>> +    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>> +    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> +    setCapManager(_capManager: address) <<onlyOwner>> <<AbstractARM>> +    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> +    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> +    feesAccrued(): (fees: uint256) <<AbstractARM>> +    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _capManager: address) <<initializer>> <<LidoARM>> +    requestLidoWithdrawals(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> +    claimLidoWithdrawals(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> +Public: +    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> +    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> +    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> +    <<event>> CrossPriceUpdated(crossPrice: 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>> CapManagerUpdated(capManager: address) <<AbstractARM>> +    <<event>> RequestLidoWithdrawals(amounts: uint256[], requestIds: uint256[]) <<LidoARM>> +    <<event>> ClaimLidoWithdrawals(requestIds: uint256[]) <<LidoARM>>    <<modifier>> onlyOwner() <<Ownable>>    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>>    constructor() <<Ownable>> -    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address) <<LidoARM>> +    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address, _claimDelay: uint256) <<LidoARM>>    claimable(): uint256 <<AbstractARM>>    totalAssets(): uint256 <<AbstractARM>>    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>> diff --git a/docs/LidoARMSquashed.svg b/docs/LidoARMSquashed.svg index 22628ef..0d51cac 100644 --- a/docs/LidoARMSquashed.svg +++ b/docs/LidoARMSquashed.svg @@ -4,47 +4,46 @@ - - + + UmlClassDiagram - + 15 - -LidoARM -../src/contracts/LidoARM.sol - -Private: -   _gap: uint256[49] <<OwnableOperable>> -   _gap: uint256[41] <<AbstractARM>> -Internal: -   OWNER_SLOT: bytes32 <<Ownable>> -   MIN_TOTAL_SUPPLY: uint256 <<AbstractARM>> -   DEAD_ACCOUNT: address <<AbstractARM>> -Public: -   operator: address <<OwnableOperable>> -   MAX_CROSS_PRICE_DEVIATION: uint256 <<AbstractARM>> -   PRICE_SCALE: uint256 <<AbstractARM>> -   FEE_SCALE: uint256 <<AbstractARM>> -   liquidityAsset: address <<AbstractARM>> -   baseAsset: address <<AbstractARM>> -   token0: IERC20 <<AbstractARM>> -   token1: IERC20 <<AbstractARM>> -   claimDelay: uint256 <<AbstractARM>> -   traderate0: uint256 <<AbstractARM>> -   traderate1: uint256 <<AbstractARM>> -   crossPrice: uint256 <<AbstractARM>> -   withdrawsQueued: uint120 <<AbstractARM>> -   withdrawsClaimed: uint120 <<AbstractARM>> -   nextWithdrawalIndex: uint16 <<AbstractARM>> -   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> -   fee: uint16 <<AbstractARM>> -   lastAvailableAssets: int128 <<AbstractARM>> -   feeCollector: address <<AbstractARM>> -   capManager: address <<AbstractARM>> -   zap: address <<AbstractARM>> + +LidoARM +../src/contracts/LidoARM.sol + +Private: +   _gap: uint256[49] <<OwnableOperable>> +   _gap: uint256[41] <<AbstractARM>> +Internal: +   OWNER_SLOT: bytes32 <<Ownable>> +   MIN_TOTAL_SUPPLY: uint256 <<AbstractARM>> +   DEAD_ACCOUNT: address <<AbstractARM>> +Public: +   operator: address <<OwnableOperable>> +   MAX_CROSS_PRICE_DEVIATION: uint256 <<AbstractARM>> +   PRICE_SCALE: uint256 <<AbstractARM>> +   FEE_SCALE: uint256 <<AbstractARM>> +   liquidityAsset: address <<AbstractARM>> +   baseAsset: address <<AbstractARM>> +   token0: IERC20 <<AbstractARM>> +   token1: IERC20 <<AbstractARM>> +   claimDelay: uint256 <<AbstractARM>> +   traderate0: uint256 <<AbstractARM>> +   traderate1: uint256 <<AbstractARM>> +   crossPrice: uint256 <<AbstractARM>> +   withdrawsQueued: uint128 <<AbstractARM>> +   withdrawsClaimed: uint128 <<AbstractARM>> +   nextWithdrawalIndex: uint256 <<AbstractARM>> +   withdrawalRequests: mapping(uint256=>WithdrawalRequest) <<AbstractARM>> +   fee: uint16 <<AbstractARM>> +   lastAvailableAssets: int128 <<AbstractARM>> +   feeCollector: address <<AbstractARM>> +   capManager: address <<AbstractARM>>   steth: IERC20 <<LidoARM>>   weth: IWETH <<LidoARM>>   lidoWithdrawalQueue: IStETHWithdrawal <<LidoARM>> @@ -62,7 +61,7 @@    _transferAssetFrom(asset: address, from: address, to: address, amount: uint256) <<AbstractARM>>    _swapExactTokensForTokens(inToken: IERC20, outToken: IERC20, amountIn: uint256, to: address): (amountOut: uint256) <<AbstractARM>>    _swapTokensForExactTokens(inToken: IERC20, outToken: IERC20, amountOut: uint256, to: address): (amountIn: uint256) <<AbstractARM>> -    _deposit(assets: uint256, liquidityProvider: address): (shares: uint256) <<AbstractARM>> +    _deposit(assets: uint256, receiver: address): (shares: uint256) <<AbstractARM>>    _requireLiquidityAvailable(amount: uint256) <<AbstractARM>>    _availableAssets(): uint256 <<AbstractARM>>    _externalWithdrawQueue(): uint256 <<LidoARM>> @@ -82,36 +81,36 @@    setCrossPrice(newCrossPrice: uint256) <<onlyOwner>> <<AbstractARM>>    previewDeposit(assets: uint256): (shares: uint256) <<AbstractARM>>    deposit(assets: uint256): (shares: uint256) <<AbstractARM>> -    deposit(assets: uint256, liquidityProvider: address): (shares: uint256) <<AbstractARM>> +    deposit(assets: uint256, receiver: address): (shares: uint256) <<AbstractARM>>    previewRedeem(shares: uint256): (assets: uint256) <<AbstractARM>>    requestRedeem(shares: uint256): (requestId: uint256, assets: uint256) <<AbstractARM>>    claimRedeem(requestId: uint256): (assets: uint256) <<AbstractARM>> -    claimable(): uint256 <<AbstractARM>> -    setCapManager(_capManager: address) <<onlyOwner>> <<AbstractARM>> -    setZap(_zap: address) <<onlyOwner>> <<AbstractARM>> -    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> -    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> -    feesAccrued(): (fees: uint256) <<AbstractARM>> -    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _capManager: address) <<initializer>> <<LidoARM>> -    requestLidoWithdrawals(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> -    claimLidoWithdrawals(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> -Public: -    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> -    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> -    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> -    <<event>> CrossPriceUpdated(crossPrice: 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>> CapManagerUpdated(capManager: address) <<AbstractARM>> -    <<event>> ZapUpdated(zap: address) <<AbstractARM>> -    <<modifier>> onlyOwner() <<Ownable>> -    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> -    constructor() <<Ownable>> -    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address, _claimDelay: uint256) <<LidoARM>> +    setCapManager(_capManager: address) <<onlyOwner>> <<AbstractARM>> +    setFee(_fee: uint256) <<onlyOwner>> <<AbstractARM>> +    setFeeCollector(_feeCollector: address) <<onlyOwner>> <<AbstractARM>> +    feesAccrued(): (fees: uint256) <<AbstractARM>> +    initialize(_name: string, _symbol: string, _operator: address, _fee: uint256, _feeCollector: address, _capManager: address) <<initializer>> <<LidoARM>> +    requestLidoWithdrawals(amounts: uint256[]): (requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> +    claimLidoWithdrawals(requestIds: uint256[]) <<onlyOperatorOrOwner>> <<LidoARM>> +Public: +    <<event>> AdminChanged(previousAdmin: address, newAdmin: address) <<Ownable>> +    <<event>> OperatorChanged(newAdmin: address) <<OwnableOperable>> +    <<event>> TraderateChanged(traderate0: uint256, traderate1: uint256) <<AbstractARM>> +    <<event>> CrossPriceUpdated(crossPrice: 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>> CapManagerUpdated(capManager: address) <<AbstractARM>> +    <<event>> RequestLidoWithdrawals(amounts: uint256[], requestIds: uint256[]) <<LidoARM>> +    <<event>> ClaimLidoWithdrawals(requestIds: uint256[]) <<LidoARM>> +    <<modifier>> onlyOwner() <<Ownable>> +    <<modifier>> onlyOperatorOrOwner() <<OwnableOperable>> +    constructor() <<Ownable>> +    constructor(_steth: address, _weth: address, _lidoWithdrawalQueue: address, _claimDelay: uint256) <<LidoARM>> +    claimable(): uint256 <<AbstractARM>>    totalAssets(): uint256 <<AbstractARM>>    convertToShares(assets: uint256): (shares: uint256) <<AbstractARM>>    convertToAssets(shares: uint256): (assets: uint256) <<AbstractARM>>