Skip to content
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.

Commit

Permalink
Bring back markdown readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro committed Jan 7, 2020
1 parent 04bc60d commit 411c072
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
50 changes: 0 additions & 50 deletions README.adoc

This file was deleted.

50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# OpenZeppelin GSN Provider

[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/gsn-provider.svg)](https://www.npmjs.org/package/@openzeppelin/gsn-provider)
[![Build Status](https://circleci.com/gh/OpenZeppelin/openzeppelin-gsn-provider.svg?style=shield)](https://circleci.com/gh/OpenZeppelin/openzeppelin-gsn-provider)

# GSN Provider

**A web3.js compatible provider for sending transactions via the Gas Station Network (GSN)**. This package wraps a modified version of the [`RelayClient`](https://github.com/tabookey/tabookey-gasless/blob/master/src/js/relayclient/RelayClient.js) from `tabookey-gasless` with a custom web3 Provider.

## Overview

### Installation

```console
$ npm install @openzeppelin/gsn-provider
```

### Usage

Create a `GSNProvider` and use it as the provider for your web3 instance:

```javascript
const Web3 = require("web3");
const { GSNProvider } = require("@openzeppelin/gsn-provider");

const web3 = new Web3(new GSNProvider("http://localhost:8545"));
```

Transactions sent to contracts will then be automatically routed through the GSN:

```javascript
const myContract = new web3.eth.Contract(abi, address);

// Sends the transaction via the GSN
await myContract.methods.myFunction().send({ from });

// Disable GSN for a specific transaction
await myContract.methods.myFunction().send({ from, useGSN: false });
```

## Learn More

* Check out [Getting Started](docs/modules/ROOT/pages/getting-started.adoc) to use GSN Provider in a new project.
* The [Testing GSN Applications](docs/modules/ROOT/pages/testing-gsn-applications.adoc) will teach you how to test your project locally.
* For detailed usage information, take a look at the [API Reference](docs/modules/ROOT/pages/api.adoc).


## License

Released under the MIT License.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

=== Installation

```bash
```console
$ npm install @openzeppelin/gsn-provider
```

Expand Down

0 comments on commit 411c072

Please sign in to comment.