OrgFundFactory
This contract is the factory for both the Org and Fund objects.
function ETH_PLACEHOLDER() external view returns (address)
Placeholder address used in swapping method to denote usage of ETH instead of a token.
Name | Type | Description |
---|---|---|
_0 | address | undefined |
function baseToken() external view returns (contract ERC20)
Base Token address is the stable coin used throughout the system.
Name | Type | Description |
---|---|---|
_0 | contract ERC20 | undefined |
function computeFundAddress(bytes32 _salt) external view returns (address)
Calculates a Fund contract's deployment address.
This function is used off-chain by the automated tests to verify proper contract address deployment.
Name | Type | Description |
---|---|---|
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
Name | Type | Description |
---|---|---|
_0 | address | The Fund's deployment address. |
function computeOrgAddress(bytes32 _salt) external view returns (address)
Calculates an Org contract's deployment address.
This function is used off-chain by the automated tests to verify proper contract address deployment.
Name | Type | Description |
---|---|---|
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
Name | Type | Description |
---|---|---|
_0 | address | The Org's deployment address. |
function deployFund(address _manager, bytes32 _salt) external nonpayable returns (contract Fund _fund)
Deploys a Fund.
Name | Type | Description |
---|---|---|
_manager | address | The address of the Fund's manager. |
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
Name | Type | Description |
---|---|---|
_fund | contract Fund | The deployed Fund. |
function deployFundAndDonate(address _manager, bytes32 _salt, uint256 _amount) external nonpayable returns (contract Fund _fund)
Deploys a Fund then pulls base token from the sender and donates to it.
Name | Type | Description |
---|---|---|
_manager | address | The address of 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 token to donate. |
Name | Type | Description |
---|---|---|
_fund | contract Fund | The deployed Fund. |
function deployFundSwapAndDonate(address _manager, bytes32 _salt, contract ISwapWrapper _swapWrapper, address _tokenIn, uint256 _amountIn, bytes _data) external payable returns (contract Fund _fund)
Deploys a new Fund, then pulls a ETH or ERC20 tokens, swaps them to base tokens, and donates to the new Fund.
Name | Type | Description |
---|---|---|
_manager | address | The address of the Fund's manager. |
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
_swapWrapper | contract ISwapWrapper | The swap wrapper to use for the donation. Must be whitelisted on the Registry. |
_tokenIn | address | The address of the ERC20 token to swap and donate, or ETH_PLACEHOLDER if donating ETH. |
_amountIn | uint256 | The amount of tokens or ETH being swapped and donated. |
_data | bytes | Additional call data required by the ISwapWrapper being used. |
Name | Type | Description |
---|---|---|
_fund | contract Fund | The deployed Fund. |
function deployOrg(bytes32 _orgId, bytes32 _salt) external nonpayable returns (contract Org _org)
Deploys an Org.
Name | Type | Description |
---|---|---|
_orgId | bytes32 | The Org's ID for tax purposes. |
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
Name | Type | Description |
---|---|---|
_org | contract Org | The deployed Org. |
function deployOrgAndDonate(bytes32 _orgId, bytes32 _salt, uint256 _amount) external nonpayable returns (contract Org _org)
Deploys an Org then pulls base token from the sender and donates to it.
Name | Type | Description |
---|---|---|
_orgId | bytes32 | The Org's ID for tax purposes. |
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
_amount | uint256 | The amount of base token to donate. |
Name | Type | Description |
---|---|---|
_org | contract Org | The deployed Org. |
function deployOrgSwapAndDonate(bytes32 _orgId, bytes32 _salt, contract ISwapWrapper _swapWrapper, address _tokenIn, uint256 _amountIn, bytes _data) external payable returns (contract Org _org)
Deploys a new Org, then pulls a ETH or ERC20 tokens, swaps them to base tokens, and donates to the new Org.
Name | Type | Description |
---|---|---|
_orgId | bytes32 | The Org's ID for tax purposes. |
_salt | bytes32 | A 32-byte value used to create the contract at a deterministic address. |
_swapWrapper | contract ISwapWrapper | The swap wrapper to use for the donation. Must be whitelisted on the Registry. |
_tokenIn | address | The address of the ERC20 token to swap and donate, or ETH_PLACEHOLDER if donating ETH. |
_amountIn | uint256 | The amount of tokens or ETH being swapped and donated. |
_data | bytes | Additional call data required by the ISwapWrapper being used. |
Name | Type | Description |
---|---|---|
_org | contract Org | The deployed Org. |
function fundImplementation() external view returns (contract Fund)
The concrete Fund used for minimal proxy deployment.
Name | Type | Description |
---|---|---|
_0 | contract Fund | undefined |
function orgImplementation() external view returns (contract Org)
The concrete Org used for minimal proxy deployment.
Name | Type | Description |
---|---|---|
_0 | contract Org | undefined |
function registry() external view returns (contract Registry)
_registry The registry to host the Entity.
Name | Type | Description |
---|---|---|
_0 | contract Registry | undefined |
event EntityDeployed(address indexed entity, uint8 indexed entityType, address indexed entityManager)
Emitted when an Entity is deployed.
Name | Type | Description |
---|---|---|
entity indexed | address | undefined |
entityType indexed | uint8 | undefined |
entityManager indexed | address | undefined |
Last modified 4mo ago