šŸŽ‰ Welcome to PartyFinance documentation!
Protocol
Contracts
interfaces
IPartyFactory

IPartyFactory

PartyCreated

event PartyCreated(address partyAddress)

Emitted when a new party is created

Parameters

NameTypeDescription
partyAddressaddressAddress of the new party created

DefaultCutChanged

event DefaultCutChanged(struct IDiamondCut.FacetCut[] newCut)

Emitted when the default cut is changed

Parameters

NameTypeDescription
newCutstruct IDiamondCut.FacetCut[]Array of FacetCut structs

PlatformSentinelChanged

event PlatformSentinelChanged(address sentinel)

Emitted when the Platform Sentinel is changed

Parameters

NameTypeDescription
sentineladdressAddress of the Platform Sentinel

PlatformCollectorChanged

event PlatformCollectorChanged(address collector)

Emitted when the Platform Fee Collector is changed

Parameters

NameTypeDescription
collectoraddressAddress of the Platform Fee Collector

PlatformFeeChanged

event PlatformFeeChanged(uint256 fee)

Emitted when the Platform Fee is changed

Parameters

NameTypeDescription
feeuint256Amount of the Platform Fee (in bps)

PfiChanged

event PfiChanged(address pfi)

Emitted when the pFi token address is changed

Parameters

NameTypeDescription
pfiaddressAddress of pFi token

PfiFeeChanged

event PfiFeeChanged(uint256 pfiFee)

Emitted when the pFi party creation fee is changed

Parameters

NameTypeDescription
pfiFeeuint256Amount of pFi party creation fee

StatusChanged

event StatusChanged(bool status)

Emitted when the PartyFactory status is changed

Parameters

NameTypeDescription
statusboolStatus of the PartyFactory

DiamondCutChanged

event DiamondCutChanged(address diamondCut)

Emitted when the DiamondCut address is changed

Parameters

NameTypeDescription
diamondCutaddressAddress of DiamondCut

PartyInitChanged

event PartyInitChanged(address partyInit)

Emitted when the PartyInit address is changed

Parameters

NameTypeDescription
partyInitaddressAddress 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

NameTypeDescription
_partyFacetsstruct IDiamondCut.FacetCut[]Party facets data
_partyDiamondCutaddressDiamondCutFacet address
_partyDiamondInitaddressPartyInit address
_sentineladdressPlatform sentinel address
_collectoraddressPlatform collector address
_feeuint256Platform fee in bps
_pfiaddresspFi ERC20 Address
_pfi_feeuint256Party fee creation in pFi
_readyboolFactory status

setPlatformSentinel

function setPlatformSentinel(address _sentinel) external

Set platform sentinel address

Lets the PartyFactory owner to change the Platform sentinel address

Parameters

NameTypeDescription
_sentineladdressAddress 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

NameTypeDescription
_platformaddressAddress 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

NameTypeDescription
_feeuint256New 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

NameTypeDescription
_pfiaddressAddress 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

NameTypeDescription
_pfi_feeuint256New 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

NameTypeDescription
_readyboolNew 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

NameTypeDescription
_partyFacetsstruct 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

NameTypeDescription
_partyDiamondCutaddressNew DiamondCut address

setPartyInit

function setPartyInit(address _partyDiamondInit) external

Set the Party init contract

Lets the PartyFactory owner change the PartyInit address

Parameters

NameTypeDescription
_partyDiamondInitaddressNew 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

NameTypeDescription
partyInfostruct PartyInfoPartyInfo struct containing basic information of the Party
tokenSymbolstringParty ERC-20 symbol
initialDeposituint256Initial deposit in denomination asset to be made by the party creator
denominationAssetaddressERC-20 denomination asset (stable coin)

getPlatformInfo

function getPlatformInfo() external view returns (address, uint256, address)

Returns the platform related info

Return Values

NameTypeDescription
[0]addressPlatform fee collector address
[1]uint256Platform fee amount
[2]addressPlatform 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

NameTypeDescription
_defaultCutstruct IDiamondCut.FacetCut[]Default DiamondCut for fresh new Parties