Skip to content

Commit 2ed2913

Browse files
authored
# Add Balancer V3, Uniswap V3, and Permit2 Support for Plasma Chain (#3908)
# Description Add Balancer V3, Uniswap V3, and Permit2 Support for Plasma Chain Plasma does not have Balancer V2 contracts deployed. ## Changes ### ✅ Balancer V3 - **BalancerV3BatchRouter** deployment for Plasma: - Address: `0x85a80afee867aDf27B50BdB7b76DA70f1E853062` - Deployment block: `782312` - Transaction: https://plasmascan.to/tx/0x7368609020622059d1061b4e3cc16aa448315956cace1e089f6876143cf2f90c?chainid=9745 ### ✅ Uniswap V3 - **UniswapV3QuoterV2**: `0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455` (marked as "not official") - **UniswapV3SwapRouterV2**: `0x807F4E281B7A3B324825C64ca53c69F0b418dE40` (marked as "not official") - **IUniswapV3Factory**: `0xcb2436774C3e191c85056d248EF4260ce5f27A9D` (named BulbaV3Factory, but same ABI and logic as UniswapV3Factory contract, checked manually) ### ✅ Permit2 - **Permit2** deployment for Plasma: - Address: `0x000000000022D473030F116dDEE9F6B43aC78BA3` (found on okta trade) - Deployment block: `35701901` - Transaction: https://plasmascan.to/tx/0x6d19057fb8b25b17fe9107be7726007d503dae50d1b0965b422fc3b512bf5dbe?chainid=9745 ### 📝 Updated - Updated all Balancer V2 contract comments to indicate they are not available on Plasma and Linea - Added test assertions for all Plasma deployments ### 🧪 Testing - Added test assertions in `test_has_address()` to verify: - BalancerV3BatchRouter deployment on Plasma - UniswapV3QuoterV2 deployment on Plasma - UniswapV3SwapRouterV2 deployment on Plasma - IUniswapV3Factory deployment on Plasma - Permit2 deployment on Plasma This PR enables the solver to route trades on Plasma using both Balancer V3 and Uniswap V3 protocols. Sources for Addresses :- 1. Balancer V3 Contracts: https://docs.balancer.fi/developer-reference/contracts/deployment-addresses/plasma.html 2. Uniswap Deployments on Plasma (found alt. addresses via Oku Trade): - https://docs.oku.trade/home/extra-information/deployed-contracts - https://plasmascan.to/address/0x000000000022D473030F116dDEE9F6B43aC78BA3 --------- Signed-off-by: Aryan Godara <[email protected]>
1 parent 382a37f commit 2ed2913

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

crates/contracts/build.rs

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn main() {
128128
MAINNET => ("0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9", 12272147),
129129
// Not available on Sepolia (only version ≥ 4)
130130
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
131-
// Not available on Lens
131+
// Not available on Lens, Linea and Plasma
132132
]),
133133
)
134134
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/mainnet.html#ungrouped-active-current-contracts>
@@ -148,7 +148,7 @@ fn main() {
148148
BNB => ("0x6e4cF292C5349c79cCd66349c3Ed56357dD11B46", 25474982),
149149
// Not available on Sepolia (only version ≥ 4)
150150
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
151-
// Not available on Lens
151+
// Not available on Lens, Linea and Plasma
152152
]),
153153
)
154154
.add_contract(
@@ -172,7 +172,7 @@ fn main() {
172172
POLYGON => ("0xFc8a407Bba312ac761D8BFe04CE1201904842B76", 40611103),
173173
// <https://bscscan.com/tx/0xc7fada60761e3240332c4cbd169633f1828b2a15de23f0148db9d121afebbb4b>
174174
BNB => ("0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a", 26665331),
175-
// Not available on Base and Lens
175+
// Not available on Base, Lens, Linea and Plasma
176176
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
177177
]),
178178
)
@@ -186,7 +186,7 @@ fn main() {
186186
OPTIMISM => ("0xdAE7e32ADc5d490a43cCba1f0c736033F2b4eFca", 7005512),
187187
// <https://polygonscan.com/tx/0xb8ac851249cc95bc0943ef0732d28bbd53b0b36c7dd808372666acd8c5f26e1c>
188188
POLYGON => ("0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9", 15832998),
189-
// Not available on Sepolia, Base, Avalanche, BNB and Lens
189+
// Not available on Sepolia, Base, Avalanche, BNB, Lens, Linea and Plasma
190190
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
191191
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
192192
]),
@@ -203,7 +203,7 @@ fn main() {
203203
OPTIMISM => ("0xeb151668006CD04DAdD098AFd0a82e78F77076c3", 11088891),
204204
// <https://polygonscan.com/tx/0xa2c41d014791888a29a9491204446c1b9b2f5dee3f3eb31ad03f290259067b44>
205205
POLYGON => ("0xcA96C4f198d343E251b1a01F3EBA061ef3DA73C1", 29371951),
206-
// Not available on Sepolia, Base, Avalanche, BNB and Lens
206+
// Not available on Sepolia, Base, Avalanche, BNB, Lens, Linea and Plasma
207207
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
208208
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
209209
]),
@@ -216,7 +216,7 @@ fn main() {
216216
ARBITRUM_ONE => ("0x142B9666a0a3A30477b052962ddA81547E7029ab", 222870),
217217
// <https://polygonscan.com/tx/0xd9b5b9a9e6ea17a87f85574e93577e3646c9c2f9c8f38644f936949e6c853288>
218218
POLYGON => ("0x751A0bC0e3f75b38e01Cf25bFCE7fF36DE1C87DE", 17116402),
219-
// Not available on Sepolia, Base, Avalanche, BNB, Optimism and Lens
219+
// Not available on Sepolia, Base, Avalanche, BNB, Optimism, Lens, Linea and Plasma
220220
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
221221
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
222222
]),
@@ -244,7 +244,7 @@ fn main() {
244244
OPTIMISM => ("0xf302f9F50958c5593770FDf4d4812309fF77414f", 7005915),
245245
// <https://polygonscan.com/tx/0x125bc007a86d771f8dc8f5fa1017de6e5a11162a458a72f25814503404bbeb0b>
246246
POLYGON => ("0x41B953164995c11C81DA73D212ED8Af25741b7Ac", 22067480),
247-
// Not available on Lens
247+
// Not available on Lens, Linea and Plasma
248248
]),
249249
)
250250
.add_contract(
@@ -258,7 +258,7 @@ fn main() {
258258
OPTIMISM => ("0xf145caFB67081895EE80eB7c04A30Cf87f07b745", 22182522),
259259
// <https://polygonscan.com/tx/0xe5d908be686056f1519663a407167c088924f60d29c799ec74438b9de891989e>
260260
POLYGON => ("0x136FD06Fa01eCF624C7F2B3CB15742c1339dC2c4", 32774224),
261-
// Not available on Sepolia, Gnosis Chain, Base, Avalanche and Lens
261+
// Not available on Sepolia, Gnosis Chain, Base, Avalanche, Lens, Linea and Plasma
262262
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
263263
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
264264
]),
@@ -279,7 +279,7 @@ fn main() {
279279
// Not available on Sepolia (only version ≥ 4) and on Base (only version ≥ 5)
280280
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/sepolia.html>
281281
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
282-
// Not available on Lens
282+
// Not available on Lens, Linea and Plasma
283283
]),
284284
)
285285
.add_contract(
@@ -300,7 +300,7 @@ fn main() {
300300
OPTIMISM => ("0x1802953277FD955f9a254B80Aa0582f193cF1d77", 82748180),
301301
// <https://polygonscan.com/tx/0x2cea6a0683e67ebdb7d4a1cf1ad303126c5f228f05f8c9e2ccafdb1f5a024376>
302302
POLYGON => ("0x6Ab5549bBd766A43aFb687776ad8466F8b42f777", 40613553),
303-
// Not available on Base and Lens
303+
// Not available on Base, Lens, Linea and Plasma
304304
// <https://docs.balancer.fi/reference/contracts/deployment-addresses/base.html>
305305
]),
306306
)
@@ -324,7 +324,7 @@ fn main() {
324324
OPTIMISM => ("0x043A2daD730d585C44FB79D2614F295D2d625412", 106752707),
325325
// <https://polygonscan.com/tx/0xa3d9a1cf00eaca469d6f9ec2fb836bbbfdfbc3b0eeadc07619bb9e695bfdecb8>
326326
POLYGON => ("0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b", 44961548),
327-
// Not available on Lens
327+
// Not available on Lens, Linea and Plasma
328328
]),
329329
)
330330
.add_contract(
@@ -347,7 +347,7 @@ fn main() {
347347
OPTIMISM => ("0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7", 116694338),
348348
// <https://polygonscan.com/tx/0x7b9678ad538b1cd3f3a03e63455e7d49a1bc716ea42310fbf99df4bf93ecfdfa>
349349
POLYGON => ("0xEAedc32a51c510d35ebC11088fD5fF2b47aACF2E", 53996258),
350-
// Not available on Lens
350+
// Not available on Lens, Linea and Plasma
351351
]),
352352
)
353353
// Balancer addresses can be obtained from:
@@ -371,7 +371,7 @@ fn main() {
371371
OPTIMISM => ("0xBA12222222228d8Ba445958a75a0704d566BF2C8", 7003431),
372372
// <https://polygonscan.com/tx/0x66f275a2ed102a5b679c0894ced62c4ebcb2a65336d086a916eb83bd1fe5c8d2>
373373
POLYGON => ("0xBA12222222228d8Ba445958a75a0704d566BF2C8", 15832990),
374-
// Not available on Lens
374+
// Not available on Lens, Linea and Plasma
375375
]))
376376
.add_contract(
377377
Contract::new("BalancerV3BatchRouter").with_networks(networks![
@@ -389,7 +389,9 @@ fn main() {
389389
AVALANCHE => ("0xc9b36096f5201ea332Db35d6D195774ea0D5988f", 59965747),
390390
// <https://optimistic.etherscan.io/tx/0xf370aab0d652f3e0f7c34e1a53e1afd98e86c487138300b0939d4e54b0088b67>
391391
OPTIMISM => ("0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E", 133969588),
392-
// Not available on Lens, Polygon, BNB
392+
// <https://plasmascan.to/tx/0x7368609020622059d1061b4e3cc16aa448315956cace1e089f6876143cf2f90c?chainid=9745>
393+
PLASMA => ("0x85a80afee867aDf27B50BdB7b76DA70f1E853062", 782312),
394+
// Not available on Lens, Polygon, BNB and Linea
393395
]),
394396
)
395397
// UniV2
@@ -505,6 +507,9 @@ fn main() {
505507
POLYGON => "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
506508
LENS => "0x1eEA2B790Dc527c5a4cd3d4f3ae8A2DDB65B2af1",
507509
LINEA => "0x42bE4D6527829FeFA1493e1fb9F3676d2425C3C1",
510+
// not official (deployed by oku trade)
511+
// <https://docs.oku.trade/home/extra-information/deployed-contracts#plasma>
512+
PLASMA => "0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455",
508513
// Not listed on Gnosis and Sepolia chains
509514
]))
510515
// <https://github.com/Uniswap/v3-periphery/blob/697c2474757ea89fec12a4e6db16a574fe259610/deploys.md>
@@ -519,6 +524,9 @@ fn main() {
519524
BNB => "0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",
520525
LENS => "0x6ddD32cd941041D8b61df213B9f515A7D288Dc13",
521526
LINEA => "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
527+
// not official (deployed by oku trade)
528+
// <https://docs.oku.trade/home/extra-information/deployed-contracts#plasma>
529+
PLASMA => "0x807F4E281B7A3B324825C64ca53c69F0b418dE40",
522530
// Not available on Gnosis Chain
523531
]),
524532
)
@@ -535,6 +543,9 @@ fn main() {
535543
// not official
536544
LENS => "0xc3A5b857Ba82a2586A45a8B59ECc3AA50Bc3D0e3",
537545
LINEA => "0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9",
546+
// not official (deployed by oku trade)
547+
// <https://docs.oku.trade/home/extra-information/deployed-contracts#plasma>
548+
PLASMA => "0xcb2436774C3e191c85056d248EF4260ce5f27A9D",
538549
// Not available on Gnosis Chain
539550
]))
540551
// <https://github.com/cowprotocol/hooks-trampoline/blob/993427166ade6c65875b932f853776299290ac4b/networks.json>
@@ -598,7 +609,7 @@ fn main() {
598609
POLYGON => ("0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5", 30988035),
599610
// <https://snowtrace.io/tx/0xf484e1efde47209bad5f72642bcb8d8e2a4092a5036434724ffa2d039e93a1bf?chainid=43114>
600611
AVALANCHE => ("0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD", 26387068),
601-
// Not available on Lens
612+
// Not available on Lens, Linea and Plasma
602613
]))
603614
// <https://liquorice.gitbook.io/liquorice-docs/links/smart-contracts>
604615
.add_contract(
@@ -646,6 +657,8 @@ fn main() {
646657
OPTIMISM => ("0x000000000022D473030F116dDEE9F6B43aC78BA3", 38854427),
647658
// <https://polygonscan.com/tx/0xe2a4d996de0d6a23108f701b37acba6c47ee34448bb51fec5c23f542a6f3ccc8>
648659
POLYGON => ("0x000000000022D473030F116dDEE9F6B43aC78BA3", 35701901),
660+
// <https://plasmascan.to/tx/0x6d19057fb8b25b17fe9107be7726007d503dae50d1b0965b422fc3b512bf5dbe?chainid=9745>
661+
PLASMA => ("0x000000000022D473030F116dDEE9F6B43aC78BA3", 7808),
649662
]))
650663
.add_contract(
651664
Contract::new("GPv2AllowListAuthentication").with_networks(networks![

0 commit comments

Comments
 (0)