Skip to content

This is frontend which is built as an example of dapp for NCD Level 2. Check videos in README for more info

Notifications You must be signed in to change notification settings

OlexandrSai/NEAR--sample-lottery-frontend

Repository files navigation

🎓 Lottery dapp

This repository contains a complete frontend applications to work with

NCD.L1.sample--lottery smart contract targeting the NEAR platform:

  1. Vue.Js (main branch)
  2. React (react branch)
  3. Angular (angular branch)

The example here is playful. It's a toy involving a lottery. The goal of this repository is to make it as easy as possible to get started writing frontend with VueJs and React for AssemblyScript contracts built to work with NEAR Protocol.

⚠️ Warning

Any content produced by NEAR, or developer resources that NEAR provides, are for educational and inspiration purposes only. NEAR does not encourage, induce or sanction the deployment of any such applications in violation of applicable laws or regulations.

Usage

image

Video demo UI walkthrough

You can use this app with contract id`s which was deployed by creators of this repo, or you can use it with your own deployed contractId. If you are using not yours contractId some functions of the lottery contract will not work because they are setted to work only if owner called this functions.

Example of such function:

image

To get possibility to work with the full functionality of the smart contract, you need to paste your contractId inside UI of VueJs deployed dapp or React deployed dapp. Before pasting id make sure that you deployed correct smart contract, in other case this code may not work as expected.

Link to smart contract repo

How to correctly deploy NCD.L1.sample--lottery smart contract (video tutorial)

After you deployed your contract, you need to paste id in one of deployed dapps

Try VueJs deployed app

Try React deployed app

Try Angular deployed app

Code walkthrough for NCD students:

Vue.Js

React

Angular ( RU | PL )

Project setup

In main branch README file is presented setup for Vue.Js, React setup README file is in react branch

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

About

This is frontend which is built as an example of dapp for NCD Level 2. Check videos in README for more info

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published