Aside from the P2P relationship mentioned before, grouping relationships are also important in a social network. With this relationship, users with common interests can interact and communicate more effectively.
In the Relation Protocol, DAOs serve the follow purposes:
Provide a social platform
With DAOs, people with common interests can build or join groups to create an interactive community.
DAO management
The Relation Protocol provides certain management functions for DAOs. DAO creators can manage the DAO, add or remove members. These features are important for a DAO and its stability.
Increase user interaction and participation
With DAOs, users can participate in social groupings more effectively to share their views and experience, thus increasing user interaction and participation.
Schema
DaoRegister
The schema corresponding to the DaoRegister contract is saved to Arweave in the form of a ttl file, with the transaction hash on Arweave as the schemaURI to be passed to the contract during its initialization stage. For example:
ar://7mRfawDArdDEcoHpiFkmrURYlMSkREwDnK3wYzZ7-x4
A complete rdf example to describe a DAO contract created by an address is as follows:
:Soul represents the address binded with a domain name record resolved. Contract represents the address of the DAO contract.
:Soul a rdfs:Class ;
rdfs:label "Soul" ;
rdfs:comment "A soul." .
:Contract a rdfs:Class ;
rdfs:label "Contract" ;
rdfs:comment "A contract." .
Predicate
p:daoContract is used to describe the DAO contract address owned by an address
p:daoContract a rdf:Property ;
rdfs:label "daoContract" ;
rdfs:comment "The dao contract." ;
rdfs:domain :Soul ;
rdfs:range :Contract .
Dao
The schema corresponding to a DAO contract is stored on Arweave in the form of a ttl file, with the transaction hash as the schemaURI to be passed to the contract during its initialization stage. For example:
ar://UTbYdbPy5Ov2bZ1ikWm_4RhMT5GJPvasE57qtSfL1oQ
A complete rdf example to describe that a certain address has joined a certain DAO:
:Soul represents the addresses of the members who joined the group. :Dao represents the group
:Soul a rdfs:Class ;
rdfs:label "soul" ;
rdfs:comment "A soul" .
:Dao a rdfs:Class ;
rdfs:label "dao" ;
rdfs:comment "A dao" .
Predicate
p:join is used to describe the relationship between an address and a group.
p:join a rdf:Property ;
rdfs:comment "Join a dao" ;
rdfs:domain :Soul ;
rdfs:range :Dao .
Contract
The DAO module consists of the DaoRegister contract and the DAO contract. We use the DaoRegister contract as the factory pattern and registration center to deploy and record the DAO contracts created by users.
DaoRegister
interfaceIDaoRegisterisISemanticSBT {/** * Deploy a DAO contract. * @param to * @param name * @return tokenId */functiondeployDaoContract(address to,stringmemory name) externalreturns (uint256);/** * Lookup the information on a DAO. * @param tokenId * @return owner * @return contractAddress */functiondaoOf(uint256 tokenId) externalviewreturns (address owner,address contractAddress);}
Dao
interfaceIDaoisISemanticSBT {//Contract initialization. The daoRegister initializes the contract:functioninitialize(address owner,address minter,stringmemory name_,stringmemory symbol_,stringmemory baseURI_,stringmemory schemaURI_,string[] memory classes_,Predicate[] memory predicates_ ) external;/** * Set the information for a DAO. * @param daoURI This should be a hash on Arweave. */functionsetDaoURI(stringmemory daoURI) external;/** * Is this an open dao? * @param isFreeJoin true--free to join;false--closed to the public */functionisFreeJoin() externalviewreturns (bool);/** * Add the specified address to dao in batches. * @param addr The specified address. */functionaddMember(address[] memory addr) external;/** * Join a dao * @param tokenId The tokenId for this member in the dao. */functionjoin() externalreturns (uint256 tokenId);/** * Removed from a dao(calls the method "burn") * @param addr */functionremove(address addr) external;/** * The URI for a dao * @param daoURI A resource address pointing to the data of a dao's information. It is a transaction hash on Arweave.
*/functiondaoURI() externalviewreturns (stringmemory daoURI);/** * The owner of a dao * @param owner The owner of a dao */functionownerOfDao() externalviewreturns (address owner);/** * Is a member of the dao? * @param addr * @return isMember: true--is a member of the dao;false--not a member of the dao */functionisMember(address addr) externalviewreturns (bool isMember);}