Skip to content

About

This repository holds some adapter contracts that will allow to use Permit2 from contracts that don't support it natively

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Universal Permit2 Adapter

Permit2 by Uniswap is an amazing development that will revolutionize the UX in Web3. However, it can be hard to migrate existing contracts to use this new way of transferring tokens.

To help in those cases, we've built the Universal Permit2 Adapter. It's basically an adapter that can be used to give Permit2 capabilities to existing contracts, without having to to re-deploy.

If you'd like to interact with these contracts, we suggest you use our SDK that already handles most of the complexities around it.

Usage

This is a list of the most frequently needed commands.

Build

Build the contracts:

$ forge build

Clean

Delete the build artifacts and cache directories:

$ forge clean

Compile

Compile the contracts:

$ forge build

Coverage

Get a test coverage report:

$ forge coverage

Format

Format the contracts:

$ forge fmt

Gas Usage

Get a gas report:

$ forge test --gas-report

Lint

Lint the contracts:

$ pnpm lint

Test

Run the tests:

$ forge test

Audit

This code has been audited by Omniscia.io. You can find the report here.

License

This project is licensed under MIT.

About

This repository holds some adapter contracts that will allow to use Permit2 from contracts that don't support it natively

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages