Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community announcement via community factory contract (#79)
It works on manual testing on testnet. Basically this pr - add a simple community factory and a community contract. - in create_community, create foo.communities.devhub.near account, add access key, deploy contract, grant social db access to devhub.near - in update_community, call social.near to update profile name and image is updated - in delete community, call foo.communities.devhub.near to self destroy TODO: - [x] add back community_addon and update_community test as workspace test because unit test no longer work due to cross contract call in create_community - [x] add workspace tests for this PR - [ ] (**After this PR approved**) manual deploy community factory to community.devhub.near and manual call create_community_account for existing communities. Note: doing migration and self-upgrade community factory similar to main contract should work, but I think it doesn't worth the effort: - These contracts are unlikely need to be changed it has granted full social db write access to devhub.near. - And it's also not a real migration: we can add create factory account, deploy factory contract and create_community_accounts as a migration, but it doesn't actually migrate any state. - Self-upgrade needs more thought. Most of time factory contract is not changed, we should detect this to prevent unnecessary self upgrade on every commit. We'll also need to all update community contracts that deployed by the factory contract, but factory contract doesn't keep track of that, only devhub contract does. So this has to be implement on devhub contract and considering gas limit. It will be much easier to upgrade with a client side script.
- Loading branch information