Hub

Hub.sol

The Hub contract is the core of a community in the Aut Protocol.

Key Functions:

  • join(address who, uint256 role, uint8 _commitment): Allows a user to join the hub.

  • addAdmin(address who): Adds a new admin to the hub.

  • removeAdmin(address who): Removes an admin from the hub.

  • setConstraintFactor(uint128 newConstraintFactor): Sets the constraint factor for the hub.

Important Concepts:

  • Hubs have roles, commitment levels, and markets.

  • Admins have special privileges within a Hub.

HubDomainsRegistry.sol

The HubDomainsRegistry contract manages domain names for Hubs.

Key Functions:

  • registerDomain(string calldata _name, string calldata _uri, address _owner): Registers a new domain for a hub.

Important Concepts:

  • Domain names are in the format "name.hub".

  • Each domain is associated with a unique ERC721 token.

HubRegistry.sol

The HubRegistry contract manages the creation and registration of hubs.

Key Functions:

  • deployHub(uint256[] calldata roles, uint256 market, string memory metadata, uint256 commitmentLevel): Deploys a new hub.

  • join(address hub, address member, uint256 role, uint8 commitmentLevel): Allows a user to join a hub.

Important Concepts:

  • The HubRegistry deploys all associated contracts when creating a new hub.

  • It maintains a record of all deployed hubs and their associated contracts.

Membership.sol

The Membership contract manages membership details for a hub.

Key Functions:

  • join(address who, uint256 role, uint8 commitmentLevel): Adds a new member to the hub.

  • changeCommitmentLevel(uint8 newCommitmentLevel): Allows a member to change their commitment level.

Important Concepts:

  • Tracks member roles, commitment levels, and join dates.

  • Manages the total commitment level of the hub.

Last updated