GithubHelp home page GithubHelp logo

fabriziosandri / blockchain-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 1.18 MB

Honey NFTs, an innovative solution for honey transfer - Blockchain course, 2022-2023

JavaScript 65.48% HTML 27.75% Solidity 6.32% CSS 0.44%
blockchain ethereum honeypot nft

blockchain-project's Introduction

BlockchainProject - HNFT

This repository contains the implementation of an architecture specifically designed to handle Honey NFTs, which serve as digital assets representing a batch of honey throughout its journey from the association to its final destination.

Requirements

Before launching the web application, ensure that Node JS is installed on your system. Additionally, if you intend to run the dapp from the association's perspective, it is essential to supply a valid Infura IPFS API key. You can specify this key within the static/contracts/const.json file.

Usage

Warning It is essential to understand that in the current implementation, both the buyers and the association must be aware of the same address of the Main smart contract in order to interact correctly. To ensure smooth communication, the Association, upon deploying the Main smart contract, is responsible for distributing the web application package that includes the accurate address of the Main smart contract stored inside the static/contracts/const.json file.

To follow the workflow for running this application, please follow the steps outlined below:

  1. The association deploys the Main smart contract according to the instructions provided below.
  2. The association then distributes the web application package to the buyers, ensuring that it contains the correct address of the Main smart contract.

By following these steps, all buyers will have access to and interact with the same instance of the Main smart contract, facilitating a seamless and consistent user experience.

Association Usage

If you are the association and want to get started with this web application, follow the steps below:

  1. Clone this repository to your local machine and navigate to the project directory and install the necessary dependencies by running:
cd BlockchainProject
npm install
  1. Configure the ENV.json file based on the provided template in ENV.json.sample. Ensure that you provide valid API keys for the Infura IPFS provider.
  2. Deploy the Main smart contract by running truffle migrate --reset or by simply running.
    npm run build

    NOTE: If you want to specify a custom network for the deployment you can edit truffle-config.js

  3. Once the project is properly set up, start the web app by running:
    npm run start
  4. You can now access the web app locally by opening your browser and visiting localhost:3000.

Buyer Usage

If you are a buyer and want to get started with this web application, follow the steps below:

  1. Clone this repository to your local machine and navigate to the project directory and install the necessary dependencies by running:
cd BlockchainProject
npm install
  1. Start the web app by running:
    npm start
  2. You can now access the web app locally by opening your browser and visiting localhost:3000.

Running the Tests

To execute the unit tests for the smart contracts, you can utilize the following command:

npm run test

By running this command, the test suite will be initiated, allowing you to verify the functionality and integrity of the smart contracts. Please ensure that all dependencies are properly installed before running the tests.

blockchain-project's People

Contributors

andrea-lorenzetti avatar fabriziosandri 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.