Comment on page

ArrakisV2Factory

Factory contract for deploying ArrakisV2 vault instances

Constant/Immutable Properties

name
type
description
arrakisV2Beacon
address
Address that stores the implementation of ArrakisV2

Internal Properties

name
type
description
_vaults
AddressSet
Every deployed ArrakisV2 vault instance

Structs

InitializePayload

name
type
description
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 :
name
type
description
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 :
name
type
description
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 :
name
type
description
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 :
name
type
description
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 :
name
type
description
vaults
address[]
TransparentProxy vaults to burn upgradeability of
modifiers :
  • only owner

getProxyAdmin

inspect the proxyAdmin of an ArrakisV2 instance

parameters :

name
type
description
proxy
address
Proxy address to get the admin() of

return :

name
type
description
admin
address
Address of proxy admin

getProxyImplementation

inspect the underlying implementation of an ArrakisV2 instance

parameters :

name
type
description
proxy
address
Proxy address to get the implementation() of
returns :
name
type
description
implementation
address
Address of proxy underlying implementation

Inherited Standard Interfaces:

  • Ownable (transferOwnership)