IPartyFactory
PartyCreated
event PartyCreated(address partyAddress)
Emitted when a new party is created
Parameters
Name | Type | Description |
---|---|---|
partyAddress | address | Address of the new party created |
DefaultCutChanged
event DefaultCutChanged(struct IDiamondCut.FacetCut[] newCut)
Emitted when the default cut is changed
Parameters
Name | Type | Description |
---|---|---|
newCut | struct IDiamondCut.FacetCut[] | Array of FacetCut structs |
PlatformSentinelChanged
event PlatformSentinelChanged(address sentinel)
Emitted when the Platform Sentinel is changed
Parameters
Name | Type | Description |
---|---|---|
sentinel | address | Address of the Platform Sentinel |
PlatformCollectorChanged
event PlatformCollectorChanged(address collector)
Emitted when the Platform Fee Collector is changed
Parameters
Name | Type | Description |
---|---|---|
collector | address | Address of the Platform Fee Collector |
PlatformFeeChanged
event PlatformFeeChanged(uint256 fee)
Emitted when the Platform Fee is changed
Parameters
Name | Type | Description |
---|---|---|
fee | uint256 | Amount of the Platform Fee (in bps) |
PfiChanged
event PfiChanged(address pfi)
Emitted when the pFi token address is changed
Parameters
Name | Type | Description |
---|---|---|
pfi | address | Address of pFi token |
PfiFeeChanged
event PfiFeeChanged(uint256 pfiFee)
Emitted when the pFi party creation fee is changed
Parameters
Name | Type | Description |
---|---|---|
pfiFee | uint256 | Amount of pFi party creation fee |
StatusChanged
event StatusChanged(bool status)
Emitted when the PartyFactory status is changed
Parameters
Name | Type | Description |
---|---|---|
status | bool | Status of the PartyFactory |
DiamondCutChanged
event DiamondCutChanged(address diamondCut)
Emitted when the DiamondCut address is changed
Parameters
Name | Type | Description |
---|---|---|
diamondCut | address | Address of DiamondCut |
PartyInitChanged
event PartyInitChanged(address partyInit)
Emitted when the PartyInit address is changed
Parameters
Name | Type | Description |
---|---|---|
partyInit | address | Address of pFi token |
initialize
function initialize(struct IDiamondCut.FacetCut[] _partyFacets, address _partyDiamondCut, address _partyDiamondInit, address _sentinel, address _collector, uint256 _fee, address _pfi, uint256 _pfi_fee, bool _ready) external
Initializes the PartyFactory
Parameters
Name | Type | Description |
---|---|---|
_partyFacets | struct IDiamondCut.FacetCut[] | Party facets data |
_partyDiamondCut | address | DiamondCutFacet address |
_partyDiamondInit | address | PartyInit address |
_sentinel | address | Platform sentinel address |
_collector | address | Platform collector address |
_fee | uint256 | Platform fee in bps |
_pfi | address | pFi ERC20 Address |
_pfi_fee | uint256 | Party fee creation in pFi |
_ready | bool | Factory status |
setPlatformSentinel
function setPlatformSentinel(address _sentinel) external
Set platform sentinel address
Lets the PartyFactory owner to change the Platform sentinel address
Parameters
Name | Type | Description |
---|---|---|
_sentinel | address | Address of the new Platform Sentinel |
setPlatformCollector
function setPlatformCollector(address _platform) external
Set platform fee collector address
Lets the PartyFactory owner to change the platform fee collector address
Parameters
Name | Type | Description |
---|---|---|
_platform | address | Address of the new Platform Fee Collector |
setPlatformFee
function setPlatformFee(uint256 _fee) external
Set platform fee
Lets the PartyFactory owner to change the Platform fee
Parameters
Name | Type | Description |
---|---|---|
_fee | uint256 | New fee in bps (50 bps equals 0.5%) |
setPfi
function setPfi(address _pfi) external
Set pFi token
Lets the PartyFactory owner to change the PFI token address
Parameters
Name | Type | Description |
---|---|---|
_pfi | address | Address of the pFi Token address |
setPfiFee
function setPfiFee(uint256 _pfi_fee) external
Set PFI token fee
Lets the PartyFactory owner to change the PFI token fee
Parameters
Name | Type | Description |
---|---|---|
_pfi_fee | uint256 | New pFi party creation fee |
setStatus
function setStatus(bool _ready) external
Set Factory status
Lets the PartyFactory owner change the status of the party creation
Parameters
Name | Type | Description |
---|---|---|
_ready | bool | New status |
setPartyFacets
function setPartyFacets(struct IDiamondCut.FacetCut[] _partyFacets) external
Set the Facets which all newly created Parties will share
Lets the PartyFactory owner change the initial diamond cut for new Parties
Parameters
Name | Type | Description |
---|---|---|
_partyFacets | struct IDiamondCut.FacetCut[] | Array of FacetCut structs |
setDiamondCut
function setDiamondCut(address _partyDiamondCut) external
Set the EIP-2535 DiamondCutFacet address
Lets the PartyFactory owner change the DiamondCutFacet address
Parameters
Name | Type | Description |
---|---|---|
_partyDiamondCut | address | New DiamondCut address |
setPartyInit
function setPartyInit(address _partyDiamondInit) external
Set the Party init contract
Lets the PartyFactory owner change the PartyInit address
Parameters
Name | Type | Description |
---|---|---|
_partyDiamondInit | address | New PartyInit contract address |
createParty
function createParty(struct PartyInfo partyInfo, string tokenSymbol, uint256 initialDeposit, address denominationAsset) external payable returns (address party)
Create Party
Deploys a new Party Contract that follows the Diamond Standard (EIP-2535)
Parameters
Name | Type | Description |
---|---|---|
partyInfo | struct PartyInfo | PartyInfo struct containing basic information of the Party |
tokenSymbol | string | Party ERC-20 symbol |
initialDeposit | uint256 | Initial deposit in denomination asset to be made by the party creator |
denominationAsset | address | ERC-20 denomination asset (stable coin) |
getPlatformInfo
function getPlatformInfo() external view returns (address, uint256, address)
Returns the platform related info
Return Values
Name | Type | Description |
---|---|---|
[0] | address | Platform fee collector address |
[1] | uint256 | Platform fee amount |
[2] | address | Platform sentinel address |
getPartyDefaultFacetCut
function getPartyDefaultFacetCut() external view returns (struct IDiamondCut.FacetCut[] _defaultCut)
Returns the default party facet cut
It will always include the DiamondCutFacet
Return Values
Name | Type | Description |
---|---|---|
_defaultCut | struct IDiamondCut.FacetCut[] | Default DiamondCut for fresh new Parties |