Component and Organization Contract Initialization Guidelines
All Components, Organization
contracts and contracts that implement them are EthereansOS-developed Factory capable contracts that follow the development and initialization pattern explained here.
In this documentation, on each page of the Organizations section, you can find an explanation of how to initialize data for the contract type that the page discusses.
Examples
Organization
Root layer
Organization
Root layerAs a child contract of DynamicMetadataCapableElement
, this must be initialized with:
The
host
*, at the level ofLazyInitCapableElement
.plainUri
anddynamicUriResolver
, at the level ofDynamicMetadataCapableElement
.A
Component[]
struct, at the level ofOrganization
.
SubDAO
SubDAO
As a child contract of Organization
, this must be initialized with:
The
host
**, at the level ofLazyInitCapableElement
.plainUri
anddynamicUriResolver
, at the level ofDynamicMetadataCapableElement
.A
Component[]
struct, at the level ofOrganization
.A
SubDAOProposalModel[]
struct, at the level ofSubDAO
.
**the host
of a SubDAO must be equal to the SubDAO Manager address
as explained in the Governance Layer section.
ProposalManager
ProposalManager
As a child contract of LazyInitCapableElement
, this must be initialized with:
The
host
, at the level ofLazyInitCapableElement
._collections, _objectIds, _weights, _canTerminateAddresses, _validatorsAddresses
, at the level ofProposalManager
.
SubDAOProposalManager
SubDAOProposalManager
As a child contract of ProposalManager
, this must be initialized with:
The
host
, at the level ofLazyInitCapableElement
._collections, _objectIds, _weights, _canTerminateAddresses, _validatorsAddresses
, at the level ofProposalManager
.Nothing at the level of
SubDAOProposalManager
, because it doesn't require specific data.
DelegationsTreasurySplitManager
DelegationsTreasurySplitManager
As a child contract of LazyInitCapableElement
, this must be initialized with:
The
host
, at the level ofLazyInitCapableElement
.callerPercentage, _treasuryPercentages
, at the level ofDelegationsTreasurySplitManager
.
The host
of a Component such as a Proposal Manager or Treasury Manager if not specified does not have to be the address of the Organization
to which it is attached. The reference is in fact the key
and the active
/inactive
state, not the host
address saved at LazyInitCapableElement
level.
Last updated