GnoErc20Vault
Inherits: VaultImmutables →, Initializable ↗, VaultAdmin →, VaultVersion →, VaultFee →, VaultState →, VaultValidators →, VaultEnterExit →, VaultOsToken →, VaultMev →, VaultToken →, VaultGnoStaking →, Multicall →, IGnoErc20Vault
Defines the Gnosis staking Vault with ERC20 ↗ token.
Structs
GnoErc20VaultConstructorArgs
Struct for initializing the GnoErc20Vault contract
struct GnoErc20VaultConstructorArgs {
address keeper;
address vaultsRegistry;
address validatorsRegistry;
address validatorsWithdrawals;
address validatorsConsolidations;
address consolidationsChecker;
address osTokenVaultController;
address osTokenConfig;
address osTokenVaultEscrow;
address sharedMevEscrow;
address depositDataRegistry;
address gnoToken;
address tokensConverterFactory;
uint256 exitingAssetsClaimDelay;
}
Properties
| Name | Type | Description |
|---|---|---|
keeper | address | The address of the Keeper contract |
vaultsRegistry | address | The address of the VaultsRegistry contract |
validatorsRegistry | address | The contract address used for registering validators in beacon chain |
validatorsWithdrawals | address | The contract address used for withdrawing validators in beacon chain |
validatorsConsolidations | address | The contract address used for consolidating validators in beacon chain |
consolidationsChecker | address | The contract address used for checking consolidations |
osTokenVaultController | address | The address of the OsTokenVaultController contract |
osTokenConfig | address | The address of the OsTokenConfig contract |
osTokenVaultEscrow | address | The address of the OsTokenVaultEscrow contract |
sharedMevEscrow | address | The address of the shared MEV escrow |
depositDataRegistry | address | The address of the DepositDataRegistry contract |
gnoToken | address | The address of the GNO token |
tokensConverterFactory | address | The address of the TokensConverterFactory contract |
exitingAssetsClaimDelay | uint256 | The delay after which the assets can be claimed after exiting from staking |
GnoErc20VaultInitParams
Struct for initializing the GnoErc20Vault contract
struct GnoErc20VaultInitParams {
uint256 capacity;
uint16 feePercent;
string name;
string symbol;
string metadataIpfsHash;
}
Properties
| Name | Type | Description |
|---|---|---|
capacity | uint256 | The Vault stops accepting deposits after exceeding the capacity |
feePercent | uint16 | The fee percent that is charged by the Vault |
name | string | The name of the ERC20 token |
symbol | string | The symbol of the ERC20 token |
metadataIpfsHash | string | The IPFS hash of the Vault's metadata file |
Functions
transfer
Moves amount tokens from the caller's account to to.
function transfer(address to, uint256 amount) public virtual override(IERC20, ERC20Upgradeable) returns (bool);
transferFrom
Moves amount tokens from from to to using the allowance mechanism.
amount is then deducted from the caller's allowance.
function transferFrom(address from, address to, uint256 amount)
public
virtual
override(IERC20, ERC20Upgradeable)
returns (bool);
enterExitQueue
Locks shares to the exit queue. The shares continue earning rewards until they will be burned by the Vault.
function enterExitQueue(uint256 shares, address receiver)
public
virtual
override(IVaultEnterExit, VaultEnterExit, VaultOsToken)
returns (uint256 positionTicket);
Parameters
| Name | Type | Description |
|---|---|---|
shares | uint256 | The number of shares to lock |
receiver | address | The address that will receive assets upon withdrawal |
Returns
| Name | Type | Description |
|---|---|---|
positionTicket | uint256 | The position ticket of the exit queue. Returns uint256 max if no ticket created. |
vaultId
Vault Unique Identifier
function vaultId() public pure virtual override(IVaultVersion, VaultVersion) returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | The unique identifier of the Vault |
version
Version
function version() public pure virtual override(IVaultVersion, VaultVersion) returns (uint8);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint8 | The version of the Vault implementation contract |