VaultGnoStaking
Inherits: Initializable ↗, VaultAdmin →, VaultState →, VaultValidators →, VaultEnterExit →, IVaultGnoStaking
Defines the Gnosis staking functionality for the Vault.
Events
XdaiSwapped
Emitted when xDAI is swapped to GNO (deprecated)
event XdaiSwapped(uint256 amount, uint256 assets);
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | The amount of xDAI swapped |
assets | uint256 | The amount of GNO received |
Functions
deposit
Deposit GNO to the Vault
function deposit(uint256 assets, address receiver, address referrer)
public
virtual
override
returns (uint256 shares);
Parameters
| Name | Type | Description |
|---|---|---|
assets | uint256 | The amount of GNO to deposit |
receiver | address | The address that will receive Vault's shares |
referrer | address | The address of the referrer. Set to zero address if not used. |
Returns
| Name | Type | Description |
|---|---|---|
shares | uint256 | The number of shares minted |
donateAssets
Donate assets to the Vault. Must approve GNO transfer before the call.
function donateAssets(uint256 amount) external override;
Parameters
| Name | Type | Description |
|---|---|---|
amount | uint256 | The amount of GNO to donate |
receive
Function for receiving xDAI and forwarding it to the tokens converter
receive() external payable;