Skip to content

Commit 72d5533

Browse files
authored
feat: add plasma support (#145)
1 parent e3f9689 commit 72d5533

File tree

3 files changed

+103
-11
lines changed

3 files changed

+103
-11
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@bgd-labs/aave-address-book": "^4.21.0",
3535
"@bgd-labs/aave-governance-ui-helpers": "^3.8.0",
3636
"@bgd-labs/frontend-web3-utils": "^1.3.1",
37-
"@bgd-labs/react-web3-icons": "^1.28.0",
37+
"@bgd-labs/react-web3-icons": "^1.35.0",
3838
"@emotion/cache": "^11.13.1",
3939
"@emotion/react": "^11.13.0",
4040
"@emotion/server": "^11.11.0",
@@ -79,7 +79,7 @@
7979
"remark-gemoji": "^8.0.0",
8080
"remark-gfm": "^4.0.0",
8181
"sharp": "0.33.4",
82-
"viem": "^2.23.2",
82+
"viem": "^2.37.3",
8383
"wagmi": "^2.12.1",
8484
"zustand": "^4.5.4"
8585
},
@@ -127,4 +127,4 @@
127127
"showDetails": true
128128
},
129129
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
130-
}
130+
}

src/utils/chains.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Draft } from 'immer';
2-
import { Chain, createClient, fallback, http } from 'viem';
1+
import { type Draft } from 'immer';
2+
import { type Chain, createClient, fallback, http } from 'viem';
33
import {
44
arbitrum,
55
avalanche,
@@ -13,6 +13,7 @@ import {
1313
mainnet,
1414
metis,
1515
optimism,
16+
plasma,
1617
polygon,
1718
polygonMumbai,
1819
scroll,
@@ -110,6 +111,7 @@ export const initialRpcUrls: Record<number, string[]> = {
110111
'https://rpc.soneium.io',
111112
'https://soneium.drpc.org',
112113
],
114+
[plasma.id]: [process.env.NEXT_PUBLIC_RPC_PLASMA || 'https://rpc.plasma.to'],
113115
// testnets
114116
[sepolia.id]: [
115117
'https://eth-sepolia.public.blastapi.io',
@@ -174,6 +176,7 @@ export const CHAINS: Record<number, Chain> = {
174176
[sonic.id]: setChain(sonic),
175177
[celo.id]: setChain(celo),
176178
[soneium.id]: setChain(soneium),
179+
[plasma.id]: setChain(plasma),
177180
// testnets
178181
[sepolia.id]: setChain(sepolia),
179182
[polygonMumbai.id]: setChain(polygonMumbai),

yarn.lock

Lines changed: 95 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7"
88
integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==
99

10-
"@adraffy/ens-normalize@^1.10.1":
10+
"@adraffy/ens-normalize@^1.10.1", "@adraffy/ens-normalize@^1.11.0":
1111
version "1.11.0"
1212
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33"
1313
integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==
@@ -920,10 +920,10 @@
920920
"@tanstack/react-query" "^5.51.11"
921921
dayjs "^1.11.12"
922922

923-
"@bgd-labs/react-web3-icons@^1.28.0":
924-
version "1.28.0"
925-
resolved "https://registry.yarnpkg.com/@bgd-labs/react-web3-icons/-/react-web3-icons-1.28.0.tgz#ebf950d780527ab318b02e117c3376cec9bc7d70"
926-
integrity sha512-sxTSirFyh8LwnD4Nre7JtarOZSlVfIyS6ySwg4csMivkkQZJbMGzL5n0RLp/18X6T977PvhrUBV6GnA9cwXsXg==
923+
"@bgd-labs/react-web3-icons@^1.35.0":
924+
version "1.35.0"
925+
resolved "https://registry.yarnpkg.com/@bgd-labs/react-web3-icons/-/react-web3-icons-1.35.0.tgz#16d5ca9e5875389104df301d04d7f54b5d5ada6e"
926+
integrity sha512-BlyPBdWLdEkyCuENRdDSzyFUyAbANYZfbpkCTHYByYcripH3egiktCWXaO64H5iZIrBug8w/DC1/w/CTlKZQEg==
927927
dependencies:
928928
"@loadable/component" "5.16.4"
929929
tailwind-merge "2.6.0"
@@ -1996,6 +1996,11 @@
19961996
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.2.1.tgz#3812b72c057a28b44ff0ad4aff5ca846e5b9cdc9"
19971997
integrity sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==
19981998

1999+
"@noble/ciphers@^1.3.0":
2000+
version "1.3.0"
2001+
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.3.0.tgz#f64b8ff886c240e644e5573c097f86e5b43676dc"
2002+
integrity sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==
2003+
19992004
20002005
version "1.4.0"
20012006
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6"
@@ -2017,6 +2022,20 @@
20172022
dependencies:
20182023
"@noble/hashes" "1.7.1"
20192024

2025+
2026+
version "1.9.1"
2027+
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.1.tgz#9654a0bc6c13420ae252ddcf975eaf0f58f0a35c"
2028+
integrity sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA==
2029+
dependencies:
2030+
"@noble/hashes" "1.8.0"
2031+
2032+
"@noble/curves@~1.9.0":
2033+
version "1.9.7"
2034+
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.7.tgz#79d04b4758a43e4bca2cbdc62e7771352fa6b951"
2035+
integrity sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==
2036+
dependencies:
2037+
"@noble/hashes" "1.8.0"
2038+
20202039
"@noble/[email protected]", "@noble/hashes@~1.4.0":
20212040
version "1.4.0"
20222041
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426"
@@ -2027,6 +2046,11 @@
20272046
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
20282047
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==
20292048

2049+
"@noble/[email protected]", "@noble/hashes@^1.8.0", "@noble/hashes@~1.8.0":
2050+
version "1.8.0"
2051+
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a"
2052+
integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==
2053+
20302054
"@nodelib/[email protected]":
20312055
version "2.1.5"
20322056
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -2111,6 +2135,11 @@
21112135
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1"
21122136
integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==
21132137

2138+
"@scure/base@~1.2.5":
2139+
version "1.2.6"
2140+
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.6.tgz#ca917184b8231394dd8847509c67a0be522e59f6"
2141+
integrity sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==
2142+
21142143
21152144
version "1.4.0"
21162145
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67"
@@ -2129,6 +2158,15 @@
21292158
"@noble/hashes" "~1.7.1"
21302159
"@scure/base" "~1.2.2"
21312160

2161+
"@scure/[email protected]", "@scure/bip32@^1.7.0":
2162+
version "1.7.0"
2163+
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.7.0.tgz#b8683bab172369f988f1589640e53c4606984219"
2164+
integrity sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==
2165+
dependencies:
2166+
"@noble/curves" "~1.9.0"
2167+
"@noble/hashes" "~1.8.0"
2168+
"@scure/base" "~1.2.5"
2169+
21322170
21332171
version "1.3.0"
21342172
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3"
@@ -2145,6 +2183,14 @@
21452183
"@noble/hashes" "~1.7.1"
21462184
"@scure/base" "~1.2.4"
21472185

2186+
"@scure/[email protected]", "@scure/bip39@^1.6.0":
2187+
version "1.6.0"
2188+
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.6.0.tgz#475970ace440d7be87a6086cbee77cb8f1a684f9"
2189+
integrity sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==
2190+
dependencies:
2191+
"@noble/hashes" "~1.8.0"
2192+
"@scure/base" "~1.2.5"
2193+
21482194
"@socket.io/component-emitter@~3.1.0":
21492195
version "3.1.2"
21502196
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2"
@@ -2964,6 +3010,11 @@ [email protected], abitype@^1.0.6, abitype@^1.0.8:
29643010
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba"
29653011
integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==
29663012

3013+
[email protected], abitype@^1.0.9:
3014+
version "1.1.0"
3015+
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.1.0.tgz#510c5b3f92901877977af5e864841f443bf55406"
3016+
integrity sha512-6Vh4HcRxNMLA0puzPjM5GBgT4aAcFGKZzSgAXvuZ27shJP6NEpielTuqbBmZILR5/xd0PizkBGy5hReKz9jl5A==
3017+
29673018
abort-controller@^3.0.0:
29683019
version "3.0.0"
29693020
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
@@ -5789,6 +5840,11 @@ [email protected]:
57895840
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7"
57905841
integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==
57915842

5843+
5844+
version "1.0.7"
5845+
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.7.tgz#1c06400b7eed216fbba3bcbd68f12490fc342915"
5846+
integrity sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==
5847+
57925848
iterator.prototype@^1.1.4:
57935849
version "1.1.5"
57945850
resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.5.tgz#12c959a29de32de0aa3bbbb801f4d777066dae39"
@@ -6990,6 +7046,20 @@ [email protected]:
69907046
abitype "^1.0.6"
69917047
eventemitter3 "5.0.1"
69927048

7049+
7050+
version "0.9.3"
7051+
resolved "https://registry.yarnpkg.com/ox/-/ox-0.9.3.tgz#92cc1008dcd913e919364fd4175c860b3eeb18db"
7052+
integrity sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg==
7053+
dependencies:
7054+
"@adraffy/ens-normalize" "^1.11.0"
7055+
"@noble/ciphers" "^1.3.0"
7056+
"@noble/curves" "1.9.1"
7057+
"@noble/hashes" "^1.8.0"
7058+
"@scure/bip32" "^1.7.0"
7059+
"@scure/bip39" "^1.6.0"
7060+
abitype "^1.0.9"
7061+
eventemitter3 "5.0.1"
7062+
69937063
p-filter@^2.1.0:
69947064
version "2.1.0"
69957065
resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c"
@@ -8903,7 +8973,7 @@ [email protected]:
89038973
webauthn-p256 "0.0.5"
89048974
ws "8.17.1"
89058975

8906-
viem@^2.1.1, viem@^2.23.2:
8976+
viem@^2.1.1:
89078977
version "2.23.2"
89088978
resolved "https://registry.yarnpkg.com/viem/-/viem-2.23.2.tgz#db395c8cf5f4fb5572914b962fb8ce5db09f681c"
89098979
integrity sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==
@@ -8917,6 +8987,20 @@ viem@^2.1.1, viem@^2.23.2:
89178987
ox "0.6.7"
89188988
ws "8.18.0"
89198989

8990+
viem@^2.37.3:
8991+
version "2.37.6"
8992+
resolved "https://registry.yarnpkg.com/viem/-/viem-2.37.6.tgz#3b05586555bd4b2c1b7351ed148f9fa98df72027"
8993+
integrity sha512-b+1IozQ8TciVQNdQUkOH5xtFR0z7ZxR8pyloENi/a+RA408lv4LoX12ofwoiT3ip0VRhO5ni1em//X0jn/eW0g==
8994+
dependencies:
8995+
"@noble/curves" "1.9.1"
8996+
"@noble/hashes" "1.8.0"
8997+
"@scure/bip32" "1.7.0"
8998+
"@scure/bip39" "1.6.0"
8999+
abitype "1.1.0"
9000+
isows "1.0.7"
9001+
ox "0.9.3"
9002+
ws "8.18.3"
9003+
89209004
wagmi@^2.12.1:
89219005
version "2.14.11"
89229006
resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.14.11.tgz#bfdd479e88bb3907efb412d04b5135a0017d5090"
@@ -9101,6 +9185,11 @@ [email protected], ws@^8.18.0:
91019185
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
91029186
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
91039187

9188+
9189+
version "8.18.3"
9190+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472"
9191+
integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==
9192+
91049193
ws@^7.3.1, ws@^7.5.1:
91059194
version "7.5.10"
91069195
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9"

0 commit comments

Comments
 (0)