I am trying to implement the simple walkthrough tutorial on my local environment using ganache and I am stuck at initializing paymaster. I have compiled the Capture the Flag contract and also NaivePaymaster contract using truffle compile
I am stuck at step 3. Where do I get the RelayHub Address?
when you start GSN using gsn start
, the relayhub is require('./build/gsn/RelayHub').address
If you use GsnTestEnvironment.startGsn()
, then the return value contains the deployment addresses
Thank you for your reply I have found the relay hub but I am now stuck at step 5 of the tutorial how do I send ether to the paymaster I tried sending the contract ether through the rinkeby test net faucet but this failed I have resulted to trying to implement the gsn locally but I am still stuck at this step. Furthermore, how do I check the paymaster’s balance
you’re limited to set up to 2 ether to a paymaster.
to check the balance, you need to use a contract:
either the RelayHub.balanceOf(paymasterAddress)
or paymaster.getRelayHubDeposit()
(which internally calls the above method)
On testnet, both are accessible via the etherscan API (e.g. our accept-everything paymaster on rinkeby: https://rinkeby.etherscan.io/address/0x43d66E6Dce20264F6511A0e8EEa3f570980341a2#readContract
)
Thanks that worked very well. The ether sent to the paymaster using the command paymaster.send(1e18)
which account does this ether originate from?
@G-nmare you able to send ether inside the test ?
Let’s talk on telegram
what’s your username?