All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

VAI

VAIVault

VAI Vault

The VAI Vault is configured for users to stake VAI And receive XVS as a reward.

Solidity API

pause

Pause vault


resume

Resume vault


deposit

Deposit VAI to VAIVault for XVS allocation

Parameters

Name
Type
Description

withdraw

Withdraw VAI from VAIVault

Parameters

Name
Type
Description

claim

Claim XVS from VAIVault


claim

Claim XVS from VAIVault

Parameters

Name
Type
Description

pendingXVS

View function to see pending XVS on frontend

Parameters

Name
Type
Description

Return Values

Name
Type
Description

updatePendingRewards

Function that updates pending rewards


_become

  • Admin Functions **


setAccessControl

Sets the address of the access control of this contract

Parameters

Name
Type
Description

_amount

uint256

The amount to deposit to vault

_amount

uint256

The amount to withdraw from vault

account

address

The account for which to claim XVS

_user

address

The user to see pending XVS

[0]

uint256

Amount of XVS the user can claim

newAccessControlAddress

address

New address for the access control

function pause() external
function resume() external
function deposit(uint256 _amount) external
function withdraw(uint256 _amount) external
function claim() external
function claim(address account) external
function pendingXVS(address _user) public view returns (uint256)
function updatePendingRewards() public
function _become(contract VAIVaultProxy vaiVaultProxy) external
function setAccessControl(address newAccessControlAddress) external

VAIVaultProxy

VAI Vault Proxy

Proxy contract for the VAI Vault

Solidity API

_setPendingImplementation

  • Admin Functions **


_acceptImplementation

Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation

Return Values

Name
Type
Description

_setPendingAdmin

Begins transfer of admin rights. The newPendingAdmin must call _acceptAdmin to finalize the transfer.

Parameters

Name
Type
Description

Return Values

Name
Type
Description

_acceptAdmin

Accepts transfer of admin rights. msg.sender must be pendingAdmin

Return Values

Name
Type
Description

[0]

uint256

uint 0=success, otherwise a failure (see ErrorReporter.sol for details)

newPendingAdmin

address

New pending admin.

[0]

uint256

uint 0=success, otherwise a failure (see ErrorReporter.sol for details)

[0]

uint256

uint 0=success, otherwise a failure (see ErrorReporter.sol for details)

function _setPendingImplementation(address newPendingImplementation) public returns (uint256)
function _acceptImplementation() public returns (uint256)
function _setPendingAdmin(address newPendingAdmin) public returns (uint256)
function _acceptAdmin() public returns (uint256)