Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content directory smart contracts: Create bridge contracts #1677

Open
Lezek123 opened this issue Nov 11, 2020 · 0 comments
Open

Content directory smart contracts: Create bridge contracts #1677

Lezek123 opened this issue Nov 11, 2020 · 0 comments

Comments

@Lezek123
Copy link
Contributor

Create bridge contracts for Membership and ContentWorkingGroup module accoring to the initial design (#1520 (comment))

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:

  1. Deploy the contracts
  2. Export current members / CWG data
  3. Initialize the data in the bridge contracts (using standard initalization process with batchInsert)
  4. Make runtime aware of bride contract addresses (ie. we would need a SetBridgeContractAddresses proposal)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants