User specifies and signs the set of operations they want to do and an amount of ERC20 tokens they're willing to pay for execution
Contract and verifies signature using Uniswap Permit2 and pulls user tokens, performs the payments.
git clone git@github.com:ngduythao/permit2-payment.git
cd permit2-payment
pnpm install # install Solhint, Prettier, and other Node.js depsBuild the contracts:
$ forge buildDelete the build artifacts and cache directories:
$ forge cleanCompile the contracts:
$ forge buildGet a test coverage report:
$ forge coverageDeploy to Anvil:
$ forge script script/DeployFoo.s.sol --broadcast --fork-url http://localhost:8545For this script to work, you need to have a MNEMONIC environment variable set to a valid
BIP39 mnemonic.
For instructions on how to deploy to a testnet or mainnet, check out the Solidity Scripting tutorial.
Format the contracts:
$ forge fmtGet a gas report:
$ forge test --gas-reportLint the contracts:
$ pnpm lintRun the tests:
$ forge test- abigger87/femplate
- cleanunicorn/ethereum-smartcontract-template
- foundry-rs/forge-template
- FrankieIsLost/forge-template
- FrankieIsLost/forge-template
- PaulRBerg/hardhat-template
This project is licensed under MIT.