ArrakisV2Factory

Factory contract for deploying ArrakisV2 vault instances

Constant/Immutable Properties

nametypedescription

arrakisV2Beacon

address

Address that stores the implementation of ArrakisV2

Internal Properties

nametypedescription

_vaults

AddressSet

Every deployed ArrakisV2 vault instance

Structs

InitializePayload

nametypedescription

feeTiers

uint24[]

Uniswap V3 feeTiers to whitelist for token pair

token0

address

ERC20 token, MUST be lower hex address than token1

token1

address

ERC20 token, MUST be higher hex address than token0

owner

address

Initial owner of ArrakisV2 instance

init0

uint256

Initial token0 ratio (for first mint)

init1

uint256

Initial token1 ratio (for first mint)

manager

address

Initial manager of ArrakisV2 instance

routers

address[]

Initial swap routers whitelisted

External Functions

deployVault

deploy an ArrakisV2 vault instance

parameters :

nametypedescription

params

InitializePayload

Struct containing vault initialization parameters

isBeacon

bool

Flag whether ArrakisV2 instance is BeaconProxy or TransparentProxy ( should be true except in very rare custom cases )

returns :

nametypedescription

vault

address

Address of deployed ArrakisV2 instance

checks :

  • check token addresses are not 0

  • check token addresses are not the same

events :

  • VaultCreated(address indexed manager, address indexed vault)

upgradeVaults

upgrade standalone TransparentProxy vaults to the latest Beacon implementation

parameters :

nametypedescription

vaults

address[]

TransparentProxy vaults to upgrade to new beacon implementation individually

modifiers :

  • only owner

upgradeVaultsAndCall

upgrade standalone TransparentProxy vaults to the latest Beacon implementation and subsequently make a call

parameters :

nametypedescription

vaults

address[]

TransparentProxy vaults to upgrade to new beacon implementation individually

datas

bytes[]

Calldata per vault, to call immediately after upgrading each vault

modifiers :

  • only owner

makeVaultsImmutable

harden standalone TransparentProxy vaults by burning upgradability powers

parameters :

nametypedescription

vaults

address[]

TransparentProxy vaults to burn upgradeability of

modifiers :

  • only owner

getProxyAdmin

inspect the proxyAdmin of an ArrakisV2 instance

parameters :

nametypedescription

proxy

address

Proxy address to get the admin() of

return :

nametypedescription

admin

address

Address of proxy admin

getProxyImplementation

inspect the underlying implementation of an ArrakisV2 instance

parameters :

nametypedescription

proxy

address

Proxy address to get the implementation() of

returns :

nametypedescription

implementation

address

Address of proxy underlying implementation

Inherited Standard Interfaces:

  • Ownable (transferOwnership)

Last updated