Skip to content

Commit

Permalink
feat: remove goerli (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito authored Feb 5, 2024
1 parent 43da0ca commit 4d0cc32
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 118 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
"fetchPermitInfo": "ts-node src/permitInfo/fetchPermitInfo.ts",
"fetchPermitInfo:mainnet": "yarn run fetchPermitInfo -- 1",
"fetchPermitInfo:gnosis": "yarn run fetchPermitInfo -- 100",
"fetchPermitInfo:goerli": "yarn run fetchPermitInfo -- 5",
"fetchPermitInfo:sepolia": "yarn run fetchPermitInfo -- 11155111",
"recheckPermitInfo:mainnet": "yarn run fetchPermitInfo -- 1 '' '' true",
"recheckPermitInfo:gnosis": "yarn run fetchPermitInfo -- 100 '' '' true",
"recheckPermitInfo:goerli": "yarn run fetchPermitInfo -- 5 '' '' true",
"recheckPermitInfo:sepolia": "yarn run fetchPermitInfo -- 11155111 '' '' true",
"test": "node --test"
},
Expand Down
1 change: 0 additions & 1 deletion src/permitInfo/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const SPENDER_ADDRESS = '0xC92E8bdf79f0507f65a392b0ab4667716BFE0110'

export const DEFAULT_RPC_URLS: Record<number, string> = {
1: 'https://mainnet.infura.io/v3/' + env.INFURA_API_KEY,
5: 'https://goerli.infura.io/v3/' + env.INFURA_API_KEY,
100: 'https://rpc.gnosischain.com',
11155111: 'https://ethereum-sepolia.publicnode.com',
}
Expand Down
4 changes: 2 additions & 2 deletions src/permitInfo/fetchPermitInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* TokenListPath is the optional second cli argument
* By default, checks against the respective default token list
* - `src/public/CowSwap.json` for mainnet and gnosis chain
* - `src/public/CowSwapGoerli.json` for goerli
* - `src/public/CowSwapSepolia.json` for sepolia
*
* RpcUrl is the optional third cli argument
* By default, it'll use Infura for mainnet and goerli.
* By default, it'll use Infura for mainnet.
* In that case, `INFURA_API_KEY` env var must be set.
*
* Minimal example:
Expand Down
2 changes: 1 addition & 1 deletion src/permitInfo/utils/getProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getProvider(chainId: number, rpcUrl: string | undefined): JsonRp
throw new Error(`No RPC found for network ${chainId}`)
}

if (!rpcUrl && (chainId === 1 || chainId === 5) && !env.INFURA_API_KEY) {
if (!rpcUrl && chainId === 1 && !env.INFURA_API_KEY) {
throw new Error(`INFURA_API_KEY is required`)
}

Expand Down
1 change: 0 additions & 1 deletion src/permitInfo/utils/getTokensFromTokenList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { join } from 'node:path'
const tokenListsByNetwork: Record<number, string> = {
1: 'CowSwap.json',
100: 'CowSwap.json',
5: 'CowSwapGoerli.json',
11155111: 'CowSwapSepolia.json',
}

Expand Down
69 changes: 0 additions & 69 deletions src/public/CowSwapGoerli.json

This file was deleted.

40 changes: 0 additions & 40 deletions src/public/PermitInfo.5.json

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

0 comments on commit 4d0cc32

Please sign in to comment.