This details the content of the Social Graph contract. View Deployed Contracts for the address.
Users can be followed and unfollowed directly on a block explorer that supports contract interactions.
Because the social graph is held on-chain, NFTs can be created which use the relationships between people. The NFT contracts can query the Social Graph contract to see what the relationships are. These network NFTs can be created by the community and used in creative ways such as for rewards or for special access. We leave this up to the community to come up with interesting utilities.
Function | Description |
---|---|
follow | Adds the address being followed to the following array of the user. Adds the user following to the followers array of that address. Sets in storage and emits an event. |
cheapFollow | Same as follow, but with no on-chain storage. |
unfollow | Removes the address being unfollowed from the following array of the user. Removes the user unfollowing from the followers array of that address. Sets in storage and emits an event. |
cheapUnfollow | Same as unfollow, but with no on-chain storage. |
getFollowers | Gets the on-chain followers of an address. |
getFollowing | Gets the on-chain following of an address. |