diff --git a/contracts/docs/SonicStakingStrategySquashed.svg b/contracts/docs/SonicStakingStrategySquashed.svg index 3eb488115c..f7336fa493 100644 --- a/contracts/docs/SonicStakingStrategySquashed.svg +++ b/contracts/docs/SonicStakingStrategySquashed.svg @@ -4,113 +4,115 @@ - - + + UmlClassDiagram - + 373 - -SonicStakingStrategy -../contracts/strategies/sonic/SonicStakingStrategy.sol - -Private: -   initialized: bool <<Initializable>> -   initializing: bool <<Initializable>> -   ______gap: uint256[50] <<Initializable>> -   governorPosition: bytes32 <<Governable>> -   pendingGovernorPosition: bytes32 <<Governable>> -   reentryStatusPosition: bytes32 <<Governable>> -   _deprecated_platformAddress: address <<InitializableAbstractStrategy>> -   _deprecated_vaultAddress: address <<InitializableAbstractStrategy>> -   _deprecated_rewardTokenAddress: address <<InitializableAbstractStrategy>> -   _deprecated_rewardLiquidationThreshold: uint256 <<InitializableAbstractStrategy>> -   _reserved: int256[98] <<InitializableAbstractStrategy>> -   __gap: uint256[45] <<SonicValidatorDelegator>> -   __gap: uint256[49] <<SonicStakingStrategy>> -Internal: -   assetsMapped: address[] <<InitializableAbstractStrategy>> -Public: -   _NOT_ENTERED: uint256 <<Governable>> -   _ENTERED: uint256 <<Governable>> -   platformAddress: address <<InitializableAbstractStrategy>> -   vaultAddress: address <<InitializableAbstractStrategy>> -   assetToPToken: mapping(address=>address) <<InitializableAbstractStrategy>> -   harvesterAddress: address <<InitializableAbstractStrategy>> -   rewardTokenAddresses: address[] <<InitializableAbstractStrategy>> -   wrappedSonic: address <<SonicValidatorDelegator>> -   sfc: address <<SonicValidatorDelegator>> -   nextWithdrawId: uint256 <<SonicValidatorDelegator>> -   pendingWithdrawals: uint256 <<SonicValidatorDelegator>> -   supportedValidators: uint256[] <<SonicValidatorDelegator>> -   withdrawals: mapping(uint256=>WithdrawRequest) <<SonicValidatorDelegator>> -   validatorRegistrator: address <<SonicValidatorDelegator>> -   depositedWSAccountedFor: uint256 <<SonicStakingStrategy>> - -Internal: -    _governor(): (governorOut: address) <<Governable>> -    _pendingGovernor(): (pendingGovernor: address) <<Governable>> -    _setGovernor(newGovernor: address) <<Governable>> -    _setPendingGovernor(newGovernor: address) <<Governable>> -    _changeGovernor(_newGovernor: address) <<Governable>> -    _initialize(_rewardTokenAddresses: address[], _assets: address[], _pTokens: address[]) <<InitializableAbstractStrategy>> -    _collectRewardTokens() <<InitializableAbstractStrategy>> -    _setPTokenAddress(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> -    _abstractSetPToken(address, address) <<SonicStakingStrategy>> -    _wSWithdrawn(_amount: uint256) <<SonicStakingStrategy>> -    _deposit(_asset: address, _amount: uint256) <<SonicStakingStrategy>> -    _withdraw(_recipient: address, _asset: address, _amount: uint256) <<SonicStakingStrategy>> -External: -    <<payable>> null() <<SonicValidatorDelegator>> -    transferGovernance(_newGovernor: address) <<onlyGovernor>> <<Governable>> -    claimGovernance() <<Governable>> -    collectRewardTokens() <<nonReentrant>> <<SonicStakingStrategy>> -    setRewardTokenAddresses(_rewardTokenAddresses: address[]) <<onlyGovernor>> <<InitializableAbstractStrategy>> -    getRewardTokenAddresses(): address[] <<InitializableAbstractStrategy>> -    setPTokenAddress(address, address) <<onlyGovernor>> <<SonicStakingStrategy>> -    removePToken(uint256) <<onlyGovernor>> <<SonicStakingStrategy>> -    setHarvesterAddress(_harvesterAddress: address) <<onlyGovernor>> <<InitializableAbstractStrategy>> -    safeApproveAllTokens() <<onlyGovernor>> <<SonicStakingStrategy>> -    deposit(_asset: address, _amount: uint256) <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> -    depositAll() <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> -    withdraw(_recipient: address, _asset: address, _amount: uint256) <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> -    withdrawAll() <<onlyVaultOrGovernor, nonReentrant>> <<SonicStakingStrategy>> -    checkBalance(_asset: address): (balance: uint256) <<SonicValidatorDelegator>> -    initialize() <<onlyGovernor, initializer>> <<SonicValidatorDelegator>> -    delegate(validatorId: uint256, amount: uint256) <<onlyRegistrator, nonReentrant>> <<SonicValidatorDelegator>> -    undelegate(validatorId: uint256, undelegateAmount: uint256): (withdrawId: uint256) <<onlyRegistrator, nonReentrant>> <<SonicValidatorDelegator>> -    withdrawFromSFC(withdrawId: uint256): (withdrawnAmount: uint256) <<onlyRegistrator, nonReentrant>> <<SonicValidatorDelegator>> -    restakeRewards(validatorIds: uint256[]) <<nonReentrant>> <<SonicValidatorDelegator>> -    setRegistrator(_address: address) <<onlyGovernor>> <<SonicValidatorDelegator>> -    supportValidator(validatorId: uint256) <<onlyGovernor>> <<SonicValidatorDelegator>> -    unsupportValidator(validatorId: uint256) <<onlyGovernor>> <<SonicValidatorDelegator>> -    supportedValidatorsLength(): uint256 <<SonicValidatorDelegator>> -Public: -    <<event>> PendingGovernorshipTransfer(previousGovernor: address, newGovernor: address) <<Governable>> -    <<event>> GovernorshipTransferred(previousGovernor: address, newGovernor: address) <<Governable>> -    <<event>> PTokenAdded(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> -    <<event>> PTokenRemoved(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> -    <<event>> Deposit(_asset: address, _pToken: address, _amount: uint256) <<InitializableAbstractStrategy>> -    <<event>> Withdrawal(_asset: address, _pToken: address, _amount: uint256) <<InitializableAbstractStrategy>> -    <<event>> RewardTokenCollected(recipient: address, rewardToken: address, amount: uint256) <<InitializableAbstractStrategy>> -    <<event>> RewardTokenAddressesUpdated(_oldAddresses: address[], _newAddresses: address[]) <<InitializableAbstractStrategy>> -    <<event>> HarvesterAddressesUpdated(_oldHarvesterAddress: address, _newHarvesterAddress: address) <<InitializableAbstractStrategy>> -    <<event>> Delegated(validatorId: uint256, delegatedAmount: uint256) <<SonicValidatorDelegator>> -    <<event>> Undelegated(withdrawId: uint256, validatorId: uint256, undelegatedAmount: uint256) <<SonicValidatorDelegator>> -    <<event>> Withdrawn(withdrawId: uint256, validatorId: uint256, undelegatedAmount: uint256, withdrawnAmount: uint256) <<SonicValidatorDelegator>> -    <<event>> RegistratorChanged(newAddress: address) <<SonicValidatorDelegator>> -    <<event>> SupportedValidator(validatorId: uint256) <<SonicValidatorDelegator>> -    <<event>> UnsupportedValidator(validatorId: uint256) <<SonicValidatorDelegator>> -    <<modifier>> initializer() <<Initializable>> -    <<modifier>> onlyGovernor() <<Governable>> -    <<modifier>> nonReentrant() <<Governable>> -    <<modifier>> onlyVault() <<InitializableAbstractStrategy>> -    <<modifier>> onlyHarvester() <<InitializableAbstractStrategy>> -    <<modifier>> onlyVaultOrGovernor() <<InitializableAbstractStrategy>> -    <<modifier>> onlyVaultOrGovernorOrStrategist() <<InitializableAbstractStrategy>> -    <<modifier>> onlyRegistrator() <<SonicValidatorDelegator>> + +SonicStakingStrategy +../contracts/strategies/sonic/SonicStakingStrategy.sol + +Private: +   initialized: bool <<Initializable>> +   initializing: bool <<Initializable>> +   ______gap: uint256[50] <<Initializable>> +   governorPosition: bytes32 <<Governable>> +   pendingGovernorPosition: bytes32 <<Governable>> +   reentryStatusPosition: bytes32 <<Governable>> +   _deprecated_platformAddress: address <<InitializableAbstractStrategy>> +   _deprecated_vaultAddress: address <<InitializableAbstractStrategy>> +   _deprecated_rewardTokenAddress: address <<InitializableAbstractStrategy>> +   _deprecated_rewardLiquidationThreshold: uint256 <<InitializableAbstractStrategy>> +   _reserved: int256[98] <<InitializableAbstractStrategy>> +   __gap: uint256[44] <<SonicValidatorDelegator>> +   __gap: uint256[50] <<SonicStakingStrategy>> +Internal: +   assetsMapped: address[] <<InitializableAbstractStrategy>> +Public: +   _NOT_ENTERED: uint256 <<Governable>> +   _ENTERED: uint256 <<Governable>> +   platformAddress: address <<InitializableAbstractStrategy>> +   vaultAddress: address <<InitializableAbstractStrategy>> +   assetToPToken: mapping(address=>address) <<InitializableAbstractStrategy>> +   harvesterAddress: address <<InitializableAbstractStrategy>> +   rewardTokenAddresses: address[] <<InitializableAbstractStrategy>> +   wrappedSonic: address <<SonicValidatorDelegator>> +   sfc: address <<SonicValidatorDelegator>> +   nextWithdrawId: uint256 <<SonicValidatorDelegator>> +   pendingWithdrawals: uint256 <<SonicValidatorDelegator>> +   supportedValidators: uint256[] <<SonicValidatorDelegator>> +   defaultValidatorId: uint256 <<SonicValidatorDelegator>> +   withdrawals: mapping(uint256=>WithdrawRequest) <<SonicValidatorDelegator>> +   validatorRegistrator: address <<SonicValidatorDelegator>> + +Internal: +    _governor(): (governorOut: address) <<Governable>> +    _pendingGovernor(): (pendingGovernor: address) <<Governable>> +    _setGovernor(newGovernor: address) <<Governable>> +    _setPendingGovernor(newGovernor: address) <<Governable>> +    _changeGovernor(_newGovernor: address) <<Governable>> +    _initialize(_rewardTokenAddresses: address[], _assets: address[], _pTokens: address[]) <<InitializableAbstractStrategy>> +    _collectRewardTokens() <<InitializableAbstractStrategy>> +    _setPTokenAddress(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> +    _abstractSetPToken(address, address) <<SonicStakingStrategy>> +    _delegate(amount: uint256) <<SonicValidatorDelegator>> +    _deposit(_asset: address, _amount: uint256) <<SonicStakingStrategy>> +    _withdraw(_recipient: address, _asset: address, _amount: uint256) <<SonicStakingStrategy>> +External: +    <<payable>> null() <<SonicValidatorDelegator>> +    transferGovernance(_newGovernor: address) <<onlyGovernor>> <<Governable>> +    claimGovernance() <<Governable>> +    collectRewardTokens() <<nonReentrant>> <<SonicStakingStrategy>> +    setRewardTokenAddresses(_rewardTokenAddresses: address[]) <<onlyGovernor>> <<InitializableAbstractStrategy>> +    getRewardTokenAddresses(): address[] <<InitializableAbstractStrategy>> +    setPTokenAddress(address, address) <<onlyGovernor>> <<SonicStakingStrategy>> +    removePToken(uint256) <<onlyGovernor>> <<SonicStakingStrategy>> +    setHarvesterAddress(_harvesterAddress: address) <<onlyGovernor>> <<InitializableAbstractStrategy>> +    safeApproveAllTokens() <<onlyGovernor>> <<SonicStakingStrategy>> +    deposit(_asset: address, _amount: uint256) <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> +    depositAll() <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> +    withdraw(_recipient: address, _asset: address, _amount: uint256) <<onlyVault, nonReentrant>> <<SonicStakingStrategy>> +    withdrawAll() <<onlyVaultOrGovernor, nonReentrant>> <<SonicStakingStrategy>> +    checkBalance(_asset: address): (balance: uint256) <<SonicValidatorDelegator>> +    initialize() <<onlyGovernor, initializer>> <<SonicValidatorDelegator>> +    undelegate(validatorId: uint256, undelegateAmount: uint256): (withdrawId: uint256) <<onlyRegistratorOrStrategist, nonReentrant>> <<SonicValidatorDelegator>> +    withdrawFromSFC(withdrawId: uint256): (withdrawnAmount: uint256) <<onlyRegistrator, nonReentrant>> <<SonicValidatorDelegator>> +    restakeRewards(validatorIds: uint256[]) <<nonReentrant>> <<SonicValidatorDelegator>> +    setRegistrator(_address: address) <<onlyGovernor>> <<SonicValidatorDelegator>> +    setDefaultValidatorId(validatorId: uint256) <<onlyRegistratorOrStrategist>> <<SonicValidatorDelegator>> +    supportValidator(validatorId: uint256) <<onlyGovernor>> <<SonicValidatorDelegator>> +    unsupportValidator(validatorId: uint256) <<onlyGovernor>> <<SonicValidatorDelegator>> +    supportedValidatorsLength(): uint256 <<SonicValidatorDelegator>> +Public: +    <<event>> PendingGovernorshipTransfer(previousGovernor: address, newGovernor: address) <<Governable>> +    <<event>> GovernorshipTransferred(previousGovernor: address, newGovernor: address) <<Governable>> +    <<event>> PTokenAdded(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> +    <<event>> PTokenRemoved(_asset: address, _pToken: address) <<InitializableAbstractStrategy>> +    <<event>> Deposit(_asset: address, _pToken: address, _amount: uint256) <<InitializableAbstractStrategy>> +    <<event>> Withdrawal(_asset: address, _pToken: address, _amount: uint256) <<InitializableAbstractStrategy>> +    <<event>> RewardTokenCollected(recipient: address, rewardToken: address, amount: uint256) <<InitializableAbstractStrategy>> +    <<event>> RewardTokenAddressesUpdated(_oldAddresses: address[], _newAddresses: address[]) <<InitializableAbstractStrategy>> +    <<event>> HarvesterAddressesUpdated(_oldHarvesterAddress: address, _newHarvesterAddress: address) <<InitializableAbstractStrategy>> +    <<event>> Delegated(validatorId: uint256, delegatedAmount: uint256) <<SonicValidatorDelegator>> +    <<event>> Undelegated(withdrawId: uint256, validatorId: uint256, undelegatedAmount: uint256) <<SonicValidatorDelegator>> +    <<event>> Withdrawn(withdrawId: uint256, validatorId: uint256, undelegatedAmount: uint256, withdrawnAmount: uint256) <<SonicValidatorDelegator>> +    <<event>> RegistratorChanged(newAddress: address) <<SonicValidatorDelegator>> +    <<event>> SupportedValidator(validatorId: uint256) <<SonicValidatorDelegator>> +    <<event>> UnsupportedValidator(validatorId: uint256) <<SonicValidatorDelegator>> +    <<event>> DefaultValidatorIdChanged(validatorId: uint256) <<SonicValidatorDelegator>> +    <<modifier>> initializer() <<Initializable>> +    <<modifier>> onlyGovernor() <<Governable>> +    <<modifier>> nonReentrant() <<Governable>> +    <<modifier>> onlyVault() <<InitializableAbstractStrategy>> +    <<modifier>> onlyHarvester() <<InitializableAbstractStrategy>> +    <<modifier>> onlyVaultOrGovernor() <<InitializableAbstractStrategy>> +    <<modifier>> onlyVaultOrGovernorOrStrategist() <<InitializableAbstractStrategy>> +    <<modifier>> onlyRegistrator() <<SonicValidatorDelegator>> +    <<modifier>> onlyRegistratorOrStrategist() <<SonicValidatorDelegator>>    constructor() <<Governable>>    governor(): address <<Governable>>    isGovernor(): bool <<Governable>> diff --git a/contracts/docs/SonicStakingStrategyStorage.svg b/contracts/docs/SonicStakingStrategyStorage.svg index 0fa464541b..acbbc3bd53 100644 --- a/contracts/docs/SonicStakingStrategyStorage.svg +++ b/contracts/docs/SonicStakingStrategyStorage.svg @@ -49,11 +49,11 @@ 161 -162-206 +162 -207 +163-206 -208-256 +207-256 type: <inherited contract>.variable (bytes) @@ -97,17 +97,17 @@ uint256[]: SonicValidatorDelegator.supportedValidators (32) -mapping(uint256=>WithdrawRequest): SonicValidatorDelegator.withdrawals (32) +uint256: SonicValidatorDelegator.defaultValidatorId (32) -unallocated (12) - -address: SonicValidatorDelegator.validatorRegistrator (20) +mapping(uint256=>WithdrawRequest): SonicValidatorDelegator.withdrawals (32) -uint256[45]: SonicValidatorDelegator.__gap (1440) +unallocated (12) + +address: SonicValidatorDelegator.validatorRegistrator (20) -uint256: depositedWSAccountedFor (32) +uint256[44]: SonicValidatorDelegator.__gap (1408) -uint256[49]: __gap (1568) +uint256[50]: __gap (1600) @@ -200,9 +200,9 @@ -5:22->4 - - +5:23->4 + +