Skip to content

Commit

Permalink
Arbitrum Nova deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed Jan 3, 2024
1 parent 9e783dd commit fab4193
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/abi/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"4002": "0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a",
"80001": "0xC74f279E5A7FDAd6624054518773ae4EC77E78D3",
"42161": "0x4bD57a848c56E6241296a1256FB2bDEbCdbb9dB0",
"42170": "0x2f5cd4366c16AFC3b04A4b2327BbFf9e3955dbC1",
"42766": "0x2f5cd4366c16AFC3b04A4b2327BbFf9e3955dbC1",
"59144": "0xbbA4dB63DA448C124ee38EeC636b697CA9bdf9e1",
"167007": "0x2f5cd4366c16AFC3b04A4b2327BbFf9e3955dbC1",
Expand Down
1 change: 1 addition & 0 deletions src/abi/resolver.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"4002": "0xa97c7AF10ee564EBf452A9347bB9653454Ba69C0",
"80001": "0xC17E9347Ce26D7630A98eC4158Bd7200E54bf4Cd",
"42161": "0xd64A2DF9d73CD1Cb50139A3eC3176070e00C67cA",
"42170": "0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a",
"42766": "0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a",
"59144": "0x2f5cd4366c16AFC3b04A4b2327BbFf9e3955dbC1",
"167007": "0xeA2f99fE93E5D07F61334C5Eb9c54c5D5C957a6a",
Expand Down
3 changes: 3 additions & 0 deletions src/abi/tlds.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
".misie": "0x526Ff108F5d422d0e1d6650E2Bc015BBE1fdb058",
".ppl": "0xbC9d19e5f97a572f428F7292DBf3dc182Cc05C82"
},
"42170": {
".alnova": "0x4087fb91A1fBdef05761C02714335D232a2Bf3a1"
},
"42766": {
".fairchat": "0x4087fb91A1fBdef05761C02714335D232a2Bf3a1"
},
Expand Down
3 changes: 3 additions & 0 deletions src/abi/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"LINK": "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4",
"UNI": "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0"
},
"42170": {
"ETH": "0x0"
},
"42766": {
"USDC": "0x0"
},
Expand Down
18 changes: 17 additions & 1 deletion src/hooks/useChainHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default function useChainHelpers() {
return "Fantom Testnet";
} else if (chainId === 42161) {
return "Arbitrum";
} else if (chainId === 42170) {
return "Arbitrum Nova";
} else if (chainId === 42766) {
return "ZKFair";
} else if (chainId === 59144) {
Expand Down Expand Up @@ -125,6 +127,11 @@ export default function useChainHelpers() {
urls = [
"https://rpc.ankr.com/arbitrum"
];
} else if (networkId === 42170) {
// Arbitrum Nova
urls = [
"https://nova.arbitrum.io/rpc"
];
} else if (networkId === 42766) {
// zkFair
urls = [
Expand Down Expand Up @@ -199,11 +206,20 @@ export default function useChainHelpers() {
method = "wallet_addEthereumChain"
params = [{
blockExplorerUrls: [ "https://arbiscan.io" ],
chainId: "0xA4B1",
chainId: "0xa4b1",
chainName: "Arbitrum One",
nativeCurrency: { decimals: 18, name: "ETH", symbol: "ETH" },
rpcUrls: ["https://rpc.ankr.com/arbitrum"]
}]
} else if (networkName == "Arbitrum Nova") {
method = "wallet_addEthereumChain"
params = [{
blockExplorerUrls: [ "https://nova.arbiscan.io" ],
chainId: "0xa4ba",
chainName: "Arbitrum Nova",
nativeCurrency: { decimals: 18, name: "ETH", symbol: "ETH" },
rpcUrls: ["https://nova.arbitrum.io/rpc"]
}]
} else if (networkName == "Optimism") {
method = "wallet_addEthereumChain"
params = [{
Expand Down
13 changes: 13 additions & 0 deletions src/store/modules/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default {
137: "Polygon",
255: "Kroma",
42161: "Arbitrum",
42170: "Arbitrum Nova",
42766: "ZKFair",
59144: "Linea",
534352: "Scroll",
Expand Down Expand Up @@ -54,6 +55,8 @@ export default {
return "https://testnet.ftmscan.com";
} else if (chainId.value === 42161) {
return "https://arbiscan.io";
} else if (chainId.value === 42170) {
return "https://nova.arbiscan.io";
} else if (chainId.value === 42766) {
return "https://scan.zkfair.io";
} else if (chainId.value === 59144) {
Expand Down Expand Up @@ -100,6 +103,8 @@ export default {
return "https://testnet.ftmscan.com";
} else if (netId === 42161) {
return "https://arbiscan.io";
} else if (netId === 42170) {
return "https://nova.arbiscan.io";
} else if (netId === 42766) {
return "https://scan.zkfair.io";
} else if (netId === 59144) {
Expand Down Expand Up @@ -190,6 +195,11 @@ export default {
urls = [
"https://rpc.ankr.com/arbitrum",
];
} else if (networkId === 42170) {
// Arbitrum Nova
urls = [
"https://nova.arbitrum.io/rpc",
];
} else if (networkId === 42766) {
// ZKFair
urls = [
Expand Down Expand Up @@ -319,6 +329,9 @@ export default {
} else if (chainId.value === 42161) {
state.networkName = "Arbitrum";
state.networkCurrency = "ETH";
} else if (chainId.value === 42170) {
state.networkName = "Arbitrum Nova";
state.networkCurrency = "ETH";
} else if (chainId.value === 42766) {
state.networkName = "ZKFair";
state.networkCurrency = "USDC";
Expand Down

0 comments on commit fab4193

Please sign in to comment.