Giter Site home page Giter Site logo

samsonajulor / smart_contracts Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 12.0 622 KB

This repository contains smart contracts and dApps worked on collaboratively by web3bridgers of cohort IX.

License: MIT License

Solidity 65.81% HTML 4.01% CSS 2.17% TypeScript 14.20% JavaScript 13.81%

smart_contracts's Introduction

smart_contracts

This repository contains smart contracts and dApps designed collaboratively by web3bridgers of cohort IX.

To contribute to this repository, fork it, and raise a PR against the main branch.

Contracts are found in the .sol file in the truffle folder.

How to compile a contract

  • Change into the truffle dir cd truffle

  • Install truffle globally npm install -g truffle

OR

  • install packages npm install

  • Init truffle if truffle-config is absent (optional) npx truffle init

  • Compile the contract(s) with either of these commands npx truffle compile npx truffle compile --all npx truffle compile ./{file path}

  • Copy the resulting JSON abi from the ./build/contracts dir into the client/{appName}/src/contract/{nameOfContract}.json

    PS: replace texts in {}.

  • install brave browser. Dedicate this browser for development.

  • IMPORTANT!!!! please please please create a brand new test wallet and address!!!!!

  • In another terminal, cd into the clients/ballot or client/{anyOtherAppCreated} dir

  • Run npm install to install dependencies.

  • Run npm start

  • view the dApp in localhost:{port}.

    port is usually 3000

  • the app looks like this

ballot contract UI

smart_contracts's People

Contributors

samsonajulor avatar

Watchers

 avatar  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.