GithubHelp home page GithubHelp logo

grandbaiyi / chainbridge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goerli/goethbridge

0.0 0.0 0.0 75.07 MB

๐ŸŒ‰ Modular Multi-Directional Blockchain Bridge to interact with Multiple Networks; Ethereum, Rootstock, Ethereum Classic and many more to come

License: GNU General Public License v3.0

Go 94.48% Shell 0.23% Solidity 4.13% JavaScript 1.16%

chainbridge's Introduction

ChainBridge

This is a go implementation of a generic bridge between blockchains. The bridge will be able to connect any networks using native fuel or any token.

todo

  • implement support for non EVM based blockchains

requirements

go 1.9.1

go-ethereum go get github.com/ethereum/go-ethereum

solc/solcjs npm i -g solc

to get the bridge

go get github.com/ChainSafe/ChainBridge

compile abi

cd solidity
mkdir build
solcjs --abi contracts/Bridge.sol -o build

to run

generic instructions for bridge, needs to be updated!

cd $GOPATH/src/github.com/ChainSafe/ChainBridge
go build && go install

ChainBridge [networks]

the arguments after ChainBridge are the names of the networks you want to listen on as specified in config.json

eg. ChainBridge ropsten kovan

  • 1: mainnet

  • 3: ropsten

  • 4: rinkeby

  • 42: kovan

  • 31: rootstock testnet

    additional flags: ChainBridge -a [networks]

ChainBridge --config ./config.json [networks]

-a read logs from every contract on the network (not really useful, mostly for testing)

-v verbose output

--config specify path to config file

--keystore specify path to keystore file

interacting with the contract

for all the following, you should have another terminal open running the bridge listener with ChainBridge [networks]

ChainBridge fund network this will open up a prompt for you to make a deposit on the specified chain

ChainBridge deposit network this will open up a prompt for you to make a deposit on the specified chain id

ChainBridge pay network pay the bridge contract for a later withdraw on the specified chain

ChainBridge withdraw network this will withdraw ether that was paid to the bridge contract previously

--keystore specify path to keystore directory

--password specify password to account; this assumes that there's the same account for every chain

eg. ChainBridge fund kovan

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.