Giter VIP home page Giter VIP logo

web3-server's Introduction

Web3 server

This webserver provides an interface to communicate with Ethereum Smart Contracts over HTTP.

Requirements

Installation

Clone the repository

git clone [email protected]:legalthings/web3-server.git

Install dependencies

cd <project_name>
npm install

Build and run the project

npm start

Ethereum node

The project by default runs TestRPC on http://localhost:8545. This is useful for development and testing because its fast. However, if the server restarts the stored state is reset.

For production you should run your own node via Geth and then configure the url/port to a different endpoint.

Configuration

Configuration can be found here. Each environment and hostname can have its own configuration file.

Environment variables

Certain pieces of the configuration can be configured through environment variables.

Variable Description
ETH_WEB3_URL The url used to connect Web3 to the ethereum node.
ETH_WEB3_ADDRESS The default wallet address used to make transactions.

Smart Contracts

Predefined Smart Contracts can be added to the project in this folder. These contracts can then be instantiated and invoked by using the API.

You can add a contract by first creating a folder with the name of the contract. Within that folder add the following files.

| - my-contract
  | - contract.sol      | The smart contract written in Solidity
  | - contract.abi      | The smart contract application binary interface, used in JSON-RPC requests
  | - contract.bytecode | The smart contract compiled to bytecode, used to deploy it to the blockchain

API

Api documentation can be found here.

web3-server's People

Contributors

moesjarraf avatar benrogmans avatar

Watchers

Shrikrishna Khose 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.