General-grants-program: Create a Smart Contract Example with Tutorial using Ink #2

Created on 24 Apr 2019  ·  27Comments  ·  Source: w3f/General-Grants-Program

Parity Ink is a smart contract tool which allows for WebAssembly based smart contracts to be written in the Rust programming language.

Create an example smart contract with documentation and a tutorial detailing how you made it. In the tutorial it would be helpful if you compared some of the syntax and methods to what developers may already be familiar with in other smart contract languages. Deploy the smart contract example to a Substrate chain and optionally create a UI to interact with it.

Requirements
_A correct submission will:_

  • Be open source.
  • Comes with a tutorial detailing how it was developed and comparing it to other smart contract languages.
  • The smart contract must be deployed to a Substrate chain.
Bounty Bounty-m

All 27 comments

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


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

Issue Status: 1. Open 2. Cancelled


__Work has been started__.

These users each claimed they can complete the work by 6 months, 3 weeks from now.
Please review their action plans below:

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

Read the doc, chat on riot and do it
2) riusricardo has applied to start work _(Funders only: approve worker | reject worker)_.

I'll be working on an IoT project. The idea is to explain how easy it is to put Substrate on constrained devices.
3) hskang9 has been approved to start work.

I have made materials with Rust code for Substrate workshop "Blockchain Developer Seminar: Applied Rust for Protocol Development"
link: https://medium.com/@decentral/new-york-goes-blockchain-ec1f04560124
and I wrote medium articles which reached over 4.5k views total(link: https://medium.com/@hyungsukkang).

Here are the steps that I will take to create a smart contract example on Parity Ink.

  1. Introduce Parity Ink to Ethcon Korea(link: https://ethcon.kr/) and refer the official repo and my tutorial repo

  2. Make a medium article(Korean / English) to start with parity ink. I will make voting contract focusing on how the contract works(e.g. making custom events)

  3. Make/Curate contracts and make a verified ink contract repo.

Learn more on the Gitcoin Issue Details page.

@hskang9 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

@hskang9 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

@hskang9 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 have made korean translation on how to install substrate and connect. The repo is private for now, asking speckle team to discuss opening to public.

github link is now in https://github.com/speckleos/Ethcon-korea, check progress.

@hskang9 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

@hskang9 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 am still working on this issue. Right now, I am working on building substrate quickstart tutorial to start off substrate development in both local and cloud environment.

thanks for the update @hskang9 !

So I have made a ppt and presented it on ethcon korea. now I am creating medium post to present to Polkadot Korea group for new developers who are interested in substrate

Is that bounty still open? I want to apply for this...

@aj07 I am working on parity ink medium in Korean(And English as well). I think you can ask for other languages as well.

My first article https://medium.com/@a4nkit/tictactoe-game-on-ink-substrate-chain-84ac30cc826a?postPublishedType=initial @Web3Foundation

My first article(korean) https://medium.com/@hyungsukkang/parity-ink-%EB%A1%9C-substrate-%EC%8A%A4%EB%A7%88%ED%8A%B8-%EC%BB%A8%ED%8A%B8%EB%9E%99%ED%8A%B8-%EA%B5%AC%ED%98%84%ED%95%98%EA%B8%B0-c9bd1a57cc93 @Web3Foundation

English version: https://medium.com/@hyungsukkang/implementing-a-quadratic-voting-with-parity-ink-71d9d06eefc6?postPublishedType=repub

@aj07 and @hskang9 my suggestion if you want to want to try and earn this bounty is to provide a PR to this repo with a new chapter:
https://github.com/substrate-developer-hub/substrate-contracts-workshop

The goal of your new chapter would be to highlight something new about the language, for example
using any of the env APIs which were not covered by the other chapters:

  • random_seed()
  • now()
  • gas_price()
  • gas_left()
  • etc...

Medium articles that you post will quickly go out of date as we update the ink! project.

Be open source.

Also means be content which can be updated and maintained by the community.

Both of you are wasting your time copy and pasting the same install instructions over and over into a "part 1" of your guide.

@hskang9 please feel free to continue with this bounty. Once you have the second part and the code + additional documentation our team will review!

@dfishb why was this closed? @hskang9 you are continuing the work on this or what's the latest again? It seems to have been abandoned a few times; if you'd like to discontinue working on it or changed directions I can revoke the bounty.

Well recently, I am finding a combination in which I can work on the smart contract. It is good to see the updates here, but updating at break-neck speed is really a challenge. To provide real tutorial, I really wanted to show working demo, and I thought I could solve the errors on the way, but it turns out I can't 🤦‍♂️... I think I should ask for solutions while I am getting an error for now.

Ok; @hskang9 so should consider it still a WIP for you? Its understandable on the timing, so just wanted to see if you're still considering finishing what you started when you can execute on it.

Yes, I feel guilty every time when I see this...but it is on the way...as my heart says I should finish this with real demo. It looks cool to show the solution right away, but this is a long fight for me.

So the first error I got is when I uploaded the contract, the screen stops after adding the code in substrate development chain. I received event putCode, and after that the polkadot.js apps stops like this screen below:

The chapter I found problem is deploying-your-contract

I used MacOS with the newest cargo-contract interface downloaded from parity.io,
my substrate version is substrate 2.0.0-79dd9c83-x86_64-macos.

How long does it take to upload code in substrate?

@Web3Foundation and @hskang9
It does not make sense to continue this bounty with ink! at the moment.

ink! is undergoing huge changes at the moment that will fundamentally change all the syntax.

There are also a number of constantly moving development items that break UIs and end to end scenarios. We have a single tutorial right now that the ink! team personally maintains:
https://github.com/substrate-developer-hub/substrate-contracts-workshop

For the time being, this is how we should keep it until ink! is stabilized.

@hskang9 with the update that @shawntabrizi has provided it seems we should put this one off the shelf as !ink is not stable enough / fundamentally changing syntax for completion of this bounty.

I will revoke and we can remove until further iterations of !ink are more stable presumably.

Issue Status: 1. Open 2. Cancelled


__The funding of 300.0 DAI (300.0 USD @ $1.0/DAI) attached to this issue has been cancelled by the bounty submitter__

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dfishb picture dfishb  ·  6Comments

Web3Foundation picture Web3Foundation  ·  82Comments

jplatts12 picture jplatts12  ·  6Comments

EdwardAThomson picture EdwardAThomson  ·  7Comments

EdwardAThomson picture EdwardAThomson  ·  6Comments