ISLAYVaultFactoryV2
Interface for the SLAYVaultFactory contract.
Functions
create
For operator (the caller) to create a new SLAYVault instance using the Beacon proxy pattern. The IERC20Metadata is used to initialize the vault with its name and symbol prefixed. This self-serve function allows operators to create new vaults without needing to go through the owner. For example an operator can create a vault for a new token that is IERC20Metadata compliant. Given the {ERC20.name()} is Token and {ERC20.symbol()} is TKN, the vault will be initialized with the name “Restaked {name} {ERC20.name()}” and symbol “sat.{symbol}.{ERC20.symbol()}”. We recommend operators to use a unique infix name and symbol to avoid confusion with other vaults. For instance, if operator is Babylon then the vault name can be “Restaked Babylon Wrapped BTC” and symbol “sat.BABY.WBTC”.
function create(IERC20Metadata asset, string calldata name, string calldata symbol) external returns (SLAYVaultV2);Parameters
| Name | Type | Description |
|---|---|---|
asset | IERC20Metadata | The ERC20Metadata asset to be used in the vault. |
name | string | The infix name of the tokenized vault token. (e.g. “Restaked {name} Wrapped BTC” ) |
symbol | string | The infix symbol of the tokenized vault token. (e.g. “sat.{symbol}.WBTC” ) |
Returns
| Name | Type | Description |
|---|---|---|
<none> | SLAYVaultV2 | The newly created SLAYVault instance. |
create
For owner to create a new SLAYVault instance using the Beacon proxy pattern. This function allows the owner to create a vault with a custom operator, name, and symbol. This scenario is mainly used for creating vaults that aren’t IERC20Metadata compliant. For example, an owner can create a vault for a custom token that does not implement the IERC20Metadata interface.
function create(IERC20 asset, address operator, string memory name, string memory symbol)
external
returns (SLAYVaultV2);Parameters
| Name | Type | Description |
|---|---|---|
asset | IERC20 | The ERC20 asset to be used in the vault. |
operator | address | The address that will be the operator of the vault. |
name | string | The name of the tokenized vault token. |
symbol | string | The symbol of the tokenized vault token. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | SLAYVaultV2 | The newly created SLAYVault instance. |
Errors
NotOperator
The account is not an operator.
error NotOperator(address account);