Renzo integration#116
Conversation
d046c4e to
da4d6ef
Compare
| @@ -0,0 +1,11 @@ | |||
| # substreams auth file | |||
There was a problem hiding this comment.
I don't understand why you added this because these things are already ignored by the root .gitignore
But for sure we don't want to have a module scoped gitignore
| continue | ||
| states[pool_id]["state"] = state | ||
|
|
||
| print("🚨 states", states) |
There was a problem hiding this comment.
SDK improvements are welcomed but this is out of scope for this branch.
If you want to improve SDK related logic, please do this in another branch
| @@ -0,0 +1,35 @@ | |||
| # ethereum_renzo Substreams modules | |||
There was a problem hiding this comment.
This whole readme looks not accurate with what we actually have
| @@ -0,0 +1,40 @@ | |||
| #![allow(clippy::all)] | |||
There was a problem hiding this comment.
We have a generic build.rs file that should work for any packages (you can for example find it in balancer_v2).
We're trying to stick with this one as much as possible to avoid having too much protocol specific logic. Please try it there and see if it works as expected
| @@ -0,0 +1,566 @@ | |||
| syntax = "proto3"; | |||
| ) | ||
| .with_contracts(&[RESTAKE_MANAGER_ADDRESS.as_slice()]) | ||
| .with_tokens(&[ETH_ADDRESS.as_slice(), EZETH_ADDRESS.as_slice()]) | ||
| .as_swap_type("restake_manager", ImplementationType::Vm), |
There was a problem hiding this comment.
We want to know the protocol it belongs to in the ProtocolType.name, you can check others modules to see how we do it. Maybe "renzo_collateral"
| .filter_map(|(log, _)| { | ||
| if log.address != RESTAKE_MANAGER_ADDRESS { | ||
| None | ||
| } else if let Some(ev) = restake_manager_contract::events::CollateralTokenAdded::match_and_decode(log) { |
There was a problem hiding this comment.
One question, can a collateral be removed?
| ProtocolComponent::new( | ||
| // according to the general logic used in other components this should be ETH_ADDRESS, | ||
| // however using RESTAKE_MANAGER_ADDRESS to make integration tests pass | ||
| &format!("0x{}", hex::encode(RESTAKE_MANAGER_ADDRESS)) |
There was a problem hiding this comment.
The name should be unique, I'm opened for suggestions but it could be "renzo-eth"?
| Attribute { | ||
| name: "update_marker".to_string(), | ||
| value: vec![1u8], | ||
| change: ChangeType::Creation.into(), | ||
| }, |
There was a problem hiding this comment.
I think you miss understood the usage of this marker. It's not needed if the components aren't marked with the "manual_update" static attributes
|
|
||
| # A list of tests. | ||
| tests: | ||
| - name: test_restake_manager_creation |
There was a problem hiding this comment.
Can you add more tests with more collaterals please?
|
Please fix foundry CI |
Scope
Integrates Renzo protocol using proposed adapter and substream.
Notes
(COLLATERAL_TOKEN, ezETH). In case theCOLLATERAL_TOKEN == ETHwe have used the restake manager renzo contract asset as the integration tests where failing when usingcomponent_id = "0x0000000000000000000000000000000000000000"