Skip to content
🚧 Under Development! May be incomplete.Some pages/links may be incomplete or subject to change.

RewardVaultFactory

0x2B6e40f65D82A0cB98795bC7587a71bfa49fBB2B | ABI JSON

Functions

createRewardVault

Creates a new reward vault for the given staking token.

Reverts if the staking token is not a contract.

Reverts if a vault already exists for the given staking token and the base vault implementation hasn't changed as its deployment is deterministic.

solidity
function createRewardVault(address stakingToken) external returns (address);

Parameters

NameTypeDescription
stakingTokenaddressThe address of the staking token.

Returns

NameTypeDescription
<none>addressThe address of the new vault.

setRewardVaultImplementation

Updates the vault implementation.

Only callable by the governance.

solidity
function setRewardVaultImplementation(address _vaultImpl) external;

Parameters

NameTypeDescription
_vaultImpladdressThe address of the new vault implementation.

VAULT_MANAGER_ROLE

Gets the VAULT_MANAGER_ROLE.

solidity
function VAULT_MANAGER_ROLE() external view returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The VAULT_MANAGER_ROLE.

getVault

Gets the vault for the given staking token.

solidity
function getVault(address stakingToken) external view returns (address);

Parameters

NameTypeDescription
stakingTokenaddressThe address of the staking token.

Returns

NameTypeDescription
<none>addressThe address of the vault.

allVaultsLength

Gets the number of vaults that have been created.

solidity
function allVaultsLength() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The number of vaults.

predictRewardVaultAddress

Predicts the address of the reward vault for the given staking token.

solidity
function predictRewardVaultAddress(address stakingToken) external view returns (address);

Parameters

NameTypeDescription
stakingTokenaddressThe address of the staking token.

Returns

NameTypeDescription
<none>addressThe address of the reward vault.

Events

VaultCreated

Emitted when a new vault is created.

solidity
event VaultCreated(address indexed stakingToken, address indexed vault);

Parameters

NameTypeDescription
stakingTokenaddressThe address of the staking token.
vaultaddressThe address of the vault.

UpdateRewardVaultImplementation

Emitted when the vault implementation is updated.

solidity
event UpdateRewardVaultImplementation(address indexed oldVaultImpl, address indexed newVaultImpl);

Parameters

NameTypeDescription
oldVaultImpladdressThe address of the old vault implementation.
newVaultImpladdressThe address of the new vault implementation.