feat(curve): Add CurveEncoder

We don't know the pool tokens in the ProtocolComponent, so we can't infer the indexes correctly. Added a call to the MetaRegistry curve contract to get the correct token indexes. To do this, I had to move the get_client to utils. We could actually refactor the transaction logic into its' own struct and use it here and in the approval logic
It was assumed that all the pools will have a "factory" static attribute, even if empty

--- don't change below this line ---
ENG-4306 Took 2 hours 28 minutes


Took 27 seconds
This commit is contained in:
Diana Carvalho
2025-04-04 13:48:10 +01:00
parent f7cdc6f537
commit e9bb8c576a
8 changed files with 371 additions and 40 deletions

View File

@@ -7,7 +7,8 @@
"pancakeswap_v3": "0x4929B619A8F0D9c06ed0FfD497636580D823F65d",
"uniswap_v4": "0x042C0ebBEAb9d9987c2f64Ee05f2B3aeB86eAf70",
"vm:balancer_v2": "0x00BE8EfAE40219Ff76287b0F9b9e497942f5BC91",
"ekubo_v2": "0x4f88f6630a33dB05BEa1FeF7Dc7ff7508D1c531D"
"ekubo_v2": "0x4f88f6630a33dB05BEa1FeF7Dc7ff7508D1c531D",
"vm:curve": "0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f"
},
"tenderly_ethereum": {
"uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E",

View File

@@ -7,6 +7,7 @@
"pancakeswap_v3": "0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9",
"uniswap_v4": "0xF62849F9A0B5Bf2913b396098F7c7019b51A820a",
"vm:balancer_v2": "0xc7183455a4C133Ae270771860664b6B7ec320bB1",
"ekubo_v2": "0x2a07706473244BC757E10F2a9E86fB532828afe3"
"ekubo_v2": "0x2a07706473244BC757E10F2a9E86fB532828afe3",
"vm:curve": "0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f"
}
}