sevenisalie / ERC20Permit

An implementation of Open Zeppelin's draft-ERC20Permit that allows a user to sign a gasless transaction to increase their allowance to a counterparty. This implementation includes a Paymaster counterparty that the pays for the transfer between two parties, eliminating the need for users spending gas.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERC20Permit

This hardhat project demonstrates the following:

  • Signing a arbitrary typed data message in ethers
  • Verifying a signed message in ethers
  • A Token Owner sending ERC20 to a Token Receiver without spending gas
  • Implementing a 3rd party paymaster to sponsor transactions
  • Utilize the permit() method of ERC20Permit to verify a token owner's signature and increase their token allowance

To understand how this works, read the tests and then run them:

yarn
yarn hardhat test

This will automatically compile the contracts in the /contracts folder, and run the test coverage found in /test

About

An implementation of Open Zeppelin's draft-ERC20Permit that allows a user to sign a gasless transaction to increase their allowance to a counterparty. This implementation includes a Paymaster counterparty that the pays for the transfer between two parties, eliminating the need for users spending gas.


Languages

Language:TypeScript 92.6%Language:Solidity 7.4%