Deployment and Data Model
This guide walks you through the steps to deploy tgether’s contracts in the correct order, as well as an overview of where different pieces of data are stored in the system.
Deployment Steps
To deploy the tgether platform, follow these steps in the correct order:
- Deploy Fund Contract
- Deploy Communities Contract
- Requires fee price initially set to
2000000000000000
- Requires fee price initially set to
- Deploy Members Contract
- Call
setMembersContract
on the Communities contract - Call
setCommunitiesContract
on the Members contract - Deploy Lane Registry Contract
- Takes the Communities contract as an argument
- Call
setRegistry
on the Communities contract - Deploy Lane Contract
- Takes in the Fund contract address, Communities contract address, and Lane Registry contract address
- Deploy Community Consensus Contract
- Takes in:
- Initial fee:
2000000000000000
- Communities contract address
- Community fee:
2000000000000000
- Fund contract address
- Initial fee:
- Takes in:
- Deploy Posts Contract
- Deploy Posts Consensus Contract
- Takes in:
- Community Consensus contract address
- Members contract address
- Posts contract address
- Fee:
2000000000000000
- Takes in:
- Deploy Another Instance of Registry Contract
- For the Post Consensus Contract
- Call
setLaneRegistry
on the Post Consensus Contract- Set the registry address
- Deploy Post Consensus Lane
- Takes in:
- Fund contract address
- Post Consensus contract address
- Post Consensus Lane Registry address
- Takes in:
- Deploy Tgether Incentives Contract
- Takes in:
- Fee price:
2000000000000000
- Communities contract address
- Community fee:
2000000000000000
- Fund contract address
- Fee price:
- Takes in:
- Deploy Consensus Bounty Contract
- Takes in:
- Fund contract address
- Post Consensus contract address
- Incentives contract address
- Fee:
2000000000000000
- Takes in:
- Deploy Tgether Parameter Group Registry
- Deploy Community Enrollment Contract
- Call
setCommunityEnrollmentContract
from Tgether Parameter Group Registry Contract - Deploy Members Info Contract
- Register Communities Contract Lane Upkeep with Chainlink Automation
- Register Community Consensus Upkeep with Chainlink Automation
- Register Post Consensus Lane Upkeep with Chainlink Automation
- Call
setForwarder
on Post Consensus Lane Contract- Set the Chainlink Upkeep Forwarder address
- Register Incentives with Chainlink Automation
- Register Consensus Bounty with Chainlink Automation
- Call
setAutomationContractAddress
in Consensus Bounty Contract- Set the Chainlink Forwarder address
- Call Fund Contract to Create Mapping for Communities Lane to its Upkeep ID
- Call Fund Contract to Create Mapping for Post Consensus Lane to its Upkeep ID
- Call Fund Contract to Create Mapping for Incentives to its Upkeep ID
- Call Fund Contract to Create Mapping for Consensus Bounty to its Upkeep ID
After completing these steps, your contracts should be deployed and interconnected correctly, ready for community interactions.
Fees and Fees Addresses Where applicable, fees are set by the owner of the contract and are sent by default to the Fees Addresses, no fee values are stored in the contracts themselves.
Data Model Overview
Understanding where different data is stored within tgether is key to working with the platform. Here’s a breakdown of the data model:
-
Communities and Proposals:
Stored in theCommunities
contract. This contract holds all community-related settings and tracks proposals made within the community. -
Membership and Creds:
Managed by theMembers
contract. This contract keeps track of member information, creds, and membership rules. -
Member Profiles:
Stored in theMembersInfo
contract. This optional contract allows members to define their profile information, such as display names and credentials. -
Community Consensus Parameters:
Managed by theCommunityConsensus
contract. This contract holds the rules and parameters that define how consensus is reached in the community, such as the number of reviews needed and the percentage of approvals required. -
Posts:
Content submissions from members are stored in thePosts
contract. Note Posts are not tied to communities at all. So any one can create a post for any purpose, even if they are not a member of any community on the platform. -
Community Submissions and Reviews:
Stored in thePostConsensus
contract. This contract manages the review process, including who can participate in reviews and how those reviews impact the consensus process.
By following this deployment process and understanding the data model, you’ll have a solid foundation for working with tgether’s decentralized consensus platform.
Next up: Chainlink Automation