Git Product home page Git Product logo

motokobootcamp2023-coreproject's Introduction

ICP Motoko Bootcamp 2023 - Core Project - DAO

A DAO to control the text on a webpage through proposals.

Contains three canisters:

  1. A dao canister (Motoko) for managing the logic of the DAO.
  2. A webpage canister (Motoko) for storing the webpage that the DAO will control.
  3. A ledger canister (Motoko) for storing transactions and balances.
  4. A interface canister (Svelte) (folder called interface) for the user-friendly interface of the DAO.

On-chain UI: TBD

Running the project locally

To test the project locally, use the following commands:

# Set rust backtrace to get more useful debug info when things go wrong
export RUST_BACKTRACE=full

# Starts the replica, running in the background
dfx start --clean --background

# First time, canisters will need to be created, built and the back-end deployed and the declarations generated.
npm run create
npm run backend
npm run deploy

# Deploys the canisters to the replica and generates the candid interface
dfx deploy

Once the job completes, the application will be available at http://localhost:4943?canisterId={asset_canister_id}.

Additionally, if you are making frontend changes, you can start a development server with

npm run dev

Which will start a server at http://localhost:8080, proxying API requests to the replica at port 4943.

Note on frontend environment variables

If you are hosting frontend code somewhere without using DFX, you may need to make one of the following adjustments to ensure your project does not fetch the root key in production:

  • setNODE_ENV to production if you are using Webpack
  • use your own preferred method to replace process.env.NODE_ENV in the autogenerated declarations
  • Write your own createActor constructor

Useful commands

  • Check on-chain balance: dfx wallet --network=ic balance
  • Get principal ID: dfx identity get-principal
  • Get ledger ID: dfx ledger account-id
  • Get on-chain wallet ID: dfx identity --network=ic get-wallet

Resources

motokobootcamp2023-coreproject's People

Contributors

agent009 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.