This package has been deprecated

Author message:

This project is deprecated. We are no longer actively developing new features nor addressing issues. Head to the readme for more information.

@openzeppelin/gsn-provider

0.1.11 • Public • Published

⚠️ This project is deprecated. All development on the GSN has been moved to the OpenGSN organization. Please refer to the OpenGSN provider implementation (GSNv1 version here). We won't be developing new features nor addressing issues. Read here for more info.

OpenZeppelin GSN Provider

NPM Package Build Status

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 from tabookey-gasless with a custom web3 Provider.

Overview

Installation

$ npm install @openzeppelin/gsn-provider

Usage

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

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:

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

License

Released under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i @openzeppelin/gsn-provider

Weekly Downloads

51

Version

0.1.11

License

MIT

Unpacked Size

78.7 kB

Total Files

19

Last publish

Collaborators

  • mcarlomagno
  • collins-oz
  • dylkil
  • zeljkox
  • namis
  • tirumerla
  • frangio