Socket
Socket
Sign inDemoInstall

@openzeppelin/gsn-provider

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openzeppelin/gsn-provider

Web3 provider for GSN


Version published
Weekly downloads
41
decreased by-71.33%
Maintainers
5
Weekly downloads
 
Created
Source

:warning: 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.

FAQs

Package last updated on 05 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc