The Core and Components
Contract name | Github | Deployed contract address | Contract Implemented | Initialization Data |
---|---|---|---|---|
| Coming soon | Coming soon |
|
|
The core is represented by the Organization
contract.
What Is a Component?
A Component is a smart contract (not just a wallet address) that can be linked to an Organization
contract, and thereby become a functional part of its architecture. To link a Component to a Organization
, its reference data is passed as a Component
struct, composed of the following parameters:
key
-> a user-defined, immutable key (inbytes32
format) used to attach a specific Component to a Organization.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 IOrganization
interface contract.
A Component can be either 'active' or 'passive'. Only an active Component can be 'authorized', i.e have permission to write on the Organization
to which it is linked, as well as on the other Components linked to the Organization.
To learn more, see the next page.
Organization Control of Components
An Organization
can:
Return a linked Component
When you want to access a Component linked to your Organization, you pass the key to which it is attached. This returns the Component address.
Link, replace and un-link components
An authorized subject can
Ask the Organization to link a new Component to itself. This can be done in two ways:
log -> records the Component in the history.
non-log -> doesn't record the Component in the history; this is used for the one-time use of a Component.
Change which Component is attached to a key of the Organization, so that the Component changes, but the key remains the same.
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 Organization 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 Organization
contract to call a specific contract with certain input parameters performing a call
function.
Last updated