Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2. Add GSN provider support #1

Open
wants to merge 1 commit into
base: 1-workshop-before-gsn
Choose a base branch
from

Conversation

drortirosh
Copy link
Member

minimal set of changes to add GSN support to the contract and the dApp
so that calling user no longer needs eth.

Actual payment is done by the default "accept everything" paymaster
contract.

@drortirosh drortirosh changed the title Add GSN provider support 2. Add GSN provider support Jul 28, 2022
captureFlagContract = await CaptureTheFlag.new(forwarderAddress);

const gsnProvider = await RelayProvider.newProvider({
provider: web3.currentProvider,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the web3 object coming from?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this project the tests are executed by a Truffle (https://trufflesuite.com/truffle/)
It injects some global variables to your test environment, including the web3 object.

minimal set of changes to add GSN support to the contract and the dApp
so that calling user no longer needs eth.

Actual payment is done by the default "accept everything" paymaster
contract.
@drortirosh drortirosh force-pushed the 1-workshop-before-gsn branch from c7c9e8b to 6f34bae Compare August 1, 2022 11:45
@drortirosh drortirosh force-pushed the 2-workshop-with-gsn branch from 76025e5 to db14e26 Compare August 1, 2022 11:45
Copy link

@Semsemq Semsemq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants