AriaIPRWAVaultFactory

Inherits: IAriaIPRWAVaultFactory, UUPSUpgradeable, AccessControl

This contract is used to deploy new AriaIPRWAVault instances

State Variables

AriaIPRWAVaultFactoryStorageLocation

bytes32 public constant AriaIPRWAVaultFactoryStorageLocation =
    0x7921dd9d2a27003607aeccbdc5d8b1cb6480ee25e74a8450b0073a735a571f00;

Functions

constructor

Note: oz-upgrades-unsafe-allow: constructor

constructor();

initialize

Initializes the factory

function initialize(StoryAddrs memory storyAddrs, address admin_, address vaultTemplate_) external initializer;

Parameters

Name
Type
Description

storyAddrs

StoryAddrs

The story addresses

admin_

address

The address of the admin

vaultTemplate_

address

The address of AriaIPRWAVault

deployFundraiseIpVault

Deploys a new fundraise IP vault

zero address checks skipped: they are checked in the AriaIPRWAVault initializer

function deployFundraiseIpVault(
    address admin,
    AriaIPRWAVaultStorage.FractionalTokenDetails memory tokenDetails,
    VaultFundraiseStorage.Setup memory fundraiseSetup,
    uint48 withdrawalTimelockDuration,
    uint256 claimDeadline,
    address legal
) external returns (address ipVault);

Parameters

Name
Type
Description

admin

address

The address of the admin

tokenDetails

AriaIPRWAVaultStorage.FractionalTokenDetails

The details of the fractional token

fundraiseSetup

VaultFundraiseStorage.Setup

The setup of the fundraise

withdrawalTimelockDuration

uint48

The timelock duration (in seconds) for admin fractional token withdrawals.

claimDeadline

uint256

The deadline for the users to claim the fractional token.

legal

address

The address of the legal contract that checks blacklist and license.

Returns

Name
Type
Description

ipVault

address

The address of the deployed IP Vault

deployWhitelistIpVault

Deploys a new whitelist IP vault

zero address checks skipped: they are checked in the AriaIPRWAVault initializer

function deployWhitelistIpVault(
    address admin,
    AriaIPRWAVaultStorage.FractionalTokenDetails memory tokenDetails,
    bytes32 merkleRoot,
    uint48 withdrawalTimelockDuration,
    uint256 claimDeadline,
    address legal
) external returns (address ipVault);

Parameters

Name
Type
Description

admin

address

The address of the admin

tokenDetails

AriaIPRWAVaultStorage.FractionalTokenDetails

The details of the fractional token

merkleRoot

bytes32

The merkle root of the whitelist

withdrawalTimelockDuration

uint48

The timelock duration (in seconds) for admin fractional token withdrawals.

claimDeadline

uint256

The deadline for the users to claim the fractional token.

legal

address

The address of the legal contract that checks blacklist and license.

Returns

Name
Type
Description

ipVault

address

The address of the deployed IP Vault

setVaultTemplate

Sets the vault template

function setVaultTemplate(address newVault) external onlyRole(AccessControlStorage.DEFAULT_ADMIN_ROLE);

Parameters

Name
Type
Description

newVault

address

The address of the new vault template

isAdmin

function isAdmin(address account) external view returns (bool);

Returns

Name
Type
Description

<none>

bool

True if the caller is the admin

getStoryAddrs

function getStoryAddrs() external view returns (StoryAddrs memory);

getVaultTemplate

Returns the address of the vault template

function getVaultTemplate() external view returns (address);

Returns

Name
Type
Description

<none>

address

vaultTemplate The address of the vault template

_authorizeUpgrade

Hook to authorize the upgrade according to UUPSUpgradeable

Enforced to be only callable by the protocol admin in governance.

function _authorizeUpgrade(address newImplementation)
    internal
    override
    onlyRole(AccessControlStorage.DEFAULT_ADMIN_ROLE);

Parameters

Name
Type
Description

newImplementation

address

The address of the new implementation

_deployInitProxy

function _deployInitProxy(bytes memory data) internal returns (address ipVault);

_getAriaIPRWAVaultFactoryStorage

Returns the storage struct of AriaIPRWAVaultFactory.

function _getAriaIPRWAVaultFactoryStorage() private pure returns (AriaIPRWAVaultFactoryStorage storage $);

Events

VaultTemplateUpdated

event VaultTemplateUpdated(address oldVaultTemplate, address newVaultTemplate);

Structs

AriaIPRWAVaultFactoryStorage

Storage structure for the AriaIPRWAVaultFactory

Note: storage-location: erc7201:aria-protocol.AriaIPRWAVaultFactory

struct AriaIPRWAVaultFactoryStorage {
    StoryAddrs storyAddrs;
    address vaultTemplate;
}