Skip to content

Commit

Permalink
Merge pull request #31 from ourzora/01-30-add_abstract_main_testnet_a…
Browse files Browse the repository at this point in the history
…nd_uni_chains

Add abstract main, testnet and uni chains
  • Loading branch information
iainnash authored Jan 31, 2025
2 parents 1e8e478 + 8fd9bcd commit 7290d17
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"react-router-dom": "^6.20.0",
"reshaped": "^2.6.0",
"toastify-js": "^1.12.0",
"viem": "^2.21.43",
"viem": "^2.22.17",
"yup": "^1.3.2"
},
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const zkAddresses: ContractNetworkConfig = {

// Example how to add new networks before they are merged and released from `safe-global/safe-deployments` package.
export const contractNetworks: ContractNetworksConfig = {
[`${chains.abstractTestnet.id}`]: zkAddresses,
[`${chains.abstract.id}`]: zkAddresses,
[`${chains.zoraSepolia.id}`]: defaultL2Addresses,
[`${chains.blastSepolia.id}`]: defaultL2Addresses,
[`${chains.optimismSepolia.id}`]: defaultL2Addresses,
[`${chains.blast.id}`]: defaultL2Addresses,
[`${chains.unichainSepolia.id}`]: defaultL2Addresses,
[`${chains.zksyncSepoliaTestnet.id}`]: zkAddresses,
[`${chains.zksync.id}`]: zkAddresses,
[`${chains.abstractTestnet.id}`]: zkAddresses,
};

export const allowedNetworks: { [chainId: number]: chains.Chain } = {
Expand All @@ -54,6 +56,9 @@ export const allowedNetworks: { [chainId: number]: chains.Chain } = {
[chains.blast.id]: chains.blast,
[chains.zksync.id]: chains.zkSync,
[chains.zksyncSepoliaTestnet.id]: chains.zksyncSepoliaTestnet,
[chains.unichainSepolia.id]: chains.unichainSepolia,
[chains.abstractTestnet.id]: chains.abstractTestnet,
[chains.abstract.id]: chains.abstract,
};

Object.keys(contractNetworks).map((network) => {
Expand All @@ -62,7 +67,7 @@ Object.keys(contractNetworks).map((network) => {
return;
}
const viemChain = Object.values(chains).find(
(chain) => chain.id.toString() === network,
(chain) => chain.id.toString() === network
);

if (!viemChain) {
Expand Down
86 changes: 58 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,14 @@
dependencies:
"@noble/hashes" "1.3.3"

"@noble/curves@1.6.0", "@noble/curves@^1.4.0", "@noble/curves@^1.6.0", "@noble/curves@~1.6.0":
"@noble/curves@1.8.1", "@noble/curves@~1.8.1":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff"
integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==
dependencies:
"@noble/hashes" "1.7.1"

"@noble/curves@^1.6.0", "@noble/curves@~1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b"
integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==
Expand All @@ -543,11 +550,16 @@
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699"
integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==

"@noble/hashes@1.5.0", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.5.0":
"@noble/hashes@1.5.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0"
integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==

"@noble/hashes@1.7.1", "@noble/hashes@~1.7.1":
version "1.7.1"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==

"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down Expand Up @@ -1265,6 +1277,11 @@
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1"
integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==

"@scure/base@~1.2.2", "@scure/base@~1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.4.tgz#002eb571a35d69bdb4c214d0995dff76a8dcd2a9"
integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==

"@scure/bip32@1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.3.tgz#a9624991dc8767087c57999a5d79488f48eae6c8"
Expand All @@ -1274,7 +1291,16 @@
"@noble/hashes" "~1.3.2"
"@scure/base" "~1.1.4"

"@scure/bip32@1.5.0", "@scure/bip32@^1.5.0":
"@scure/bip32@1.6.2":
version "1.6.2"
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.2.tgz#093caa94961619927659ed0e711a6e4bf35bffd0"
integrity sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==
dependencies:
"@noble/curves" "~1.8.1"
"@noble/hashes" "~1.7.1"
"@scure/base" "~1.2.2"

"@scure/bip32@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.5.0.tgz#dd4a2e1b8a9da60e012e776d954c4186db6328e6"
integrity sha512-8EnFYkqEQdnkuGBVpCzKxyIwDCBLDVj3oiX0EKUFre/tOjL/Hqba1D6n/8RcmaQy4f95qQFrO2A8Sr6ybh4NRw==
Expand All @@ -1291,7 +1317,15 @@
"@noble/hashes" "~1.3.2"
"@scure/base" "~1.1.4"

"@scure/bip39@1.4.0", "@scure/bip39@^1.4.0":
"@scure/bip39@1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.4.tgz#07fd920423aa671be4540d59bdd344cc1461db51"
integrity sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==
dependencies:
"@noble/hashes" "~1.7.1"
"@scure/base" "~1.2.4"

"@scure/bip39@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.4.0.tgz#664d4f851564e2e1d4bffa0339f9546ea55960a6"
integrity sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==
Expand Down Expand Up @@ -1716,7 +1750,12 @@
"@types/tinycolor2" "^1.4.3"
tinycolor2 "^1.4.2"

abitype@1.0.6, abitype@^1.0.6:
abitype@1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba"
integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==

abitype@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.6.tgz#76410903e1d88e34f1362746e2d407513c38565b"
integrity sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==
Expand Down Expand Up @@ -4562,10 +4601,10 @@ os-browserify@^0.3.0:
resolved "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz"
integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==

ox@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/ox/-/ox-0.1.0.tgz#ff6d914b57f973a2e0af5532e4d60b9aea05e84f"
integrity sha512-xs+STnBP8XG38N+7W5c/5LRN68XOleiTfKJlSBw5rcorIfGvpJPB45lRE3AlziiiuZ+KrEd/1ZLrD+LkN5XFzQ==
ox@0.6.7:
version "0.6.7"
resolved "https://registry.yarnpkg.com/ox/-/ox-0.6.7.tgz#afd53f2ecef68b8526660e9d29dee6e6b599a832"
integrity sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==
dependencies:
"@adraffy/ens-normalize" "^1.10.1"
"@noble/curves" "^1.6.0"
Expand Down Expand Up @@ -5927,19 +5966,18 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"

viem@^2.21.43:
version "2.21.43"
resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.43.tgz#02a977bd8e1fa94836cd97c515ca7c0a2ff1a63d"
integrity sha512-dSLb5bMRSr2Jw65xSZs6YMynhLMewvmlmYMtBK3IblFqa3b1O/N+Fn9qkTZxP5BUzKp8AB2eRTipESzGkLtfAg==
viem@^2.22.17:
version "2.22.17"
resolved "https://registry.yarnpkg.com/viem/-/viem-2.22.17.tgz#71cb5793d898e7850d440653b0043803c2d00c8d"
integrity sha512-eqNhlPGgRLR29XEVUT2uuaoEyMiaQZEKx63xT1py9OYsE+ZwlVgjnfrqbXad7Flg2iJ0Bs5Hh7o0FfRWUJGHvg==
dependencies:
"@noble/curves" "1.6.0"
"@noble/hashes" "1.5.0"
"@scure/bip32" "1.5.0"
"@scure/bip39" "1.4.0"
abitype "1.0.6"
"@noble/curves" "1.8.1"
"@noble/hashes" "1.7.1"
"@scure/bip32" "1.6.2"
"@scure/bip39" "1.5.4"
abitype "1.0.8"
isows "1.0.6"
ox "0.1.0"
webauthn-p256 "0.0.10"
ox "0.6.7"
ws "8.18.0"

vite@^5.0.2:
Expand Down Expand Up @@ -6295,14 +6333,6 @@ web3@^1.10.3:
web3-shh "1.10.4"
web3-utils "1.10.4"

webauthn-p256@0.0.10:
version "0.0.10"
resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.10.tgz#877e75abe8348d3e14485932968edf3325fd2fdd"
integrity sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA==
dependencies:
"@noble/curves" "^1.4.0"
"@noble/hashes" "^1.4.0"

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz"
Expand Down

0 comments on commit 7290d17

Please # to comment.