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-helpers
Advanced tools
Test and development helper methods and scripts for GSN
:warning: This project is deprecated. All development on the GSN has been moved to the OpenGSN organization. Please refer to the OpenGSN localgsn implementation. We won't be developing new features nor addressing issues. Read here for more info.
Helper functions and scripts for using the Gas Station Network. Develop and test your GSN application with minimal setup.
Provides methods for:
RelayHub
instance$ npm install @openzeppelin/gsn-helpers
The GSN Helpers come in two flavors: a command-line interface and a JavaScript library, providing high flexibility.
The following samples show how to use each to deploy the RelayHub
contract, fund a recipient and then start a relayer server.
$ npx oz-gsn deploy-relay-hub --ethereumNodeURL http://localhost:8545
Deploying singleton RelayHub instance
RelayHub deployed at 0xd216153c06e857cd7f72665e0af1d7d82172f494
$ npx oz-gsn fund-recipient --recipient <address> --amount 50000000
Recipient <address> balance is now 50000000 wei
$ npx oz-gsn run-relayer --ethereumNodeURL http://localhost:8545 --quiet
Starting relayer
~/.cache/gsn-nodejs/gsn-relay-v0.2.1
-EthereumNodeUrl http://localhost:8545
-RelayHubAddress 0xd216153c06e857cd7f72665e0af1d7d82172f494
-Port 8090
-Url http://localhost:8090
Relay is funded and ready!
const {
deployRelayHub,
runRelayer,
fundRecipient,
} = require('@openzeppelin/gsn-helpers');
const web3 = new Web3('http://localhost:8545');
await deployRelayHub(web3);
await runRelayer(web3, { quiet: true });
await fundRecipient(web3, { recipient: <address>, amount: 50000000 });
NOTE: All of these actions require a local blockchain to be running in the background on port 8545.
The MIT License.
FAQs
Test and development helper methods and scripts for GSN
The npm package @openzeppelin/gsn-helpers receives a total of 50 weekly downloads. As such, @openzeppelin/gsn-helpers popularity was classified as not popular.
We found that @openzeppelin/gsn-helpers 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.