Tasks
TaskRegistry Contract
The TaskRegistry
contract maintains a registry of all tasks that can be used for contributions.
Key Functions:
registerTask(Task memory task)
: Registers a new task.isTaskId(bytes32 taskId)
: Checks if a task ID is registered.
Important Concepts:
Tasks are the building blocks for contributions.
Each task has a unique ID and associated metadata (URI).
TaskFactory.sol
The TaskFactory
contract manages the creation of contributions (tasks) within a hub.
Key Functions:
createContribution(Contribution calldata contribution)
: Creates a new contribution.getContributionIdsActive(uint32 timestamp)
: Retrieves active contribution IDs at a given timestamp.
Important Concepts:
Contributions have associated points, quantities, and date ranges.
Integrates with the TaskManager for contribution tracking.
TaskManager.sol
The TaskManager
contract manages the lifecycle of contributions within a hub.
Key Functions:
addContribution(bytes32 contributionId, Contribution calldata Contribution)
: Adds a new contribution to be managed.commitContribution(bytes32 contributionId, address who, bytes calldata data)
: Commits a member to a contribution.giveContribution(bytes32 contributionId, address who)
: Awards points for a completed contribution.
Important Concepts:
Tracks the status of contributions (Open, Inactive, Complete).
Manages point summaries for each period.
Last updated