-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added discussions accounts factory to community contract (#88)
This issue is supporting PR [#645](NEAR-DevHub/neardevhub-bos#645) @frolvlad @ailisp I would like to get some feedback on my approach. I assumed that in order to create `discussions.${handle}.community.devhub.near` the `${handle}.community.devhub.near` account needs to be an factory in itself. I added this image help describe what I did with some common terminology. <img width="1072" alt="Screenshot 2024-01-23 at 17 31 22" src="https://github.com/NEAR-DevHub/neardevhub-contract/assets/28901891/7b0b1145-0828-4e32-9a1d-cb0ba32354f9"> I added a `set_discussions_community_socialdb` function so the user can post on socialdb from the devhub.near contract. This uses `get_devhub_discussions_account` which retrieves `discussions.<handle>.community.devhub.near`. To support that I added a `create_discussions_account` function to the community contract. So the community contract is in essence a discussions factory. I copied most of what was the community contract to the discussions contract with some minor tweaks since it is a level down in subaccounts. In file `community/src/lib.rs` line 9 and 70 a PUBkey from devhub.near is used to give control to make posts on socialDB. Should this be devhub.near?
- Loading branch information
1 parent
e80dc29
commit e8e8afe
Showing
16 changed files
with
3,307 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.