This demonstrates an ERC1155/ERC2771 semi-fungible contract with meta transactions and token metadata stored on IPFS, as well as a gasless web app to initialize, view and mint new tokens.
Only local dev works for now. The deployment to testnets is waiting for updated 3.x GSN contracts (RelayHub/Forwarder) there, see the discussion on OpenGSN Discord server.
Tech:
- OpenZeppelin ERC1155
- OpenZeppelin ERC2771Context
- Gas Station Network
- Hardhat
- Next.js
- wagmi
- ipfs-http-client
- Infura IPFS gateway
Copy sol/.env.example
to sol/.env
and web/.env.example
to web/.env
and fill in the missing env vars.
yarn sol:node
starts Hardhat Networkyarn sol:gsn
deploys GSN contracts, and starts a relay serveryarn sol:deploy:localhost
deploysTokenStore
andWhitelistPaymaster
contractsyarn web:dev
starts Next.js app athttp://localhost:3000