-
Notifications
You must be signed in to change notification settings - Fork 24
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
base: 1-workshop-before-gsn
Are you sure you want to change the base?
Conversation
captureFlagContract = await CaptureTheFlag.new(forwarderAddress); | ||
|
||
const gsnProvider = await RelayProvider.newProvider({ | ||
provider: web3.currentProvider, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
c7c9e8b
to
6f34bae
Compare
76025e5
to
db14e26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
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.