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 “SatLayer Token” and symbol “satTKN”.
function create(IERC20Metadata asset) external returns (SLAYVaultV2);
Parameters
Name | Type | Description |
---|---|---|
asset | IERC20Metadata | The ERC20Metadata asset to be used in the vault. |
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);