From ed55b8633f913cd77d80087b2bc687c9d1f54b83 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Thu, 8 Aug 2024 11:34:56 -0500 Subject: [PATCH 1/6] Add new adaptor and position permissions --- src/cellars.rs | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/src/cellars.rs b/src/cellars.rs index 475c7a46..d3b562fe 100644 --- a/src/cellars.rs +++ b/src/cellars.rs @@ -117,18 +117,35 @@ pub const ALLOWED_V2_0_POSITIONS: [(&str, u32); 20] = [ (CELLAR_RYUSD, 28), (CELLAR_RYUSD, 29), ]; -pub const ALLOWED_V2_2_CATALOGUE_POSITIONS: [(&str, u32); 2] = - [(CELLAR_RYETH, 200), (CELLAR_RYETH, 201)]; -pub const ALLOWED_V2_5_CATALOGUE_POSITIONS: [(&str, u32); 9] = [ - (CELLAR_MORPHO_ETH_MAXIMIZER, 110000007), - (CELLAR_MORPHO_ETH_MAXIMIZER, 110000008), - (CELLAR_MORPHO_ETH_MAXIMIZER, 110000009), - (CELLAR_MORPHO_ETH_MAXIMIZER, 110000010), - (CELLAR_MORPHO_ETH_MAXIMIZER, 11500004), - (CELLAR_MORPHO_ETH_MAXIMIZER, 11500005), - (CELLAR_TURBO_EETH_DEPLOYMENT_1, 10000004), - (CELLAR_TURBO_STETH, 69000002), - (CELLAR_TURBO_STETH, 100000008), +pub const ALLOWED_V2_2_CATALOGUE_POSITIONS: [(&str, u32); 22] = [ + (CELLAR_RYETH, 202), + (CELLAR_RYETH, 203), + (CELLAR_RYETH, 204), + (CELLAR_RYETH, 205), + (CELLAR_RYETH, 206), + (CELLAR_RYETH, 207), + (CELLAR_RYETH, 208), + (CELLAR_RYETH, 209), + (CELLAR_RYETH, 210), + (CELLAR_RYETH, 211), + (CELLAR_RYETH, 212), + (CELLAR_RYETH, 213), + (CELLAR_RYETH, 214), + (CELLAR_RYETH, 215), + (CELLAR_RYETH, 216), + (CELLAR_RYETH, 217), + (CELLAR_RYETH, 218), + (CELLAR_RYETH, 219), + (CELLAR_RYETH, 220), + (CELLAR_RYETH, 221), + (CELLAR_RYETH, 222), + (CELLAR_RYETH, 223), +]; +pub const ALLOWED_V2_5_CATALOGUE_POSITIONS: [(&str, u32); 4] = [ + (CELLAR_TURBO_STETH, 7000), + (CELLAR_TURBO_STETH, 7001), + (CELLAR_TURBO_STETH, 7500), + (CELLAR_TURBO_STETH, 7501), ]; pub const BLOCKED_ADAPTORS: [&str; 3] = [ @@ -190,6 +207,8 @@ pub const ADAPTOR_COMPOUND_C_TOKEN_V1: &str = "26dba82495f6189dde7648ae88bead46c // adaptors pub const ADAPTOR_AAVE_V3_A_TOKEN_V1: &str = "76cef5606c8b6ba38fe2e3c639e1659afa530b47"; +pub const ADAPTOR_AAVE_V3_A_TOKEN_V1_LIDO: &str = "67448b5689012f99db211b516e9fd480d8edfbf3"; +pub const ADAPTOR_AAVE_V3_DEBT_TOKEN_V1_LIDO: &str = "7fade03231a694fc12b4ad6098a0f8aa9f732335"; pub const ADAPTOR_AURA_ERC4626_ADAPTOR_V1: &str = "298d97494c5374e796368bcf15f0290771f6ae99"; pub const ADAPTOR_BALANCER_POOL_V1: &str = "2750348a897059c45683d33a1742a3989454f7d6"; pub const ADAPTOR_CELLAR_V2: &str = "3b5ca5de4d808cd793d3a7b3a731d3e67e707b27"; @@ -206,9 +225,8 @@ 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"; -// used by RYETH, RYBTC +pub const ADAPTOR_PENDLE_ADAPTOR_V1: &str = "3ba55a9151cb67ce15bb3ed2d7a6894989626a8a"; pub const ADAPTOR_UNIV3_V3_DEPLOYMENT_1: &str = "92611574ec9bc13c6137917481dab7bb7b173c9b"; -// used by Turbo stETH and eETH pub const ADAPTOR_UNIV3_V3_DEPLOYMENT_2: &str = "c74ffa211a8148949a77ec1070df7013c8d5ce92"; pub const ADAPTOR_VESTING_SIMPLE_V1_1_DEPLOYMENT1: &str = "3b98ba00f981342664969e609fb88280704ac479"; From baa191d952adfef7cf45bd406dc77234549e0036 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Thu, 8 Aug 2024 11:35:05 -0500 Subject: [PATCH 2/6] Remove old adaptor permissions --- src/cellars.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cellars.rs b/src/cellars.rs index d3b562fe..a733a6c1 100644 --- a/src/cellars.rs +++ b/src/cellars.rs @@ -85,12 +85,14 @@ lazy_static! { // permissions pub const ALLOWED_V2_0_SETUP_ADAPTORS: [(&str, &str); 0] = []; -pub const ALLOWED_V2_2_CATALOGUE_ADAPTORS: [(&str, &str); 1] = - [(CELLAR_RYETH, ADAPTOR_LIDO_STAKING_V1)]; -pub const ALLOWED_V2_5_CATALOGUE_ADAPTORS: [(&str, &str); 3] = [ - (CELLAR_TURBO_EETH_DEPLOYMENT_1, ADAPTOR_ERC4626_V1), - (CELLAR_TURBO_STETH, ADAPTOR_LIDO_STAKING_V1), - (CELLAR_TURBO_STETH, ADAPTOR_VESTING_SIMPLE_V1_1_DEPLOYMENT2), +pub const ALLOWED_V2_2_CATALOGUE_ADAPTORS: [(&str, &str); 2] = [ + (CELLAR_RYETH, ADAPTOR_AAVE_V3_A_TOKEN_V1_LIDO), + (CELLAR_RYETH, ADAPTOR_AAVE_V3_DEBT_TOKEN_V1_LIDO), + (CELLAR_RYETH, ADAPTOR_PENDLE_ADAPTOR_V1), +]; +pub const ALLOWED_V2_5_CATALOGUE_ADAPTORS: [(&str, &str); 2] = [ + (CELLAR_TURBO_STETH, ADAPTOR_AAVE_V3_A_TOKEN_V1_LIDO), + (CELLAR_TURBO_STETH, ADAPTOR_AAVE_V3_DEBT_TOKEN_V1_LIDO), ]; // due to position size limits in v2.0, positions must be added and removed from the limited list From 20ccaf64cefee568879be8d18699632df2b2d7ff Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Thu, 8 Aug 2024 12:31:43 -0500 Subject: [PATCH 3/6] Specify rust version in Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 9027e5de..13b6bc46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ name = "steward" authors = ["Collin Brittain", "Eric Bolten", "Ukpai Ugochi", "Zaki Manian"] version.workspace = true edition.workspace = true +rust-version = "1.76.0" [dependencies] abscissa_tokio = "0.6.0" From 171167f0bc6dafd8e14db27dc9a476b989581980 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Thu, 8 Aug 2024 12:31:48 -0500 Subject: [PATCH 4/6] Fix compiler error --- src/cellars.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cellars.rs b/src/cellars.rs index a733a6c1..c9c4770a 100644 --- a/src/cellars.rs +++ b/src/cellars.rs @@ -85,7 +85,7 @@ lazy_static! { // permissions pub const ALLOWED_V2_0_SETUP_ADAPTORS: [(&str, &str); 0] = []; -pub const ALLOWED_V2_2_CATALOGUE_ADAPTORS: [(&str, &str); 2] = [ +pub const ALLOWED_V2_2_CATALOGUE_ADAPTORS: [(&str, &str); 3] = [ (CELLAR_RYETH, ADAPTOR_AAVE_V3_A_TOKEN_V1_LIDO), (CELLAR_RYETH, ADAPTOR_AAVE_V3_DEBT_TOKEN_V1_LIDO), (CELLAR_RYETH, ADAPTOR_PENDLE_ADAPTOR_V1), From e0c55be51ac1b62a8c03fffcb1fae36a02502bb5 Mon Sep 17 00:00:00 2001 From: Collin Brittain Date: Thu, 8 Aug 2024 12:35:01 -0500 Subject: [PATCH 5/6] Update docker file --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 14061899..db9d76aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Reference: https://www.lpalmieri.com/posts/fast-rust-docker-builds/ -FROM rust:1.74-bullseye as cargo-chef-rust +FROM rust:1.76-bullseye as cargo-chef-rust RUN cargo install cargo-chef --version 0.1.62 RUN rustup component add rustfmt From 908788285bf497f88cccbd396193bf1448570dda Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 8 Aug 2024 11:05:42 -0700 Subject: [PATCH 6/6] Fix the time package compilation error --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5a75c3e..179a4e7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4302,9 +4302,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -4323,9 +4323,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core",