Skip to content

Add SubDAO Chrome Extension Milestone 1#203

Merged
semuelle merged 7 commits intow3f:masterfrom
SubDAO-Network:master
Sep 29, 2021
Merged

Add SubDAO Chrome Extension Milestone 1#203
semuelle merged 7 commits intow3f:masterfrom
SubDAO-Network:master

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 22, 2021

Milestone Delivery Checklist

@Noc2
Copy link
Copy Markdown
Contributor

Noc2 commented Jun 22, 2021

Thanks for the delivery. We will look into it as soon as possible.

@Noc2 Noc2 assigned Noc2 and unassigned Noc2 Jun 22, 2021
@semuelle semuelle self-assigned this Jun 22, 2021
@semuelle
Copy link
Copy Markdown
Contributor

Hi @wannam, you can ignore the failed check, that's just for internal bookkeeping. I'm looking into your delivery right now and I'll get back to you later today.

@semuelle
Copy link
Copy Markdown
Contributor

semuelle commented Jul 1, 2021

Hi @wannam,
sorry for the delay and thanks for your patience. I am testing your deliverable, and I have some issues. Can you clarify these?

  • The DAO screen doesn't load;
  • How Do I add a custom token? By address? Name? The readme and testing guide are not very helpful in that regard. Also, the Etherscan link for the example token is not valid;
  • When I tweet an image, I can view the post and image from any browser without being logged into Twitter.

@ghost
Copy link
Copy Markdown
Author

ghost commented Jul 6, 2021

Hi @wannam,
sorry for the delay and thanks for your patience. I am testing your deliverable, and I have some issues. Can you clarify these?

Thank you for your efforts.

  • The DAO screen doesn't load;

We are developing the SubDAO project, that the extension was affected. We will update the extension to avoid the side effect of SubDAO code updates.

  • How Do I add a custom token? By address? Name? The readme and testing guide are not very helpful in that regard. Also, the Etherscan link for the example token is not valid;

It only support substrate chains, no ethereum. To add custom token, you just need paste the erc20 token address (on subdao network).
When the DAO Screen load, you will know how to do that.

  • When I tweet an image, I can view the post and image from any browser without being logged into Twitter.

Yes, your extension will decrypt the message, and your message is public to everyone. It's align with design.

We will update the extension to adapt the new updates in subdao network. And will come back to you soon.

@semuelle
Copy link
Copy Markdown
Contributor

semuelle commented Jul 7, 2021

* When I tweet an image, I can view the post and image from any browser without being logged into Twitter.
  Yes, your extension will decrypt the message, and your message is public to everyone. It's align with design.

To clarify, I can view the image from any device, any browser, any account. It is not related to the extension. Do you mean the image is public?

@ghost
Copy link
Copy Markdown
Author

ghost commented Jul 8, 2021

* When I tweet an image, I can view the post and image from any browser without being logged into Twitter.
  Yes, your extension will decrypt the message, and your message is public to everyone. It's align with design.

To clarify, I can view the image from any device, any browser, any account. It is not related to the extension. Do you mean the image is public?

Yes, I mean the image is public. Everyone can see that image, and the message is encrypted, only those who are selected to receive the message can decrypt it.

@semuelle
Copy link
Copy Markdown
Contributor

We will update the extension to adapt the new updates in subdao network. And will come back to you soon.

Please ping me here once the published version is updated.

I was able to build the extension locally and load it into Chrome. A Create a DAO link shows, which is not clickable. If I inspect the page and go to the linked page to create a DAO, I get Main contract initialization failed. Can you tell what's wrong here?

@ghost
Copy link
Copy Markdown
Author

ghost commented Jul 19, 2021

We will update the extension to adapt the new updates in subdao network. And will come back to you soon.

Please ping me here once the published version is updated.

I was able to build the extension locally and load it into Chrome. A Create a DAO link shows, which is not clickable. If I inspect the page and go to the linked page to create a DAO, I get Main contract initialization failed. Can you tell what's wrong here?

That link will jump to the dapp of SubDAO to create a new DAO. The latest version of SubDAO is in progress. Will let you know ASAP when it's ready.

@semuelle
Copy link
Copy Markdown
Contributor

Hi @wannam, could you share an update on the state of this milestone? Is there anything specific holding you back?

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 6, 2021

Hi @wannam, could you share an update on the state of this milestone? Is there anything specific holding you back?

Hi @semuelle I was in hospital for the past weeks. Sorry to delay this grant.

The Chrome extenstion is ready. And the new version should be working after I have checked with our dev team.

@semuelle
Copy link
Copy Markdown
Contributor

semuelle commented Sep 6, 2021

Sorry to hear, @wannam; wishing you a speedy recovery.

Please let me know when I should review again.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 7, 2021

Sorry to hear, @wannam; wishing you a speedy recovery.

Please let me know when I should review again.

Thank you!
Please continue the review!
The new version is published on Chrome Webstore and also the SubDAO smart contracts are updated to the latest version.
If meet any problems, please leave me comments.

@semuelle
Copy link
Copy Markdown
Contributor

semuelle commented Sep 7, 2021

Hi @wannam, the issue with the DAO screen seems to be resolved. There are some other issues, though:

  • Your repository contains large parts of the maskbook code without adhering to its license. Please fix any license infringements immediately, otherwise the grant will be terminated.
  • When I pnpm start the extension locally, I just get an Uncaught TypeError in the browser console. I suspect it is trying to connect to a local node, but there is no mention of such a requirement in your README; can you clarify this and, if necessary, update the documentation?
  • Testing guides usually contain a description of any tests (unit, integration) that have been written, and how to run them. Could you please add this information to the testing guide?
  • According to the contract, the article (deliverable 0d) was supposed to "describe our chrome extension and how to use it", which it doesn't.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 9, 2021

Hi @wannam, the issue with the DAO screen seems to be resolved. There are some other issues, though:

  • Your repository contains large parts of the maskbook code without adhering to its license. Please fix any license infringements immediately, otherwise the grant will be terminated.

Have added COPYRIGHT to address the relationship with Maskbook. We already discussed this with Mask Team when we started this project, and we will contribute the changes to upstream when it's stable.

  • When I pnpm start the extension locally, I just get an Uncaught TypeError in the browser console. I suspect it is trying to connect to a local node, but there is no mention of such a requirement in your README; can you clarify this and, if necessary, update the documentation?

The default one is using online testing node wss://alpha.subdao.org/
And the related explorer is https://explorer.subdao.org/?rpc=wss%253A%252F%252Falpha.subdao.org#/explorer

Let us try to reproduce it.

  • Testing guides usually contain a description of any tests (unit, integration) that have been written, and how to run them. Could you please add this information to the testing guide?

Sure.

  • According to the contract, the article (deliverable 0d) was supposed to "describe our chrome extension and how to use it", which it doesn't.

We have a tutorial in documents and we will publish one article more precisely on how to use it.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 9, 2021

When I pnpm start the extension locally, I just get an Uncaught TypeError in the browser console. I suspect it is trying to connect to a local node, but there is no mention of such a requirement in your README; can you clarify this and, if necessary, update the documentation?

@semuelle Could you provide a screenshot for this error, we could not reproduce it, which page did you on when this error happened?

@semuelle
Copy link
Copy Markdown
Contributor

semuelle commented Sep 9, 2021

which page did you on when this error happened?

localhost:8080. The page is blank.

I noticed I skipped the webpack installation, but it fails because the package.json seems to be using a yarn syntax? It compiles fine, though.

❯ npm install webpack webpack-cli --save-dev -w
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "workspace:": workspace:*

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 10, 2021

Extension development is different from web app, please follow the steps to install:

  1. In Chrome type chrome://extensions/ in the address window.
  2. Enable Developer Mode (slider)New window will open allowing you to add your Extension
  3. Drag dist folder under subdao-extension/ to chrome://extensions/

Then you should be able to see the extension installed:
2021-09-10 at 2 49 PM

@semuelle
Copy link
Copy Markdown
Contributor

Thanks, I wasn't aware. What does pnpm start do, then? And the webpack installation is unnecessary?

@semuelle
Copy link
Copy Markdown
Contributor

Also, I am trying to use subdao-node, but I cannot transfer assets to my own account due to the following errors. Any suggestions?

REGISTRY: Error: Call: failed decoding balances.transferKeepAlive:: Struct: failed on args: :: Struct: failed on dest: r:: Cannot construct unknown type

Uncaught Error: createType(Call):: Call: failed decoding balances.transferKeepAlive:: Struct: failed on args: :: Struct: failed on dest: r:: Cannot construct unknown type

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 12, 2021

Thanks, I wasn't aware. What does pnpm start do, then? And the webpack installation is unnecessary?

It builds necessary files for extension to run in browser. webpack installation is unnecessary, I deleted the content in readme.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 12, 2021

Also, I am trying to use subdao-node, but I cannot transfer assets to my own account due to the following errors. Any suggestions?

Let me test it

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 12, 2021

Testing guides usually contain a description of any tests (unit, integration) that have been written, and how to run them. Could you please add this information to the testing guide?

Please refer to the doc:
https://github.com/SubDAO-Network/subdao-extension#test

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 15, 2021

Also, I am trying to use subdao-node, but I cannot transfer assets to my own account due to the following errors. Any suggestions?

The extension connects our node wss://alpha.subdao.org, we tested and can not reproduce this issue, could you tell us the steps you did for our debug?

@semuelle
Copy link
Copy Markdown
Contributor

could you tell us the steps you did for our debug?

> git clone https://github.com/SubDAO-Network/subdao-node.git
> cd subdao-node
> cargo build
> cargo run -- --dev --tmp

Opening polkadot.js.org/apps, connected to my local node, I get a bunch of

DRR: Unable to decode storage system.account: entry 0:: createType(AccountInfo):: {"nonce":"Index","consumers":"RefCount","providers":"RefCount","sufficients":"RefCount","data":"AccountData"}:: Decoded input doesn't match input, received 0x0000000000000000000000000000001000000000000000000000000000000000…0000000000000000000000000000000000000000000000000000000000000000 (72 bytes), created 0x0000000000000000000000000000001000000000000000000000000000000000…0000000000000000000000000000000000000000000000000000000000000000 (80 bytes)

and no balance information for Alice and Bob.

Screenshot from 2021-09-16 12-34-14

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 17, 2021

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 17, 2021

@semuelle Go to explorer Settings -> Developer then fill out the following config:

{
  "Address": "MultiAddress",
  "LookupSource": "MultiAddress"
}

@semuelle
Copy link
Copy Markdown
Contributor

I realized I was using polkadot.js.org/apps, but you pointed to explorer.subdao.org above. Does it not work with other apps versions?

Either way, connecting explorer.subdao.org to my local node, I get Could not convert parameter `uxt` between node and runtime: No such variant in enum MultiSignature, with the types injected. Am I supposed to use another branch than master?

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 18, 2021

We have a docker setup https://github.com/SubDAO-Network/docs/blob/main/tutorial/README.md
You will get a node running, and explorer running at http://localhost:3001/ automatically, the underlying polkadot.js version is v0.87.1 and listed here: https://github.com/SubDAO-Network/subdao-node/blob/3.0_dev/docker/Dockerfile#L23-L31

@semuelle
Copy link
Copy Markdown
Contributor

I tried building the docker image from your Dockerfile, but it results in the following error. Could it be related to this issue?

❯ docker build -t subdaonode-man .
Sending build context to Docker daemon  4.608kB
Step 1/30 : FROM paritytech/ci-linux:production as builder
 ---> 34bbdb962000
Step 2/30 : LABEL maintainer="subdao-dev"
 ---> Using cache
 ---> c9e37640b7e1
Step 3/30 : ARG RUST_VERSION=nightly-2020-10-06
 ---> Using cache
 ---> 72103820a034
Step 4/30 : ARG PROFILE=debug
 ---> Using cache
 ---> 97760cd5d4a0
Step 5/30 : ARG GIT_REPO="https://github.com/SubDAO-Network/subdao-node.git"
 ---> Using cache
 ---> 449fe36c7c97
Step 6/30 : ARG GIT_BRANCH="3.0_dev"
 ---> Using cache
 ---> 2f0d8af637e0
Step 7/30 : RUN git clone --recursive ${GIT_REPO}
 ---> Using cache
 ---> c9405a74ab44
Step 8/30 : WORKDIR /builds/subdao-node
 ---> Using cache
 ---> 44e0959f6804
Step 9/30 : RUN rustup default stable
 ---> Using cache
 ---> 6741c2eaca9f
Step 10/30 : RUN rustup update nightly
 ---> Running in d01d5cd4b915
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-09-20, rust version 1.57.0-nightly (5ecc8ad84 2021-09-19)
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: downloading component 'cargo'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'
info: rolling back changes
error: could not rename component file from '/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/wasm32-unknown-unknown/lib' to '/usr/local/rustup/tmp/bcpo71fo6d75phpe_dir/bk'

Caused by:
    Invalid cross-device link (os error 18)
The command '/bin/sh -c rustup update nightly' returned a non-zero code: 1

Now I have the (downloaded) docker version running, but when I try and add a template, I get a Error: Invalid JSON ABI structure supplied, expected a recent metadata version error. No templates appear in the DAO creation wizard, and although I can continue without selection a template, the Submit button simply does nothing.

Could you please review the tutorial and all build instructions, and add version numbers and/or branch/tag names to each step?

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 28, 2021

It's due to every time cargo will pull latest version, we fixed with a specific rust version at https://github.com/SubDAO-Network/subDAO-contracts/tree/3.0_dev_m2
Please use this branch to proceed, we tested and it worked, thanks for the waiting.

@semuelle
Copy link
Copy Markdown
Contributor

Thanks for the update, @wannam. I was finally able to deploy and initialize all contracts. Your milestone is hereby accepted. You can find my evaluation notes here.

I will forward your invoice for processing.

@semuelle semuelle merged commit 5fc24df into w3f:master Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants