From 0c1c931a3246a7d9f676350259e18e3a71588ca3 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 12:52:02 +0300 Subject: [PATCH 1/8] add integration guide and fix stale eth-core URLs --- docs/contracts/api/base/ERC20Upgradeable.md | 2 +- docs/contracts/api/base/Multicall.md | 2 +- .../contracts/api/curators/BalancedCurator.md | 2 +- .../api/curators/CuratorsRegistry.md | 2 +- docs/contracts/api/keeper/KeeperContract.md | 2 +- docs/contracts/api/keeper/KeeperOracles.md | 2 +- docs/contracts/api/keeper/KeeperRewards.md | 2 +- docs/contracts/api/keeper/KeeperValidators.md | 2 +- docs/contracts/api/libraries/EIP712Utils.md | 2 +- docs/contracts/api/libraries/Errors.md | 2 +- docs/contracts/api/libraries/ExitQueue.md | 2 +- docs/contracts/api/libraries/OsTokenUtils.md | 2 +- .../contracts/api/libraries/ValidatorUtils.md | 2 +- docs/contracts/api/misc/EthRewardSplitter.md | 2 +- docs/contracts/api/misc/GnoRewardSplitter.md | 2 +- docs/contracts/api/misc/RewardSplitter.md | 2 +- .../api/misc/RewardSplitterFactory.md | 2 +- .../api/tokens/EthOsTokenRedeemer.md | 2 +- .../api/tokens/EthOsTokenVaultEscrow.md | 2 +- .../api/tokens/GnoOsTokenRedeemer.md | 2 +- .../api/tokens/GnoOsTokenVaultEscrow.md | 2 +- docs/contracts/api/tokens/OsToken.md | 2 +- docs/contracts/api/tokens/OsTokenConfig.md | 2 +- .../contracts/api/tokens/OsTokenFlashLoans.md | 2 +- docs/contracts/api/tokens/OsTokenRedeemer.md | 2 +- .../api/tokens/OsTokenVaultController.md | 2 +- .../api/tokens/OsTokenVaultEscrow.md | 2 +- docs/contracts/api/tokens/PriceFeed.md | 2 +- .../api/validators/ConsolidationsChecker.md | 2 +- .../api/validators/DepositDataRegistry.md | 2 +- .../api/validators/EthValidatorsChecker.md | 2 +- .../api/validators/GnoValidatorsChecker.md | 2 +- .../api/validators/ValidatorsChecker.md | 2 +- docs/contracts/api/vaults/VaultsRegistry.md | 2 +- .../vaults/ethereum/EthBlocklistErc20Vault.md | 2 +- .../api/vaults/ethereum/EthBlocklistVault.md | 2 +- .../api/vaults/ethereum/EthErc20Vault.md | 2 +- .../api/vaults/ethereum/EthGenesisVault.md | 2 +- .../api/vaults/ethereum/EthPrivErc20Vault.md | 2 +- .../api/vaults/ethereum/EthPrivVault.md | 2 +- .../contracts/api/vaults/ethereum/EthVault.md | 2 +- .../api/vaults/ethereum/EthVaultFactory.md | 2 +- .../api/vaults/ethereum/custom/EthFoxVault.md | 2 +- .../vaults/ethereum/custom/EthMetaVault.md | 2 +- .../ethereum/custom/EthMetaVaultFactory.md | 2 +- .../api/vaults/ethereum/mev/OwnMevEscrow.md | 2 +- .../vaults/ethereum/mev/SharedMevEscrow.md | 2 +- .../vaults/gnosis/GnoBlocklistErc20Vault.md | 2 +- .../api/vaults/gnosis/GnoBlocklistVault.md | 2 +- .../api/vaults/gnosis/GnoErc20Vault.md | 2 +- .../api/vaults/gnosis/GnoGenesisVault.md | 2 +- .../api/vaults/gnosis/GnoPrivErc20Vault.md | 2 +- .../api/vaults/gnosis/GnoPrivVault.md | 2 +- docs/contracts/api/vaults/gnosis/GnoVault.md | 2 +- .../api/vaults/gnosis/GnoVaultFactory.md | 2 +- .../api/vaults/modules/VaultAdmin.md | 2 +- .../api/vaults/modules/VaultBlocklist.md | 2 +- .../api/vaults/modules/VaultEnterExit.md | 2 +- .../api/vaults/modules/VaultEthStaking.md | 2 +- docs/contracts/api/vaults/modules/VaultFee.md | 2 +- .../api/vaults/modules/VaultGnoStaking.md | 2 +- .../api/vaults/modules/VaultImmutables.md | 2 +- docs/contracts/api/vaults/modules/VaultMev.md | 2 +- .../api/vaults/modules/VaultOsToken.md | 2 +- .../api/vaults/modules/VaultState.md | 2 +- .../api/vaults/modules/VaultSubVaults.md | 2 +- .../api/vaults/modules/VaultToken.md | 2 +- .../api/vaults/modules/VaultValidators.md | 2 +- .../api/vaults/modules/VaultVersion.md | 2 +- .../api/vaults/modules/VaultWhitelist.md | 2 +- docs/docs/integration.mdx | 153 ++++++++++++++++++ sidebars.ts | 1 + static/context7.json | 13 +- 73 files changed, 229 insertions(+), 78 deletions(-) create mode 100644 docs/docs/integration.mdx diff --git a/docs/contracts/api/base/ERC20Upgradeable.md b/docs/contracts/api/base/ERC20Upgradeable.md index 15c79ad0..84582bc7 100644 --- a/docs/contracts/api/base/ERC20Upgradeable.md +++ b/docs/contracts/api/base/ERC20Upgradeable.md @@ -6,7 +6,7 @@ description: "Modern and gas-efficient upgradeable ERC20 token implementation wi # ERC20Upgradeable -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/base/ERC20Upgradeable.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/base/ERC20Upgradeable.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [IERC20Permit ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Permit.sol), [IERC20 ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol), [IERC20Metadata ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol) diff --git a/docs/contracts/api/base/Multicall.md b/docs/contracts/api/base/Multicall.md index 1b1997e9..f4d1d070 100644 --- a/docs/contracts/api/base/Multicall.md +++ b/docs/contracts/api/base/Multicall.md @@ -6,7 +6,7 @@ description: "Utility contract for batching multiple function calls into a singl # Multicall -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/base/Multicall.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/base/Multicall.sol) **Inherits:** IMulticall diff --git a/docs/contracts/api/curators/BalancedCurator.md b/docs/contracts/api/curators/BalancedCurator.md index cfd6bb91..2d672f80 100644 --- a/docs/contracts/api/curators/BalancedCurator.md +++ b/docs/contracts/api/curators/BalancedCurator.md @@ -6,7 +6,7 @@ description: "Curator for evenly managing assets in sub-vaults" # BalancedCurator -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/curators/BalancedCurator.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/curators/BalancedCurator.sol) **Inherits:** ISubVaultsCurator diff --git a/docs/contracts/api/curators/CuratorsRegistry.md b/docs/contracts/api/curators/CuratorsRegistry.md index 76164c3a..ec35182f 100644 --- a/docs/contracts/api/curators/CuratorsRegistry.md +++ b/docs/contracts/api/curators/CuratorsRegistry.md @@ -6,7 +6,7 @@ description: "Registry for managing curator addresses for sub-vaults" # CuratorsRegistry -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/curators/CuratorsRegistry.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/curators/CuratorsRegistry.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), ICuratorsRegistry diff --git a/docs/contracts/api/keeper/KeeperContract.md b/docs/contracts/api/keeper/KeeperContract.md index 9f12ce13..557fe954 100644 --- a/docs/contracts/api/keeper/KeeperContract.md +++ b/docs/contracts/api/keeper/KeeperContract.md @@ -6,7 +6,7 @@ description: "Oracle system for updating Vault rewards and approving validator r # Keeper -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/Keeper.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/Keeper.sol) **Inherits:** [KeeperOracles →](./KeeperOracles), [KeeperRewards →](./KeeperRewards), [KeeperValidators →](./KeeperValidators), IKeeper diff --git a/docs/contracts/api/keeper/KeeperOracles.md b/docs/contracts/api/keeper/KeeperOracles.md index 1b1f66b6..25b5e450 100644 --- a/docs/contracts/api/keeper/KeeperOracles.md +++ b/docs/contracts/api/keeper/KeeperOracles.md @@ -6,7 +6,7 @@ description: "Oracle signature verification system for off-chain oracle whitelis # KeeperOracles -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperOracles.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperOracles.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), [EIP712 ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol), IKeeperOracles diff --git a/docs/contracts/api/keeper/KeeperRewards.md b/docs/contracts/api/keeper/KeeperRewards.md index 088910f8..32464200 100644 --- a/docs/contracts/api/keeper/KeeperRewards.md +++ b/docs/contracts/api/keeper/KeeperRewards.md @@ -6,7 +6,7 @@ description: "Rewards management system for updating Vault and osToken rewards" # KeeperRewards -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperRewards.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperRewards.sol) **Inherits:** [KeeperOracles →](./KeeperOracles), IKeeperRewards diff --git a/docs/contracts/api/keeper/KeeperValidators.md b/docs/contracts/api/keeper/KeeperValidators.md index ae163d03..d39a3892 100644 --- a/docs/contracts/api/keeper/KeeperValidators.md +++ b/docs/contracts/api/keeper/KeeperValidators.md @@ -6,7 +6,7 @@ description: "Validator registration approval and exit signature management syst # KeeperValidators -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperValidators.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/keeper/KeeperValidators.sol) **Inherits:** [KeeperOracles →](./KeeperOracles), [KeeperRewards →](./KeeperRewards), IKeeperValidators diff --git a/docs/contracts/api/libraries/EIP712Utils.md b/docs/contracts/api/libraries/EIP712Utils.md index 4b2e5f7e..6152d9bf 100644 --- a/docs/contracts/api/libraries/EIP712Utils.md +++ b/docs/contracts/api/libraries/EIP712Utils.md @@ -6,7 +6,7 @@ description: "Utility library for calculating EIP712 typed data hashes" # EIP712Utils -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/EIP712Utils.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/EIP712Utils.sol) Includes functionality for calculating [EIP712 ↗](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) hashes. diff --git a/docs/contracts/api/libraries/Errors.md b/docs/contracts/api/libraries/Errors.md index 8611df23..fe2ce7ea 100644 --- a/docs/contracts/api/libraries/Errors.md +++ b/docs/contracts/api/libraries/Errors.md @@ -6,7 +6,7 @@ description: "Custom error definitions used across contracts" # Errors -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/Errors.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/Errors.sol) Contains all the custom errors. diff --git a/docs/contracts/api/libraries/ExitQueue.md b/docs/contracts/api/libraries/ExitQueue.md index ca94b8f2..9561503c 100644 --- a/docs/contracts/api/libraries/ExitQueue.md +++ b/docs/contracts/api/libraries/ExitQueue.md @@ -6,7 +6,7 @@ description: "Library for managing exit queue checkpoints of burned shares and e # ExitQueue -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/ExitQueue.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/ExitQueue.sol) ExitQueue represent checkpoints of burned shares and exited assets. diff --git a/docs/contracts/api/libraries/OsTokenUtils.md b/docs/contracts/api/libraries/OsTokenUtils.md index 2ffa22cd..ec3ea417 100644 --- a/docs/contracts/api/libraries/OsTokenUtils.md +++ b/docs/contracts/api/libraries/OsTokenUtils.md @@ -6,7 +6,7 @@ description: "Utility library for handling osToken redemption calculations" # OsTokenUtils -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/OsTokenUtils.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/OsTokenUtils.sol) Includes functionality for handling osToken redemptions. diff --git a/docs/contracts/api/libraries/ValidatorUtils.md b/docs/contracts/api/libraries/ValidatorUtils.md index ae0c36ef..a5c1c63c 100644 --- a/docs/contracts/api/libraries/ValidatorUtils.md +++ b/docs/contracts/api/libraries/ValidatorUtils.md @@ -6,7 +6,7 @@ description: "Utility library for managing validator operations and deposits" # ValidatorUtils -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/ValidatorUtils.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/libraries/ValidatorUtils.sol) Includes functionality for managing the validators. diff --git a/docs/contracts/api/misc/EthRewardSplitter.md b/docs/contracts/api/misc/EthRewardSplitter.md index 5e41a55e..d1ad4d8c 100644 --- a/docs/contracts/api/misc/EthRewardSplitter.md +++ b/docs/contracts/api/misc/EthRewardSplitter.md @@ -6,7 +6,7 @@ description: "Ethereum-specific implementation of RewardSplitter for distributin # EthRewardSplitter -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/EthRewardSplitter.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/EthRewardSplitter.sol) **Inherits:** [ReentrancyGuardUpgradeable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/utils/ReentrancyGuardUpgradeable.sol), [RewardSplitter →](./RewardSplitter) diff --git a/docs/contracts/api/misc/GnoRewardSplitter.md b/docs/contracts/api/misc/GnoRewardSplitter.md index 8b357cbb..82edb018 100644 --- a/docs/contracts/api/misc/GnoRewardSplitter.md +++ b/docs/contracts/api/misc/GnoRewardSplitter.md @@ -6,7 +6,7 @@ description: "Gnosis-specific implementation of RewardSplitter for distributing # GnoRewardSplitter -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/GnoRewardSplitter.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/GnoRewardSplitter.sol) **Inherits:** [RewardSplitter →](./RewardSplitter) diff --git a/docs/contracts/api/misc/RewardSplitter.md b/docs/contracts/api/misc/RewardSplitter.md index 90f2109b..c58fe0c1 100644 --- a/docs/contracts/api/misc/RewardSplitter.md +++ b/docs/contracts/api/misc/RewardSplitter.md @@ -6,7 +6,7 @@ description: "Abstract contract for splitting vault rewards among shareholders b # RewardSplitter -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/RewardSplitter.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/RewardSplitter.sol) **Inherits:** IRewardSplitter, [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [Multicall →](../base/Multicall) diff --git a/docs/contracts/api/misc/RewardSplitterFactory.md b/docs/contracts/api/misc/RewardSplitterFactory.md index dfef9fd5..6f90cd33 100644 --- a/docs/contracts/api/misc/RewardSplitterFactory.md +++ b/docs/contracts/api/misc/RewardSplitterFactory.md @@ -6,7 +6,7 @@ description: "Factory contract for deploying RewardSplitter proxies" # RewardSplitterFactory -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/RewardSplitterFactory.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/misc/RewardSplitterFactory.sol) **Inherits:** IRewardSplitterFactory diff --git a/docs/contracts/api/tokens/EthOsTokenRedeemer.md b/docs/contracts/api/tokens/EthOsTokenRedeemer.md index b0a1711e..847a15a2 100644 --- a/docs/contracts/api/tokens/EthOsTokenRedeemer.md +++ b/docs/contracts/api/tokens/EthOsTokenRedeemer.md @@ -6,7 +6,7 @@ description: "Ethereum-specific contract for redeeming osTokens for ETH" # EthOsTokenRedeemer -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/EthOsTokenRedeemer.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/EthOsTokenRedeemer.sol) **Inherits:** IEthOsTokenRedeemer, [ReentrancyGuard ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol), [OsTokenRedeemer →](./OsTokenRedeemer) diff --git a/docs/contracts/api/tokens/EthOsTokenVaultEscrow.md b/docs/contracts/api/tokens/EthOsTokenVaultEscrow.md index ffa0de7c..0564cf20 100644 --- a/docs/contracts/api/tokens/EthOsTokenVaultEscrow.md +++ b/docs/contracts/api/tokens/EthOsTokenVaultEscrow.md @@ -6,7 +6,7 @@ description: "Contract for initiating assets exits from the vault without burnin # EthOsTokenVaultEscrow -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/EthOsTokenVaultEscrow.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/EthOsTokenVaultEscrow.sol) **Inherits:** [ReentrancyGuard ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol), [OsTokenVaultEscrow →](./OsTokenVaultEscrow) diff --git a/docs/contracts/api/tokens/GnoOsTokenRedeemer.md b/docs/contracts/api/tokens/GnoOsTokenRedeemer.md index 43a615ac..46446ec0 100644 --- a/docs/contracts/api/tokens/GnoOsTokenRedeemer.md +++ b/docs/contracts/api/tokens/GnoOsTokenRedeemer.md @@ -6,7 +6,7 @@ description: "Gnosis-specific contract for redeeming osTokens for GNO" # GnoOsTokenRedeemer -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/GnoOsTokenRedeemer.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/GnoOsTokenRedeemer.sol) **Inherits:** IGnoOsTokenRedeemer, [OsTokenRedeemer →](./OsTokenRedeemer) diff --git a/docs/contracts/api/tokens/GnoOsTokenVaultEscrow.md b/docs/contracts/api/tokens/GnoOsTokenVaultEscrow.md index 281d3efd..77b140a8 100644 --- a/docs/contracts/api/tokens/GnoOsTokenVaultEscrow.md +++ b/docs/contracts/api/tokens/GnoOsTokenVaultEscrow.md @@ -6,7 +6,7 @@ description: "Contract for initiating assets exits from the vault without burnin # GnoOsTokenVaultEscrow -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/GnoOsTokenVaultEscrow.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/GnoOsTokenVaultEscrow.sol) **Inherits:** [OsTokenVaultEscrow →](./OsTokenVaultEscrow) diff --git a/docs/contracts/api/tokens/OsToken.md b/docs/contracts/api/tokens/OsToken.md index 2ef69d76..d27c3361 100644 --- a/docs/contracts/api/tokens/OsToken.md +++ b/docs/contracts/api/tokens/OsToken.md @@ -6,7 +6,7 @@ description: "Over-collateralized staked token with controller-based minting and # OsToken -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsToken.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsToken.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), [ERC20Permit ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Permit.sol), IOsToken diff --git a/docs/contracts/api/tokens/OsTokenConfig.md b/docs/contracts/api/tokens/OsTokenConfig.md index 33cefe40..0fba8bf0 100644 --- a/docs/contracts/api/tokens/OsTokenConfig.md +++ b/docs/contracts/api/tokens/OsTokenConfig.md @@ -6,7 +6,7 @@ description: "Configuration contract for OsToken minting and liquidation paramet # OsTokenConfig -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenConfig.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenConfig.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), IOsTokenConfig diff --git a/docs/contracts/api/tokens/OsTokenFlashLoans.md b/docs/contracts/api/tokens/OsTokenFlashLoans.md index 2b80170b..4c0928a2 100644 --- a/docs/contracts/api/tokens/OsTokenFlashLoans.md +++ b/docs/contracts/api/tokens/OsTokenFlashLoans.md @@ -6,7 +6,7 @@ description: "Flash loan contract for borrowing up to 100,000 osToken shares in # OsTokenFlashLoans -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenFlashLoans.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenFlashLoans.sol) **Inherits:** [ReentrancyGuard ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuard.sol), IOsTokenFlashLoans diff --git a/docs/contracts/api/tokens/OsTokenRedeemer.md b/docs/contracts/api/tokens/OsTokenRedeemer.md index 8591c823..9c7aab3a 100644 --- a/docs/contracts/api/tokens/OsTokenRedeemer.md +++ b/docs/contracts/api/tokens/OsTokenRedeemer.md @@ -6,7 +6,7 @@ description: "Abstract contract for redeeming osTokens through exit queue or dir # OsTokenRedeemer -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenRedeemer.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenRedeemer.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), [Multicall →](../base/Multicall), IOsTokenRedeemer diff --git a/docs/contracts/api/tokens/OsTokenVaultController.md b/docs/contracts/api/tokens/OsTokenVaultController.md index c36bc648..6957201c 100644 --- a/docs/contracts/api/tokens/OsTokenVaultController.md +++ b/docs/contracts/api/tokens/OsTokenVaultController.md @@ -6,7 +6,7 @@ description: "Controller contract for managing osToken minting, burning, and rew # OsTokenVaultController -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenVaultController.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenVaultController.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), IOsTokenVaultController diff --git a/docs/contracts/api/tokens/OsTokenVaultEscrow.md b/docs/contracts/api/tokens/OsTokenVaultEscrow.md index c99cc6e4..6ca3ce1c 100644 --- a/docs/contracts/api/tokens/OsTokenVaultEscrow.md +++ b/docs/contracts/api/tokens/OsTokenVaultEscrow.md @@ -6,7 +6,7 @@ description: "Abstract contract for initiating assets exits from the vault witho # OsTokenVaultEscrow -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenVaultEscrow.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/OsTokenVaultEscrow.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), [Multicall →](../base/Multicall), IOsTokenVaultEscrow diff --git a/docs/contracts/api/tokens/PriceFeed.md b/docs/contracts/api/tokens/PriceFeed.md index 1cf56055..7c040568 100644 --- a/docs/contracts/api/tokens/PriceFeed.md +++ b/docs/contracts/api/tokens/PriceFeed.md @@ -6,7 +6,7 @@ description: "Price feed oracle for osToken compatible with Balancer and Chainli # PriceFeed -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/PriceFeed.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/tokens/PriceFeed.sol) **Inherits:** IBalancerRateProvider, IChainlinkAggregator, IChainlinkV3Aggregator diff --git a/docs/contracts/api/validators/ConsolidationsChecker.md b/docs/contracts/api/validators/ConsolidationsChecker.md index f2b1d2b3..5a636a7b 100644 --- a/docs/contracts/api/validators/ConsolidationsChecker.md +++ b/docs/contracts/api/validators/ConsolidationsChecker.md @@ -6,7 +6,7 @@ description: "Contract for checking signatures of oracles for validators consoli # ConsolidationsChecker -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/ConsolidationsChecker.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/ConsolidationsChecker.sol) **Inherits:** [EIP712 ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/EIP712.sol), IConsolidationsChecker diff --git a/docs/contracts/api/validators/DepositDataRegistry.md b/docs/contracts/api/validators/DepositDataRegistry.md index ce148b81..eb639efa 100644 --- a/docs/contracts/api/validators/DepositDataRegistry.md +++ b/docs/contracts/api/validators/DepositDataRegistry.md @@ -6,7 +6,7 @@ description: "Contract for managing Vault's deposit data and validator registrat # DepositDataRegistry -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/DepositDataRegistry.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/DepositDataRegistry.sol) **Inherits:** [Multicall →](../base/Multicall), IDepositDataRegistry diff --git a/docs/contracts/api/validators/EthValidatorsChecker.md b/docs/contracts/api/validators/EthValidatorsChecker.md index 62e0256a..5e5dca2e 100644 --- a/docs/contracts/api/validators/EthValidatorsChecker.md +++ b/docs/contracts/api/validators/EthValidatorsChecker.md @@ -6,7 +6,7 @@ description: "Contract for checking validators registration on Ethereum" # EthValidatorsChecker -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/EthValidatorsChecker.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/EthValidatorsChecker.sol) **Inherits:** [ValidatorsChecker →](./ValidatorsChecker) diff --git a/docs/contracts/api/validators/GnoValidatorsChecker.md b/docs/contracts/api/validators/GnoValidatorsChecker.md index b97ea6d3..da9bbe7a 100644 --- a/docs/contracts/api/validators/GnoValidatorsChecker.md +++ b/docs/contracts/api/validators/GnoValidatorsChecker.md @@ -6,7 +6,7 @@ description: "Contract for checking validators registration on Gnosis" # GnoValidatorsChecker -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/GnoValidatorsChecker.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/GnoValidatorsChecker.sol) **Inherits:** [ValidatorsChecker →](./ValidatorsChecker) diff --git a/docs/contracts/api/validators/ValidatorsChecker.md b/docs/contracts/api/validators/ValidatorsChecker.md index dcc86c4d..4828d44a 100644 --- a/docs/contracts/api/validators/ValidatorsChecker.md +++ b/docs/contracts/api/validators/ValidatorsChecker.md @@ -6,7 +6,7 @@ description: "Abstract contract for checking validators manager signature and de # ValidatorsChecker -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/ValidatorsChecker.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/validators/ValidatorsChecker.sol) **Inherits:** [Multicall →](../base/Multicall), IValidatorsChecker diff --git a/docs/contracts/api/vaults/VaultsRegistry.md b/docs/contracts/api/vaults/VaultsRegistry.md index c52bd334..50da4f04 100644 --- a/docs/contracts/api/vaults/VaultsRegistry.md +++ b/docs/contracts/api/vaults/VaultsRegistry.md @@ -4,7 +4,7 @@ description: VaultsRegistry contract API reference for tracking StakeWise vaults --- # VaultsRegistry -[Git Source](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/VaultsRegistry.sol) +[Git Source](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/VaultsRegistry.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), IVaultsRegistry diff --git a/docs/contracts/api/vaults/ethereum/EthBlocklistErc20Vault.md b/docs/contracts/api/vaults/ethereum/EthBlocklistErc20Vault.md index 7f1b213e..db902ed9 100644 --- a/docs/contracts/api/vaults/ethereum/EthBlocklistErc20Vault.md +++ b/docs/contracts/api/vaults/ethereum/EthBlocklistErc20Vault.md @@ -6,7 +6,7 @@ description: "Ethereum staking vault with ERC-20 token and blocklist functionali # EthBlocklistErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthBlocklistErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthBlocklistErc20Vault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [EthErc20Vault →](./EthErc20Vault), [VaultBlocklist →](../modules/VaultBlocklist), IEthBlocklistErc20Vault diff --git a/docs/contracts/api/vaults/ethereum/EthBlocklistVault.md b/docs/contracts/api/vaults/ethereum/EthBlocklistVault.md index 5d07adb3..da257646 100644 --- a/docs/contracts/api/vaults/ethereum/EthBlocklistVault.md +++ b/docs/contracts/api/vaults/ethereum/EthBlocklistVault.md @@ -6,7 +6,7 @@ description: "Ethereum staking vault with blocklist functionality" # EthBlocklistVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthBlocklistVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthBlocklistVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [EthVault →](./EthVault), [VaultBlocklist →](../modules/VaultBlocklist), IEthBlocklistVault diff --git a/docs/contracts/api/vaults/ethereum/EthErc20Vault.md b/docs/contracts/api/vaults/ethereum/EthErc20Vault.md index 2458c343..0b6c9947 100644 --- a/docs/contracts/api/vaults/ethereum/EthErc20Vault.md +++ b/docs/contracts/api/vaults/ethereum/EthErc20Vault.md @@ -6,7 +6,7 @@ description: "Ethereum staking vault with ERC-20 token functionality" # EthErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthErc20Vault.sol) **Inherits:** [VaultImmutables →](../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../modules/VaultAdmin), [VaultVersion →](../modules/VaultVersion), [VaultFee →](../modules/VaultFee), [VaultState →](../modules/VaultState), [VaultValidators →](../modules/VaultValidators), [VaultEnterExit →](../modules/VaultEnterExit), [VaultOsToken →](../modules/VaultOsToken), [VaultMev →](../modules/VaultMev), [VaultToken →](../modules/VaultToken), [VaultEthStaking →](../modules/VaultEthStaking), [Multicall →](../../base/Multicall), IEthErc20Vault diff --git a/docs/contracts/api/vaults/ethereum/EthGenesisVault.md b/docs/contracts/api/vaults/ethereum/EthGenesisVault.md index 74846aff..51614ce5 100644 --- a/docs/contracts/api/vaults/ethereum/EthGenesisVault.md +++ b/docs/contracts/api/vaults/ethereum/EthGenesisVault.md @@ -6,7 +6,7 @@ description: "Genesis vault for Ethereum staking migrated from StakeWise Legacy" # EthGenesisVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthGenesisVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthGenesisVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [EthVault →](./EthVault), IEthGenesisVault diff --git a/docs/contracts/api/vaults/ethereum/EthPrivErc20Vault.md b/docs/contracts/api/vaults/ethereum/EthPrivErc20Vault.md index 05211712..69a8a61d 100644 --- a/docs/contracts/api/vaults/ethereum/EthPrivErc20Vault.md +++ b/docs/contracts/api/vaults/ethereum/EthPrivErc20Vault.md @@ -6,7 +6,7 @@ description: "Ethereum staking vault with ERC-20 token and whitelist functionali # EthPrivErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthPrivErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthPrivErc20Vault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [EthErc20Vault →](./EthErc20Vault), [VaultWhitelist →](../modules/VaultWhitelist), IEthPrivErc20Vault diff --git a/docs/contracts/api/vaults/ethereum/EthPrivVault.md b/docs/contracts/api/vaults/ethereum/EthPrivVault.md index 6e3a7702..8d5f9d1f 100644 --- a/docs/contracts/api/vaults/ethereum/EthPrivVault.md +++ b/docs/contracts/api/vaults/ethereum/EthPrivVault.md @@ -6,7 +6,7 @@ description: "Ethereum staking vault with whitelist functionality" # EthPrivVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthPrivVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthPrivVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [EthVault →](./EthVault), [VaultWhitelist →](../modules/VaultWhitelist), IEthPrivVault diff --git a/docs/contracts/api/vaults/ethereum/EthVault.md b/docs/contracts/api/vaults/ethereum/EthVault.md index 8de3d167..18268707 100644 --- a/docs/contracts/api/vaults/ethereum/EthVault.md +++ b/docs/contracts/api/vaults/ethereum/EthVault.md @@ -6,7 +6,7 @@ description: "Core Ethereum staking vault implementation" # EthVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthVault.sol) **Inherits:** [VaultImmutables →](../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../modules/VaultAdmin), [VaultVersion →](../modules/VaultVersion), [VaultFee →](../modules/VaultFee), [VaultState →](../modules/VaultState), [VaultValidators →](../modules/VaultValidators), [VaultEnterExit →](../modules/VaultEnterExit), [VaultOsToken →](../modules/VaultOsToken), [VaultMev →](../modules/VaultMev), [VaultEthStaking →](../modules/VaultEthStaking), [Multicall →](../../base/Multicall), IEthVault diff --git a/docs/contracts/api/vaults/ethereum/EthVaultFactory.md b/docs/contracts/api/vaults/ethereum/EthVaultFactory.md index 0a95e815..3a19800a 100644 --- a/docs/contracts/api/vaults/ethereum/EthVaultFactory.md +++ b/docs/contracts/api/vaults/ethereum/EthVaultFactory.md @@ -6,7 +6,7 @@ description: "Factory for deploying Ethereum staking vaults" # EthVaultFactory -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthVaultFactory.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/EthVaultFactory.sol) **Inherits:** IEthVaultFactory diff --git a/docs/contracts/api/vaults/ethereum/custom/EthFoxVault.md b/docs/contracts/api/vaults/ethereum/custom/EthFoxVault.md index eb92ca52..1ae10353 100644 --- a/docs/contracts/api/vaults/ethereum/custom/EthFoxVault.md +++ b/docs/contracts/api/vaults/ethereum/custom/EthFoxVault.md @@ -6,7 +6,7 @@ description: "Custom Ethereum non-ERC20 vault with blocklist, own MEV and withou # EthFoxVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthFoxVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthFoxVault.sol) **Inherits:** [VaultImmutables →](../../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../../modules/VaultAdmin), [VaultVersion →](../../modules/VaultVersion), [VaultFee →](../../modules/VaultFee), [VaultState →](../../modules/VaultState), [VaultValidators →](../../modules/VaultValidators), [VaultEnterExit →](../../modules/VaultEnterExit), [VaultMev →](../../modules/VaultMev), [VaultEthStaking →](../../modules/VaultEthStaking), [VaultBlocklist →](../../modules/VaultBlocklist), [Multicall →](../../../base/Multicall), IEthFoxVault diff --git a/docs/contracts/api/vaults/ethereum/custom/EthMetaVault.md b/docs/contracts/api/vaults/ethereum/custom/EthMetaVault.md index d9e8fe2f..c8820adb 100644 --- a/docs/contracts/api/vaults/ethereum/custom/EthMetaVault.md +++ b/docs/contracts/api/vaults/ethereum/custom/EthMetaVault.md @@ -6,7 +6,7 @@ description: "Meta vault that delegates stake to sub-vaults on Ethereum" # EthMetaVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthMetaVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthMetaVault.sol) **Inherits:** [VaultImmutables →](../../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../../modules/VaultAdmin), [VaultVersion →](../../modules/VaultVersion), [VaultFee →](../../modules/VaultFee), [VaultState →](../../modules/VaultState), [VaultEnterExit →](../../modules/VaultEnterExit), [VaultOsToken →](../../modules/VaultOsToken), [VaultSubVaults →](../../modules/VaultSubVaults), [Multicall →](../../../base/Multicall), IEthMetaVault diff --git a/docs/contracts/api/vaults/ethereum/custom/EthMetaVaultFactory.md b/docs/contracts/api/vaults/ethereum/custom/EthMetaVaultFactory.md index 64cdc795..adda5574 100644 --- a/docs/contracts/api/vaults/ethereum/custom/EthMetaVaultFactory.md +++ b/docs/contracts/api/vaults/ethereum/custom/EthMetaVaultFactory.md @@ -6,7 +6,7 @@ description: "Factory for deploying Ethereum meta vaults" # EthMetaVaultFactory -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthMetaVaultFactory.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/custom/EthMetaVaultFactory.sol) **Inherits:** [Ownable2Step ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol), IEthMetaVaultFactory diff --git a/docs/contracts/api/vaults/ethereum/mev/OwnMevEscrow.md b/docs/contracts/api/vaults/ethereum/mev/OwnMevEscrow.md index 0801eb33..a15e1c1d 100644 --- a/docs/contracts/api/vaults/ethereum/mev/OwnMevEscrow.md +++ b/docs/contracts/api/vaults/ethereum/mev/OwnMevEscrow.md @@ -6,7 +6,7 @@ description: "MEV escrow owned by individual vault" # OwnMevEscrow -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/mev/OwnMevEscrow.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/mev/OwnMevEscrow.sol) **Inherits:** IOwnMevEscrow diff --git a/docs/contracts/api/vaults/ethereum/mev/SharedMevEscrow.md b/docs/contracts/api/vaults/ethereum/mev/SharedMevEscrow.md index 8a8947bc..87bd38d7 100644 --- a/docs/contracts/api/vaults/ethereum/mev/SharedMevEscrow.md +++ b/docs/contracts/api/vaults/ethereum/mev/SharedMevEscrow.md @@ -6,7 +6,7 @@ description: "Shared MEV escrow for multiple vaults" # SharedMevEscrow -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/mev/SharedMevEscrow.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/ethereum/mev/SharedMevEscrow.sol) **Inherits:** ISharedMevEscrow diff --git a/docs/contracts/api/vaults/gnosis/GnoBlocklistErc20Vault.md b/docs/contracts/api/vaults/gnosis/GnoBlocklistErc20Vault.md index 5fe25a9a..3a5bd354 100644 --- a/docs/contracts/api/vaults/gnosis/GnoBlocklistErc20Vault.md +++ b/docs/contracts/api/vaults/gnosis/GnoBlocklistErc20Vault.md @@ -6,7 +6,7 @@ description: "Gnosis staking vault with blocklist and ERC-20 token functionality # GnoBlocklistErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoBlocklistErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoBlocklistErc20Vault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [GnoErc20Vault →](./GnoErc20Vault), [VaultBlocklist →](../modules/VaultBlocklist), IGnoBlocklistErc20Vault diff --git a/docs/contracts/api/vaults/gnosis/GnoBlocklistVault.md b/docs/contracts/api/vaults/gnosis/GnoBlocklistVault.md index 327c9355..d2d17689 100644 --- a/docs/contracts/api/vaults/gnosis/GnoBlocklistVault.md +++ b/docs/contracts/api/vaults/gnosis/GnoBlocklistVault.md @@ -6,7 +6,7 @@ description: "Gnosis staking vault with blocklist functionality" # GnoBlocklistVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoBlocklistVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoBlocklistVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [GnoVault →](./GnoVault), [VaultBlocklist →](../modules/VaultBlocklist), IGnoBlocklistVault diff --git a/docs/contracts/api/vaults/gnosis/GnoErc20Vault.md b/docs/contracts/api/vaults/gnosis/GnoErc20Vault.md index b01cc889..bc19a19e 100644 --- a/docs/contracts/api/vaults/gnosis/GnoErc20Vault.md +++ b/docs/contracts/api/vaults/gnosis/GnoErc20Vault.md @@ -6,7 +6,7 @@ description: "Gnosis staking vault with ERC-20 token" # GnoErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoErc20Vault.sol) **Inherits:** [VaultImmutables →](../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../modules/VaultAdmin), [VaultVersion →](../modules/VaultVersion), [VaultFee →](../modules/VaultFee), [VaultState →](../modules/VaultState), [VaultValidators →](../modules/VaultValidators), [VaultEnterExit →](../modules/VaultEnterExit), [VaultOsToken →](../modules/VaultOsToken), [VaultMev →](../modules/VaultMev), [VaultToken →](../modules/VaultToken), [VaultGnoStaking →](../modules/VaultGnoStaking), [Multicall →](../../base/Multicall), IGnoErc20Vault diff --git a/docs/contracts/api/vaults/gnosis/GnoGenesisVault.md b/docs/contracts/api/vaults/gnosis/GnoGenesisVault.md index c4abc5b2..657a9ec0 100644 --- a/docs/contracts/api/vaults/gnosis/GnoGenesisVault.md +++ b/docs/contracts/api/vaults/gnosis/GnoGenesisVault.md @@ -6,7 +6,7 @@ description: "Genesis vault for Gnosis staking migrated from StakeWise Legacy" # GnoGenesisVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoGenesisVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoGenesisVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [GnoVault →](./GnoVault), IGnoGenesisVault diff --git a/docs/contracts/api/vaults/gnosis/GnoPrivErc20Vault.md b/docs/contracts/api/vaults/gnosis/GnoPrivErc20Vault.md index 972a12a6..d13c2fe5 100644 --- a/docs/contracts/api/vaults/gnosis/GnoPrivErc20Vault.md +++ b/docs/contracts/api/vaults/gnosis/GnoPrivErc20Vault.md @@ -6,7 +6,7 @@ description: "Gnosis staking vault with whitelist and ERC-20 token functionality # GnoPrivErc20Vault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoPrivErc20Vault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoPrivErc20Vault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [GnoErc20Vault →](./GnoErc20Vault), [VaultWhitelist →](../modules/VaultWhitelist), IGnoPrivErc20Vault diff --git a/docs/contracts/api/vaults/gnosis/GnoPrivVault.md b/docs/contracts/api/vaults/gnosis/GnoPrivVault.md index 3aeee327..384b7acf 100644 --- a/docs/contracts/api/vaults/gnosis/GnoPrivVault.md +++ b/docs/contracts/api/vaults/gnosis/GnoPrivVault.md @@ -6,7 +6,7 @@ description: "Gnosis staking vault with whitelist functionality" # GnoPrivVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoPrivVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoPrivVault.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [GnoVault →](./GnoVault), [VaultWhitelist →](../modules/VaultWhitelist), IGnoPrivVault diff --git a/docs/contracts/api/vaults/gnosis/GnoVault.md b/docs/contracts/api/vaults/gnosis/GnoVault.md index 88ff2a4f..9579cd9b 100644 --- a/docs/contracts/api/vaults/gnosis/GnoVault.md +++ b/docs/contracts/api/vaults/gnosis/GnoVault.md @@ -6,7 +6,7 @@ description: "Core Gnosis staking vault implementation" # GnoVault -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoVault.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoVault.sol) **Inherits:** [VaultImmutables →](../modules/VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](../modules/VaultAdmin), [VaultVersion →](../modules/VaultVersion), [VaultFee →](../modules/VaultFee), [VaultState →](../modules/VaultState), [VaultValidators →](../modules/VaultValidators), [VaultEnterExit →](../modules/VaultEnterExit), [VaultOsToken →](../modules/VaultOsToken), [VaultMev →](../modules/VaultMev), [VaultGnoStaking →](../modules/VaultGnoStaking), [Multicall →](../../base/Multicall), IGnoVault diff --git a/docs/contracts/api/vaults/gnosis/GnoVaultFactory.md b/docs/contracts/api/vaults/gnosis/GnoVaultFactory.md index fed53ece..bd4c2b41 100644 --- a/docs/contracts/api/vaults/gnosis/GnoVaultFactory.md +++ b/docs/contracts/api/vaults/gnosis/GnoVaultFactory.md @@ -6,7 +6,7 @@ description: "Factory for deploying Gnosis staking Vaults" # GnoVaultFactory -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoVaultFactory.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/gnosis/GnoVaultFactory.sol) **Inherits:** IGnoVaultFactory diff --git a/docs/contracts/api/vaults/modules/VaultAdmin.md b/docs/contracts/api/vaults/modules/VaultAdmin.md index e36773fe..92d32527 100644 --- a/docs/contracts/api/vaults/modules/VaultAdmin.md +++ b/docs/contracts/api/vaults/modules/VaultAdmin.md @@ -6,7 +6,7 @@ description: "Abstract contract defining admin functionality for vaults" # VaultAdmin -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultAdmin.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultAdmin.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), IVaultAdmin diff --git a/docs/contracts/api/vaults/modules/VaultBlocklist.md b/docs/contracts/api/vaults/modules/VaultBlocklist.md index 1130e690..73a05170 100644 --- a/docs/contracts/api/vaults/modules/VaultBlocklist.md +++ b/docs/contracts/api/vaults/modules/VaultBlocklist.md @@ -6,7 +6,7 @@ description: "Abstract contract defining blocklisting functionality for vaults" # VaultBlocklist -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultBlocklist.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultBlocklist.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](./VaultAdmin), IVaultBlocklist diff --git a/docs/contracts/api/vaults/modules/VaultEnterExit.md b/docs/contracts/api/vaults/modules/VaultEnterExit.md index f4830580..8d197959 100644 --- a/docs/contracts/api/vaults/modules/VaultEnterExit.md +++ b/docs/contracts/api/vaults/modules/VaultEnterExit.md @@ -6,7 +6,7 @@ description: "Abstract contract defining enter and exit functionality for vaults # VaultEnterExit -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultEnterExit.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultEnterExit.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultState →](./VaultState), IVaultEnterExit diff --git a/docs/contracts/api/vaults/modules/VaultEthStaking.md b/docs/contracts/api/vaults/modules/VaultEthStaking.md index 6d8ee70b..9a11118b 100644 --- a/docs/contracts/api/vaults/modules/VaultEthStaking.md +++ b/docs/contracts/api/vaults/modules/VaultEthStaking.md @@ -6,7 +6,7 @@ description: "Abstract contract defining Ethereum staking functionality for vaul # VaultEthStaking -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultEthStaking.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultEthStaking.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultState →](./VaultState), [VaultValidators →](./VaultValidators), [VaultEnterExit →](./VaultEnterExit), [VaultMev →](./VaultMev), IVaultEthStaking diff --git a/docs/contracts/api/vaults/modules/VaultFee.md b/docs/contracts/api/vaults/modules/VaultFee.md index 27dc1950..29f1b388 100644 --- a/docs/contracts/api/vaults/modules/VaultFee.md +++ b/docs/contracts/api/vaults/modules/VaultFee.md @@ -6,7 +6,7 @@ description: "Abstract contract defining fee functionality for vaults" # VaultFee -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultFee.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultFee.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](./VaultAdmin), IVaultFee diff --git a/docs/contracts/api/vaults/modules/VaultGnoStaking.md b/docs/contracts/api/vaults/modules/VaultGnoStaking.md index 1177c3e7..0a0b7209 100644 --- a/docs/contracts/api/vaults/modules/VaultGnoStaking.md +++ b/docs/contracts/api/vaults/modules/VaultGnoStaking.md @@ -6,7 +6,7 @@ description: "Abstract contract defining Gnosis staking functionality for vaults # VaultGnoStaking -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultGnoStaking.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultGnoStaking.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](./VaultAdmin), [VaultState →](./VaultState), [VaultValidators →](./VaultValidators), [VaultEnterExit →](./VaultEnterExit), IVaultGnoStaking diff --git a/docs/contracts/api/vaults/modules/VaultImmutables.md b/docs/contracts/api/vaults/modules/VaultImmutables.md index 9ec702d5..eb5541bd 100644 --- a/docs/contracts/api/vaults/modules/VaultImmutables.md +++ b/docs/contracts/api/vaults/modules/VaultImmutables.md @@ -6,6 +6,6 @@ description: "Abstract contract defining common immutable variables and check fu # VaultImmutables -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultImmutables.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultImmutables.sol) Defines the Vault common immutable variables and check functions. diff --git a/docs/contracts/api/vaults/modules/VaultMev.md b/docs/contracts/api/vaults/modules/VaultMev.md index fe5a4fab..6efb08ee 100644 --- a/docs/contracts/api/vaults/modules/VaultMev.md +++ b/docs/contracts/api/vaults/modules/VaultMev.md @@ -6,7 +6,7 @@ description: "Abstract contract defining MEV escrow functionality for vaults" # VaultMev -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultMev.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultMev.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultState →](./VaultState), IVaultMev diff --git a/docs/contracts/api/vaults/modules/VaultOsToken.md b/docs/contracts/api/vaults/modules/VaultOsToken.md index 8a0514ec..18a6c522 100644 --- a/docs/contracts/api/vaults/modules/VaultOsToken.md +++ b/docs/contracts/api/vaults/modules/VaultOsToken.md @@ -6,7 +6,7 @@ description: "Abstract contract defining OsToken minting functionality for vault # VaultOsToken -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultOsToken.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultOsToken.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [VaultState →](./VaultState), [VaultEnterExit →](./VaultEnterExit), IVaultOsToken diff --git a/docs/contracts/api/vaults/modules/VaultState.md b/docs/contracts/api/vaults/modules/VaultState.md index 5bf83dd0..95394ac0 100644 --- a/docs/contracts/api/vaults/modules/VaultState.md +++ b/docs/contracts/api/vaults/modules/VaultState.md @@ -6,7 +6,7 @@ description: "Abstract contract defining state manipulation functionality for va # VaultState -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultState.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultState.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultFee →](./VaultFee), IVaultState diff --git a/docs/contracts/api/vaults/modules/VaultSubVaults.md b/docs/contracts/api/vaults/modules/VaultSubVaults.md index 8b1a4747..bc46f1da 100644 --- a/docs/contracts/api/vaults/modules/VaultSubVaults.md +++ b/docs/contracts/api/vaults/modules/VaultSubVaults.md @@ -6,7 +6,7 @@ description: "Abstract contract defining sub-vaults management functionality for # VaultSubVaults -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultSubVaults.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultSubVaults.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [ReentrancyGuardUpgradeable ↗](https://github.com/Badger-Finance/badger-system/blob/master/deps/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol), [VaultAdmin →](./VaultAdmin), [VaultState →](./VaultState), IVaultSubVaults diff --git a/docs/contracts/api/vaults/modules/VaultToken.md b/docs/contracts/api/vaults/modules/VaultToken.md index 2803a212..3074161a 100644 --- a/docs/contracts/api/vaults/modules/VaultToken.md +++ b/docs/contracts/api/vaults/modules/VaultToken.md @@ -6,7 +6,7 @@ description: "Abstract contract defining ERC20 token functionality for vaults" # VaultToken -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultToken.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultToken.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [ERC20Upgradeable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/token/ERC20/ERC20Upgradeable.sol), [VaultState →](./VaultState), IVaultToken diff --git a/docs/contracts/api/vaults/modules/VaultValidators.md b/docs/contracts/api/vaults/modules/VaultValidators.md index 4895e749..617966d5 100644 --- a/docs/contracts/api/vaults/modules/VaultValidators.md +++ b/docs/contracts/api/vaults/modules/VaultValidators.md @@ -6,7 +6,7 @@ description: "Abstract contract defining validators management functionality for # VaultValidators -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultValidators.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultValidators.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [ReentrancyGuardUpgradeable ↗](https://github.com/Badger-Finance/badger-system/blob/master/deps/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol), [VaultAdmin →](./VaultAdmin), [VaultState →](./VaultState), IVaultValidators diff --git a/docs/contracts/api/vaults/modules/VaultVersion.md b/docs/contracts/api/vaults/modules/VaultVersion.md index 204659bc..2bdde100 100644 --- a/docs/contracts/api/vaults/modules/VaultVersion.md +++ b/docs/contracts/api/vaults/modules/VaultVersion.md @@ -6,7 +6,7 @@ description: "Abstract contract defining versioning and upgrade functionality fo # VaultVersion -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultVersion.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultVersion.sol) **Inherits:** [VaultImmutables →](./VaultImmutables), [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [UUPSUpgradeable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/UUPSUpgradeable.sol), [VaultAdmin →](./VaultAdmin), IVaultVersion diff --git a/docs/contracts/api/vaults/modules/VaultWhitelist.md b/docs/contracts/api/vaults/modules/VaultWhitelist.md index 493f68e5..21eb144c 100644 --- a/docs/contracts/api/vaults/modules/VaultWhitelist.md +++ b/docs/contracts/api/vaults/modules/VaultWhitelist.md @@ -6,7 +6,7 @@ description: "Abstract contract defining whitelisting functionality for vaults" # VaultWhitelist -[Git Source ↗](https://github.com/stakewise/eth-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultWhitelist.sol) +[Git Source ↗](https://github.com/stakewise/v3-core/blob/c511cd912cb881f60cf2a32d6c5d5f533e5d04b5/contracts/vaults/modules/VaultWhitelist.sol) **Inherits:** [Initializable ↗](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/utils/Initializable.sol), [VaultAdmin →](./VaultAdmin), IVaultWhitelist diff --git a/docs/docs/integration.mdx b/docs/docs/integration.mdx new file mode 100644 index 00000000..a4d53c9e --- /dev/null +++ b/docs/docs/integration.mdx @@ -0,0 +1,153 @@ +--- +id: integration +title: Integrating with StakeWise +description: Direct smart contract integration guide for StakeWise V3 — for non-JavaScript languages or custom on-chain integrations. JS/TS developers should use the SDK. +--- + +# Integrating with StakeWise + +Choose by audience: + +| Audience | Use | +|---|---| +| End users | [app.stakewise.io](https://app.stakewise.io) | +| **JavaScript / TypeScript developers** | [`@stakewise/v3-sdk`](/sdk/) — full code via [Context7](https://context7.com/stakewise/v3-sdk) | +| Other languages, on-chain integrations | This page ↓ | + +For TS/JS, the SDK is strictly better — it handles approve / multicall / encoding / +subgraph polling internally. This page covers **direct contract integration** for +Python, Go, Rust developers and smart-contract-to-smart-contract use. + +## Contract addresses + +Network deployments in [`v3-core/deployments/`](https://github.com/stakewise/v3-core/blob/main/deployments): +[mainnet](https://github.com/stakewise/v3-core/blob/main/deployments/mainnet.json) · +[gnosis](https://github.com/stakewise/v3-core/blob/main/deployments/gnosis.json) · +[hoodi](https://github.com/stakewise/v3-core/blob/main/deployments/hoodi.json) · +[chiado](https://github.com/stakewise/v3-core/blob/main/deployments/chiado.json). + +Per-Vault addresses: [vault marketplace](https://app.stakewise.io) or `VaultsRegistry`. +Function signatures and ABIs: [contracts API](/contracts/api/). + +Stable osToken addresses for ERC-20 operations: +- **osETH (Mainnet)**: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` +- **osETH (Hoodi)**: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` +- **osGNO (Gnosis)**: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` + +## Stake and mint osToken + +Examples in ethers.js — translate signatures to your language. + +### Ethereum (single transaction) + +```ts +const vault = new ethers.Contract(VAULT_ADDRESS, [ + 'function depositAndMintOsToken(address receiver, uint256 osTokenShares, address referrer) payable returns (uint256 assets)', +], signer) + +await (await vault.depositAndMintOsToken(userAddress, osTokenSharesToMint, ethers.ZeroAddress, { + value: ethers.parseEther('1.0'), +})).wait() +``` + +For deposit-only: `vault.deposit(receiver, referrer)` payable. + +### Gnosis Chain (three transactions) + +GNO is an ERC-20 — approve, deposit, mint: + +```ts +const GNO = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' + +const gno = new ethers.Contract(GNO, [ + 'function approve(address spender, uint256 amount) returns (bool)', +], signer) + +const vault = new ethers.Contract(VAULT_ADDRESS, [ + 'function deposit(uint256 assets, address receiver, address referrer) returns (uint256 shares)', + 'function mintOsToken(address receiver, uint256 osTokenShares, address referrer) returns (uint256 assets)', +], signer) + +const amount = ethers.parseEther('0.5') +await (await gno.approve(VAULT_ADDRESS, amount)).wait() +await (await vault.deposit(amount, userAddress, ethers.ZeroAddress)).wait() +await (await vault.mintOsToken(userAddress, osTokenSharesToMint, ethers.ZeroAddress)).wait() +``` + +## Redeem osToken + +Four steps: burn → enter queue → wait → claim. + +> ⚠️ `OsTokenVaultEscrow.redeemOsToken` is restricted to the protocol's redeemer +> role. Regular users redeem via the flow below. + +```ts +const vault = new ethers.Contract(VAULT_ADDRESS, [ + 'function burnOsToken(uint128 osTokenShares) returns (uint256 assets)', + 'function enterExitQueue(uint256 shares, address receiver) returns (uint256 positionTicket)', + 'function getExitQueueIndex(uint256 positionTicket) view returns (int256)', + 'function calculateExitedAssets(address receiver, uint256 positionTicket, uint256 timestamp, uint256 exitQueueIndex) view returns (uint256 leftTickets, uint256 exitedTickets, uint256 exitedAssets)', + 'function claimExitedAssets(uint256 positionTicket, uint256 timestamp, uint256 exitQueueIndex)', + 'event ExitQueueEntered(address indexed owner, address indexed receiver, uint256 positionTicket, uint256 shares)', +], signer) + +await (await vault.burnOsToken(ethers.parseEther('1.0'))).wait() + +const enterReceipt = await (await vault.enterExitQueue(sharesToExit, userAddress)).wait() +const exitEvent = enterReceipt.logs + .map(log => { try { return vault.interface.parseLog(log) } catch { return null } }) + .find(parsed => parsed?.name === 'ExitQueueEntered') +const positionTicket = exitEvent.args.positionTicket +const enterTimestamp = (await provider.getBlock(enterReceipt.blockNumber)).timestamp + +let queueIndex = await vault.getExitQueueIndex(positionTicket) +while (queueIndex < 0n) { + await new Promise(r => setTimeout(r, 60_000)) + queueIndex = await vault.getExitQueueIndex(positionTicket) +} + +let exitedAssets = 0n +while (exitedAssets === 0n) { + const result = await vault.calculateExitedAssets(userAddress, positionTicket, enterTimestamp, queueIndex) + exitedAssets = result.exitedAssets + if (exitedAssets === 0n) await new Promise(r => setTimeout(r, 60_000)) +} + +await (await vault.claimExitedAssets(positionTicket, enterTimestamp, queueIndex)).wait() +``` + +## Tracking a user's staking + +- **JS / TS**: use [`sdk.vault.getStakerActions`](/sdk/api/vault/requests/getstakeractions) — paginated history of deposits, mints, exits, claims, MEV per user. +- **Other languages**: subscribe to Vault events filtered by user address: `Deposited`, `OsTokenMinted`, `ExitQueueEntered` (filter by `owner` or `receiver`), `ExitedAssetsClaimed`. +- **Validator state**: after `KeeperValidators.ValidatorRegistered` for a Vault, query a consensus client beacon API directly (pending → active → exited). + +Validator threshold: **32 ETH** on Ethereum, **1 GNO** on Gnosis. Activation requires +oracle quorum (configurable via `validatorsMinOracles`). If you also operate the +Operator Service, see [Operator monitoring](/operator/operator-monitoring). + +## Building on top of StakeWise + +Key contracts and roles: + +- **`Vault`** (Eth/Gno + variants) — staked assets, share minting, validator registration +- **`OsTokenVaultController`** — coordinates osToken mint/burn across Vaults +- **`OsTokenConfig`** — per-Vault `ltvPercent`, `liqThresholdPercent`, `liqBonusPercent` — read live via `getConfig(vault)` +- **`OsTokenVaultEscrow`** — `redeemOsToken` (redeemer role) and `liquidateOsToken` (permissionless when below threshold) +- **`OsTokenRedeemer`** — redemption queue and merkle-proof position lists +- **`Keeper`** — reports rewards (`rewardsMinOracles`), approves validators (`validatorsMinOracles`) +- **`PriceOracle`** — asset/USD rates + +osToken peg is maintained via three mechanisms (see [How osToken works](/docs/ostoken/how-ostoken-works) for the conceptual detail): + +1. **Minting** capped at `ltvPercent` — arbitrage prevents secondary-market premiums. +2. **Redemption** by redeemer role via `OsTokenVaultEscrow.redeemOsToken`, based on lists in `OsTokenRedeemer`. +3. **Liquidation** at `liqThresholdPercent` — anyone calls `liquidateOsToken` for collateral with a bonus. + +A derivative on top of osToken should: +- Read live `ltvPercent` / `liqThresholdPercent` from `OsTokenConfig.getConfig(vault)` — values are configurable per Vault. +- Track collateral health via `getPosition` reads. +- Account for `redeemOsToken` (redeemer-role) and `liquidateOsToken` (permissionless) — they may pull osToken without user interaction. +- Implement an internal buffer above the protocol's liquidation threshold. + +For full Solidity: [contracts API](/contracts/api/) · [v3-core source](https://github.com/stakewise/v3-core). diff --git a/sidebars.ts b/sidebars.ts index 34fb016a..4aa77420 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -68,6 +68,7 @@ const sidebars: SidebarsConfig = { 'docs/governance/dao-treasury', ], }, + 'docs/integration', 'docs/glossary', ], diff --git a/static/context7.json b/static/context7.json index 088ca227..86fa9ca7 100644 --- a/static/context7.json +++ b/static/context7.json @@ -4,18 +4,15 @@ "description": "Official documentation for StakeWise liquid staking protocol on Ethereum and Gnosis Chain — covers Stakers, Vault Operators, smart contracts, and protocol concepts. SDK docs are hosted separately at /stakewise/v3-sdk.", "url": "https://context7.com/websites/stakewise_io", "public_key": "pk_wpaUy9UwJWjviJip1LFYx", - "excludeFolders": [ - "sdk", - "sdk/**" - ], "rules": [ - "StakeWise SDK content (TypeScript code, API references, transaction examples) is in a separate Context7 library: /stakewise/v3-sdk. Switch to it viaresolve-library-id for SDK-specific questions.", - "StakeWise has three staking modes: Simple Staking (StakeWise dApp, easiest), Vault Staking (choose a specific Vault from marketplace), Solo Staking(run your own validator using Operator Service).", + "StakeWise SDK content (TypeScript code, API references, transaction examples) is in a separate Context7 library: /stakewise/v3-sdk. Switch to it via resolve-library-id for SDK-specific questions.", + "StakeWise has three staking modes: Simple Staking (StakeWise dApp, easiest), Vault Staking (choose a specific Vault from marketplace), Solo Staking (run your own validator using Operator Service).", "osToken is StakeWise over-collateralized liquid staking token: osETH on Ethereum Mainnet, osGNO on Gnosis Chain. Represents the staked position and is redeemable for the underlying asset.", "On Ethereum the staking asset is ETH (paired with osETH). On Gnosis Chain the staking asset is GNO, not xDAI - xDAI is the network gas token (paired with osGNO).", - "Operator Service is open-source software running alongside Execution + Consensus nodes. Available as Docker image, prebuilt binary, or source. Automates day-to-day Vault operations.", - "MEV rewards model is set at vault creation - either Smoothing Pool (shared with all vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", + "Operator Service is open-source software running alongside Execution + Consensus nodes. Available as Docker image, prebuilt binary, or from source. Automates day-to-day Vault operations.", + "MEV rewards model is set at vault creation - either Smoothing Pool (shared across vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", + "User redemption flow: vault.burnOsToken → vault.enterExitQueue → wait → vault.claimExitedAssets. The OsTokenVaultEscrow.redeemOsToken function is restricted to the protocol's designated redeemer role for collateral health management, NOT for regular user redemptions.", "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position." ] From 0debac413084f2e2797f76b0c6ce5ed4c61eba14 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 13:34:56 +0300 Subject: [PATCH 2/8] add 5 actionable rules for benchmark coverage --- docs/docs/integration.mdx | 153 -------------------------------------- sidebars.ts | 1 - static/context7.json | 7 +- 3 files changed, 6 insertions(+), 155 deletions(-) delete mode 100644 docs/docs/integration.mdx diff --git a/docs/docs/integration.mdx b/docs/docs/integration.mdx deleted file mode 100644 index a4d53c9e..00000000 --- a/docs/docs/integration.mdx +++ /dev/null @@ -1,153 +0,0 @@ ---- -id: integration -title: Integrating with StakeWise -description: Direct smart contract integration guide for StakeWise V3 — for non-JavaScript languages or custom on-chain integrations. JS/TS developers should use the SDK. ---- - -# Integrating with StakeWise - -Choose by audience: - -| Audience | Use | -|---|---| -| End users | [app.stakewise.io](https://app.stakewise.io) | -| **JavaScript / TypeScript developers** | [`@stakewise/v3-sdk`](/sdk/) — full code via [Context7](https://context7.com/stakewise/v3-sdk) | -| Other languages, on-chain integrations | This page ↓ | - -For TS/JS, the SDK is strictly better — it handles approve / multicall / encoding / -subgraph polling internally. This page covers **direct contract integration** for -Python, Go, Rust developers and smart-contract-to-smart-contract use. - -## Contract addresses - -Network deployments in [`v3-core/deployments/`](https://github.com/stakewise/v3-core/blob/main/deployments): -[mainnet](https://github.com/stakewise/v3-core/blob/main/deployments/mainnet.json) · -[gnosis](https://github.com/stakewise/v3-core/blob/main/deployments/gnosis.json) · -[hoodi](https://github.com/stakewise/v3-core/blob/main/deployments/hoodi.json) · -[chiado](https://github.com/stakewise/v3-core/blob/main/deployments/chiado.json). - -Per-Vault addresses: [vault marketplace](https://app.stakewise.io) or `VaultsRegistry`. -Function signatures and ABIs: [contracts API](/contracts/api/). - -Stable osToken addresses for ERC-20 operations: -- **osETH (Mainnet)**: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` -- **osETH (Hoodi)**: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` -- **osGNO (Gnosis)**: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` - -## Stake and mint osToken - -Examples in ethers.js — translate signatures to your language. - -### Ethereum (single transaction) - -```ts -const vault = new ethers.Contract(VAULT_ADDRESS, [ - 'function depositAndMintOsToken(address receiver, uint256 osTokenShares, address referrer) payable returns (uint256 assets)', -], signer) - -await (await vault.depositAndMintOsToken(userAddress, osTokenSharesToMint, ethers.ZeroAddress, { - value: ethers.parseEther('1.0'), -})).wait() -``` - -For deposit-only: `vault.deposit(receiver, referrer)` payable. - -### Gnosis Chain (three transactions) - -GNO is an ERC-20 — approve, deposit, mint: - -```ts -const GNO = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' - -const gno = new ethers.Contract(GNO, [ - 'function approve(address spender, uint256 amount) returns (bool)', -], signer) - -const vault = new ethers.Contract(VAULT_ADDRESS, [ - 'function deposit(uint256 assets, address receiver, address referrer) returns (uint256 shares)', - 'function mintOsToken(address receiver, uint256 osTokenShares, address referrer) returns (uint256 assets)', -], signer) - -const amount = ethers.parseEther('0.5') -await (await gno.approve(VAULT_ADDRESS, amount)).wait() -await (await vault.deposit(amount, userAddress, ethers.ZeroAddress)).wait() -await (await vault.mintOsToken(userAddress, osTokenSharesToMint, ethers.ZeroAddress)).wait() -``` - -## Redeem osToken - -Four steps: burn → enter queue → wait → claim. - -> ⚠️ `OsTokenVaultEscrow.redeemOsToken` is restricted to the protocol's redeemer -> role. Regular users redeem via the flow below. - -```ts -const vault = new ethers.Contract(VAULT_ADDRESS, [ - 'function burnOsToken(uint128 osTokenShares) returns (uint256 assets)', - 'function enterExitQueue(uint256 shares, address receiver) returns (uint256 positionTicket)', - 'function getExitQueueIndex(uint256 positionTicket) view returns (int256)', - 'function calculateExitedAssets(address receiver, uint256 positionTicket, uint256 timestamp, uint256 exitQueueIndex) view returns (uint256 leftTickets, uint256 exitedTickets, uint256 exitedAssets)', - 'function claimExitedAssets(uint256 positionTicket, uint256 timestamp, uint256 exitQueueIndex)', - 'event ExitQueueEntered(address indexed owner, address indexed receiver, uint256 positionTicket, uint256 shares)', -], signer) - -await (await vault.burnOsToken(ethers.parseEther('1.0'))).wait() - -const enterReceipt = await (await vault.enterExitQueue(sharesToExit, userAddress)).wait() -const exitEvent = enterReceipt.logs - .map(log => { try { return vault.interface.parseLog(log) } catch { return null } }) - .find(parsed => parsed?.name === 'ExitQueueEntered') -const positionTicket = exitEvent.args.positionTicket -const enterTimestamp = (await provider.getBlock(enterReceipt.blockNumber)).timestamp - -let queueIndex = await vault.getExitQueueIndex(positionTicket) -while (queueIndex < 0n) { - await new Promise(r => setTimeout(r, 60_000)) - queueIndex = await vault.getExitQueueIndex(positionTicket) -} - -let exitedAssets = 0n -while (exitedAssets === 0n) { - const result = await vault.calculateExitedAssets(userAddress, positionTicket, enterTimestamp, queueIndex) - exitedAssets = result.exitedAssets - if (exitedAssets === 0n) await new Promise(r => setTimeout(r, 60_000)) -} - -await (await vault.claimExitedAssets(positionTicket, enterTimestamp, queueIndex)).wait() -``` - -## Tracking a user's staking - -- **JS / TS**: use [`sdk.vault.getStakerActions`](/sdk/api/vault/requests/getstakeractions) — paginated history of deposits, mints, exits, claims, MEV per user. -- **Other languages**: subscribe to Vault events filtered by user address: `Deposited`, `OsTokenMinted`, `ExitQueueEntered` (filter by `owner` or `receiver`), `ExitedAssetsClaimed`. -- **Validator state**: after `KeeperValidators.ValidatorRegistered` for a Vault, query a consensus client beacon API directly (pending → active → exited). - -Validator threshold: **32 ETH** on Ethereum, **1 GNO** on Gnosis. Activation requires -oracle quorum (configurable via `validatorsMinOracles`). If you also operate the -Operator Service, see [Operator monitoring](/operator/operator-monitoring). - -## Building on top of StakeWise - -Key contracts and roles: - -- **`Vault`** (Eth/Gno + variants) — staked assets, share minting, validator registration -- **`OsTokenVaultController`** — coordinates osToken mint/burn across Vaults -- **`OsTokenConfig`** — per-Vault `ltvPercent`, `liqThresholdPercent`, `liqBonusPercent` — read live via `getConfig(vault)` -- **`OsTokenVaultEscrow`** — `redeemOsToken` (redeemer role) and `liquidateOsToken` (permissionless when below threshold) -- **`OsTokenRedeemer`** — redemption queue and merkle-proof position lists -- **`Keeper`** — reports rewards (`rewardsMinOracles`), approves validators (`validatorsMinOracles`) -- **`PriceOracle`** — asset/USD rates - -osToken peg is maintained via three mechanisms (see [How osToken works](/docs/ostoken/how-ostoken-works) for the conceptual detail): - -1. **Minting** capped at `ltvPercent` — arbitrage prevents secondary-market premiums. -2. **Redemption** by redeemer role via `OsTokenVaultEscrow.redeemOsToken`, based on lists in `OsTokenRedeemer`. -3. **Liquidation** at `liqThresholdPercent` — anyone calls `liquidateOsToken` for collateral with a bonus. - -A derivative on top of osToken should: -- Read live `ltvPercent` / `liqThresholdPercent` from `OsTokenConfig.getConfig(vault)` — values are configurable per Vault. -- Track collateral health via `getPosition` reads. -- Account for `redeemOsToken` (redeemer-role) and `liquidateOsToken` (permissionless) — they may pull osToken without user interaction. -- Implement an internal buffer above the protocol's liquidation threshold. - -For full Solidity: [contracts API](/contracts/api/) · [v3-core source](https://github.com/stakewise/v3-core). diff --git a/sidebars.ts b/sidebars.ts index 4aa77420..34fb016a 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -68,7 +68,6 @@ const sidebars: SidebarsConfig = { 'docs/governance/dao-treasury', ], }, - 'docs/integration', 'docs/glossary', ], diff --git a/static/context7.json b/static/context7.json index 86fa9ca7..6baffb75 100644 --- a/static/context7.json +++ b/static/context7.json @@ -14,6 +14,11 @@ "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", "User redemption flow: vault.burnOsToken → vault.enterExitQueue → wait → vault.claimExitedAssets. The OsTokenVaultEscrow.redeemOsToken function is restricted to the protocol's designated redeemer role for collateral health management, NOT for regular user redemptions.", "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", - "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position." + "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position.", + "For per-vault TVL: read Vault.totalAssets() (uint256, in wei) on the specific Vault contract. For network-wide TVL across all vaults: query the StakeWise subgraph or use sdk.utils.getStakewiseStats from the SDK.", + "osETH and osGNO are standard ERC-20 tokens — use transfer/approve/balanceOf/allowance directly on the OsToken contract. Find the OsToken address per network in /contracts/networks/Mainnet, /contracts/networks/Gnosis, /contracts/networks/Hoodi.", + "On Gnosis Chain, GNO is an ERC-20 token (address 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb). Approve the Vault to spend GNO before calling Vault.deposit. On Ethereum, ETH is native and sent as msg.value — no approve needed.", + "Before any write operation on a Vault (deposit, mint, burn, enterExitQueue), check Keeper.canHarvest(vault). If true, call Vault.updateState(harvestParams) first to refresh state, or use combined functions like updateStateAndDepositAndMintOsToken — otherwise transactions may revert on stale state.", + "Track a user's staking lifecycle via three layers: (1) Vault events filtered by user address — Deposited, OsTokenMinted, ExitQueueEntered, ExitedAssetsClaimed; (2) StakeWise subgraph for paginated history; (3) consensus-client beacon API for validator state after Vault.ValidatorRegistered." ] } From 8250dd44ed99eccfdd90eb2927beb6079f890ab8 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 14:07:57 +0300 Subject: [PATCH 3/8] update context7 documentation and add Gnosis integration guide --- docs/contracts/integration.mdx | 88 ++++++++++++++++++++++++++++++++++ static/context7.json | 3 +- 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 docs/contracts/integration.mdx diff --git a/docs/contracts/integration.mdx b/docs/contracts/integration.mdx new file mode 100644 index 00000000..d02017d0 --- /dev/null +++ b/docs/contracts/integration.mdx @@ -0,0 +1,88 @@ +--- +id: integration +title: Integration +sidebar_position: 1 +description: Direct smart contract integration pattern for Gnosis Chain (GNO stake → osGNO mint). For Ethereum and general SDK usage, see the SDK reference. +--- + +# Integration + +For most integrations, use the [`@stakewise/v3-sdk`](/sdk/) — it handles +approve, multicall, harvest checks, and stake calculator inputs internally. + +This page documents one Gnosis-specific pattern that the SDK quick-starts cover +only for Ethereum: **stake GNO + mint osGNO via direct contract calls**. + +## Stake GNO and mint osGNO (Gnosis Chain) + +GNO is an ERC-20 token (not the native asset of Gnosis Chain). The Vault must +be approved to spend GNO before deposit, so the flow takes three transactions. + +```ts +import { BrowserProvider, Contract, ZeroAddress, parseEther } from 'ethers' + +const GNO_ADDRESS = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' + +const eip1193Provider = window.ethereum + +const browserProvider = new BrowserProvider(eip1193Provider, { + chainId: 100, // Gnosis Chain + name: 'gnosis', +}) + +type Input = { + amount: string + userAddress: string + vaultAddress: string + osTokenShares: bigint +} + +const stakeAndMintOsGno = async (values: Input) => { + const { amount, userAddress, vaultAddress, osTokenShares } = values + + try { + const assets = parseEther(amount) + const signer = await browserProvider.getSigner(userAddress) + + const gno = new Contract(GNO_ADDRESS, [ + 'function approve(address spender, uint256 amount) returns (bool)', + ], signer) + + const vault = new Contract(vaultAddress, [ + 'function deposit(uint256 assets, address receiver, address referrer) returns (uint256 shares)', + 'function mintOsToken(address receiver, uint256 osTokenShares, address referrer) returns (uint256 assets)', + ], signer) + + // 1. Approve the Vault to spend GNO + const approveTx = await gno.approve(vaultAddress, assets) + await browserProvider.waitForTransaction(approveTx.hash) + + // 2. Deposit GNO into the Vault + const depositTx = await vault.deposit(assets, userAddress, ZeroAddress) + await browserProvider.waitForTransaction(depositTx.hash) + + // 3. Mint osGNO against the staked position + const mintTx = await vault.mintOsToken(userAddress, osTokenShares, ZeroAddress) + await browserProvider.waitForTransaction(mintTx.hash) + } + catch (error) { + console.error(error) + } +} + +stakeAndMintOsGno({ + amount: '0.5', // GNO + osTokenShares: parseEther('0.45'), // osGNO to mint + userAddress: 'USER_ADDRESS', + vaultAddress: 'VAULT_ADDRESS', +}) +``` + +Find Vault addresses on the [vault marketplace](https://app.stakewise.io) or +via the `VaultsRegistry` contract. Per-network protocol contracts are listed in +[Networks → Gnosis](/contracts/networks/Gnosis). + +For all other operations — deposit ETH on Ethereum, mint osETH, redeem +(unstake) for the underlying asset, transfer osToken, query balances or +exchange rates — use the [SDK](/sdk/), which handles state freshness checks, +the StakeCalculator helper, and exit-queue polling automatically. diff --git a/static/context7.json b/static/context7.json index 6baffb75..b667c410 100644 --- a/static/context7.json +++ b/static/context7.json @@ -1,7 +1,7 @@ { "$schema": "https://context7.com/schema/context7.json", "projectTitle": "StakeWise Documentation", - "description": "Official documentation for StakeWise liquid staking protocol on Ethereum and Gnosis Chain — covers Stakers, Vault Operators, smart contracts, and protocol concepts. SDK docs are hosted separately at /stakewise/v3-sdk.", + "description": "Official documentation for StakeWise liquid staking protocol on Ethereum and Gnosis Chain — covers Stakers, Vault Operators, smart contracts, protocol concepts, and SDK quick-start guides. For the full SDK API reference, also see /stakewise/v3-sdk.", "url": "https://context7.com/websites/stakewise_io", "public_key": "pk_wpaUy9UwJWjviJip1LFYx", "rules": [ @@ -13,6 +13,7 @@ "MEV rewards model is set at vault creation - either Smoothing Pool (shared across vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", "User redemption flow: vault.burnOsToken → vault.enterExitQueue → wait → vault.claimExitedAssets. The OsTokenVaultEscrow.redeemOsToken function is restricted to the protocol's designated redeemer role for collateral health management, NOT for regular user redemptions.", + "Redemption, unstake, and withdraw all describe the same user flow in StakeWise. Use sdk.vault.withdraw to enter the exit queue, then sdk.vault.claimExitQueue to claim after processing — see /sdk/quick-start/unstake for the full SDK example. The contract function OsTokenVaultEscrow.redeemOsToken is unrelated to user-initiated redemption.", "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position.", "For per-vault TVL: read Vault.totalAssets() (uint256, in wei) on the specific Vault contract. For network-wide TVL across all vaults: query the StakeWise subgraph or use sdk.utils.getStakewiseStats from the SDK.", From c1d798f34d14a846596e60b78aada5ca4af6feec Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 15:03:51 +0300 Subject: [PATCH 4/8] update context7 --- docs/contracts/integration.mdx | 100 ++++++++++++++++++++++++++++----- static/context7.json | 9 ++- 2 files changed, 90 insertions(+), 19 deletions(-) diff --git a/docs/contracts/integration.mdx b/docs/contracts/integration.mdx index d02017d0..21c89b89 100644 --- a/docs/contracts/integration.mdx +++ b/docs/contracts/integration.mdx @@ -1,22 +1,22 @@ --- id: integration -title: Integration +title: Direct contract integration sidebar_position: 1 -description: Direct smart contract integration pattern for Gnosis Chain (GNO stake → osGNO mint). For Ethereum and general SDK usage, see the SDK reference. +description: Direct smart contract patterns that complement the SDK quick-starts — Gnosis Chain GNO stake, osToken ERC-20 operations (transfer, approve, permit) on osETH and osGNO. --- -# Integration +# Direct contract integration -For most integrations, use the [`@stakewise/v3-sdk`](/sdk/) — it handles -approve, multicall, harvest checks, and stake calculator inputs internally. +This page documents direct smart contract patterns that complement the +[SDK quick-starts](/sdk/). For most JavaScript / TypeScript integrations, +use the SDK — it handles approve, multicall, harvest checks, and stake +calculator inputs automatically. -This page documents one Gnosis-specific pattern that the SDK quick-starts cover -only for Ethereum: **stake GNO + mint osGNO via direct contract calls**. - -## Stake GNO and mint osGNO (Gnosis Chain) +## Stake GNO on Gnosis Chain GNO is an ERC-20 token (not the native asset of Gnosis Chain). The Vault must -be approved to spend GNO before deposit, so the flow takes three transactions. +be approved to spend GNO before deposit, so the flow takes three transactions: +**approve → deposit → mint osGNO**. ```ts import { BrowserProvider, Contract, ZeroAddress, parseEther } from 'ethers' @@ -82,7 +82,79 @@ Find Vault addresses on the [vault marketplace](https://app.stakewise.io) or via the `VaultsRegistry` contract. Per-network protocol contracts are listed in [Networks → Gnosis](/contracts/networks/Gnosis). -For all other operations — deposit ETH on Ethereum, mint osETH, redeem -(unstake) for the underlying asset, transfer osToken, query balances or -exchange rates — use the [SDK](/sdk/), which handles state freshness checks, -the StakeCalculator helper, and exit-queue polling automatically. +## Transfer osETH or osGNO (ERC-20 operations) + +osETH and osGNO are standard ERC-20 tokens with EIP-2612 `permit` support. +Use them directly via the OsToken contract address — supports `transfer`, +`transferFrom`, `approve`, `balanceOf`, `allowance`, `permit`. + +OsToken contract addresses (from [contract networks](/contracts/networks/)): + +- **osETH** on Ethereum Mainnet: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` +- **osETH** on Hoodi testnet: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` +- **osGNO** on Gnosis Chain: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` + +```ts +import { BrowserProvider, Contract, parseEther } from 'ethers' + +const OSGNO_ADDRESS = '0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0' + +const eip1193Provider = window.ethereum + +const browserProvider = new BrowserProvider(eip1193Provider, { + chainId: 100, // Gnosis Chain + name: 'gnosis', +}) + +type Input = { + amount: string + fromAddress: string + toAddress: string +} + +const transferOsGno = async (values: Input) => { + const { amount, fromAddress, toAddress } = values + + try { + const value = parseEther(amount) + const signer = await browserProvider.getSigner(fromAddress) + + const osToken = new Contract(OSGNO_ADDRESS, [ + 'function transfer(address to, uint256 amount) returns (bool)', + 'function transferFrom(address from, address to, uint256 amount) returns (bool)', + 'function approve(address spender, uint256 amount) returns (bool)', + 'function balanceOf(address account) view returns (uint256)', + 'function allowance(address owner, address spender) view returns (uint256)', + ], signer) + + const balance = await osToken.balanceOf(fromAddress) + + if (balance < value) { + throw new Error('Insufficient osGNO balance.') + } + + const tx = await osToken.transfer(toAddress, value) + await browserProvider.waitForTransaction(tx.hash) + } + catch (error) { + console.error(error) + } +} + +transferOsGno({ + amount: '0.5', // osGNO + fromAddress: 'USER_ADDRESS', + toAddress: 'RECIPIENT_ADDRESS', +}) +``` + +Substitute the Mainnet osETH address (`0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38`) +and `chainId: 1` for Ethereum Mainnet to operate on osETH. + +## Use the SDK for everything else + +For deposits on Ethereum, redemptions (unstake), boost / unboost, balance and +APY queries, exchange-rate reads, vault data, staker action history — use the +[SDK](/sdk/). It handles state freshness checks via `Keeper.canHarvest`, the +`StakeCalculator` helper for share computations, and exit-queue polling +automatically. diff --git a/static/context7.json b/static/context7.json index b667c410..63372b1c 100644 --- a/static/context7.json +++ b/static/context7.json @@ -12,14 +12,13 @@ "Operator Service is open-source software running alongside Execution + Consensus nodes. Available as Docker image, prebuilt binary, or from source. Automates day-to-day Vault operations.", "MEV rewards model is set at vault creation - either Smoothing Pool (shared across vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", - "User redemption flow: vault.burnOsToken → vault.enterExitQueue → wait → vault.claimExitedAssets. The OsTokenVaultEscrow.redeemOsToken function is restricted to the protocol's designated redeemer role for collateral health management, NOT for regular user redemptions.", - "Redemption, unstake, and withdraw all describe the same user flow in StakeWise. Use sdk.vault.withdraw to enter the exit queue, then sdk.vault.claimExitQueue to claim after processing — see /sdk/quick-start/unstake for the full SDK example. The contract function OsTokenVaultEscrow.redeemOsToken is unrelated to user-initiated redemption.", + "Redemption, unstake, withdraw = same user flow. SDK: sdk.vault.withdraw → sdk.vault.claimExitQueue. Direct: vault.burnOsToken → vault.enterExitQueue → vault.claimExitedAssets. OsTokenVaultEscrow.redeemOsToken is redeemer-role only, NOT for users.", "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position.", "For per-vault TVL: read Vault.totalAssets() (uint256, in wei) on the specific Vault contract. For network-wide TVL across all vaults: query the StakeWise subgraph or use sdk.utils.getStakewiseStats from the SDK.", - "osETH and osGNO are standard ERC-20 tokens — use transfer/approve/balanceOf/allowance directly on the OsToken contract. Find the OsToken address per network in /contracts/networks/Mainnet, /contracts/networks/Gnosis, /contracts/networks/Hoodi.", + "osETH/osGNO are standard ERC-20 with EIP-2612 permit. Call transfer/approve/balanceOf on these addresses (NOT Vault contracts): osETH Mainnet 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38, osGNO Gnosis 0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0.", "On Gnosis Chain, GNO is an ERC-20 token (address 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb). Approve the Vault to spend GNO before calling Vault.deposit. On Ethereum, ETH is native and sent as msg.value — no approve needed.", - "Before any write operation on a Vault (deposit, mint, burn, enterExitQueue), check Keeper.canHarvest(vault). If true, call Vault.updateState(harvestParams) first to refresh state, or use combined functions like updateStateAndDepositAndMintOsToken — otherwise transactions may revert on stale state.", - "Track a user's staking lifecycle via three layers: (1) Vault events filtered by user address — Deposited, OsTokenMinted, ExitQueueEntered, ExitedAssetsClaimed; (2) StakeWise subgraph for paginated history; (3) consensus-client beacon API for validator state after Vault.ValidatorRegistered." + "Before any Vault write (deposit/mint/burn/enterExitQueue), check Keeper.canHarvest(vault). If true, call Vault.updateState(harvestParams) first or use combined functions like updateStateAndDepositAndMintOsToken — else transactions revert on stale state.", + "Track user staking lifecycle via three layers: (1) Vault events Deposited/OsTokenMinted/ExitQueueEntered/ExitedAssetsClaimed (filter by user); (2) StakeWise subgraph for paginated history; (3) beacon API after Vault.ValidatorRegistered." ] } From 24912521fbf2def1a4a3718ab6baf6eda6fe3ab6 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 15:13:24 +0300 Subject: [PATCH 5/8] fix integration code review issues and resolve rule inconsistency --- docs/contracts/integration.mdx | 44 +++++++++++++++++++++------------- static/context7.json | 4 ++-- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/contracts/integration.mdx b/docs/contracts/integration.mdx index 21c89b89..a7be09f1 100644 --- a/docs/contracts/integration.mdx +++ b/docs/contracts/integration.mdx @@ -18,10 +18,18 @@ GNO is an ERC-20 token (not the native asset of Gnosis Chain). The Vault must be approved to spend GNO before deposit, so the flow takes three transactions: **approve → deposit → mint osGNO**. +Before the deposit, check `Keeper.canHarvest(vault)`. If it returns `true`, +the Vault state is stale — call `Vault.updateState(harvestParams)` first +(or use a combined `updateStateAndDeposit` variant) or the deposit may +revert. Harvest params are produced by StakeWise oracles; obtain them via the +SDK helper `sdk.vault.getHarvestParams({ vaultAddress })` or by querying the +StakeWise oracle endpoints directly. + ```ts import { BrowserProvider, Contract, ZeroAddress, parseEther } from 'ethers' const GNO_ADDRESS = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' +const KEEPER_ADDRESS = '0xcAC0e3E35d3BA271cd2aaBE688ac9DB1898C26aa' // Gnosis Keeper const eip1193Provider = window.ethereum @@ -32,17 +40,22 @@ const browserProvider = new BrowserProvider(eip1193Provider, { type Input = { amount: string - userAddress: string vaultAddress: string osTokenShares: bigint + harvestParams: HarvestParams // see SDK sdk.vault.getHarvestParams } const stakeAndMintOsGno = async (values: Input) => { - const { amount, userAddress, vaultAddress, osTokenShares } = values + const { amount, vaultAddress, osTokenShares, harvestParams } = values try { const assets = parseEther(amount) - const signer = await browserProvider.getSigner(userAddress) + const signer = await browserProvider.getSigner() + const userAddress = await signer.getAddress() + + const keeper = new Contract(KEEPER_ADDRESS, [ + 'function canHarvest(address vault) view returns (bool)', + ], browserProvider) const gno = new Contract(GNO_ADDRESS, [ 'function approve(address spender, uint256 amount) returns (bool)', @@ -51,8 +64,15 @@ const stakeAndMintOsGno = async (values: Input) => { const vault = new Contract(vaultAddress, [ 'function deposit(uint256 assets, address receiver, address referrer) returns (uint256 shares)', 'function mintOsToken(address receiver, uint256 osTokenShares, address referrer) returns (uint256 assets)', + 'function updateState(tuple(bytes32 rewardsRoot, int160 reward, uint160 unlockedMevReward, bytes32[] proof) harvestParams)', ], signer) + // 0. Refresh Vault state if stale + if (await keeper.canHarvest(vaultAddress)) { + const updateTx = await vault.updateState(harvestParams) + await browserProvider.waitForTransaction(updateTx.hash) + } + // 1. Approve the Vault to spend GNO const approveTx = await gno.approve(vaultAddress, assets) await browserProvider.waitForTransaction(approveTx.hash) @@ -69,18 +89,11 @@ const stakeAndMintOsGno = async (values: Input) => { console.error(error) } } - -stakeAndMintOsGno({ - amount: '0.5', // GNO - osTokenShares: parseEther('0.45'), // osGNO to mint - userAddress: 'USER_ADDRESS', - vaultAddress: 'VAULT_ADDRESS', -}) ``` Find Vault addresses on the [vault marketplace](https://app.stakewise.io) or -via the `VaultsRegistry` contract. Per-network protocol contracts are listed in -[Networks → Gnosis](/contracts/networks/Gnosis). +via the `VaultsRegistry` contract. Per-network protocol contracts (including +Keeper) are listed in [Networks → Gnosis](/contracts/networks/Gnosis). ## Transfer osETH or osGNO (ERC-20 operations) @@ -108,16 +121,16 @@ const browserProvider = new BrowserProvider(eip1193Provider, { type Input = { amount: string - fromAddress: string toAddress: string } const transferOsGno = async (values: Input) => { - const { amount, fromAddress, toAddress } = values + const { amount, toAddress } = values try { const value = parseEther(amount) - const signer = await browserProvider.getSigner(fromAddress) + const signer = await browserProvider.getSigner() + const fromAddress = await signer.getAddress() const osToken = new Contract(OSGNO_ADDRESS, [ 'function transfer(address to, uint256 amount) returns (bool)', @@ -143,7 +156,6 @@ const transferOsGno = async (values: Input) => { transferOsGno({ amount: '0.5', // osGNO - fromAddress: 'USER_ADDRESS', toAddress: 'RECIPIENT_ADDRESS', }) ``` diff --git a/static/context7.json b/static/context7.json index 63372b1c..eca3ce7c 100644 --- a/static/context7.json +++ b/static/context7.json @@ -5,14 +5,14 @@ "url": "https://context7.com/websites/stakewise_io", "public_key": "pk_wpaUy9UwJWjviJip1LFYx", "rules": [ - "StakeWise SDK content (TypeScript code, API references, transaction examples) is in a separate Context7 library: /stakewise/v3-sdk. Switch to it via resolve-library-id for SDK-specific questions.", + "SDK quick-start guides (deposit, mint, burn, unstake, boost) are in this library under /sdk/quick-start/*. The full SDK API reference is in a separate Context7 library /stakewise/v3-sdk — switch to it via resolve-library-id for deep SDK questions.", "StakeWise has three staking modes: Simple Staking (StakeWise dApp, easiest), Vault Staking (choose a specific Vault from marketplace), Solo Staking (run your own validator using Operator Service).", "osToken is StakeWise over-collateralized liquid staking token: osETH on Ethereum Mainnet, osGNO on Gnosis Chain. Represents the staked position and is redeemable for the underlying asset.", "On Ethereum the staking asset is ETH (paired with osETH). On Gnosis Chain the staking asset is GNO, not xDAI - xDAI is the network gas token (paired with osGNO).", "Operator Service is open-source software running alongside Execution + Consensus nodes. Available as Docker image, prebuilt binary, or from source. Automates day-to-day Vault operations.", "MEV rewards model is set at vault creation - either Smoothing Pool (shared across vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", - "Redemption, unstake, withdraw = same user flow. SDK: sdk.vault.withdraw → sdk.vault.claimExitQueue. Direct: vault.burnOsToken → vault.enterExitQueue → vault.claimExitedAssets. OsTokenVaultEscrow.redeemOsToken is redeemer-role only, NOT for users.", + "Redemption / unstake / withdraw — same user flow. SDK: /sdk/quick-start/unstake-example. Direct: vault.burnOsToken → vault.enterExitQueue → vault.claimExitedAssets. OsTokenVaultEscrow.redeemOsToken is redeemer-role only, NOT for users.", "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position.", "For per-vault TVL: read Vault.totalAssets() (uint256, in wei) on the specific Vault contract. For network-wide TVL across all vaults: query the StakeWise subgraph or use sdk.utils.getStakewiseStats from the SDK.", From b479c4115c9d69cd8b81b84d7d0c7afae50cbdb9 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 16:10:21 +0300 Subject: [PATCH 6/8] test --- docs/contracts/integration.mdx | 172 --------------------------------- static/context7.json | 18 +--- 2 files changed, 1 insertion(+), 189 deletions(-) delete mode 100644 docs/contracts/integration.mdx diff --git a/docs/contracts/integration.mdx b/docs/contracts/integration.mdx deleted file mode 100644 index a7be09f1..00000000 --- a/docs/contracts/integration.mdx +++ /dev/null @@ -1,172 +0,0 @@ ---- -id: integration -title: Direct contract integration -sidebar_position: 1 -description: Direct smart contract patterns that complement the SDK quick-starts — Gnosis Chain GNO stake, osToken ERC-20 operations (transfer, approve, permit) on osETH and osGNO. ---- - -# Direct contract integration - -This page documents direct smart contract patterns that complement the -[SDK quick-starts](/sdk/). For most JavaScript / TypeScript integrations, -use the SDK — it handles approve, multicall, harvest checks, and stake -calculator inputs automatically. - -## Stake GNO on Gnosis Chain - -GNO is an ERC-20 token (not the native asset of Gnosis Chain). The Vault must -be approved to spend GNO before deposit, so the flow takes three transactions: -**approve → deposit → mint osGNO**. - -Before the deposit, check `Keeper.canHarvest(vault)`. If it returns `true`, -the Vault state is stale — call `Vault.updateState(harvestParams)` first -(or use a combined `updateStateAndDeposit` variant) or the deposit may -revert. Harvest params are produced by StakeWise oracles; obtain them via the -SDK helper `sdk.vault.getHarvestParams({ vaultAddress })` or by querying the -StakeWise oracle endpoints directly. - -```ts -import { BrowserProvider, Contract, ZeroAddress, parseEther } from 'ethers' - -const GNO_ADDRESS = '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb' -const KEEPER_ADDRESS = '0xcAC0e3E35d3BA271cd2aaBE688ac9DB1898C26aa' // Gnosis Keeper - -const eip1193Provider = window.ethereum - -const browserProvider = new BrowserProvider(eip1193Provider, { - chainId: 100, // Gnosis Chain - name: 'gnosis', -}) - -type Input = { - amount: string - vaultAddress: string - osTokenShares: bigint - harvestParams: HarvestParams // see SDK sdk.vault.getHarvestParams -} - -const stakeAndMintOsGno = async (values: Input) => { - const { amount, vaultAddress, osTokenShares, harvestParams } = values - - try { - const assets = parseEther(amount) - const signer = await browserProvider.getSigner() - const userAddress = await signer.getAddress() - - const keeper = new Contract(KEEPER_ADDRESS, [ - 'function canHarvest(address vault) view returns (bool)', - ], browserProvider) - - const gno = new Contract(GNO_ADDRESS, [ - 'function approve(address spender, uint256 amount) returns (bool)', - ], signer) - - const vault = new Contract(vaultAddress, [ - 'function deposit(uint256 assets, address receiver, address referrer) returns (uint256 shares)', - 'function mintOsToken(address receiver, uint256 osTokenShares, address referrer) returns (uint256 assets)', - 'function updateState(tuple(bytes32 rewardsRoot, int160 reward, uint160 unlockedMevReward, bytes32[] proof) harvestParams)', - ], signer) - - // 0. Refresh Vault state if stale - if (await keeper.canHarvest(vaultAddress)) { - const updateTx = await vault.updateState(harvestParams) - await browserProvider.waitForTransaction(updateTx.hash) - } - - // 1. Approve the Vault to spend GNO - const approveTx = await gno.approve(vaultAddress, assets) - await browserProvider.waitForTransaction(approveTx.hash) - - // 2. Deposit GNO into the Vault - const depositTx = await vault.deposit(assets, userAddress, ZeroAddress) - await browserProvider.waitForTransaction(depositTx.hash) - - // 3. Mint osGNO against the staked position - const mintTx = await vault.mintOsToken(userAddress, osTokenShares, ZeroAddress) - await browserProvider.waitForTransaction(mintTx.hash) - } - catch (error) { - console.error(error) - } -} -``` - -Find Vault addresses on the [vault marketplace](https://app.stakewise.io) or -via the `VaultsRegistry` contract. Per-network protocol contracts (including -Keeper) are listed in [Networks → Gnosis](/contracts/networks/Gnosis). - -## Transfer osETH or osGNO (ERC-20 operations) - -osETH and osGNO are standard ERC-20 tokens with EIP-2612 `permit` support. -Use them directly via the OsToken contract address — supports `transfer`, -`transferFrom`, `approve`, `balanceOf`, `allowance`, `permit`. - -OsToken contract addresses (from [contract networks](/contracts/networks/)): - -- **osETH** on Ethereum Mainnet: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` -- **osETH** on Hoodi testnet: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` -- **osGNO** on Gnosis Chain: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` - -```ts -import { BrowserProvider, Contract, parseEther } from 'ethers' - -const OSGNO_ADDRESS = '0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0' - -const eip1193Provider = window.ethereum - -const browserProvider = new BrowserProvider(eip1193Provider, { - chainId: 100, // Gnosis Chain - name: 'gnosis', -}) - -type Input = { - amount: string - toAddress: string -} - -const transferOsGno = async (values: Input) => { - const { amount, toAddress } = values - - try { - const value = parseEther(amount) - const signer = await browserProvider.getSigner() - const fromAddress = await signer.getAddress() - - const osToken = new Contract(OSGNO_ADDRESS, [ - 'function transfer(address to, uint256 amount) returns (bool)', - 'function transferFrom(address from, address to, uint256 amount) returns (bool)', - 'function approve(address spender, uint256 amount) returns (bool)', - 'function balanceOf(address account) view returns (uint256)', - 'function allowance(address owner, address spender) view returns (uint256)', - ], signer) - - const balance = await osToken.balanceOf(fromAddress) - - if (balance < value) { - throw new Error('Insufficient osGNO balance.') - } - - const tx = await osToken.transfer(toAddress, value) - await browserProvider.waitForTransaction(tx.hash) - } - catch (error) { - console.error(error) - } -} - -transferOsGno({ - amount: '0.5', // osGNO - toAddress: 'RECIPIENT_ADDRESS', -}) -``` - -Substitute the Mainnet osETH address (`0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38`) -and `chainId: 1` for Ethereum Mainnet to operate on osETH. - -## Use the SDK for everything else - -For deposits on Ethereum, redemptions (unstake), boost / unboost, balance and -APY queries, exchange-rate reads, vault data, staker action history — use the -[SDK](/sdk/). It handles state freshness checks via `Keeper.canHarvest`, the -`StakeCalculator` helper for share computations, and exit-queue polling -automatically. diff --git a/static/context7.json b/static/context7.json index eca3ce7c..312dd80d 100644 --- a/static/context7.json +++ b/static/context7.json @@ -4,21 +4,5 @@ "description": "Official documentation for StakeWise liquid staking protocol on Ethereum and Gnosis Chain — covers Stakers, Vault Operators, smart contracts, protocol concepts, and SDK quick-start guides. For the full SDK API reference, also see /stakewise/v3-sdk.", "url": "https://context7.com/websites/stakewise_io", "public_key": "pk_wpaUy9UwJWjviJip1LFYx", - "rules": [ - "SDK quick-start guides (deposit, mint, burn, unstake, boost) are in this library under /sdk/quick-start/*. The full SDK API reference is in a separate Context7 library /stakewise/v3-sdk — switch to it via resolve-library-id for deep SDK questions.", - "StakeWise has three staking modes: Simple Staking (StakeWise dApp, easiest), Vault Staking (choose a specific Vault from marketplace), Solo Staking (run your own validator using Operator Service).", - "osToken is StakeWise over-collateralized liquid staking token: osETH on Ethereum Mainnet, osGNO on Gnosis Chain. Represents the staked position and is redeemable for the underlying asset.", - "On Ethereum the staking asset is ETH (paired with osETH). On Gnosis Chain the staking asset is GNO, not xDAI - xDAI is the network gas token (paired with osGNO).", - "Operator Service is open-source software running alongside Execution + Consensus nodes. Available as Docker image, prebuilt binary, or from source. Automates day-to-day Vault operations.", - "MEV rewards model is set at vault creation - either Smoothing Pool (shared across vaults) or Own MEV Escrow (per-vault). Affects how priority fees and MEV are distributed.", - "Withdrawal flow: enter the exit queue → protocol processes withdrawal request → claim withdrawn assets. Not instant - depends on protocol's unbonded ETH/GNO availability.", - "Redemption / unstake / withdraw — same user flow. SDK: /sdk/quick-start/unstake-example. Direct: vault.burnOsToken → vault.enterExitQueue → vault.claimExitedAssets. OsTokenVaultEscrow.redeemOsToken is redeemer-role only, NOT for users.", - "Boost is a leveraged staking strategy: borrow ETH on Aave against osETH collateral, restake to amplify APY. Only safe within designed buffer to liquidation threshold.", - "Vault types: Default (open to all), Private (whitelist only), Blocklist (open with denylist). Type is set at creation, immutable. ERC20 vaults additionally mint a vault-specific token for the staked position.", - "For per-vault TVL: read Vault.totalAssets() (uint256, in wei) on the specific Vault contract. For network-wide TVL across all vaults: query the StakeWise subgraph or use sdk.utils.getStakewiseStats from the SDK.", - "osETH/osGNO are standard ERC-20 with EIP-2612 permit. Call transfer/approve/balanceOf on these addresses (NOT Vault contracts): osETH Mainnet 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38, osGNO Gnosis 0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0.", - "On Gnosis Chain, GNO is an ERC-20 token (address 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb). Approve the Vault to spend GNO before calling Vault.deposit. On Ethereum, ETH is native and sent as msg.value — no approve needed.", - "Before any Vault write (deposit/mint/burn/enterExitQueue), check Keeper.canHarvest(vault). If true, call Vault.updateState(harvestParams) first or use combined functions like updateStateAndDepositAndMintOsToken — else transactions revert on stale state.", - "Track user staking lifecycle via three layers: (1) Vault events Deposited/OsTokenMinted/ExitQueueEntered/ExitedAssetsClaimed (filter by user); (2) StakeWise subgraph for paginated history; (3) beacon API after Vault.ValidatorRegistered." - ] + "rules": [] } From 1c2d1761d952b6f31d3da6ed1d8faa6c733b2e82 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 16:50:28 +0300 Subject: [PATCH 7/8] add osToken page --- docs/contracts/osToken-erc20.mdx | 228 +++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 docs/contracts/osToken-erc20.mdx diff --git a/docs/contracts/osToken-erc20.mdx b/docs/contracts/osToken-erc20.mdx new file mode 100644 index 00000000..07763653 --- /dev/null +++ b/docs/contracts/osToken-erc20.mdx @@ -0,0 +1,228 @@ +--- +id: osToken-erc20 +title: osToken ERC-20 operations +sidebar_position: 2 +description: Transfer, approve, and read balances of osETH and osGNO tokens. osETH and osGNO are standard ERC-20 tokens with EIP-2612 permit support — accessible via sdk.contracts.tokens.mintToken in the StakeWise V3 SDK. +--- + +# osToken ERC-20 operations + +osETH and osGNO are standard ERC-20 tokens with EIP-2612 `permit` support. +The StakeWise V3 SDK exposes the osToken contract for the configured network +as `sdk.contracts.tokens.mintToken`, which automatically resolves to the +correct address (osETH on Mainnet/Hoodi, osGNO on Gnosis Chain). + +OsToken contract addresses *(also available in [Networks](/contracts/networks/))*: + +- **osETH** on Ethereum Mainnet: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` +- **osETH** on Hoodi testnet: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` +- **osGNO** on Gnosis Chain: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` + +## Transfer osGNO to another address (Gnosis Chain) + +```ts +import { BrowserProvider, parseEther } from 'ethers' +import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' + +const eip1193Provider = window.ethereum + +const browserProvider = new BrowserProvider(eip1193Provider, { + chainId: Network.Gnosis, + name: 'gnosis', +}) + +const sdk = new StakeWiseSDK({ + network: Network.Gnosis, + provider: browserProvider, +}) + +type Input = { + amount: string + userAddress: string + toAddress: string +} + +const transferOsGno = async (values: Input) => { + const { amount, userAddress, toAddress } = values + + try { + const value = parseEther(amount) + const osTokenContract = sdk.contracts.tokens.mintToken + + const balance = await osTokenContract.balanceOf(userAddress) + + if (balance < value) { + throw new Error('Insufficient osGNO balance.') + } + + const signer = await sdk.provider.getSigner(userAddress) + const signedContract = osTokenContract.connect(signer) + + const tx = await signedContract.transfer(toAddress, value) + + await sdk.provider.waitForTransaction(tx.hash) + } + catch (error) { + console.error(error) + } +} + +transferOsGno({ + amount: '0.5', // osGNO + userAddress: 'USER_ADDRESS', + toAddress: 'RECIPIENT_ADDRESS', +}) +``` + +## Transfer osETH to another address (Ethereum Mainnet) + +The same code works on Ethereum — only the network in the SDK constructor +changes. `sdk.contracts.tokens.mintToken` automatically resolves to the +osETH contract. + +```ts +import { BrowserProvider, parseEther } from 'ethers' +import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' + +const eip1193Provider = window.ethereum + +const browserProvider = new BrowserProvider(eip1193Provider, { + chainId: Network.Mainnet, + name: 'mainnet', +}) + +const sdk = new StakeWiseSDK({ + network: Network.Mainnet, + provider: browserProvider, +}) + +type Input = { + amount: string + userAddress: string + toAddress: string +} + +const transferOsEth = async (values: Input) => { + const { amount, userAddress, toAddress } = values + + try { + const value = parseEther(amount) + const osTokenContract = sdk.contracts.tokens.mintToken + + const balance = await osTokenContract.balanceOf(userAddress) + + if (balance < value) { + throw new Error('Insufficient osETH balance.') + } + + const signer = await sdk.provider.getSigner(userAddress) + const signedContract = osTokenContract.connect(signer) + + const tx = await signedContract.transfer(toAddress, value) + + await sdk.provider.waitForTransaction(tx.hash) + } + catch (error) { + console.error(error) + } +} + +transferOsEth({ + amount: '0.5', // osETH + userAddress: 'USER_ADDRESS', + toAddress: 'RECIPIENT_ADDRESS', +}) +``` + +## Approve a spender (e.g. a DeFi protocol) + +```ts +import { BrowserProvider, parseEther } from 'ethers' +import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' + +const eip1193Provider = window.ethereum + +const browserProvider = new BrowserProvider(eip1193Provider, { + chainId: Network.Mainnet, + name: 'mainnet', +}) + +const sdk = new StakeWiseSDK({ + network: Network.Mainnet, + provider: browserProvider, +}) + +type Input = { + amount: string + userAddress: string + spenderAddress: string +} + +const approveOsToken = async (values: Input) => { + const { amount, userAddress, spenderAddress } = values + + try { + const value = parseEther(amount) + const osTokenContract = sdk.contracts.tokens.mintToken + + const signer = await sdk.provider.getSigner(userAddress) + const signedContract = osTokenContract.connect(signer) + + const tx = await signedContract.approve(spenderAddress, value) + + await sdk.provider.waitForTransaction(tx.hash) + } + catch (error) { + console.error(error) + } +} + +approveOsToken({ + amount: '1.0', // osETH + userAddress: 'USER_ADDRESS', + spenderAddress: 'SPENDER_CONTRACT_ADDRESS', +}) +``` + +## Read balance and allowance + +```ts +import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' +import { formatEther } from 'ethers' + +const sdk = new StakeWiseSDK({ + network: Network.Mainnet, + endpoints: { + web3: 'https://mainnet.infura.io/v3/...', + }, +}) + +type Input = { + ownerAddress: string + spenderAddress: string +} + +const readOsTokenState = async (values: Input) => { + const { ownerAddress, spenderAddress } = values + + try { + const osTokenContract = sdk.contracts.tokens.mintToken + + const [ balance, allowance ] = await Promise.all([ + osTokenContract.balanceOf(ownerAddress), + osTokenContract.allowance(ownerAddress, spenderAddress), + ]) + + console.log('osETH balance:', formatEther(balance)) + console.log('osETH allowance:', formatEther(allowance)) + } + catch (error) { + console.error(error) + } +} + +readOsTokenState({ + ownerAddress: 'USER_ADDRESS', + spenderAddress: 'SPENDER_CONTRACT_ADDRESS', +}) +``` From 29e0328f9461d07d0eae546a2f8a403227233f76 Mon Sep 17 00:00:00 2001 From: dfkadyr Date: Fri, 8 May 2026 17:00:41 +0300 Subject: [PATCH 8/8] test --- docs/contracts/osToken-erc20.mdx | 228 ------------------------------- static/context7.json | 6 +- 2 files changed, 1 insertion(+), 233 deletions(-) delete mode 100644 docs/contracts/osToken-erc20.mdx diff --git a/docs/contracts/osToken-erc20.mdx b/docs/contracts/osToken-erc20.mdx deleted file mode 100644 index 07763653..00000000 --- a/docs/contracts/osToken-erc20.mdx +++ /dev/null @@ -1,228 +0,0 @@ ---- -id: osToken-erc20 -title: osToken ERC-20 operations -sidebar_position: 2 -description: Transfer, approve, and read balances of osETH and osGNO tokens. osETH and osGNO are standard ERC-20 tokens with EIP-2612 permit support — accessible via sdk.contracts.tokens.mintToken in the StakeWise V3 SDK. ---- - -# osToken ERC-20 operations - -osETH and osGNO are standard ERC-20 tokens with EIP-2612 `permit` support. -The StakeWise V3 SDK exposes the osToken contract for the configured network -as `sdk.contracts.tokens.mintToken`, which automatically resolves to the -correct address (osETH on Mainnet/Hoodi, osGNO on Gnosis Chain). - -OsToken contract addresses *(also available in [Networks](/contracts/networks/))*: - -- **osETH** on Ethereum Mainnet: `0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38` -- **osETH** on Hoodi testnet: `0x7345fC8268459413beE9e9dd327f31283C65Ee7e` -- **osGNO** on Gnosis Chain: `0xF490c80aAE5f2616d3e3BDa2483E30C4CB21d1A0` - -## Transfer osGNO to another address (Gnosis Chain) - -```ts -import { BrowserProvider, parseEther } from 'ethers' -import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' - -const eip1193Provider = window.ethereum - -const browserProvider = new BrowserProvider(eip1193Provider, { - chainId: Network.Gnosis, - name: 'gnosis', -}) - -const sdk = new StakeWiseSDK({ - network: Network.Gnosis, - provider: browserProvider, -}) - -type Input = { - amount: string - userAddress: string - toAddress: string -} - -const transferOsGno = async (values: Input) => { - const { amount, userAddress, toAddress } = values - - try { - const value = parseEther(amount) - const osTokenContract = sdk.contracts.tokens.mintToken - - const balance = await osTokenContract.balanceOf(userAddress) - - if (balance < value) { - throw new Error('Insufficient osGNO balance.') - } - - const signer = await sdk.provider.getSigner(userAddress) - const signedContract = osTokenContract.connect(signer) - - const tx = await signedContract.transfer(toAddress, value) - - await sdk.provider.waitForTransaction(tx.hash) - } - catch (error) { - console.error(error) - } -} - -transferOsGno({ - amount: '0.5', // osGNO - userAddress: 'USER_ADDRESS', - toAddress: 'RECIPIENT_ADDRESS', -}) -``` - -## Transfer osETH to another address (Ethereum Mainnet) - -The same code works on Ethereum — only the network in the SDK constructor -changes. `sdk.contracts.tokens.mintToken` automatically resolves to the -osETH contract. - -```ts -import { BrowserProvider, parseEther } from 'ethers' -import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' - -const eip1193Provider = window.ethereum - -const browserProvider = new BrowserProvider(eip1193Provider, { - chainId: Network.Mainnet, - name: 'mainnet', -}) - -const sdk = new StakeWiseSDK({ - network: Network.Mainnet, - provider: browserProvider, -}) - -type Input = { - amount: string - userAddress: string - toAddress: string -} - -const transferOsEth = async (values: Input) => { - const { amount, userAddress, toAddress } = values - - try { - const value = parseEther(amount) - const osTokenContract = sdk.contracts.tokens.mintToken - - const balance = await osTokenContract.balanceOf(userAddress) - - if (balance < value) { - throw new Error('Insufficient osETH balance.') - } - - const signer = await sdk.provider.getSigner(userAddress) - const signedContract = osTokenContract.connect(signer) - - const tx = await signedContract.transfer(toAddress, value) - - await sdk.provider.waitForTransaction(tx.hash) - } - catch (error) { - console.error(error) - } -} - -transferOsEth({ - amount: '0.5', // osETH - userAddress: 'USER_ADDRESS', - toAddress: 'RECIPIENT_ADDRESS', -}) -``` - -## Approve a spender (e.g. a DeFi protocol) - -```ts -import { BrowserProvider, parseEther } from 'ethers' -import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' - -const eip1193Provider = window.ethereum - -const browserProvider = new BrowserProvider(eip1193Provider, { - chainId: Network.Mainnet, - name: 'mainnet', -}) - -const sdk = new StakeWiseSDK({ - network: Network.Mainnet, - provider: browserProvider, -}) - -type Input = { - amount: string - userAddress: string - spenderAddress: string -} - -const approveOsToken = async (values: Input) => { - const { amount, userAddress, spenderAddress } = values - - try { - const value = parseEther(amount) - const osTokenContract = sdk.contracts.tokens.mintToken - - const signer = await sdk.provider.getSigner(userAddress) - const signedContract = osTokenContract.connect(signer) - - const tx = await signedContract.approve(spenderAddress, value) - - await sdk.provider.waitForTransaction(tx.hash) - } - catch (error) { - console.error(error) - } -} - -approveOsToken({ - amount: '1.0', // osETH - userAddress: 'USER_ADDRESS', - spenderAddress: 'SPENDER_CONTRACT_ADDRESS', -}) -``` - -## Read balance and allowance - -```ts -import { StakeWiseSDK, Network } from '@stakewise/v3-sdk' -import { formatEther } from 'ethers' - -const sdk = new StakeWiseSDK({ - network: Network.Mainnet, - endpoints: { - web3: 'https://mainnet.infura.io/v3/...', - }, -}) - -type Input = { - ownerAddress: string - spenderAddress: string -} - -const readOsTokenState = async (values: Input) => { - const { ownerAddress, spenderAddress } = values - - try { - const osTokenContract = sdk.contracts.tokens.mintToken - - const [ balance, allowance ] = await Promise.all([ - osTokenContract.balanceOf(ownerAddress), - osTokenContract.allowance(ownerAddress, spenderAddress), - ]) - - console.log('osETH balance:', formatEther(balance)) - console.log('osETH allowance:', formatEther(allowance)) - } - catch (error) { - console.error(error) - } -} - -readOsTokenState({ - ownerAddress: 'USER_ADDRESS', - spenderAddress: 'SPENDER_CONTRACT_ADDRESS', -}) -``` diff --git a/static/context7.json b/static/context7.json index 312dd80d..5a57fbc6 100644 --- a/static/context7.json +++ b/static/context7.json @@ -1,8 +1,4 @@ { - "$schema": "https://context7.com/schema/context7.json", - "projectTitle": "StakeWise Documentation", - "description": "Official documentation for StakeWise liquid staking protocol on Ethereum and Gnosis Chain — covers Stakers, Vault Operators, smart contracts, protocol concepts, and SDK quick-start guides. For the full SDK API reference, also see /stakewise/v3-sdk.", "url": "https://context7.com/websites/stakewise_io", - "public_key": "pk_wpaUy9UwJWjviJip1LFYx", - "rules": [] + "public_key": "pk_wpaUy9UwJWjviJip1LFYx" }