Skip to content

Commit

Permalink
feat: add anvil support
Browse files Browse the repository at this point in the history
  • Loading branch information
zugdev committed Feb 2, 2025
1 parent 326dbc2 commit c99f741
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"prepare": "husky install",
"test": "jest --setupFiles dotenv/config --coverage",
"cy:open": "cypress open",
"cy:run": "cypress run"
"cy:run": "cypress run",
"test:anvil": "cypress/scripts/anvil.sh"
},
"keywords": [
"typescript",
Expand Down
2 changes: 2 additions & 0 deletions static/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const providersUrl: { [key: string]: string } = {
324: "https://mainnet.era.zksync.io",
43114: "https://rpc.ankr.com/avalanche",
480: "https://rpc.worldchain.network",
31337: "http://127.0.0.1:8545",
};

export const explorersUrl: { [key: string]: string } = {
Expand All @@ -47,6 +48,7 @@ export const explorersUrl: { [key: string]: string } = {
324: "https://explorer.zksync.io",
43114: "https://snowtrace.io",
480: "https://explorer.worldchain.network",
31337: "http://127.0.0.1:8545",
};

let networks: [AppKitNetwork, ...AppKitNetwork[]];
Expand Down
1 change: 1 addition & 0 deletions static/permit2-addresses.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export function getPermit2Address(networkId: number): string | undefined {
switch (networkId) {
case 31337:
case 100:
case 1:
case 42161:
Expand Down
3 changes: 3 additions & 0 deletions static/populate-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const tokensByNetwork: { [key: number]: { [token: string]: string } } = {
100: {
UUSD: "0xc6ed4f520f6a4e4dc27273509239b7f8a68d2068",
},
31337: {
UUSD: "0x0f644658510c95cb46955e55d7ba9dda9e9fbec6",
},
};

const tokenSelector = document.querySelector(".token-selector") as HTMLInputElement;
Expand Down

0 comments on commit c99f741

Please sign in to comment.