This is a sample of using GSN with react application. It also adds some basic UI to the transaction progress.
This is the branch with GSN support.
Running it now is slightly different, since GSN must be active when deploying the contract (this is no problem in testnet/mainnet, but requires one extra step on local network)
In order to run it run these commands in different window each:
- Install dependencies:
yarn install
- Launch Hardhat node:
yarn evm
- Deploy GSN contracts, such as RelayHub and Forwarder, and start a Relay Server:
yarn gsn
- Deploy the CTF contract:
yarn deploy
- Launch the React app:
yarn start
A live deployment of this app is available at https://ctf-react.opengsn.org