GithubHelp home page GithubHelp logo

eth-smart-contracts's Introduction

ETH-smart-contracts

This repository is no longer maintained. Our Multitoken Smart Contract has an implementation of automatic wrapping and unwrapping of ETH.

Smart contracts for the ETH payment channel. This repo contains the logic to implement a Payment Channel using Ethereum. The files contained here are still in development and will be updated in the interests of functionality and security. This is not to be considered the final version. Code related comments or questions can be made using an Issue on GitHub. We appreciate your feedback!

Initialize

Install project dependencies

npm install

Local Development with Ganache CLI/Ganache UI Client

Our current development release uses the following versions:

Truffle v4.1.8 (core: 4.1.8)

Solidity v0.4.23 (solc-js) 

Ganache CLI v6.0.3 (ganache-core: 2.0.2)

By default, the repo assumes that the third address is the Signer's address. This address is required for signing. Note: Your address may be different than the one shown in the example below. Copy and paste the private key of this address into ./test/ETHChannelClosing.js and replace signerPk with the one on your local machine. Instructions for Ganache and ganache-cli are outlined below.

Ganache-UI Client

To install, you can download the appropriate installation located here: http://truffleframework.com/ganache/.

Should you use the Ganache UI Client, ensure you are using the private key of the third address from the top. You can access this value by clicking the button highlighted in red.

Ganache

Ganache Command Line Interface

To install, you can use npm install -g ganache-cli.

Use the third private key address in the CLI.

Running Tests

Run tests using

truffle test

Deploy to local testnet

This will also generate a deployedAddress.json for other application to read from

ganache-cli

truffle compile

truffle migrate

or run the following for new deployment

truffle migrate --reset --compile-all

Deploy to live testnet (Rinkeby)

Before deploying to Rinkeby, please register on Infura

In your bash_profile Add INFURA_URL and MNEMONIC

vim ~/.bash_profile export MNEMONIC="<passphrase>" export INFURA_URL=https://rinkeby.infura.io/<api-key>

truffle migrate --network rinkeby

eth-smart-contracts's People

Contributors

thomasmetta avatar

Watchers

James Cloos 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.