Skip to main content

VaultConfigurator

Git Source

Methods

DELEGATOR_FACTORY

function DELEGATOR_FACTORY() external view returns (address)

Get the delegator factory’s address.

Returns

NameTypeDescription
addressaddress of the delegator factory

SLASHER_FACTORY

function SLASHER_FACTORY() external view returns (address)

Get the slasher factory’s address.

Returns

NameTypeDescription
addressaddress of the slasher factory

VAULT_FACTORY

function VAULT_FACTORY() external view returns (address)

Get the vault factory’s address.

Returns

NameTypeDescription
addressaddress of the vault factory

create

function create(InitParams params) external nonpayable returns (address vault, address delegator, address slasher)

Create a new vault with a delegator and a slasher.

Parameters

NameTypeDescription
paramsInitParamsinitial parameters needed for a vault with a delegator and a slasher deployment

Returns

NameTypeDescription
vaultaddressaddress of the vault
delegatoraddressaddress of the delegator
slasheraddressaddress of the slasher

Structs

InitParams

struct InitParams {
uint64 version;
address owner;
bytes vaultParams;
uint64 delegatorIndex;
bytes delegatorParams;
bool withSlasher;
uint64 slasherIndex;
bytes slasherParams;
}

Initial parameters needed for a vault with a delegator and a slasher deployment.

Parameters

NameTypeDescription
versionuint64entity’s version to use
owneraddressinitial owner of the entity
vaultParamsbytesparameters for the vault initialization
delegatorIndexuint64delegator’s index of the implementation to deploy
delegatorParamsbytesparameters for the delegator initialization
withSlasherboolwhether to deploy a slasher or not
slasherIndexuint64slasher’s index of the implementation to deploy (used only if withSlasher == true)
slasherParamsbytesparameters for the slasher initialization (used only if withSlasher == true)