Joystream / Joystream/joystream
Content directory smart contracts: Create bridge contracts
@Lezek123 is already working on this.
Since Nov 11, 2020.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Create bridge contracts for Membership and ContentWorkingGroup module accoring to the initial design (https://github.com/Joystream/joystream/issues/1520#issuecomment-724227857)
Those contract can be managed only by a specific address hardcoded in the runtime. For the purpose of initial tests we should be able to provide the "runtime address" during contract deployment.
Initialization
In order to initialize bridge contracts on the actual Joystream chain we woiuld need to:
- Deploy the contracts
- Export current members / CWG data
- Initialize the data in the bridge contracts (using standard initalization process with
batchInsert) - Make runtime aware of bride contract addresses (ie. we would need a
SetBridgeContractAddressesproposal)
The problem in this scenario is that between steps 2 and 4, the memberships and curator working group state may (and most likely will) undergo some changes that the bridge contract will then not be aware of (since the runtime only starts to interact with it at after step 4).
This means we probably need to change the order of steps to 1, 4, 2, 3 order and make sure the contract is able to handle initialization and new changes coming from the runtime at the same time (ie. ignore member address provided in batchInsert if we already have one assigned)
This will make implementing a bridge contract a little more complex, but it should be plausible and it's probably worth the effort.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.