Web3.js: Create live examples for the documentation examples.

Created on 2 Dec 2018  Â·  51Comments  Â·  Source: ChainSafe/web3.js

Documentation Feature Request:

Currently, many developers have trouble to understand how to interact with the ethereum blockchain over Web3.js/JSON-RPC. The documentation is not bad but if you just started to build a Dapp it's hard to do the first steps.

That's why I would like to have live examples with JsFiddle.

ToDo's:

  • [ ] Check if ethereum-js really works otherwise have a look at eWASM.
  • [ ] Create simple example on JsFiddle.
  • [ ] Check if there is a nice way to provide these examples with readthedocs.
  • [ ] This examples could be placed in a separate repository.
    (tag me and I will create a repository and give you access)
Resources

https://github.com/ethereumjs/browser-builds/tree/master/dist/ethereumjs-vm
https://docs.jsfiddle.net/github-integration/untitled-1

Thanks Melonport for this idea ;-)

2.x Feature Request Stale bounty documentation

Most helpful comment

Seems like the trail has gone a bit cold on this one.
I’m happy to take the lead on this and get together with some of the others wanting to contribute on this and make a start?

All 51 comments

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 250.0 DAI (250.0 USD @ $1.0/DAI) attached to it as part of the Ethereum Foundation fund.__

@nivida how about serving the already present examples on a static page, can it help in any way? 🤔

@anshumanv Thanks for your idea but I would like to have interactive examples for the 1.0 documentation. The examples you mention are unfortunately written with 0.20.
It would be great if the developer could play around with the API while reading the documentation. 😄

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Workers have applied to start work__.

These users each claimed they can complete the work by 11 months ago.
Please review their action plans below:

1) flash-git has applied to start work _(Funders only: approve worker | reject worker)_.

I would love to do this, I have experience with web3 and already have a few snippets that might be useful.
Unfortunately I can't tell whether it has been started yet, the repo linked is empty. If there is still a sizeable amount of work to be done, I'm happy to start immediately!
2) alexanmtz has applied to start work _(Funders only: approve worker | reject worker)_.

I'm learning and I like to document while I'm doing. I created a Bounty platform as well: gitpay.me
3) juan21232 has applied to start work _(Funders only: approve worker | reject worker)_.

Quiero mi pago tengo desde 3 meses queno e cobrado digame sime vana pagar o no
4) theblockchaindeveloper has applied to start work _(Funders only: approve worker | reject worker)_.

I will be appy to help. Thanks, Elad.

Learn more on the Gitcoin Issue Details page.

(tag me and I will create a repository and give you access)

@nivida this is what I'm doing :wink:

Hey @nivida is it alright if we move forward with @Jorropo ?

@ceresstation Yes would be fine :)

@Jorropo I'll talk to our DevOps guys that they create a repository for it. I'll add the information about the repository later here.

Can we have a serie of examples like the Nextjs project https://github.com/zeit/next.js/tree/canary/examples ? I think that this would be a good way to see some examples already working, we can have web3js-graphql, web3js-rest-api, web3js-nextjs, web3js-react, web3js-events, among others, everything interacting with an API or a frontend, some more complex than others.

Yes, sure great idea!
I should get the repository this week. We can then discuss further ideas in the issue list there.

Thanks for your feedback. @fmauricios

@Jorropo
This is the repository:
https://github.com/ethereum/web3-examples

Feel free to create the structure you think it's the best for creating these examples. It would be cool if the structure would be open to having examples in vanilla JS, TypeScript and other superset languages.

@fmauricios If you would like to create the starter projects then please contact @Jorropo for coordinating with him. Btw. it will be possible to split up this bounty.

@Jorropo Hey, I would like to help with creating the live examples :) Recently did some work with Josh on creating the TS types for web3js so I think I have a good knowledge of how the library works.

@Jorropo I would like to help too! We can plan some great examples.

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

I'm still happy to work on this. Have there been any updates?

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

I would also love to work on this, is @Jorropo still working on this?

Seems like the trail has gone a bit cold on this one.
I’m happy to take the lead on this and get together with some of the others wanting to contribute on this and make a start?

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@ceresstation I think @Jorropo will not finish this bounty. But @Huanzhang89 would be interested to do it and he knows a friend that could help him out.

I already started with some examples for v1.0.0-beta.38 specific things:
https://github.com/ethereum/web3-examples

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@nivida -- I'd like to take this issue forward. I see that the example repo has already been created with a sample code. Next steps would be to make it work in JSFiddle and then add the code around using web3.js API right? Thanks!

cc: @ceresstation

@jorropo Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] reminder (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@eswarasai Sorry for the late response. I've created a webpack example and a module example. Yes, we would have to create a documentation folder there and setting the things up for jsfiddle. I think @Huanzhang89 would also like to help :)

@nivida -- No problem. Thanks for the update. I'll get started on setting up JSFiddle and shall update you once done :)

@Huanzhang89 -- Would love to have your help on setting up docs and probably have clearer list of examples that are needed in various tech stacks. Thanks!

@nivida -- Does the examples need to be setup on JSFiddle or maybe you'd prefer Codesandbox.io?

It looks like it's pretty easy to import a GitHub repo and get started with it just by using the GitHub URL to the example directory. You can open the below URL in a browser and you can see that it automatically installs dependencies and sets up dev environment for you.

URL --> https://codesandbox.io/s/github/ethereum/web3-examples/tree/development/starters/webpack

Let me know your thoughts on taking this approach. That way, we can just focus on having multiple example directories with all sorts of combinations of libraries/frameworks that can be easily imported and played around with in Codesandbox. Also, I'd like to know if there's any communication channel that's available for the ease of having such discussions and deciding on things faster. Thanks!

@nivida -- Any update here?

@eswarasai Sorry for the late response. @OFRBG started to do some tests and created a PR in the web3-examples repository. Feel free to join the two open discussions we have in the issue list there.

@nvidia :

Some examples using non-node accounts ( v3 keystore decrypt, privatekeyToAccount, etc.) and showing different ways ( from most automated to least ) to deploy contracts & method call them would be great.

I've found myself the way to do it but i'm not sure it is understable to everyone so that might be a great help to them.

Also, docs sometime does not explicitly provide all the information a dev could gather for its own usage (e.g : all the options we can use on some methods) . It's quite understable as it might make doc too big, however, examples could fill the gap on this ?

I applied to start work on Gitcoin. Is this issue still active?

Is this issue active? I see it opened in Gitcoin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions

Hello everyone,
What happened to this issue?
I came across an article for @nivida and ended up here. Please let me know if there is something to be done here. Would like to help!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

Was this page helpful?
0 / 5 - 0 ratings