The Core and Components
Deployed contract address
The core is represented by the
What Is a Component?
A Component is a smart contract (not just a wallet address) that can be linked to an
Organizationcontract, and thereby become a functional part of its architecture. To link a Component to a
Organization, its reference data is passed as a
Componentstruct, composed of the following parameters:
key-> a user-defined, immutable key (in
bytes32format) used to attach a specific Component to a Guild.
location-> the contract address of that specific component.
active-> a boolean value that represents whether a Component is 'active' (true) or 'passive' (false). In the first case, the Component's key is marked as active; in the second case, the Component's key is marked as passive.
log-> a boolean value that represents whether the Component has to be saved in the history (true) or not (false).
Each Component struct is provided by the
A Component can be either 'active' or 'passive'. Only an active Component can be 'authorized', i.e have permission to write on the
Organizationto which it is linked, as well as on the other Components linked to the Guild.
To learn more, see the next page.
- Return a linked Component
When you want to access a Component linked to your Guild, you pass the key to which it is attached. This returns the Component address.
- Link, replace and un-link components
An authorized subject can
- 1.Ask the Guild to link a new Component to itself. This can be done in two ways:
- 1.log -> records the Component in the history.
- 2.non-log -> doesn't record the Component in the history; this is used for the one-time use of a Component.
- 2.Change which Component is attached to a key of the Guild, so that the Component changes, but the key remains the same.
- 3.Un-link a Component, by detaching it from a key.
- Return the history record of all components, organized by key
For example, imagine there are 5 versions of a 'microservice manager' Component. By passing the key to which that component is presently attached, the Guild returns the addresses of all five versions that the Component has ever had in its history.
- Call another contract
A linked and authorized (i.e active) Component can ask the
Organizationcontract to call a specific contract with certain input parameters performing a