Skip to content

Commit 1ae355e

Browse files
authored
feat: add plasma support (#112)
1 parent 98bcaf6 commit 1ae355e

File tree

3 files changed

+58
-85
lines changed

3 files changed

+58
-85
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"viem": "^2"
4747
},
4848
"devDependencies": {
49-
"@bgd-labs/aave-address-book": "^4.22.1",
49+
"@bgd-labs/aave-address-book": "^4.30.1",
5050
"@bgd-labs/js-utils": "^1.4.7",
5151
"@bgd-labs/toolbox": "^0.0.38",
5252
"@types/lodash": "^4.17.15",
@@ -69,7 +69,7 @@
6969
"tsx": "^4.19.2",
7070
"typescript": "^5.7.3",
7171
"typescript-eslint": "^8.22.0",
72-
"viem": "^2.23.2"
72+
"viem": "^2.37.3"
7373
},
7474
"dependencies": {
7575
"abitype": "^1.0.8",
@@ -78,4 +78,4 @@
7878
"gray-matter": "^4.0.3"
7979
},
8080
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
81-
}
81+
}

src/utils/viem/appConfig.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
GovernanceV3Linea,
1212
GovernanceV3Metis,
1313
GovernanceV3Optimism,
14+
GovernanceV3Plasma,
1415
GovernanceV3Polygon,
1516
GovernanceV3Scroll,
1617
GovernanceV3Soneium,
@@ -31,6 +32,7 @@ import {
3132
mainnet,
3233
metis,
3334
optimism,
35+
plasma,
3436
polygon,
3537
scroll,
3638
sepolia,
@@ -41,10 +43,7 @@ import {
4143

4244
export type CoreNetworkName = 'mainnet' | 'sepolia';
4345

44-
type Config = {
45-
contractAddress: Hex;
46-
dataHelperContractAddress: Hex;
47-
};
46+
type Config = { contractAddress: Hex; dataHelperContractAddress: Hex };
4847

4948
export const govCoreConfig: Record<
5049
CoreNetworkName,
@@ -144,6 +143,10 @@ export const payloadsControllerConfig: Record<
144143
dataHelperContractAddress: GovernanceV3Soneium.PC_DATA_HELPER,
145144
contractAddresses: [GovernanceV3Soneium.PAYLOADS_CONTROLLER],
146145
},
146+
[plasma.id]: {
147+
dataHelperContractAddress: GovernanceV3Plasma.PC_DATA_HELPER,
148+
contractAddresses: [GovernanceV3Plasma.PAYLOADS_CONTROLLER],
149+
},
147150
},
148151
// testnets
149152
sepolia: {
@@ -236,6 +239,7 @@ export const payloadsControllerChainIds: Record<CoreNetworkName, number[]> = {
236239
sonic.id,
237240
celo.id,
238241
soneium.id,
242+
plasma.id,
239243
],
240244
sepolia: [sepolia.id, avalancheFuji.id],
241245
};

yarn.lock

Lines changed: 47 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# yarn lockfile v1
33

44

5-
"@adraffy/ens-normalize@^1.10.1", "@adraffy/ens-normalize@^1.11.0":
5+
"@adraffy/ens-normalize@^1.11.0":
66
version "1.11.0"
77
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33"
88
integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==
@@ -24,10 +24,10 @@
2424
resolved "https://registry.yarnpkg.com/@assemblyscript/loader/-/loader-0.9.4.tgz#a483c54c1253656bb33babd464e3154a173e1577"
2525
integrity sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==
2626

27-
"@bgd-labs/aave-address-book@^4.22.1":
28-
version "4.22.1"
29-
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.22.1.tgz#1cf211a44a34d3c8fa5db5408f521539f9223d9c"
30-
integrity sha512-ArXOFU2Vi9U2mcph9Gu+bhlgjeVtcyuhVNuPph9XD7dY/QjJTeW4D9i65KsZs5xXVqemm5bU+spo6vHYbzLHmA==
27+
"@bgd-labs/aave-address-book@^4.30.1":
28+
version "4.30.1"
29+
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.30.1.tgz#6e92aa64081bb917ed897421da1651b63138e394"
30+
integrity sha512-rOtveLwI0YiD9FlcA5wG62o83GQ9cvnTqlR92xrpwH/ZnmYsx9N1EJ/7wFdllnTLSBHy08q2RekOH4GA1FoUxw==
3131

3232
"@bgd-labs/js-utils@^1.4.7":
3333
version "1.4.7"
@@ -867,12 +867,12 @@
867867
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-1.3.0.tgz#f64b8ff886c240e644e5573c097f86e5b43676dc"
868868
integrity sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==
869869

870-
"@noble/curves@1.8.1", "@noble/curves@^1.6.0", "@noble/curves@~1.8.1":
871-
version "1.8.1"
872-
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff"
873-
integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==
870+
"@noble/curves@1.9.1":
871+
version "1.9.1"
872+
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.1.tgz#9654a0bc6c13420ae252ddcf975eaf0f58f0a35c"
873+
integrity sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA==
874874
dependencies:
875-
"@noble/hashes" "1.7.1"
875+
"@noble/hashes" "1.8.0"
876876

877877
878878
version "1.9.2"
@@ -888,11 +888,6 @@
888888
dependencies:
889889
"@noble/hashes" "1.8.0"
890890

891-
"@noble/[email protected]", "@noble/hashes@^1.5.0", "@noble/hashes@~1.7.1":
892-
version "1.7.1"
893-
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f"
894-
integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==
895-
896891
"@noble/[email protected]", "@noble/hashes@^1.8.0", "@noble/hashes@~1.8.0":
897892
version "1.8.0"
898893
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a"
@@ -1029,25 +1024,11 @@
10291024
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
10301025
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==
10311026

1032-
"@scure/base@~1.2.2", "@scure/base@~1.2.4":
1033-
version "1.2.4"
1034-
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.4.tgz#002eb571a35d69bdb4c214d0995dff76a8dcd2a9"
1035-
integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==
1036-
10371027
"@scure/base@~1.2.5":
10381028
version "1.2.6"
10391029
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.6.tgz#ca917184b8231394dd8847509c67a0be522e59f6"
10401030
integrity sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==
10411031

1042-
"@scure/[email protected]", "@scure/bip32@^1.5.0":
1043-
version "1.6.2"
1044-
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.2.tgz#093caa94961619927659ed0e711a6e4bf35bffd0"
1045-
integrity sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==
1046-
dependencies:
1047-
"@noble/curves" "~1.8.1"
1048-
"@noble/hashes" "~1.7.1"
1049-
"@scure/base" "~1.2.2"
1050-
10511032
"@scure/[email protected]", "@scure/bip32@^1.7.0":
10521033
version "1.7.0"
10531034
resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.7.0.tgz#b8683bab172369f988f1589640e53c4606984219"
@@ -1057,14 +1038,6 @@
10571038
"@noble/hashes" "~1.8.0"
10581039
"@scure/base" "~1.2.5"
10591040

1060-
"@scure/[email protected]", "@scure/bip39@^1.4.0":
1061-
version "1.5.4"
1062-
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.4.tgz#07fd920423aa671be4540d59bdd344cc1461db51"
1063-
integrity sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==
1064-
dependencies:
1065-
"@noble/hashes" "~1.7.1"
1066-
"@scure/base" "~1.2.4"
1067-
10681041
"@scure/[email protected]", "@scure/bip39@^1.6.0":
10691042
version "1.6.0"
10701043
resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.6.0.tgz#475970ace440d7be87a6086cbee77cb8f1a684f9"
@@ -1210,10 +1183,10 @@ [email protected], abitype@^1.0.8:
12101183
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba"
12111184
integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==
12121185

1213-
abitype@^1.0.6:
1214-
version "1.0.6"
1215-
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.6.tgz#76410903e1d88e34f1362746e2d407513c38565b"
1216-
integrity sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==
1186+
abitype@1.1.0, abitype@^1.0.9:
1187+
version "1.1.0"
1188+
resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.1.0.tgz#510c5b3f92901877977af5e864841f443bf55406"
1189+
integrity sha512-6Vh4HcRxNMLA0puzPjM5GBgT4aAcFGKZzSgAXvuZ27shJP6NEpielTuqbBmZILR5/xd0PizkBGy5hReKz9jl5A==
12171190

12181191
abort-error@^1.0.1:
12191192
version "1.0.1"
@@ -3056,11 +3029,6 @@ isexe@^2.0.0:
30563029
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
30573030
integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
30583031

3059-
3060-
version "1.0.6"
3061-
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7"
3062-
integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==
3063-
30643032
30653033
version "1.0.7"
30663034
resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.7.tgz#1c06400b7eed216fbba3bcbd68f12490fc342915"
@@ -3488,19 +3456,6 @@ own-keys@^1.0.1:
34883456
object-keys "^1.1.1"
34893457
safe-push-apply "^1.0.0"
34903458

3491-
3492-
version "0.6.7"
3493-
resolved "https://registry.yarnpkg.com/ox/-/ox-0.6.7.tgz#afd53f2ecef68b8526660e9d29dee6e6b599a832"
3494-
integrity sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==
3495-
dependencies:
3496-
"@adraffy/ens-normalize" "^1.10.1"
3497-
"@noble/curves" "^1.6.0"
3498-
"@noble/hashes" "^1.5.0"
3499-
"@scure/bip32" "^1.5.0"
3500-
"@scure/bip39" "^1.4.0"
3501-
abitype "^1.0.6"
3502-
eventemitter3 "5.0.1"
3503-
35043459
35053460
version "0.8.6"
35063461
resolved "https://registry.yarnpkg.com/ox/-/ox-0.8.6.tgz#7dd666216ee8cda2eb2e5fef3fe4cb20dec3dcad"
@@ -3515,6 +3470,20 @@ [email protected]:
35153470
abitype "^1.0.8"
35163471
eventemitter3 "5.0.1"
35173472

3473+
3474+
version "0.9.3"
3475+
resolved "https://registry.yarnpkg.com/ox/-/ox-0.9.3.tgz#92cc1008dcd913e919364fd4175c860b3eeb18db"
3476+
integrity sha512-KzyJP+fPV4uhuuqrTZyok4DC7vFzi7HLUFiUNEmpbyh59htKWkOC98IONC1zgXJPbHAhQgqs6B0Z6StCGhmQvg==
3477+
dependencies:
3478+
"@adraffy/ens-normalize" "^1.11.0"
3479+
"@noble/ciphers" "^1.3.0"
3480+
"@noble/curves" "1.9.1"
3481+
"@noble/hashes" "^1.8.0"
3482+
"@scure/bip32" "^1.7.0"
3483+
"@scure/bip39" "^1.6.0"
3484+
abitype "^1.0.9"
3485+
eventemitter3 "5.0.1"
3486+
35183487
p-defer@^4.0.0, p-defer@^4.0.1:
35193488
version "4.0.1"
35203489
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-4.0.1.tgz#d12c6d41420785ed0d162dbd86b71ba490f7f99e"
@@ -4495,20 +4464,6 @@ util-deprecate@^1.0.1:
44954464
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
44964465
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
44974466

4498-
viem@^2.23.2:
4499-
version "2.23.3"
4500-
resolved "https://registry.yarnpkg.com/viem/-/viem-2.23.3.tgz#3b8af9490f8f453a17e849d774bea1b5c992738c"
4501-
integrity sha512-ON/Uybteajqxn3iFyhV/6Ybm+QKhcrsVyTZf/9v2w0CvYQIoyJYCfHSsQR9zpsbOGrR7d2p62w6jzb6fqzzacg==
4502-
dependencies:
4503-
"@noble/curves" "1.8.1"
4504-
"@noble/hashes" "1.7.1"
4505-
"@scure/bip32" "1.6.2"
4506-
"@scure/bip39" "1.5.4"
4507-
abitype "1.0.8"
4508-
isows "1.0.6"
4509-
ox "0.6.7"
4510-
ws "8.18.0"
4511-
45124467
viem@^2.30.0:
45134468
version "2.33.3"
45144469
resolved "https://registry.yarnpkg.com/viem/-/viem-2.33.3.tgz#b69d7ff9edf649d1b7d9218e0225bcadc83a8caa"
@@ -4523,6 +4478,20 @@ viem@^2.30.0:
45234478
ox "0.8.6"
45244479
ws "8.18.2"
45254480

4481+
viem@^2.37.3:
4482+
version "2.37.6"
4483+
resolved "https://registry.yarnpkg.com/viem/-/viem-2.37.6.tgz#3b05586555bd4b2c1b7351ed148f9fa98df72027"
4484+
integrity sha512-b+1IozQ8TciVQNdQUkOH5xtFR0z7ZxR8pyloENi/a+RA408lv4LoX12ofwoiT3ip0VRhO5ni1em//X0jn/eW0g==
4485+
dependencies:
4486+
"@noble/curves" "1.9.1"
4487+
"@noble/hashes" "1.8.0"
4488+
"@scure/bip32" "1.7.0"
4489+
"@scure/bip39" "1.6.0"
4490+
abitype "1.1.0"
4491+
isows "1.0.7"
4492+
ox "0.9.3"
4493+
ws "8.18.3"
4494+
45264495
weald@^1.0.4:
45274496
version "1.0.4"
45284497
resolved "https://registry.yarnpkg.com/weald/-/weald-1.0.4.tgz#8858cf9186869deba58357ae10cf26eaada80bb0"
@@ -4667,16 +4636,16 @@ [email protected]:
46674636
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
46684637
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
46694638

4670-
4671-
version "8.18.0"
4672-
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
4673-
integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
4674-
46754639
46764640
version "8.18.2"
46774641
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a"
46784642
integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==
46794643

4644+
4645+
version "8.18.3"
4646+
resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472"
4647+
integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==
4648+
46804649
yocto-queue@^0.1.0:
46814650
version "0.1.0"
46824651
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"

0 commit comments

Comments
 (0)