From 3d947a557881d20a18c1b6e4d42e723f2b722752 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Mon, 27 Dec 2021 15:27:27 +0800 Subject: [PATCH 01/11] add private chain in the directory --- .gitignore | 3 ++ PrivateNet.neo-express | 77 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 PrivateNet.neo-express diff --git a/.gitignore b/.gitignore index c6127b3..6846830 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,6 @@ modules.order Module.symvers Mkfile.old dkms.conf + +#Self add +.vscode diff --git a/PrivateNet.neo-express b/PrivateNet.neo-express new file mode 100644 index 0000000..a1010e8 --- /dev/null +++ b/PrivateNet.neo-express @@ -0,0 +1,77 @@ +{ + "magic": 3658658481, + "address-version": 53, + "consensus-nodes": [ + { + "tcp-port": 50013, + "ws-port": 50014, + "rpc-port": 50012, + "wallet": { + "name": "node1", + "accounts": [ + { + "private-key": "20f5fa65b03a19e1c187cca93f67de76bee93dac719557a85b831bac2ec50773", + "script-hash": "NLu8jxcz9fP78DFauoGYCMzyGoT1AP169R", + "label": null, + "is-default": true, + "contract": { + "script": "0c2102da742931cdadd5033012d15d302f3e2f8320a003838568f0745906a924ea49434156e7b327", + "parameters": [ + "Signature" + ] + } + }, + { + "private-key": "20f5fa65b03a19e1c187cca93f67de76bee93dac719557a85b831bac2ec50773", + "script-hash": "Nj3j6vzTBTEaMJCSLr8uaEVsRkrwUKk6CS", + "label": "Consensus MultiSigContract", + "is-default": false, + "contract": { + "script": "110c2102da742931cdadd5033012d15d302f3e2f8320a003838568f0745906a924ea494311419ed0dc3a", + "parameters": [ + "Signature" + ] + } + } + ] + } + } + ], + "wallets": [ + { + "name": "Alice", + "accounts": [ + { + "private-key": "c8802350a50d71e64910a00ea85a7b6586a709fa54975b656735f19c53c85b6c", + "script-hash": "NNrk4GbQx7TYioYaYD2VSmKyU54eJHv5Gc", + "label": null, + "is-default": true, + "contract": { + "script": "0c21030933d54e275f378eb0cc2d5098045bca8ce23ab3268a9895b296dafa9b13c8504156e7b327", + "parameters": [ + "Signature" + ] + } + } + ] + }, + { + "name": "Bob", + "accounts": [ + { + "private-key": "b9ad9f982b62198d575514247b1f39d8ee5d7bf32b133f641c54cd5220c9383c", + "script-hash": "NccYWsqK4noyymLu716fexqcEi2ckASxfD", + "label": null, + "is-default": true, + "contract": { + "script": "0c210266b8bf8f550f7076b55a0a4e6ce1dac28bc5f60879992cf3d77204c502c95dc74156e7b327", + "parameters": [ + "Signature" + ] + } + } + ] + } + ], + "settings": {} +} \ No newline at end of file From 51c1de8b313e04b5953c4b254fb9c9523c1a90d2 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Fri, 7 Jan 2022 17:49:42 +0800 Subject: [PATCH 02/11] Delete private chain --- PrivateNet.neo-express | 77 ------------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 PrivateNet.neo-express diff --git a/PrivateNet.neo-express b/PrivateNet.neo-express deleted file mode 100644 index a1010e8..0000000 --- a/PrivateNet.neo-express +++ /dev/null @@ -1,77 +0,0 @@ -{ - "magic": 3658658481, - "address-version": 53, - "consensus-nodes": [ - { - "tcp-port": 50013, - "ws-port": 50014, - "rpc-port": 50012, - "wallet": { - "name": "node1", - "accounts": [ - { - "private-key": "20f5fa65b03a19e1c187cca93f67de76bee93dac719557a85b831bac2ec50773", - "script-hash": "NLu8jxcz9fP78DFauoGYCMzyGoT1AP169R", - "label": null, - "is-default": true, - "contract": { - "script": "0c2102da742931cdadd5033012d15d302f3e2f8320a003838568f0745906a924ea49434156e7b327", - "parameters": [ - "Signature" - ] - } - }, - { - "private-key": "20f5fa65b03a19e1c187cca93f67de76bee93dac719557a85b831bac2ec50773", - "script-hash": "Nj3j6vzTBTEaMJCSLr8uaEVsRkrwUKk6CS", - "label": "Consensus MultiSigContract", - "is-default": false, - "contract": { - "script": "110c2102da742931cdadd5033012d15d302f3e2f8320a003838568f0745906a924ea494311419ed0dc3a", - "parameters": [ - "Signature" - ] - } - } - ] - } - } - ], - "wallets": [ - { - "name": "Alice", - "accounts": [ - { - "private-key": "c8802350a50d71e64910a00ea85a7b6586a709fa54975b656735f19c53c85b6c", - "script-hash": "NNrk4GbQx7TYioYaYD2VSmKyU54eJHv5Gc", - "label": null, - "is-default": true, - "contract": { - "script": "0c21030933d54e275f378eb0cc2d5098045bca8ce23ab3268a9895b296dafa9b13c8504156e7b327", - "parameters": [ - "Signature" - ] - } - } - ] - }, - { - "name": "Bob", - "accounts": [ - { - "private-key": "b9ad9f982b62198d575514247b1f39d8ee5d7bf32b133f641c54cd5220c9383c", - "script-hash": "NccYWsqK4noyymLu716fexqcEi2ckASxfD", - "label": null, - "is-default": true, - "contract": { - "script": "0c210266b8bf8f550f7076b55a0a4e6ce1dac28bc5f60879992cf3d77204c502c95dc74156e7b327", - "parameters": [ - "Signature" - ] - } - } - ] - } - ], - "settings": {} -} \ No newline at end of file From 7479fad707538c4e793b1074d2e529e3f28668d8 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Fri, 7 Jan 2022 18:05:07 +0800 Subject: [PATCH 03/11] Add the structure instructure of readme --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9319613..bf0b75e 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ -# Neo-Incentive-NFTs \ No newline at end of file +# Neo Incentive NFTs + +This project shows the whole structure of Neo NFT incentive system. We utilize a Demo to develop to MVP to validate the feasibility of this system. This proposal includes several terms: + +- Tutorial example +- Tasks based on tutorial +- NFT series based on Tasks +- Claim method +- Feedback and improvement ways + +## Tutorial example + +We will use [A Demo of Neo N3 Core Components dApp](https://github.com/leiw5173/A-Demo-of-Neo-N3-Core-Components-dApp) as tutorial example. The dApp built in it is designed for the following usage scenario: +_Oliver_ is looking for an accommodation. To make the reservation, the dApp requires Oliver to identify himself as an individual. Fortunately for Oliver, his Government has recently decided to implement a digital version of the national ID with the help of the Neo blockchain. Oliver needs to apply for a digital ID by presenting his physical ID to a local authority. At the moment of booking, Oliver can identify himself to the dApp with his digital Passport. Once the identity is verified, the dApp issues an access key credential to Oliver. Among the other things, the access key contains a code that gives access to an automatic door to enter the accommodation. When Oliver arrives at his accommodation, he displays the booking confirmation to the Door Lock, an automatic door with a IoT device capable to verify Oliver's claim. Once the booking is verified, Oliver is finally able to enter the accommodation. +In this tutorial, it describes an interactive demo to demonstrate the functionality and usage of NeoID (Neo Identity) as well as Neo Oracle and NeoFS (Neo File Storage) with an example use case. + +## Tasks based on tutorial + +## NFT series based on tasks + +## Claim method + +## Feedback and improvement ways From 10bf14279e47b75e7b5296c43ef2a3c536f788d5 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Fri, 7 Jan 2022 18:08:04 +0800 Subject: [PATCH 04/11] fix the readme paragraph issue --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bf0b75e..0e55495 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ This project shows the whole structure of Neo NFT incentive system. We utilize a ## Tutorial example We will use [A Demo of Neo N3 Core Components dApp](https://github.com/leiw5173/A-Demo-of-Neo-N3-Core-Components-dApp) as tutorial example. The dApp built in it is designed for the following usage scenario: + _Oliver_ is looking for an accommodation. To make the reservation, the dApp requires Oliver to identify himself as an individual. Fortunately for Oliver, his Government has recently decided to implement a digital version of the national ID with the help of the Neo blockchain. Oliver needs to apply for a digital ID by presenting his physical ID to a local authority. At the moment of booking, Oliver can identify himself to the dApp with his digital Passport. Once the identity is verified, the dApp issues an access key credential to Oliver. Among the other things, the access key contains a code that gives access to an automatic door to enter the accommodation. When Oliver arrives at his accommodation, he displays the booking confirmation to the Door Lock, an automatic door with a IoT device capable to verify Oliver's claim. Once the booking is verified, Oliver is finally able to enter the accommodation. + In this tutorial, it describes an interactive demo to demonstrate the functionality and usage of NeoID (Neo Identity) as well as Neo Oracle and NeoFS (Neo File Storage) with an example use case. ## Tasks based on tutorial From 5bfe275d2620f327b817ec023fea1972bc7a54bf Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Fri, 7 Jan 2022 18:24:12 +0800 Subject: [PATCH 05/11] Add structure of tutorial --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 0e55495..928dbce 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,24 @@ _Oliver_ is looking for an accommodation. To make the reservation, the dApp requ In this tutorial, it describes an interactive demo to demonstrate the functionality and usage of NeoID (Neo Identity) as well as Neo Oracle and NeoFS (Neo File Storage) with an example use case. +In this tutorial, the structure is shown as below: + +- `Environment setting` +- `Smart contract writing` + - `Basic smart contract knowledge` + - `Oracle integration` +- `Smart contract compiling` +- `Neo dApp and smart contract interaction` +- `NeoID integration` +- `NeoFS integration` +- `Demo operation` + +According to this structure, we will seperate the tutorial into 8 courses. For each course, it will last around 60 minutes. + ## Tasks based on tutorial +The tasks are designed according to the structure of tutorial. 8 courses will need 8 series of tasks + ## NFT series based on tasks ## Claim method From 2302e294073bb46e14d259645f0faa34aa6947be Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 15:40:52 +0800 Subject: [PATCH 06/11] Add the tasks part of this repo --- README.md | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 928dbce..3f7afb4 100644 --- a/README.md +++ b/README.md @@ -18,21 +18,41 @@ In this tutorial, it describes an interactive demo to demonstrate the functional In this tutorial, the structure is shown as below: -- `Environment setting` -- `Smart contract writing` - - `Basic smart contract knowledge` - - `Oracle integration` -- `Smart contract compiling` -- `Neo dApp and smart contract interaction` -- `NeoID integration` -- `NeoFS integration` -- `Demo operation` +- Environment setting +- Smart contract writing + - Basic smart contract knowledge + - Oracle integration +- Smart contract compiling, deployment, Invokation, and testing +- Neo dApp and smart contract interaction +- NeoID integration +- NeoFS integration +- Demo operation According to this structure, we will seperate the tutorial into 8 courses. For each course, it will last around 60 minutes. ## Tasks based on tutorial -The tasks are designed according to the structure of tutorial. 8 courses will need 8 series of tasks +The tasks are designed according to the structure of tutorial. 7 serieses of tasks will be set to test the first 7 learning processes. The last one demonstrate the whole procedure of this dapp. The serieses of tasks are shown as below: + +- Set environment to fetch the data of Neo testnet +- Deploy a smart contract on N3 testnet +- Update the smart contract with Oracle integration +- Invoke and debug a smart contract with [NeoExpress and NeoTrace](https://github.com/neo-project/neo-express) +- Develop a frontend page to interact with smart contract +- Update the smart contract and frontend page to integrate with NeoID +- Update the smart contract and frontend page to integrate with NeoFS + +After the tasks finished by learners, we need methods to check their degrees of different tasks' completion. The method can be set as below: + +- Submit the screenshot of the fetched data +- Submit the contract hash +- Submit the contract hash after update +- Submit the NeoExpress file and NeoTrace file +- Submit the website address +- Submit the contract hash and frontend page after update +- Submit the contract hash and frontend page after update + +In this segment, we set up the tasks and checking point and make sure the learners get familiar with the whole development process of Neo N3. ## NFT series based on tasks From c99fd7272636fdcc21737478c69249b92989dd12 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 16:19:39 +0800 Subject: [PATCH 07/11] Add the NFTs part of this repo --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 3f7afb4..ba370a8 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ In this segment, we set up the tasks and checking point and make sure the learne ## NFT series based on tasks +There are two kinds of Incentive NFTs in this system. One is for contributors of this repo. Another is for learners who complete the tasks. + +- `Contributors NFT`: We will deploy a Non-tradable NFT smart contract to reward the contributors who make their efforts on this system. +- `Learners NFT`: We will deploy four Non-tradable NFT smart contract to reward learners who complete the different levels of tasks. + - `Junior Learner`: The learners who are able to deploy smart contract on testnet can get this NFT + - `Middle Learner`: The learners who are able to create website and interact with smart contract can get this NFT. + - `Senior Learner`: The learners who are able to integrate NeoID, NeoFS, and Oracle into the smart contract can get this NFT. + - `Leader`: The developers who run their own projects on Neo N3 mainnet can get this NFT. + +The whole NFT serieses are shown above. All the NFTs are distributed on the Neo N3 mainnet and will be endowed certain incentive according to the NFT series. + ## Claim method ## Feedback and improvement ways From d9f47be0b0794b801e9eb0e369759550b42b032b Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 16:48:18 +0800 Subject: [PATCH 08/11] Add the claim part of this repo --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba370a8..2d9617c 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ In this segment, we set up the tasks and checking point and make sure the learne There are two kinds of Incentive NFTs in this system. One is for contributors of this repo. Another is for learners who complete the tasks. -- `Contributors NFT`: We will deploy a Non-tradable NFT smart contract to reward the contributors who make their efforts on this system. +- `Contributor NFT`: We will deploy a Non-tradable NFT smart contract to reward the contributors who make their efforts on this system. - `Learners NFT`: We will deploy four Non-tradable NFT smart contract to reward learners who complete the different levels of tasks. - `Junior Learner`: The learners who are able to deploy smart contract on testnet can get this NFT - `Middle Learner`: The learners who are able to create website and interact with smart contract can get this NFT. @@ -69,4 +69,14 @@ The whole NFT serieses are shown above. All the NFTs are distributed on the Neo ## Claim method +The claim method is shown as below. + +- If you have committed any changes that were merged into this repo, you have a `Contributor NFT` waiting! +- If you have completed certain tasks and submitted the related proofs, you have one of `Learners NFT`series waiting! +- You can claim your NFTs in the ![https://img.shields.io/discord/382937847893590016?label=Neo%20Smart%20Economy](https://discord.gg/xqAXAECWsT) +- A member of our team will verify the request and DM you with a personalized link to claim your own fresh minted NFTs. +- To help with verification we request all the applicants connect their GitHub account with their Discord account (Discord > settings > Connections > GitHub). +- If you haven't learned yet and would like to earn a `Learners NFT` to show your enthusiasm to the Neo N3 space, head over to [Developer Portal](https://kind-meadow-0e3193d1e.azurestaticapps.net/) to start learning! +- If you haven't contribute yet and would lke to earn a `Contributor NFT` to show your loyalty to the Neo N3 space, head over to [Issue](https://github.com/leiw5173/Neo-Incentive-NFTs/issues) tab to get start. + ## Feedback and improvement ways From 3a505f5274de005efda0ee354d7e61b81b1cb8fb Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 16:52:29 +0800 Subject: [PATCH 09/11] Fix the discord image issue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d9617c..ae842f7 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The claim method is shown as below. - If you have committed any changes that were merged into this repo, you have a `Contributor NFT` waiting! - If you have completed certain tasks and submitted the related proofs, you have one of `Learners NFT`series waiting! -- You can claim your NFTs in the ![https://img.shields.io/discord/382937847893590016?label=Neo%20Smart%20Economy](https://discord.gg/xqAXAECWsT) +- You can claim your NFTs in the [![Discord](https://img.shields.io/discord/382937847893590016?label=Neo%20Smart%20Economy)](https://discord.gg/xqAXAECWsT) - A member of our team will verify the request and DM you with a personalized link to claim your own fresh minted NFTs. - To help with verification we request all the applicants connect their GitHub account with their Discord account (Discord > settings > Connections > GitHub). - If you haven't learned yet and would like to earn a `Learners NFT` to show your enthusiasm to the Neo N3 space, head over to [Developer Portal](https://kind-meadow-0e3193d1e.azurestaticapps.net/) to start learning! From 63583919f8c25ba77b465a7acb470bbd8756c7e6 Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 17:22:38 +0800 Subject: [PATCH 10/11] Add Incentive part into the README file --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index ae842f7..ee75aa4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ This project shows the whole structure of Neo NFT incentive system. We utilize a - Tasks based on tutorial - NFT series based on Tasks - Claim method +- Incentive system - Feedback and improvement ways ## Tutorial example @@ -79,4 +80,14 @@ The claim method is shown as below. - If you haven't learned yet and would like to earn a `Learners NFT` to show your enthusiasm to the Neo N3 space, head over to [Developer Portal](https://kind-meadow-0e3193d1e.azurestaticapps.net/) to start learning! - If you haven't contribute yet and would lke to earn a `Contributor NFT` to show your loyalty to the Neo N3 space, head over to [Issue](https://github.com/leiw5173/Neo-Incentive-NFTs/issues) tab to get start. +## Incentive system + +The incentive is the key to motivating the developers and contributors to build the whole page of this developer ecosystem. And we need two different incentive systems to award developers and contributors. + +The people with different NFTs can get some privileges: + +- Exclusive role and badge on Discord +- Exclusive access to channels on Discord +- Exclusive new perks in the future + ## Feedback and improvement ways From 2f65807d2a3022ad7ada3c78f4203189237c2c5b Mon Sep 17 00:00:00 2001 From: Sam Wang Date: Tue, 11 Jan 2022 18:09:29 +0800 Subject: [PATCH 11/11] Add contribution part into the README file --- README.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee75aa4..925b62c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This project shows the whole structure of Neo NFT incentive system. We utilize a - NFT series based on Tasks - Claim method - Incentive system -- Feedback and improvement ways +- How to contribute ## Tutorial example @@ -90,4 +90,77 @@ The people with different NFTs can get some privileges: - Exclusive access to channels on Discord - Exclusive new perks in the future -## Feedback and improvement ways +## How to contribute + +The updates of this system are made through these steps: + +### Submit an issue + +- Create an [new issue](https://github.com/leiw5173/Neo-Incentive-NFTs/issues) +- Comment on the issue (if you'd like to be assigned to it) - taht way [our team can assign the issue to you](https://github.blog/2019-06-25-assign-issues-to-issue-commenters/) + +### Fork the repository (repo) + +- If you're not sure, here's how to [fork the repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo) + +### Set up your local environment (optional) + +If you're ready to contribute and create your PR, it will help to set up a local environment so you can see your changes. + +1. [Set up your development environment](https://www.gatsbyjs.com/docs/tutorial/part-0/) +2. Clone your fork + +If this is your first time forking our repo, this is all you need to do for this step: + +```bash +git clone git@github.com:[your_github_handle]/Neo-incentive-NFTs.git && cd Neo-incentive-NFTs +``` + +If you've already forked the repo, you'll want to ensure your fork is configured and that it's up to date. This will save you the headache of potential merge conflicts. +To [configure your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork): + +```bash +git remote add upstream https://github.com/leiw5173/Neo-Incentive-NFTs.git +``` + +To [sync your fork with the latest changes](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork): + +```bash +git checkout dev +git fetch upstream +git merge upstream/dev +``` + +### Make awesome changes! + +1. Create new branch for your changes + + ```bash + git checkout -b new_branch_name + ``` + +2. Start developing! + + - Open this directory in your favorite text editor / IDE + +3. Commit and prepare for pull request (PR). In your PR commit message, reference the issue it resolves (see [how to link a commit message to an issue using a keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)). + + ```bash + git commit -m "brief description of changes [Fixes #1234]" + ``` + +4. Push to your GitHub account + +### Wait for review + +- The repo team reviews every PR +- Acceptable PRs will be approved & merged into the `dev` branch + +### Release + +- The repo team will periodically merge `dev` into `master` (typically multiple times per week) +- You can [view the history of releases](https://github.com/leiw5173/Neo-Incentive-NFTs/releases), which include PR highlights + +### Join our Discord server + +You can discuss this NFT incentive system in the `nft-incentive-system` group in the [![Discord](https://img.shields.io/discord/382937847893590016?label=Neo%20Smart%20Economy)](https://discord.gg/xqAXAECWsT).