Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@openzeppelin/gsn-provider
Advanced tools
: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.
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.
$ npm install @openzeppelin/gsn-provider
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 });
Released under the MIT License.
FAQs
Web3 provider for GSN
The npm package @openzeppelin/gsn-provider receives a total of 36 weekly downloads. As such, @openzeppelin/gsn-provider popularity was classified as not popular.
We found that @openzeppelin/gsn-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.