RevokeCash / revoke.cash

❌ Revoke or update your token approvals
https://revoke.cash
MIT License
677 stars 237 forks source link
ethereum security token-approval

Do you want to swap 10 DAI for ETH? Sure thing, we'll just need your approval to spend a BAJILLION DOLLARS!

Do you ever feel worried about the different apps that have access to the tokens in your wallet? revoke.cash allows you to inspect all the contracts you've approved to spend money on your behalf, and revoke their access for the ones you no longer need. If you don't want to completely revoke access, it's also possible to update the amount they are allowed to spend instead.

If you want to learn more about (unlimited) token approvals, I wrote an article on my blog: Unlimited ERC20 allowances considered harmful.

Running locally

git clone git@github.com:rkalis/revoke.cash.git
cd revoke.cash
yarn
yarn dev

Environment variables

An .example.env file is provided that needs to be copied into a .env file and filled out.

Some of these variables are integral to the functioning of Revoke.cash:

If you omit any of these variables, Revoke.cash will not work for the chains you omitted.

Then there are a few less essential variables:

Contributing

Adding a new network

Adding a new network is relatively straightforward as you only need to change three files: lib/utils/chains.ts, cypress/e2e/chains.cy.ts and locales/en/networks.json.

Prerequisites

To add a new network, one of the following needs to be available:

Also make sure that your network is listed in ethereum-lists/chains (and that it has subsequently been included in @revoke.cash/chains). Besides the earlier requirements, we also require a publicly available RPC endpoint with rate limits that are not too restrictive. It is also helpful if your network is listed (with TVL and volume stats) on DeFiLlama, but this is not required.

Adding the network

In lib/utils/chains.ts:

In cypress/e2e/chains.cy.ts:

In locales/en/networks.json:

Credits

Website created by Rosco Kalis after discussing the idea with Paul Berg at Devcon 5 in Osaka. Uses viem and wagmi for all Ethereum-related operations and Etherscan, CovalentHQ, Infura & Alchemy for extended multichain support. Built with Next.js, Tailwind and TypeScript. Uses Upstash for queueing.