Code Monkey home page Code Monkey logo

filosf's Introduction

X-App Template for VeBetterDAO πŸš€

                                 #######
                            ################
                          ####################
                        ###########   #########
                       #########      #########
     #######          #########       #########
     #########       #########      ##########
      ##########     ########     ####################
       ##########   #########  #########################
         ################### ############################
          #################  ##########          ########
            ##############      ###              ########
             ############                       #########
               ##########                     ##########
                ########                    ###########
                  ###                    ############
                                     ##############
                               #################
                              ##############
                              #########

Unlock the potential of decentralized application development on Vechain with our X-App template for VeBetterDAO. Designed for the Vechain Thor blockchain, this template integrates cutting-edge technologies such as React, TypeScript, Hardhat, and Express, ensuring a seamless and efficient DApp development experience. 🌟

Requirements

Ensure your development environment is set up with the following:

Project Structure

Frontend (apps/frontend) 🌐

A blazing-fast React application powered by Vite:

  • Vechain dapp-kit: Streamline wallet connections and interactions. Learn more

Backend (apps/backend) πŸ”™

An Express server crafted with TypeScript for robust API development:

  • Vechain SDK: Seamlessly fetch and perform transactions with the VechainThor blockchain. Learn more
  • OpenAI GPT-Vision-Preview: Integrate image analysis capabilities. Explore here

Contracts (apps/contracts) πŸ“œ

Smart contracts in Solidity, managed with Hardhat for deployment on the Vechain Thor network.

Packages πŸ“¦

Shared configurations and utility functions to unify and simplify your development process.

Environment Variables βš™οΈ

Configure your environment variables for seamless integration:

Frontend

Place your .env files in apps/frontend:

Backend

Store your environment-specific .env files in apps/backend. .env.development.local & .env.production.local allow for custom environment variables based on the environment:

Contracts

Manage deployment parameters and network configurations in hardhat.config.js under apps/contracts:

  • MNEMONIC: Mnemonic of the deploying wallet

Getting Started 🏁

Clone the repository and install dependencies with ease:

yarn install # Run this at the root level of the project

Deploying Contracts πŸš€

Deploy your contracts effortlessly on either the Testnet or Solo networks:

Deploying on Solo Network

yarn contracts:deploy:solo

Deploying on Testnet

yarn contracts:deploy:testnet

Running on Solo Network πŸ”§

Run the Frontend and Backend, connected to the Solo network and pointing to your deployed contracts. Ensure all environment variables are properly configured:

yarn dev 

Setting up rewards

Run vechain devpal

npx @vechain/devpal http://localhost:8669

Open the Inspector tab and perform the following transactions:

  • Add Contracts: Add the EcoEarn contract and the Token contract deployed previously. Addresses can be found in the config-contracts package. ABIs can be found in the artifacts folder of the contracts app. image
  • Approve token: Approve the EcoEarn contract to spend your tokens image
  • Claim rewards: Claim rewards for the EcoEarn contract image
  • Trigger cycle: Trigger the cycle for the EcoEarn contract image

Disclaimer ⚠️

This template serves as a foundational starting point and should be thoroughly reviewed and customized to suit your project’s specific requirements. Pay special attention to configurations, security settings, and environment variables to ensure a secure and efficient deployment.


Embrace the power of VeBetterDAO's X-Apps template and transform your DApp development experience. Happy coding! πŸ˜„

FiloSF

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.