Skip to Content
EvmContract ReferenceISLAYVaultFactoryV2

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

NameTypeDescription
assetIERC20MetadataThe ERC20Metadata asset to be used in the vault.

Returns

NameTypeDescription
<none>SLAYVaultV2The 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

NameTypeDescription
assetIERC20The ERC20 asset to be used in the vault.
operatoraddressThe address that will be the operator of the vault.
namestringThe name of the tokenized vault token.
symbolstringThe symbol of the tokenized vault token.

Returns

NameTypeDescription
<none>SLAYVaultV2The newly created SLAYVault instance.

Errors

NotOperator

The account is not an operator.

error NotOperator(address account);
Last updated on