Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonic Deploy 003 - Sonic Staking Strategy #2359

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

naddison36
Copy link
Collaborator

@naddison36 naddison36 commented Jan 22, 2025

Dependencies

Deployment

Deploy scripts

  • contracts/deploy/sonic/003_sonic_staking_strategy.js

Contracts

Contract Address
SonicStakingStrategyProxy 0x596B0401479f6DfE1cAF8c12838311FeE742B95c
SonicStakingStrategy 0x34A505A58aEb350C1b4386E183BD4fCc001B0fd4
WOSonic 0x43d85091cfBD65dE89dC7275e9ed372647Cbf233

Governance

The following governance actions need to go through the Timelock contract via the Admin 5/8 multisig

  1. Approve Sonic Staking Strategy on the Vault
  2. Add supported validators
  3. Set Defender Relayer for Sonic validator controls
  4. Set the Sonic Staking Strategy as the default strategy for wS
  5. Set 10% performance fee
  6. set the trustee address
  7. Set the Vault buffer to 1%
  8. Set the auto allocation to 1,000 wS
  9. Upgrade the Wrapped Origin Sonic contract with new name

Schedule Batch in Timelock

{
  "version": "1.0",
  "chainId": "146",
  "createdAt": 1737523080,
  "meta": {
    "name": "Transaction Batch",
    "description": "",
    "txBuilderVersion": "1.16.1",
    "createdFromSafeAddress": "0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899",
    "createdFromOwnerAddress": ""
  },
  "transactions": [
    {
      "to": "0x31a91336414d3B955E494E7d485a6B06b55FC8fB",
      "value": "0",
      "data": null,
      "contractMethod": {
        "inputs": [
          {
            "type": "address[]",
            "name": "targets"
          },
          {
            "type": "uint256[]",
            "name": "values"
          },
          {
            "type": "bytes[]",
            "name": "payloads"
          },
          {
            "type": "bytes32",
            "name": "predecessor"
          },
          {
            "type": "bytes32",
            "name": "salt"
          },
          {
            "type": "uint256",
            "name": "delay"
          }
        ],
        "name": "scheduleBatch",
        "payable": false
      },
      "contractInputsValues": {
        "targets": "[\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0x9F0dF7799f6FDAd409300080cfF680f5A23df4b1\"]",
        "values": "[\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]",
        "payloads": "[\"0x3b8ae397000000000000000000000000596b0401479f6dfe1caf8c12838311fee742b95c\",\"0x84bcbb4e000000000000000000000000000000000000000000000000000000000000000f\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000010\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000011\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000012\",\"0x6e811d38000000000000000000000000531b8d5ed6db72a56cf1238d4ce478e7cb7f2825\",\"0xbc90106b000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38000000000000000000000000596b0401479f6dfe1caf8c12838311fee742b95c\",\"0x0acbda7500000000000000000000000000000000000000000000000000000000000003e8\",\"0x2da845a800000000000000000000000063cdd3072f25664eec6faeff6daeb668ea4de94a\",\"0x8ec489a2000000000000000000000000000000000000000000000000002386f26fc10000\",\"0xb2c9336d00000000000000000000000000000000000000000000003635c9adc5dea00000\",\"0x3659cfe600000000000000000000000043d85091cfbd65de89dc7275e9ed372647cbf233\"]",
        "predecessor": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "salt": "0x2dad2e3c6f78aed64919aec88bd85087dde5c909ebe37315f68490e5ef62caee",
        "delay": "60"
      }
    }
  ]
}

Execute Batch in Timelock

{
  "version": "1.0",
  "chainId": "146",
  "createdAt": 1737523080,
  "meta": {
    "name": "Transaction Batch",
    "description": "",
    "txBuilderVersion": "1.16.1",
    "createdFromSafeAddress": "0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899",
    "createdFromOwnerAddress": ""
  },
  "transactions": [
    {
      "to": "0x31a91336414d3B955E494E7d485a6B06b55FC8fB",
      "value": "0",
      "data": null,
      "contractMethod": {
        "inputs": [
          {
            "type": "address[]",
            "name": "targets"
          },
          {
            "type": "uint256[]",
            "name": "values"
          },
          {
            "type": "bytes[]",
            "name": "payloads"
          },
          {
            "type": "bytes32",
            "name": "predecessor"
          },
          {
            "type": "bytes32",
            "name": "salt"
          }
        ],
        "name": "executeBatch",
        "payable": true
      },
      "contractInputsValues": {
        "targets": "[\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0x596B0401479f6DfE1cAF8c12838311FeE742B95c\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0xa3c0eCA00D2B76b4d1F170b0AB3FdeA16C180186\",\"0x9F0dF7799f6FDAd409300080cfF680f5A23df4b1\"]",
        "values": "[\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"]",
        "payloads": "[\"0x3b8ae397000000000000000000000000596b0401479f6dfe1caf8c12838311fee742b95c\",\"0x84bcbb4e000000000000000000000000000000000000000000000000000000000000000f\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000010\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000011\",\"0x84bcbb4e0000000000000000000000000000000000000000000000000000000000000012\",\"0x6e811d38000000000000000000000000531b8d5ed6db72a56cf1238d4ce478e7cb7f2825\",\"0xbc90106b000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad38000000000000000000000000596b0401479f6dfe1caf8c12838311fee742b95c\",\"0x0acbda7500000000000000000000000000000000000000000000000000000000000003e8\",\"0x2da845a800000000000000000000000063cdd3072f25664eec6faeff6daeb668ea4de94a\",\"0x8ec489a2000000000000000000000000000000000000000000000000002386f26fc10000\",\"0xb2c9336d00000000000000000000000000000000000000000000003635c9adc5dea00000\",\"0x3659cfe600000000000000000000000043d85091cfbd65de89dc7275e9ed372647cbf233\"]",
        "predecessor": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "salt": "0x2dad2e3c6f78aed64919aec88bd85087dde5c909ebe37315f68490e5ef62caee"
      }
    }
  ]
}

Deploy checklist

Two reviewers complete the following checklist:

- [ ] All deployed contracts are listed in the deploy PR's description
- [ ] Deployed contract's verified code (and all dependencies) match the code in master
- [ ] Contract constructors have correct arguments
- [ ] The transactions that interacted with the newly deployed contract match the deploy script.
- [ ] Governance proposal matches the deploy script
- [ ] Smoke tests pass after fork test execution of the governance proposal

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.05%. Comparing base (0afd827) to head (1e1f138).

Additional details and impacted files
@@               Coverage Diff               @@
##           nicka/sonic    #2359      +/-   ##
===============================================
- Coverage        54.57%   54.05%   -0.53%     
===============================================
  Files               91       91              
  Lines             4414     4414              
  Branches          1162     1162              
===============================================
- Hits              2409     2386      -23     
- Misses            2002     2025      +23     
  Partials             3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@naddison36 naddison36 changed the base branch from master to nicka/sonic January 22, 2025 05:28
Copy link
Contributor

@clement-ux clement-ux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • All deployed contracts are listed in the deploy PR's description
    • SonicStakingStrategyProxy
    • SonicStakingStrategy
    • WOSonic
  • Deployed contract's verified code (and all dependencies) match the code in master
    • Verified against branch nicka/sonic-deploy-003
    • SonicStakingStrategyProxy
    • SonicStakingStrategy
    • WOSonic
  • Contract constructors have correct arguments
    • SonicStakingStrategyProxy - No constructor
    • SonicStakingStrategy
    • WOSonic
  • The transactions that interacted with the newly deployed contract match the deploy script.
    • Initialize SonicStakingStrategyProxy.
  • Governance proposal matches the deploy script
  • Smoke tests pass after fork test execution of the governance proposal

Diff

SonicStakingStrategyProxy

sol2uml diff 0x596B0401479f6DfE1cAF8c12838311FeE742B95c .,node_modules -n sonic
(node:13144) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "SonicStakingStrategyProxy" contract with address 0x596B0401479f6DfE1cAF8c12838311FeE742B95c on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/SonicProxies.sol

SonicStakingStrategy

sol2uml diff 0x34A505A58aEb350C1b4386E183BD4fCc001B0fd4 .,node_modules -n sonic
(node:13456) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "SonicStakingStrategy" contract with address 0x34A505A58aEb350C1b4386E183BD4fCc001B0fd4 on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/Math.sol
match   @openzeppelin/contracts/utils/math/SafeCast.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/IVault.sol
match   contracts/interfaces/sonic/ISFC.sol
match   contracts/interfaces/sonic/IWrappedSonic.sol
match   contracts/strategies/sonic/SonicStakingStrategy.sol
match   contracts/strategies/sonic/SonicValidatorDelegator.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableAbstractStrategy.sol
match   contracts/vault/VaultStorage.sol

WOSonic

sol2uml diff 0x43d85091cfBD65dE89dC7275e9ed372647Cbf233 .,node_modules -n sonic
(node:13531) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "WOSonic" contract with address 0x43d85091cfBD65dE89dC7275e9ed372647Cbf233 on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/ERC20.sol
match   @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/Context.sol
match   @openzeppelin/contracts/utils/math/SafeCast.sol
match   contracts/governance/Governable.sol
match   contracts/token/OSonic.sol
match   contracts/token/OUSD.sol
match   contracts/token/WOSonic.sol
match   contracts/utils/Initializable.sol
match   lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol
match   lib/openzeppelin/interfaces/IERC4626.sol

@sparrowDom
Copy link
Member

  • All deployed contracts are listed in the deploy PR's description
  • Deployed contract's verified code (and all dependencies) match the code in master
  • Contract constructors have correct arguments
  • The transactions that interacted with the newly deployed contract match the deploy script.
  • Governance proposal matches the deploy script
  • [] Smoke tests pass after fork test execution of the governance proposal
    • a few are failing with "validator not supported" since our test tooling isn't capable of passing proposals yet
npx sol2uml diff 0x596B0401479f6DfE1cAF8c12838311FeE742B95c .,node_modules -n sonic
Compared the "SonicStakingStrategyProxy" contract with address 0x596B0401479f6DfE1cAF8c12838311FeE742B95c on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/SonicProxies.sol

npx sol2uml diff 0x34A505A58aEb350C1b4386E183BD4fCc001B0fd4 .,node_modules -n sonic
Compared the "SonicStakingStrategy" contract with address 0x34A505A58aEb350C1b4386E183BD4fCc001B0fd4 on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/Math.sol
match   @openzeppelin/contracts/utils/math/SafeCast.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/IVault.sol
match   contracts/interfaces/sonic/ISFC.sol
match   contracts/interfaces/sonic/IWrappedSonic.sol
match   contracts/strategies/sonic/SonicStakingStrategy.sol
match   contracts/strategies/sonic/SonicValidatorDelegator.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableAbstractStrategy.sol
match   contracts/vault/VaultStorage.sol

npx sol2uml diff 0x43d85091cfBD65dE89dC7275e9ed372647Cbf233 .,node_modules -n sonic
Compared the "WOSonic" contract with address 0x43d85091cfBD65dE89dC7275e9ed372647Cbf233 on sonic
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/ERC20.sol
match   @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/Context.sol
match   @openzeppelin/contracts/utils/math/SafeCast.sol
match   contracts/governance/Governable.sol
match   contracts/token/OSonic.sol
match   contracts/token/OUSD.sol
match   contracts/token/WOSonic.sol
match   contracts/utils/Initializable.sol
match   lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol
match   lib/openzeppelin/interfaces/IERC4626.sol

@sparrowDom sparrowDom merged commit bdf5f4d into nicka/sonic Jan 22, 2025
10 of 17 checks passed
@sparrowDom sparrowDom deleted the nicka/sonic-delpoy-003 branch January 22, 2025 13:19
sparrowDom added a commit that referenced this pull request Jan 22, 2025
* bumped the deploy script number

* Cap the validators a Native Staking Strategy can hold (#2087)

* Added max validators check to Native Staking Strategy

* don't format Defender Action code in dist folder

* Deployed latest NativeStakingSSVStrategy contract to Holesky

* Fix deployment file

* updated deploy number for OETH withdrawal queue

* Fixed unit tests

* Remove stETH from Vault in OETH Withdrawal Queue deployment is not already done
Skip Lido Withdrawal Strategy tests

* Skipping OETH Vault collateral swaps

* Skipping OETH whale redeem in fork tests
Added OETH whale request withdrawal to fork tests

* Fixed spelling in comments of VaultStorage

* Fail CI if any mainnet fork tests fail

* Continue with fork tests if any fail but still fail the CI job

* increment deploy script number

* restore Github Actions config

* Updated OETHVaultCore comments

* Upgraded OETH Vault on Holesky to include the withdrawal queue

* Added Vault requestWithdrawal andclaimWithdrawal Hardhat tasks
Added Dripper collect and setDripDuration Hardhat tasks

* OETHVaultCore Natspec updates
OETHVaultCore params with an underscore

* Add 30 minute time delay between request and claim from the OETH Withdrawal Queue. (#2127)

* feat: add delay between request and claim.

* test: update test with delay.

* fix: move `CLAIM_DELAY` from `VaultStorage.sol` to `OETHVaultCore.sol`.

* style: require error message start with capital letter.

---------

Co-authored-by: Nicholas Addison <[email protected]>

* fix: test expectRevert with new error message

* Fixed unit tests

* Remove stETH and rETH asset from OETH Vault
Remove legacy strategies from the Vault

* Skip legacy strategy tests

* Skiped legacy Oracle prices

* Skipped Aura price tests

* Remove rETH as an asset from the Vault

* Added call to cacheWETHAssetIndex after stETH is removed from  the Vault

* Updated vault storage diagrams

* Added second native staking strategy as the default for WETH

* Add solvency check. (#2131)

* feat: add solvency check.

* test: add test for solvency check.

* docs: add comments

* test: add more assertions.

* style: run prettier

* test: redeem with fees.

* test: increase coverage.

* test: increase coverage again.

* fix: failing test.

* Fixed claim Natspec now the delay is in place

* Changed console debug in assertUpgradeIsSafe to use logger

* Updated Natspec

* Assert totalValue in withdrawal queue unit tests

* Fixed prettier

* Asset vault checkBalance of WETH to OETH Vault unit tests

* _checkBalance and _totalValue on OETH Vault to protect against insolvency with most users requesting a withdrawal

* Override _totalValueInVault in OETH Vault

* Removed super._totalValue call

* Fix AMO fork tests

* Generated latest OETH Vault diagrams

* Don't account for WETH reserved for withdrawal during allocation (#2138)

* Override allocate method

* Add test

* WIP more unit tests

* Added more unit tests

* Added more withdrawal unit tests

* Fix skipped test

* Add extra test to OETH ARM. (#2139)

* test: add extra fork test for claiming withdraw.

* fix: div by zero on `_postRedeem()`.

* test: add test when vault is insolvent.

* test: when enough WETH in vault to cover exactly withdraw.

* test: when more than enough WETH in vault to cover withdraw.

* fix: reduce delay period between request and claim to 10min. (#2140)

* Refactor OETH Vault's `_allocate()` (#2141)

* Refactor of OETH Vault's _allocate

* Updated allocate test

* Add extra test for OETH Withdraw Queue  (#2142)

* test: add tests for `_allocate()`.

* Override allocate on OETH Vault so _addWithdrawalQueueLiquidity is not called twice on large mints (#2144)

OEH Vault _allocate exits early if no default WETH strategy

* Skip waiting for confirmation on Tenderly testnets

* Fix unit tests

* Add snapVault hardhat task

* Updated insolvency unit tests

* Added more insolvency unit tests

* Fix _totalValue so it handles when vault value is less than the outstanding withdrawal requests

* Added SafeCast to unit128

* Reject redeems and withdrawals if no available assets due to insolvency

* Redeem to no longer try and get liquidity from the default strategy if not enough available WETH in the vault

* Simplify _wethAvailable

* refactor of _claimWithdrawal

* Generated latest OETHVaultCore diagram

* Fix Slither

* Updated the other _wethAvailable function

* Set Vault buffer to 0.2%

* Swapped order in deploy script

* Simplify _totalValue logic

* Moved the burn of OETH lower in the request withdrawal

* Added reentrant protection to addWithdrawalQueueLiquidity

* Refactor _addWithdrawalQueueLiquidity
Removed nonReentrant on addWithdrawalQueueLiquidity for now

* Added vault buffer to snapVault Hardhat task

* M-01 _checkBalance Returns an Incorrect Value During Insolvency (#2166)

* Fix checkBalance bug in new OETHVaultCore (#2162)

* Added unit test for checkBalance when balance is less than the outstanding requests

* Fix _checkBalance so it returns 0 when the amount of WETH in the vault and strategies is less than the outstanding withdrawal requests

* Moved asset check to top of _checkBalance

* simplified _totalValue by calling _checkBalance (#2163)

* Fix vault storage slots (#2167)

* L-03 Missing Docstrings (#2169)

* Added Natspec to VaultStorage

* Added Natspec to VaultCore

* Fixed Natspec on requestWithdrawal (#2170)

* Changed _requestIds param in claimWithdrawals be of type calldata (#2171)

* Remove unnecessary address cast (#2172)

* Updated Natpsec of _checkBalance and _checkBalance (#2173)

* made constant CLAIM_DELAY public (#2174)

* Removed unused MAX_UINT constant (#2175)

* N-08 Variables Are Initialized to Their Default Values (#2176)

* Removed unused MAX_UINT constant

* Removed variables being initialized to their default values

* Generated latest Vault contract diagrams

* initial commit

* WIP Sonic Vault

* Changed Sonic Vault to use OETH Base Vault

* WIP sonic

* WIP sonic

* WIP sonic

* Got unit tests working

* Added sonic to node script

* WIP Sonic deploy script

* Added sonic to storageSlots

* Fix getHardhatNetworkProperties

* Added sonic deployment files

* Added WETH address on Sonic

* Fix Sonic deployment

* Upgraded Hardhat

* More Sonic deployment changes

* More Sonic fixes

* Sonic VaultAdmin override supportAsset as it doesn't have a price provider

* Solidity prettier

* Skipping reborn attack tests now self-destruct has been removed

* fix reborn tests

* re-enable fixed reborn tests

* Added SPC

* fix reborn tests

* Fix Solidity compile

* WIP Sonic Staking Strategy

* Add supported validators to Sonic Staking Strategy

* Added Sonic Staking Strategy to deploy script

* checkBalance now gets stake and pending rewards

* add basic fork tests for Sonic staking

* add correct validator ids

* Added Defender Relayer for Sonic

* Fixed Sonic unit tests
Prettier and linter

* More admin unit tests

* More unit tests

* Update dependencies

* bumped solidity-coverage version

* Added Sonic tests to CI

* Fix deprecation notices
Renamed actions

* Formatting of fork-test.sh script

* Slither fixes

* Removed unit tests to get gas numbers from CI

* Removed redeem from OSonicVault

* Removed unused code from SonicValidatorDelegator

* clean up fork test structure

* improve fork test checks

* add basic withdrawal tests

* prettier

* Fix OSonic unit test deploy after merge with yield delegation

* Added Fixed Rate Dripper for Sonic

* Fixed base unit tests after
Fix upgrade script of OETHBase

* Added Sonic Zapper

* Added Sonic contract dependency diagram

* add withdrawal fork tests

* add restaking test

* add withdrawal timestamp to the withdrawal struct

* Updated Sonic token metadata

* prettier

* Update Natspec
Added governor transfer unit tests

* Added VaultValueChecker to Sonic deploy script

* Added phase 2 contracts to Sonic contract dependencies

* Generated Sonic contract diagrams
Updated existing OToken diagrams after Yield Delegation

* Added Sonic fork tests for Zapper

* Reduced depositedWSAccountedFor when delegating or withdrawing from the Sonic Staking Strategy

* Generated latest SonicStakingStrategy

* Added Sonic Vault config to deploy script

* Added TODO in Sonic addresses

* Added Sonic Vault fork tests
Added missing Vault config to Sonic deploy script
Sonic Staking Strategy governor fixed in deploy script

* remove the depositedWSAccountedFor

* automatically delegate on deposit transaction & add strategist allowance to undelegate

* add donation attack comment and pick up any S tokens in the withdrawAll

* Prettier

* Cleaned up imports
Updated __gap after adding defaultValidatorId

* Fix Slither

* Updated Natspec

* Removed Deposit event from restakeRewards

* Fix Natspec

* Fix fork tests after removing Deposit event from restakeRewards
More Natspec updated

* Added deposit and withdraw fork tests for sonic staking strategy

* Added more Sonic fork tests

* Generated latest Sonic Strategy diagrams

* update the solc version to re-enable harhdat tracer

* Added Sonic Admin and Guardian wallets

* Added logger to Sonic staking fork tests

* update the compiler version to 0.8.28

* Prettier

(cherry picked from commit fe45bce)

* Added Timelock to Sonic deploy script

(cherry picked from commit 2c3e2e4)

* deployOnSonic now handles Timelock governance
Split Sonic deploy up into vault/tokens and sonic staking strategy

(cherry picked from commit d57fd0c)

* cleaner max int

* remove unused variable

* simplify casting

* remove secondary 0 amount check

* gas optimisation

* fix incorrect type

* Sonic Deploy 001 - Token and Vault  (#2352)

* fix incorrect type

* update hardhat-verify to support sonic chain verifications

* add descriptors of sonic 001 deploy

* remove trustee address and feeBps setting

* Prettier

---------

Co-authored-by: Domen Grabec <[email protected]>

* add oracle router deployment (#2353)

* add oracle router deployment

* Renamed Router to be consistent with other Sonic contracts

* Added oracle router to Sonic contract diagram

---------

Co-authored-by: Nicholas Addison <[email protected]>

* Revert change to MAX_INT in VaultCore

* Changed withConfirmation it ignore confirmations to Sonic and Base Tenderly Testnets

* change max int notation

* Correct chainId when generating Gnosis file

(cherry picked from commit 27b4e82)

* create a separate contract for OSonicOracleRouter

* Hardhat tasks working with Sonic (#2357)

* Made depositWETH work with Sonic

* HH tasks allocate, capital, rebase, mint, requestWithdrawal, claimWithdrawal and  and snapVault working with Sonic

* correct comment

* correct comment

* allow restaking only of the supported validators

* add SonicOracleRouter deployment files (#2355)

* add the ability to claim rewards without restaking them

* emit Withdrawal event when funds withdrawn from the strategy

* simplify ACL

* Store contract state before executing external calls

* automatically undelegate when unsupporting a validator

* remove comment

* remove slither disables

* add test for confirming rewards being restaked

* emit withdrawal event when collecting rewards

* Sonic 003 deploy script changed to config vault and upgrade Wrapped OS token

* remove the non required is validator supported check

* add test for depositAll

* add some missing tests

* add test for not receiving sonic

* add comment

* add trustee address to the deploy script

* correct local variable names

* Sonic Deploy 003 - Sonic Staking Strategy (#2359)

* Added setAssetDefaultStrategy to Sonic deploy 003 script

* Added setDefaultValidator Hardhat task

* Fixed Sonic fork tests now mints are auto allocating to the Sonic Staking Strategy

* Sonic deploy 003 contracts

---------

Co-authored-by: Shahul Hameed <[email protected]>
Co-authored-by: Clément <[email protected]>
Co-authored-by: clement-ux <[email protected]>
Co-authored-by: Domen Grabec <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants