Search
K

TransferDeployer

This contract serves to automatically deploy entities on entity transfers

State Variables

orgFundFactory

The canonical OrgFundFactory address
OrgFundFactory public immutable orgFundFactory;

Functions

requiresManager

modifier requiresManager(Entity _entity);

constructor

constructor(OrgFundFactory _orgFundFactory);
Parameters
Name
Type
Description
_orgFundFactory
OrgFundFactory
The canonical OrgFundFactory address

deployOrgAndTransfer

Deploys an Org and transfers assets from the source entity
Can only be called by the source entity's manager or will revert
function deployOrgAndTransfer(Entity _source, bytes32 _orgId, uint256 _amount)
external
requiresManager(_source)
returns (Org _org);
Parameters
Name
Type
Description
_source
Entity
The source entity that wants to transfer
_orgId
bytes32
The Org's ID for tax purposes
_amount
uint256
The amount of base tokens to transfer to the deployed Org
Returns
Name
Type
Description
_org
Org
The deployed Org

deployFundAndTransfer

Deploys a Fund and transfers assets from the source entity
Can only be called by the source entity's manager or will revert
function deployFundAndTransfer(Entity _source, address _manager, bytes32 _salt, uint256 _amount)
external
requiresManager(_source)
returns (Fund _fund);
Parameters
Name
Type
Description
_source
Entity
The source entity that wants to transfer
_manager
address
The Fund's manager
_salt
bytes32
A 32-byte value used to create the contract at a deterministic address
_amount
uint256
The amount of base tokens to transfer to the deployed Fund
Returns
Name
Type
Description
_fund
Fund
The deployed Fund

Events

OrgDeployedAndTransferred

Emitted when an Org is deployed and assets are transferred to it
event OrgDeployedAndTransferred(Org org, Entity source, uint256 amount);

FundDeployedAndTransferred

Emitted when a Fund is deployed and assets are transferred to it
event FundDeployedAndTransferred(Fund fund, Entity source, uint256 amount);