GithubHelp home page GithubHelp logo

isabella232 / gsn-site Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openzeppelin/gsn-site

0.0 0.0 0.0 3.39 MB

The Ethereum Gas Station Network Alliance Landing Page and Tools

License: MIT License

JavaScript 92.25% CSS 7.75%

gsn-site's Introduction

⚠️ This project is in maintenance mode. All development on the GSN has been moved to the OpenGSN organization. Please refer to the OpenGSN site implementation. We will only be releasing fixes for high severity issues for this project until July 2020. Read here for more info.

Gas Station Network Site

The official front end for the Gas Station Network. The staging site is here.

GSN Test Environment

The Gas Station Network is currently deployed to Rinkeby. The addresses are:

Role Address Description
RelayHub 0xd216153c06e857cd7f72665e0af1d7d82172f494 Main RelayHub contract
SampleRecipient 0x9C7bd19648BF9538eE9986b0E2BF18daaA80601c Example contract that handles meta tx
Relay 0xeE90C66Ed6Aaafbf2DBcd34c84c395905B5C8f20 Relay deployed to https://rinkeby-01.gsn.openzeppelin.org

Local Setup

The GSN site can be run locally using just a few commands:

# install dependencies
yarn
# Setup environment variables.  See the file for more info.
cp .envrc.example .envrc
# allow environment variables
direnv allow
# Start up the local server
yarn dev

Now navigate to localhost:3000 in your browser. You'll be able to build against test nets such as Rinkeby.

For full control over the smart contracts you'll want to setup the Gas Station Network locally.

Gas Station Network Local Test Environment

Setup a local clone of tabookey-gasless.

Once the dependencies are set up you can run:

./restart-relay.sh

This will start up a local ganache, deploy the contracts, create a sample recipient, and create a relay. You may need to run this command a couple of times; it was a little flakey at the time of this writing.

To mint Ether to yourself on the ganache instance, use the command:

./scripts/ganache-fund.js 10 0x1234...

Replace 0x1234... with your address.

In your browser simply use the network Localhost 8545. You may need to reset the account.

You'll find Tabookey has cleverly deployed consistent addresses.

Role Address Description
RelayHub 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 Main RelayHub contract
SampleRecipient 0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B Example contract that handles meta tx
Relay 0xeE90C66Ed6Aaafbf2DBcd34c84c395905B5C8f20 Relay deployed to http://localhost:8090

Production Deployment

The app can currently be deployed to Netlify. Url re-write rules are required so that static pages can serve dynamic urls. The url re-write configuration lives in netlify.toml.

To build the production version of the site run:

$ yarn dist

Configuring the built-in RelayHub addresses

The directory networks contains a configuration file for each network the contracts are deployed to. Network files are named according to the network id: contracts for mainnet live in networks/1.json, contracts for rinkeby live in networks/4.json etc.

Network files are JSON formatted and the expected structure is an array of objects. For example:

[
  {
    "contractName": "RelayHub",
    "address": "0x4FC8ac0210527bCA8c5C66a595Da78B428862276"
  }
]

You can add and edit the network config files to add new RelayHubs. Only one RelayHub per network is supported by the application.

Made with ❤️ by Delta Camp

gsn-site's People

Contributors

asselstine avatar chuckbergeron avatar frangio avatar nventuro avatar rrecuero avatar spalladino 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.