From 1098e96eff8a01ecd2ed017b4d6c08b521c43c53 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 14 Jul 2023 11:38:50 -0700 Subject: [PATCH] Update RYBTC/RYETH (#214) * bump to 3.3.2 * update univ3 adaptor, add rybtc/ryeth positions * Fix allowlist unit tests --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- steward/Cargo.toml | 2 +- steward/src/cellars.rs | 32 ++++++++++++++------------------ steward_abi/Cargo.toml | 2 +- steward_proto_rust/Cargo.toml | 2 +- 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d84c2e70..a7ce5642 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4688,7 +4688,7 @@ dependencies = [ [[package]] name = "sommelier_steward" -version = "3.3.1" +version = "3.3.2" dependencies = [ "lazy_static", "steward", @@ -4779,7 +4779,7 @@ checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "steward" -version = "3.3.1" +version = "3.3.2" dependencies = [ "abscissa_core", "abscissa_tokio", @@ -4832,7 +4832,7 @@ dependencies = [ [[package]] name = "steward_abi" -version = "3.3.1" +version = "3.3.2" dependencies = [ "ethers", "serde", @@ -4852,7 +4852,7 @@ dependencies = [ [[package]] name = "steward_proto" -version = "3.3.1" +version = "3.3.2" dependencies = [ "prost 0.7.0", "prost-types 0.7.0", diff --git a/Cargo.toml b/Cargo.toml index 7dfaf844..53bc5aed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sommelier_steward" -version = "3.3.1" +version = "3.3.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/steward/Cargo.toml b/steward/Cargo.toml index 27d620cd..79020f31 100644 --- a/steward/Cargo.toml +++ b/steward/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "steward" authors = [] -version = "3.3.1" +version = "3.3.2" edition = "2018" [dependencies] diff --git a/steward/src/cellars.rs b/steward/src/cellars.rs index 6acc375c..e055fce7 100644 --- a/steward/src/cellars.rs +++ b/steward/src/cellars.rs @@ -17,23 +17,17 @@ pub(crate) mod cellar_v2_2; // allow/block lists. -pub const ALLOWED_CATALOGUE_ADAPTORS: [(&str, &str); 6] = [ - (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V2_A_TOKEN_V1), - (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V2_DEBT_TOKEN_V1), - (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V3_A_TOKEN_COLLATERAL_V1), - (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V3_DEBT_TOKEN_V1), - (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V3_P2P_V1), - (CELLAR_RYLINK, ADAPTOR_CELLAR_V2), +pub const ALLOWED_CATALOGUE_ADAPTORS: [(&str, &str); 2] = [ + (CELLAR_RYETH, ADAPTOR_UNIV3_V3), + (CELLAR_RYBTC, ADAPTOR_UNIV3_V3), ]; -pub const ALLOWED_CATALOGUE_POSITIONS: [(&str, u32); 8] = [ - (CELLAR_RYETH, 155), - (CELLAR_RYETH, 156), - (CELLAR_RYETH, 161), - (CELLAR_RYETH, 162), - (CELLAR_RYETH, 163), - (CELLAR_RYETH, 165), - (CELLAR_RYETH, 166), - (CELLAR_RYLINK, 154), +pub const ALLOWED_CATALOGUE_POSITIONS: [(&str, u32); 6] = [ + (CELLAR_RYETH, 185), + (CELLAR_RYETH, 186), + (CELLAR_RYETH, 187), + (CELLAR_RYBTC, 185), + (CELLAR_RYBTC, 186), + (CELLAR_RYBTC, 187), ]; pub const ALLOWED_SETUP_ADAPTORS: [(&str, &str); 1] = [(CELLAR_RYUSD, ADAPTOR_MORPHO_AAVE_V2_A_TOKEN_V1)]; @@ -53,6 +47,7 @@ pub const CELLAR_RYLINK: &str = "4068bdd217a45f8f668ef19f1e3a1f043e4c4934"; pub const CELLAR_RYSNX: &str = "cbf2250f33c4161e18d4a2fa47464520af5216b5"; pub const CELLAR_RYUNI: &str = "6a6af5393dc23d7e3db28d28ef422db7c40932b6"; pub const CELLAR_RYUSD: &str = "97e6e0a40a3d02f12d1cec30ebfbae04e37c119e"; +pub const CELLAR_RYBTC: &str = "0274a704a6d9129f90a62ddc6f6024b33ecdad36"; // deprecated adaptors @@ -69,6 +64,7 @@ pub const ADAPTOR_MORPHO_AAVE_V3_A_TOKEN_COLLATERAL_V1: &str = "b46e8a03b1aafffb50f281397c57b5b87080363e"; pub const ADAPTOR_MORPHO_AAVE_V3_DEBT_TOKEN_V1: &str = "25a61f771af9a38c10ddd93c2bbab39a88926fa9"; pub const ADAPTOR_MORPHO_AAVE_V3_P2P_V1: &str = "4fe068caad05b82bf3f86e1f7d1a7b8bbf516111"; +pub const ADAPTOR_UNIV3_V3: &str = "92611574ec9bc13c6137917481dab7bb7b173c9b"; // utils @@ -232,7 +228,7 @@ mod tests { #[test] fn test_validate_add_adaptor_to_catalogue() { // allows approved cellar/adaptor ID pairs - let (cellar_id, approved_adaptor_id) = (CELLAR_RYETH, ADAPTOR_MORPHO_AAVE_V2_A_TOKEN_V1); + let (cellar_id, approved_adaptor_id) = (CELLAR_RYETH, ADAPTOR_UNIV3_V3); assert!(validate_add_adaptor_to_catalogue(cellar_id, approved_adaptor_id).is_ok()); let error_prefix = "SP call error: ".to_string(); @@ -266,7 +262,7 @@ mod tests { #[test] fn test_validate_add_position_to_catalogue() { // allows approved cellar/position ID pairs - let (cellar_id, approved_pos) = (CELLAR_RYLINK, 154); + let (cellar_id, approved_pos) = (CELLAR_RYETH, 185); assert!(validate_add_position_to_catalogue(cellar_id, approved_pos).is_ok()); let error_prefix = "SP call error: ".to_string(); diff --git a/steward_abi/Cargo.toml b/steward_abi/Cargo.toml index 3be56c56..1e4ab312 100644 --- a/steward_abi/Cargo.toml +++ b/steward_abi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "steward_abi" -version = "3.3.1" +version = "3.3.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/steward_proto_rust/Cargo.toml b/steward_proto_rust/Cargo.toml index b1cf2180..e4426863 100644 --- a/steward_proto_rust/Cargo.toml +++ b/steward_proto_rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "steward_proto" -version = "3.3.1" +version = "3.3.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html