From b2d8606f14b8e666f7268eea28c88bb4316a450c Mon Sep 17 00:00:00 2001 From: Collin Date: Fri, 26 Jan 2024 15:03:17 -0600 Subject: [PATCH] feat:Morpho Blue adaptors (#241) * Add alternative asset protos to Cellar 2.5 API * Add CellarWithMultiAssetDeposit abi bindings * Update multi asset ABI to fixed version * Git ignore DS_Store files * Fmt * Handlers for multi asset commit functions * Update test certs * Protos for Morpho Blue adaptors * Morpho Blue ABIs + bindings * Fix typos in proto * Wire up morpho blue adaptor handlers * fmt * get ci running * get ci running * Add Morpho Blue position permissions * Fix unwrap * Fix lazy eval * Bump to v3.8.0 --- Cargo.lock | 8 +- Cargo.toml | 2 +- .../aave/aave_v3_debt_token_flash_loan.proto | 9 + .../balancer/balancer_pool_flash_loan.proto | 11 +- .../morpho/morpho_blue_collateral.proto | 58 ++ proto/adaptors/morpho/morpho_blue_debt.proto | 58 ++ .../adaptors/morpho/morpho_blue_supply.proto | 58 ++ proto/cellar_v2.proto | 9 + proto/common.proto | 20 + steward/Cargo.toml | 2 +- steward/src/cellars.rs | 18 +- steward/src/cellars/adaptors/aave_v3.rs | 9 + steward/src/cellars/adaptors/balancer_pool.rs | 9 + steward/src/cellars/adaptors/morpho.rs | 215 +++++- steward/src/cellars/cellar_v2.rs | 9 + steward/src/cellars/cellar_v2_2.rs | 9 + steward/src/cellars/cellar_v2_5.rs | 9 + steward_abi/Cargo.toml | 2 +- .../abi/MorphoBlueCollateralAdaptorV1.json | 475 ++++++++++++ steward_abi/abi/MorphoBlueDebtAdaptorV1.json | 475 ++++++++++++ .../abi/MorphoBlueSupplyAdaptorV1.json | 457 ++++++++++++ steward_abi/src/lib.rs | 3 + .../src/morpho_blue_collateral_adaptor_v1.rs | 678 ++++++++++++++++++ .../src/morpho_blue_debt_adaptor_v1.rs | 670 +++++++++++++++++ .../src/morpho_blue_supply_adaptor_v1.rs | 640 +++++++++++++++++ steward_abi_build/src/main.rs | 6 + .../aave_v3_debt_token_flash_loan.pb.go | 123 +++- .../balancer_pool_flash_loan.pb.go | 123 +++- .../steward_proto/cellar_v2.pb.go | 192 +++-- steward_proto_go/steward_proto/common.pb.go | 127 +++- .../morpho_blue_collateral.pb.go | 462 ++++++++++++ .../steward_proto/morpho_blue_debt.pb.go | 463 ++++++++++++ .../steward_proto/morpho_blue_supply.pb.go | 460 ++++++++++++ steward_proto_rust/Cargo.toml | 2 +- steward_proto_rust/src/prost/descriptor.bin | Bin 182626 -> 193362 bytes steward_proto_rust/src/prost/steward.v3.rs | 221 +++++- 36 files changed, 5968 insertions(+), 124 deletions(-) create mode 100644 proto/adaptors/morpho/morpho_blue_collateral.proto create mode 100644 proto/adaptors/morpho/morpho_blue_debt.proto create mode 100644 proto/adaptors/morpho/morpho_blue_supply.proto create mode 100644 steward_abi/abi/MorphoBlueCollateralAdaptorV1.json create mode 100644 steward_abi/abi/MorphoBlueDebtAdaptorV1.json create mode 100644 steward_abi/abi/MorphoBlueSupplyAdaptorV1.json create mode 100644 steward_abi/src/morpho_blue_collateral_adaptor_v1.rs create mode 100644 steward_abi/src/morpho_blue_debt_adaptor_v1.rs create mode 100644 steward_abi/src/morpho_blue_supply_adaptor_v1.rs create mode 100644 steward_proto_go/steward_proto/morpho_blue_collateral.pb.go create mode 100644 steward_proto_go/steward_proto/morpho_blue_debt.pb.go create mode 100644 steward_proto_go/steward_proto/morpho_blue_supply.pb.go diff --git a/Cargo.lock b/Cargo.lock index c89db209..452bf835 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4688,7 +4688,7 @@ dependencies = [ [[package]] name = "sommelier_steward" -version = "3.7.0" +version = "3.8.0" dependencies = [ "lazy_static", "steward", @@ -4779,7 +4779,7 @@ checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" [[package]] name = "steward" -version = "3.7.0" +version = "3.8.0" dependencies = [ "abscissa_core", "abscissa_tokio", @@ -4832,7 +4832,7 @@ dependencies = [ [[package]] name = "steward_abi" -version = "3.7.0" +version = "3.8.0" dependencies = [ "ethers", "serde", @@ -4852,7 +4852,7 @@ dependencies = [ [[package]] name = "steward_proto" -version = "3.7.0" +version = "3.8.0" dependencies = [ "prost 0.7.0", "prost-types 0.7.0", diff --git a/Cargo.toml b/Cargo.toml index afd12051..c1520cb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sommelier_steward" -version = "3.7.0" +version = "3.8.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/proto/adaptors/aave/aave_v3_debt_token_flash_loan.proto b/proto/adaptors/aave/aave_v3_debt_token_flash_loan.proto index 9157be1f..5a14cda1 100644 --- a/proto/adaptors/aave/aave_v3_debt_token_flash_loan.proto +++ b/proto/adaptors/aave/aave_v3_debt_token_flash_loan.proto @@ -17,6 +17,9 @@ import "adaptors/morpho/morpho_aave_v2_debt_token.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_collateral.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_p2p.proto"; import "adaptors/morpho/morpho_aave_v3_debt_token.proto"; +import "adaptors/morpho/morpho_blue_collateral.proto"; +import "adaptors/morpho/morpho_blue_debt.proto"; +import "adaptors/morpho/morpho_blue_supply.proto"; import "adaptors/uniswap/uniswap_v3.proto"; import "adaptors/uniswap/swap_with_uniswap.proto"; import "adaptors/fees_and_reserves.proto"; @@ -112,6 +115,12 @@ message AaveV3DebtTokenAdaptorV1FlashLoan { CurveAdaptorV1Calls curve_v1_calls = 28; // Represents function calls for the AuraERC4626AdaptorV1 AuraERC4626AdaptorV1Calls aura_erc4626_v1_calls = 29; + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralAdaptorV1Calls morpho_blue_collateral_v1_calls = 30; + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtAdaptorV1Calls morpho_blue_debt_v1_calls = 31; + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyAdaptorV1Calls morpho_blue_supply_v1_calls = 32; } } } diff --git a/proto/adaptors/balancer/balancer_pool_flash_loan.proto b/proto/adaptors/balancer/balancer_pool_flash_loan.proto index 74e7b88a..89ebaa97 100644 --- a/proto/adaptors/balancer/balancer_pool_flash_loan.proto +++ b/proto/adaptors/balancer/balancer_pool_flash_loan.proto @@ -17,6 +17,9 @@ import "adaptors/morpho/morpho_aave_v2_debt_token.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_collateral.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_p2p.proto"; import "adaptors/morpho/morpho_aave_v3_debt_token.proto"; +import "adaptors/morpho/morpho_blue_collateral.proto"; +import "adaptors/morpho/morpho_blue_debt.proto"; +import "adaptors/morpho/morpho_blue_supply.proto"; import "adaptors/uniswap/uniswap_v3.proto"; import "adaptors/uniswap/swap_with_uniswap.proto"; import "adaptors/fees_and_reserves.proto"; @@ -110,7 +113,13 @@ message BalancerPoolAdaptorV1FlashLoan { // Represents function calls for the CurveAdaptorV1 CurveAdaptorV1Calls curve_v1_calls = 29; // Represents function calls for the AuraERC4626AdaptorV1 - AuraERC4626AdaptorV1Calls aura_erc4626_v1_calls = 30; + AuraERC4626AdaptorV1Calls aura_erc4626_v1_calls = 30; + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralAdaptorV1Calls morpho_blue_collateral_v1_calls = 31; + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtAdaptorV1Calls morpho_blue_debt_v1_calls = 32; + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyAdaptorV1Calls morpho_blue_supply_v1_calls = 33; } } } diff --git a/proto/adaptors/morpho/morpho_blue_collateral.proto b/proto/adaptors/morpho/morpho_blue_collateral.proto new file mode 100644 index 00000000..509c62e0 --- /dev/null +++ b/proto/adaptors/morpho/morpho_blue_collateral.proto @@ -0,0 +1,58 @@ +/* +* Protos for function calls to the Morpho Blue Collateral adaptor. +*/ + +syntax = "proto3"; +package steward.v3; + +option go_package = "/steward_proto"; + +import "adaptors/base.proto"; +import "common.proto"; + +// Represents call data for the Morpho Blue Collateral adaptor. +message MorphoBlueCollateralAdaptorV1 { + oneof function { + /***** BASE ADAPTOR FUNCTIONS *****/ + + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval revoke_approval = 1; + + /***** ADAPTOR-SPECIFIC FUNCTIONS *****/ + + // Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` + AddCollateral add_collateral = 2; + // Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` + RemoveCollateral remove_collateral = 3; + } + + /* + * Allows strategists to add collateral to the respective cellar position on specified MB Market, enabling borrowing. + * + * Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` + */ + message AddCollateral { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of collateral to add + string collateral_to_deposit = 2; + } + + /* + * Allows strategists to remove collateral from the respective cellar position on specified MB Market. + * + * Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` + */ + message RemoveCollateral { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of collateral to remove + string collateral_amount = 2; + } +} + +message MorphoBlueCollateralAdaptorV1Calls { + repeated MorphoBlueCollateralAdaptorV1 calls = 1; +} diff --git a/proto/adaptors/morpho/morpho_blue_debt.proto b/proto/adaptors/morpho/morpho_blue_debt.proto new file mode 100644 index 00000000..8938c6cc --- /dev/null +++ b/proto/adaptors/morpho/morpho_blue_debt.proto @@ -0,0 +1,58 @@ +/* +* Protos for function calls to the Morpho Blue Debt adaptor. +*/ + +syntax = "proto3"; +package steward.v3; + +option go_package = "/steward_proto"; + +import "adaptors/base.proto"; +import "common.proto"; + +// Represents call data for the Morpho Blue Debt adaptor. +message MorphoBlueDebtAdaptorV1 { + oneof function { + /***** BASE ADAPTOR FUNCTIONS *****/ + + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval revoke_approval = 1; + + /***** ADAPTOR-SPECIFIC FUNCTIONS *****/ + + // Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` + BorrowFromMorphoBlue borrow_from_morpho_blue = 2; + // Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` + RepayMorphoBlueDebt repay_morpho_blue_debt = 3; + } + + /* + * Allows strategists borrow a specific amount of an asset on Morpho Blue + * + * Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` + */ + message BorrowFromMorphoBlue { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of the debt token to borrow + string amount_to_borrow = 2; + } + + /* + * Allows strategists to repay loan debt on Morph Blue Lending Market. Make sure to call addInterest() beforehand to ensure we are repaying what is required. + * + * Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` + */ + message RepayMorphoBlueDebt { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of the debt token to repay + string debt_token_repay_amount = 2; + } +} + +message MorphoBlueDebtAdaptorV1Calls { + repeated MorphoBlueDebtAdaptorV1 calls = 1; +} diff --git a/proto/adaptors/morpho/morpho_blue_supply.proto b/proto/adaptors/morpho/morpho_blue_supply.proto new file mode 100644 index 00000000..3684c880 --- /dev/null +++ b/proto/adaptors/morpho/morpho_blue_supply.proto @@ -0,0 +1,58 @@ +/* +* Protos for function calls to the Morpho Blue Supply adaptor. +*/ + +syntax = "proto3"; +package steward.v3; + +option go_package = "/steward_proto"; + +import "adaptors/base.proto"; +import "common.proto"; + +// Represents call data for the Morpho Blue Supply adaptor. +message MorphoBlueSupplyAdaptorV1 { + oneof function { + /***** BASE ADAPTOR FUNCTIONS *****/ + + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval revoke_approval = 1; + + /***** ADAPTOR-SPECIFIC FUNCTIONS *****/ + + // Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` + LendToMorphoBlue lend_to_morpho_blue = 2; + // Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` + WithdrawFromMorphoBlue withdraw_from_morpho_blue = 3; + } + + /* + * Allows strategists to lend a specific amount for an asset on Morpho Blue + * + * Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` + */ + message LendToMorphoBlue { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of the loan token to lend + string assets = 2; + } + + /* + * Allows strategists to withdraw the underlying asset plus interest + * + * Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` + */ + message WithdrawFromMorphoBlue { + // Identifier of a Morpho Blue Market + MarketParams market = 1; + + // The amount of the loan token to lend + string assets = 2; + } +} + +message MorphoBlueSupplyAdaptorV1Calls { + repeated MorphoBlueSupplyAdaptorV1 calls = 1; +} diff --git a/proto/cellar_v2.proto b/proto/cellar_v2.proto index 22827224..cd53dcff 100644 --- a/proto/cellar_v2.proto +++ b/proto/cellar_v2.proto @@ -26,6 +26,9 @@ import "adaptors/morpho/morpho_aave_v2_debt_token.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_collateral.proto"; import "adaptors/morpho/morpho_aave_v3_a_token_p2p.proto"; import "adaptors/morpho/morpho_aave_v3_debt_token.proto"; +import "adaptors/morpho/morpho_blue_collateral.proto"; +import "adaptors/morpho/morpho_blue_debt.proto"; +import "adaptors/morpho/morpho_blue_supply.proto"; import "adaptors/uniswap/uniswap_v3.proto"; import "adaptors/uniswap/swap_with_uniswap.proto"; import "adaptors/fees_and_reserves.proto"; @@ -778,5 +781,11 @@ message AdaptorCall { CurveAdaptorV1Calls curve_v1_calls = 31; // Represents function calls for the AuraERC4626AdaptorV1 AuraERC4626AdaptorV1Calls aura_erc4626_v1_calls = 32; + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralAdaptorV1Calls morpho_blue_collateral_v1_calls = 33; + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtAdaptorV1Calls morpho_blue_debt_v1_calls = 34; + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyAdaptorV1Calls morpho_blue_supply_v1_calls = 35; } } diff --git a/proto/common.proto b/proto/common.proto index 4c978b9f..2af61ac3 100644 --- a/proto/common.proto +++ b/proto/common.proto @@ -84,3 +84,23 @@ message OracleSwapParams { UniV3OracleSwapParams univ3_params = 2; } } + +/* +* Represents parameters for a Morpho Blue market +*/ +message MarketParams { + // The address of the loan token + string loan_token = 1; + + // The address of the collateral token + string collateral_token = 2; + + // The address of the oracle + string oracle = 3; + + // The address of the interest rate model + string irm = 4; + + // The loan-to-value ratio + string lltv = 5; +} diff --git a/steward/Cargo.toml b/steward/Cargo.toml index 970b4a87..0d40e153 100644 --- a/steward/Cargo.toml +++ b/steward/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "steward" authors = [] -version = "3.7.0" +version = "3.8.0" edition = "2018" [dependencies] diff --git a/steward/src/cellars.rs b/steward/src/cellars.rs index bce9e49a..1dbb64f0 100644 --- a/steward/src/cellars.rs +++ b/steward/src/cellars.rs @@ -75,13 +75,7 @@ lazy_static! { pub const ALLOWED_V2_0_SETUP_ADAPTORS: [(&str, &str); 0] = []; pub const ALLOWED_V2_2_CATALOGUE_ADAPTORS: [(&str, &str); 0] = []; -pub const ALLOWED_V2_5_CATALOGUE_ADAPTORS: [(&str, &str); 5] = [ - (CELLAR_TURBO_EETH, ADAPTOR_UNIV3_V3_DEPLOYMENT_2), - (CELLAR_TURBO_EETH, ADAPTOR_VESTING_SIMPLE_V1_1_DEPLOYMENT2), - (CELLAR_TURBO_EETH, ADAPTOR_CURVE_ADAPTOR_V1), - (CELLAR_TURBO_EETH, ADAPTOR_BALANCER_POOL_V1), - (CELLAR_TURBO_EETH, ADAPTOR_AURA_ERC4626_ADAPTOR_V1), -]; +pub const ALLOWED_V2_5_CATALOGUE_ADAPTORS: [(&str, &str); 0] = []; // due to position size limits in v2.0, positions must be added and removed from the limited list // and thus approved positions need to be allowed to be re-added, hence this large list @@ -108,14 +102,8 @@ pub const ALLOWED_V2_0_POSITIONS: [(&str, u32); 20] = [ (CELLAR_RYUSD, 29), ]; pub const ALLOWED_V2_2_CATALOGUE_POSITIONS: [(&str, u32); 0] = []; -pub const ALLOWED_V2_5_CATALOGUE_POSITIONS: [(&str, u32); 6] = [ - (CELLAR_TURBO_EETH, 12), - (CELLAR_TURBO_EETH, 1000009), - (CELLAR_TURBO_EETH, 100000006), - (CELLAR_TURBO_EETH, 6000002), - (CELLAR_TURBO_EETH, 7000001), - (CELLAR_TURBO_EETH, 7500001), -]; +pub const ALLOWED_V2_5_CATALOGUE_POSITIONS: [(&str, u32); 2] = + [(CELLAR_TURBO_EETH, 7000002), (CELLAR_TURBO_EETH, 7500002)]; pub const BLOCKED_ADAPTORS: [&str; 3] = [ ADAPTOR_UNIV3_V1, diff --git a/steward/src/cellars/adaptors/aave_v3.rs b/steward/src/cellars/adaptors/aave_v3.rs index 7c94cd0e..35f7060e 100644 --- a/steward/src/cellars/adaptors/aave_v3.rs +++ b/steward/src/cellars/adaptors/aave_v3.rs @@ -281,6 +281,15 @@ fn get_encoded_adaptor_calls( AuraErc4626V1Calls(params) => { calls.extend(adaptors::aura::aura_erc4626_adaptor_v1_calls(params)?) } + MorphoBlueCollateralV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_collateral_adaptor_v1_calls(params)?, + ), + MorphoBlueDebtV1Calls(params) => { + calls.extend(adaptors::morpho::morpho_blue_debt_adaptor_v1_calls(params)?) + } + MorphoBlueSupplyV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_supply_adaptor_v1_calls(params)?, + ), }; result.push(AbiAdaptorCall { diff --git a/steward/src/cellars/adaptors/balancer_pool.rs b/steward/src/cellars/adaptors/balancer_pool.rs index 2018dcc2..43c53d49 100644 --- a/steward/src/cellars/adaptors/balancer_pool.rs +++ b/steward/src/cellars/adaptors/balancer_pool.rs @@ -307,6 +307,15 @@ fn get_encoded_adaptor_calls( AuraErc4626V1Calls(params) => { calls.extend(adaptors::aura::aura_erc4626_adaptor_v1_calls(params)?) } + MorphoBlueCollateralV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_collateral_adaptor_v1_calls(params)?, + ), + MorphoBlueDebtV1Calls(params) => { + calls.extend(adaptors::morpho::morpho_blue_debt_adaptor_v1_calls(params)?) + } + MorphoBlueSupplyV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_supply_adaptor_v1_calls(params)?, + ), }; result.push(AbiAdaptorCall { diff --git a/steward/src/cellars/adaptors/morpho.rs b/steward/src/cellars/adaptors/morpho.rs index 4e0f7947..ee2a1319 100644 --- a/steward/src/cellars/adaptors/morpho.rs +++ b/steward/src/cellars/adaptors/morpho.rs @@ -7,11 +7,15 @@ use steward_abi::{ morpho_aave_v3_a_token_collateral_adaptor_v1::MorphoAaveV3ATokenCollateralAdaptorV1Calls, morpho_aave_v3_a_token_p2p_adaptor_v1::MorphoAaveV3ATokenP2PAdaptorV1Calls, morpho_aave_v3_debt_token_adaptor_v1::MorphoAaveV3DebtTokenAdaptorV1Calls, + morpho_blue_collateral_adaptor_v1::MorphoBlueCollateralAdaptorV1Calls, + morpho_blue_debt_adaptor_v1::MorphoBlueDebtAdaptorV1Calls, + morpho_blue_supply_adaptor_v1::MorphoBlueSupplyAdaptorV1Calls, }; use steward_proto::steward::{ morpho_aave_v2_debt_token_adaptor_v1, morpho_aave_v2a_token_adaptor_v1, morpho_aave_v3_debt_token_adaptor_v1, morpho_aave_v3a_token_collateral_adaptor_v1, - morpho_aave_v3a_token_p2p_adaptor_v1, + morpho_aave_v3a_token_p2p_adaptor_v1, morpho_blue_collateral_adaptor_v1, + morpho_blue_debt_adaptor_v1, morpho_blue_supply_adaptor_v1, }; use crate::{ @@ -308,6 +312,215 @@ pub(crate) fn morpho_aave_v3_debt_token_adaptor_v1_calls( Ok(calls) } +pub(crate) fn morpho_blue_collateral_adaptor_v1_calls( + params: steward_proto::steward::MorphoBlueCollateralAdaptorV1Calls, +) -> Result, Error> { + let mut calls = Vec::new(); + for c in params.calls { + let function = c + .function + .ok_or_else(|| sp_call_error("function cannot be empty".to_string()))?; + + match function { + morpho_blue_collateral_adaptor_v1::Function::RevokeApproval(p) => { + let call = steward_abi::morpho_blue_collateral_adaptor_v1::RevokeApprovalCall { + asset: sp_call_parse_address(p.asset)?, + spender: sp_call_parse_address(p.spender)?, + }; + calls.push( + MorphoBlueCollateralAdaptorV1Calls::RevokeApproval(call) + .encode() + .into(), + ) + } + morpho_blue_collateral_adaptor_v1::Function::AddCollateral(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_collateral_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + let call = steward_abi::morpho_blue_collateral_adaptor_v1::AddCollateralCall { + market, + collateral_to_deposit: string_to_u256(p.collateral_to_deposit)?, + }; + calls.push( + MorphoBlueCollateralAdaptorV1Calls::AddCollateral(call) + .encode() + .into(), + ) + } + morpho_blue_collateral_adaptor_v1::Function::RemoveCollateral(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_collateral_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + let call = steward_abi::morpho_blue_collateral_adaptor_v1::RemoveCollateralCall { + market, + collateral_amount: string_to_u256(p.collateral_amount)?, + }; + calls.push( + MorphoBlueCollateralAdaptorV1Calls::RemoveCollateral(call) + .encode() + .into(), + ) + } + } + } + + Ok(calls) +} + +pub(crate) fn morpho_blue_debt_adaptor_v1_calls( + params: steward_proto::steward::MorphoBlueDebtAdaptorV1Calls, +) -> Result, Error> { + let mut calls = Vec::new(); + for c in params.calls { + let function = c + .function + .ok_or_else(|| sp_call_error("function cannot be empty".to_string()))?; + + match function { + morpho_blue_debt_adaptor_v1::Function::RevokeApproval(p) => { + let call = steward_abi::morpho_blue_debt_adaptor_v1::RevokeApprovalCall { + asset: sp_call_parse_address(p.asset)?, + spender: sp_call_parse_address(p.spender)?, + }; + calls.push( + MorphoBlueDebtAdaptorV1Calls::RevokeApproval(call) + .encode() + .into(), + ) + } + morpho_blue_debt_adaptor_v1::Function::BorrowFromMorphoBlue(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_debt_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + let call = steward_abi::morpho_blue_debt_adaptor_v1::BorrowFromMorphoBlueCall { + market, + amount_to_borrow: string_to_u256(p.amount_to_borrow)?, + }; + calls.push( + MorphoBlueDebtAdaptorV1Calls::BorrowFromMorphoBlue(call) + .encode() + .into(), + ) + } + morpho_blue_debt_adaptor_v1::Function::RepayMorphoBlueDebt(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_debt_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + + let call = steward_abi::morpho_blue_debt_adaptor_v1::RepayMorphoBlueDebtCall { + market, + debt_token_repay_amount: string_to_u256(p.debt_token_repay_amount)?, + }; + calls.push( + MorphoBlueDebtAdaptorV1Calls::RepayMorphoBlueDebt(call) + .encode() + .into(), + ) + } + } + } + + Ok(calls) +} + +pub(crate) fn morpho_blue_supply_adaptor_v1_calls( + params: steward_proto::steward::MorphoBlueSupplyAdaptorV1Calls, +) -> Result, Error> { + let mut calls = Vec::new(); + for c in params.calls { + let function = c + .function + .ok_or_else(|| sp_call_error("function cannot be empty".to_string()))?; + + match function { + morpho_blue_supply_adaptor_v1::Function::RevokeApproval(p) => { + let call = steward_abi::morpho_blue_supply_adaptor_v1::RevokeApprovalCall { + asset: sp_call_parse_address(p.asset)?, + spender: sp_call_parse_address(p.spender)?, + }; + calls.push( + MorphoBlueSupplyAdaptorV1Calls::RevokeApproval(call) + .encode() + .into(), + ) + } + morpho_blue_supply_adaptor_v1::Function::LendToMorphoBlue(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_supply_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + + let call = steward_abi::morpho_blue_supply_adaptor_v1::LendToMorphoBlueCall { + market, + assets: string_to_u256(p.assets)?, + }; + calls.push( + MorphoBlueSupplyAdaptorV1Calls::LendToMorphoBlue(call) + .encode() + .into(), + ) + } + morpho_blue_supply_adaptor_v1::Function::WithdrawFromMorphoBlue(p) => { + let market = p + .market + .ok_or_else(|| sp_call_error("market cannot be empty".to_string()))?; + let market = steward_abi::morpho_blue_supply_adaptor_v1::MarketParams { + loan_token: sp_call_parse_address(market.loan_token)?, + collateral_token: sp_call_parse_address(market.collateral_token)?, + oracle: sp_call_parse_address(market.oracle)?, + irm: sp_call_parse_address(market.irm)?, + lltv: string_to_u256(market.lltv)?, + }; + let call = steward_abi::morpho_blue_supply_adaptor_v1::WithdrawFromMorphoBlueCall { + market, + assets: string_to_u256(p.assets)?, + }; + calls.push( + MorphoBlueSupplyAdaptorV1Calls::WithdrawFromMorphoBlue(call) + .encode() + .into(), + ) + } + } + } + + Ok(calls) +} + fn parse_proof_bytes(proof: Vec>) -> Result, Error> { proof .iter() diff --git a/steward/src/cellars/cellar_v2.rs b/steward/src/cellars/cellar_v2.rs index 6734efdb..32aa6951 100644 --- a/steward/src/cellars/cellar_v2.rs +++ b/steward/src/cellars/cellar_v2.rs @@ -281,6 +281,15 @@ fn get_encoded_adaptor_calls(data: Vec) -> Result { calls.extend(adaptors::aura::aura_erc4626_adaptor_v1_calls(params)?) } + MorphoBlueCollateralV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_collateral_adaptor_v1_calls(params)?, + ), + MorphoBlueDebtV1Calls(params) => { + calls.extend(adaptors::morpho::morpho_blue_debt_adaptor_v1_calls(params)?) + } + MorphoBlueSupplyV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_supply_adaptor_v1_calls(params)?, + ), }; result.push(AbiAdaptorCall { diff --git a/steward/src/cellars/cellar_v2_2.rs b/steward/src/cellars/cellar_v2_2.rs index 9266e0ed..3798e9ef 100644 --- a/steward/src/cellars/cellar_v2_2.rs +++ b/steward/src/cellars/cellar_v2_2.rs @@ -356,6 +356,15 @@ fn get_encoded_adaptor_calls(data: Vec) -> Result { calls.extend(adaptors::aura::aura_erc4626_adaptor_v1_calls(params)?) } + MorphoBlueCollateralV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_collateral_adaptor_v1_calls(params)?, + ), + MorphoBlueDebtV1Calls(params) => { + calls.extend(adaptors::morpho::morpho_blue_debt_adaptor_v1_calls(params)?) + } + MorphoBlueSupplyV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_supply_adaptor_v1_calls(params)?, + ), }; result.push(AbiAdaptorCall { diff --git a/steward/src/cellars/cellar_v2_5.rs b/steward/src/cellars/cellar_v2_5.rs index eb7acb62..63de05c0 100644 --- a/steward/src/cellars/cellar_v2_5.rs +++ b/steward/src/cellars/cellar_v2_5.rs @@ -449,6 +449,15 @@ fn get_encoded_adaptor_calls(data: Vec) -> Result { calls.extend(adaptors::aura::aura_erc4626_adaptor_v1_calls(params)?) } + MorphoBlueCollateralV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_collateral_adaptor_v1_calls(params)?, + ), + MorphoBlueDebtV1Calls(params) => { + calls.extend(adaptors::morpho::morpho_blue_debt_adaptor_v1_calls(params)?) + } + MorphoBlueSupplyV1Calls(params) => calls.extend( + adaptors::morpho::morpho_blue_supply_adaptor_v1_calls(params)?, + ), }; result.push(AbiAdaptorCall { diff --git a/steward_abi/Cargo.toml b/steward_abi/Cargo.toml index 8157b4db..a89d2771 100644 --- a/steward_abi/Cargo.toml +++ b/steward_abi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "steward_abi" -version = "3.7.0" +version = "3.8.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/steward_abi/abi/MorphoBlueCollateralAdaptorV1.json b/steward_abi/abi/MorphoBlueCollateralAdaptorV1.json new file mode 100644 index 00000000..d495c9ac --- /dev/null +++ b/steward_abi/abi/MorphoBlueCollateralAdaptorV1.json @@ -0,0 +1,475 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_morphoBlue", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_healthFactor", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BaseAdaptor__ConstructorHealthFactorTooLow", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__ExternalReceiverBlocked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "BaseAdaptor__PricingNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__Slippage", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserDepositsNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserWithdrawsNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueAdaptors__MarketPositionsMustBeTracked", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueCollateralAdaptor__HealthFactorTooLow", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_collateralToDeposit", + "type": "uint256" + } + ], + "name": "addCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetOf", + "outputs": [ + { + "internalType": "contract ERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetsUsed", + "outputs": [ + { + "internalType": "contract ERC20[]", + "name": "assets", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "identifier", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "isDebt", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "minimumHealthFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "morphoBlue", + "outputs": [ + { + "internalType": "contract IMorpho", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_collateralAmount", + "type": "uint256" + } + ], + "name": "removeCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "revokeApproval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slippage", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "withdrawableFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/steward_abi/abi/MorphoBlueDebtAdaptorV1.json b/steward_abi/abi/MorphoBlueDebtAdaptorV1.json new file mode 100644 index 00000000..d3d44c0a --- /dev/null +++ b/steward_abi/abi/MorphoBlueDebtAdaptorV1.json @@ -0,0 +1,475 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_morphoBlue", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_healthFactor", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BaseAdaptor__ConstructorHealthFactorTooLow", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__ExternalReceiverBlocked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "BaseAdaptor__PricingNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__Slippage", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserDepositsNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserWithdrawsNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueAdaptors__MarketPositionsMustBeTracked", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueDebtAdaptor__HealthFactorTooLow", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetOf", + "outputs": [ + { + "internalType": "contract ERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetsUsed", + "outputs": [ + { + "internalType": "contract ERC20[]", + "name": "assets", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_amountToBorrow", + "type": "uint256" + } + ], + "name": "borrowFromMorphoBlue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "identifier", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "isDebt", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "minimumHealthFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "morphoBlue", + "outputs": [ + { + "internalType": "contract IMorpho", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_debtTokenRepayAmount", + "type": "uint256" + } + ], + "name": "repayMorphoBlueDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "revokeApproval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slippage", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "withdrawableFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } +] diff --git a/steward_abi/abi/MorphoBlueSupplyAdaptorV1.json b/steward_abi/abi/MorphoBlueSupplyAdaptorV1.json new file mode 100644 index 00000000..6b43b199 --- /dev/null +++ b/steward_abi/abi/MorphoBlueSupplyAdaptorV1.json @@ -0,0 +1,457 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_morphoBlue", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BaseAdaptor__ConstructorHealthFactorTooLow", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__ExternalReceiverBlocked", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "BaseAdaptor__PricingNotSupported", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__Slippage", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserDepositsNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "BaseAdaptor__UserWithdrawsNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueAdaptors__MarketPositionsMustBeTracked", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "market", + "type": "tuple" + } + ], + "name": "MorphoBlueSupplyAdaptor__MarketPositionsMustBeTracked", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetOf", + "outputs": [ + { + "internalType": "contract ERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "assetsUsed", + "outputs": [ + { + "internalType": "contract ERC20[]", + "name": "assets", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "identifier", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "isDebt", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_assets", + "type": "uint256" + } + ], + "name": "lendToMorphoBlue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "morphoBlue", + "outputs": [ + { + "internalType": "contract IMorpho", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ERC20", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "revokeApproval", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "slippage", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "configurationData", + "type": "bytes" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "loanToken", + "type": "address" + }, + { + "internalType": "address", + "name": "collateralToken", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "internalType": "address", + "name": "irm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "lltv", + "type": "uint256" + } + ], + "internalType": "struct MarketParams", + "name": "_market", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_assets", + "type": "uint256" + } + ], + "name": "withdrawFromMorphoBlue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "adaptorData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "configurationData", + "type": "bytes" + } + ], + "name": "withdrawableFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "withdrawableSupply", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/steward_abi/src/lib.rs b/steward_abi/src/lib.rs index 8e6636c8..2d777fcf 100644 --- a/steward_abi/src/lib.rs +++ b/steward_abi/src/lib.rs @@ -29,6 +29,9 @@ pub mod morpho_aave_v2_debt_token_adaptor_v1; pub mod morpho_aave_v3_a_token_collateral_adaptor_v1; pub mod morpho_aave_v3_a_token_p2p_adaptor_v1; pub mod morpho_aave_v3_debt_token_adaptor_v1; +pub mod morpho_blue_collateral_adaptor_v1; +pub mod morpho_blue_debt_adaptor_v1; +pub mod morpho_blue_supply_adaptor_v1; pub mod morpho_reward_handler; pub mod oneinch_adaptor_v1; pub mod swap_with_uniswap_adaptor_v1; diff --git a/steward_abi/src/morpho_blue_collateral_adaptor_v1.rs b/steward_abi/src/morpho_blue_collateral_adaptor_v1.rs new file mode 100644 index 00000000..02a75665 --- /dev/null +++ b/steward_abi/src/morpho_blue_collateral_adaptor_v1.rs @@ -0,0 +1,678 @@ +pub use morphobluecollateraladaptorv1_mod::*; +#[allow(clippy::too_many_arguments)] +mod morphobluecollateraladaptorv1_mod { + #![allow(clippy::enum_variant_names)] + #![allow(dead_code)] + #![allow(clippy::type_complexity)] + #![allow(unused_imports)] + use ethers::contract::{ + builders::{ContractCall, Event}, + Contract, Lazy, + }; + use ethers::core::{ + abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable}, + types::*, + }; + use ethers::providers::Middleware; + #[doc = "MorphoBlueCollateralAdaptorV1 was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] + use std::sync::Arc; + pub static MORPHOBLUECOLLATERALADAPTORV1_ABI: ethers::contract::Lazy = + ethers::contract::Lazy::new(|| { + serde_json :: from_str ("[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_morphoBlue\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_healthFactor\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ConstructorHealthFactorTooLow\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ExternalReceiverBlocked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"asset\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"BaseAdaptor__PricingNotSupported\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__Slippage\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserDepositsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserWithdrawsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueAdaptors__MarketPositionsMustBeTracked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueCollateralAdaptor__HealthFactorTooLow\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"accrueInterest\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_collateralToDeposit\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"addCollateral\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetOf\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetsUsed\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20[]\",\n \"name\": \"assets\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"assets\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"identifier\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isDebt\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumHealthFactor\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"morphoBlue\",\n \"outputs\": [\n {\n \"internalType\": \"contract IMorpho\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_collateralAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"removeCollateral\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"asset\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeApproval\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"slippage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdrawableFrom\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n }\n]\n") . expect ("invalid abi") + }); + #[derive(Clone)] + pub struct MorphoBlueCollateralAdaptorV1(ethers::contract::Contract); + impl std::ops::Deref for MorphoBlueCollateralAdaptorV1 { + type Target = ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl std::fmt::Debug for MorphoBlueCollateralAdaptorV1 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_tuple(stringify!(MorphoBlueCollateralAdaptorV1)) + .field(&self.address()) + .finish() + } + } + impl<'a, M: ethers::providers::Middleware> MorphoBlueCollateralAdaptorV1 { + #[doc = r" Creates a new contract instance with the specified `ethers`"] + #[doc = r" client at the given `Address`. The contract derefs to a `ethers::Contract`"] + #[doc = r" object"] + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + let contract = ethers::contract::Contract::new( + address.into(), + MORPHOBLUECOLLATERALADAPTORV1_ABI.clone(), + client, + ); + Self(contract) + } + #[doc = "Calls the contract's `accrueInterest` (0x151c1ade) function"] + pub fn accrue_interest( + &self, + market: MarketParams, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([21, 28, 26, 222], (market,)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `addCollateral` (0x35624a7f) function"] + pub fn add_collateral( + &self, + market: MarketParams, + collateral_to_deposit: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([53, 98, 74, 127], (market, collateral_to_deposit)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetOf` (0xe170a9bf) function"] + pub fn asset_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([225, 112, 169, 191], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetsUsed` (0xaeffddde) function"] + pub fn assets_used( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall< + M, + ::std::vec::Vec, + > { + self.0 + .method_hash([174, 255, 221, 222], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `balanceOf` (0x78415365) function"] + pub fn balance_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([120, 65, 83, 101], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `deposit` (0x69445c31) function"] + pub fn deposit( + &self, + assets: ethers::core::types::U256, + adaptor_data: ethers::core::types::Bytes, + p2: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([105, 68, 92, 49], (assets, adaptor_data, p2)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `identifier` (0x7998a1c4) function"] + pub fn identifier(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([121, 152, 161, 196], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `isDebt` (0x89353a09) function"] + pub fn is_debt(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([137, 53, 58, 9], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `minimumHealthFactor` (0x1caff8b1) function"] + pub fn minimum_health_factor( + &self, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([28, 175, 248, 177], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `morphoBlue` (0xe8ce1bfa) function"] + pub fn morpho_blue( + &self, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([232, 206, 27, 250], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `removeCollateral` (0x347ecfdb) function"] + pub fn remove_collateral( + &self, + market: MarketParams, + collateral_amount: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([52, 126, 207, 219], (market, collateral_amount)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `revokeApproval` (0xd3bfe76a) function"] + pub fn revoke_approval( + &self, + asset: ethers::core::types::Address, + spender: ethers::core::types::Address, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([211, 191, 231, 106], (asset, spender)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `slippage` (0x3e032a3b) function"] + pub fn slippage(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([62, 3, 42, 59], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdraw` (0xc9111bd7) function"] + pub fn withdraw( + &self, + p0: ethers::core::types::U256, + p1: ethers::core::types::Address, + p2: ethers::core::types::Bytes, + p3: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([201, 17, 27, 215], (p0, p1, p2, p3)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdrawableFrom` (0xfa50e5d2) function"] + pub fn withdrawable_from( + &self, + p0: ethers::core::types::Bytes, + p1: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([250, 80, 229, 210], (p0, p1)) + .expect("method not found (this should never happen)") + } + } + #[doc = "Container type for all input parameters for the `accrueInterest`function with signature `accrueInterest((address,address,address,address,uint256))` and selector `[21, 28, 26, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "accrueInterest", + abi = "accrueInterest((address,address,address,address,uint256))" + )] + pub struct AccrueInterestCall { + pub market: MarketParams, + } + #[doc = "Container type for all input parameters for the `addCollateral`function with signature `addCollateral((address,address,address,address,uint256),uint256)` and selector `[53, 98, 74, 127]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "addCollateral", + abi = "addCollateral((address,address,address,address,uint256),uint256)" + )] + pub struct AddCollateralCall { + pub market: MarketParams, + pub collateral_to_deposit: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `assetOf`function with signature `assetOf(bytes)` and selector `[225, 112, 169, 191]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetOf", abi = "assetOf(bytes)")] + pub struct AssetOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `assetsUsed`function with signature `assetsUsed(bytes)` and selector `[174, 255, 221, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetsUsed", abi = "assetsUsed(bytes)")] + pub struct AssetsUsedCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `balanceOf`function with signature `balanceOf(bytes)` and selector `[120, 65, 83, 101]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "balanceOf", abi = "balanceOf(bytes)")] + pub struct BalanceOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `deposit`function with signature `deposit(uint256,bytes,bytes)` and selector `[105, 68, 92, 49]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "deposit", abi = "deposit(uint256,bytes,bytes)")] + pub struct DepositCall { + pub assets: ethers::core::types::U256, + pub adaptor_data: ethers::core::types::Bytes, + pub p2: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `identifier`function with signature `identifier()` and selector `[121, 152, 161, 196]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "identifier", abi = "identifier()")] + pub struct IdentifierCall; + #[doc = "Container type for all input parameters for the `isDebt`function with signature `isDebt()` and selector `[137, 53, 58, 9]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "isDebt", abi = "isDebt()")] + pub struct IsDebtCall; + #[doc = "Container type for all input parameters for the `minimumHealthFactor`function with signature `minimumHealthFactor()` and selector `[28, 175, 248, 177]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "minimumHealthFactor", abi = "minimumHealthFactor()")] + pub struct MinimumHealthFactorCall; + #[doc = "Container type for all input parameters for the `morphoBlue`function with signature `morphoBlue()` and selector `[232, 206, 27, 250]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "morphoBlue", abi = "morphoBlue()")] + pub struct MorphoBlueCall; + #[doc = "Container type for all input parameters for the `removeCollateral`function with signature `removeCollateral((address,address,address,address,uint256),uint256)` and selector `[52, 126, 207, 219]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "removeCollateral", + abi = "removeCollateral((address,address,address,address,uint256),uint256)" + )] + pub struct RemoveCollateralCall { + pub market: MarketParams, + pub collateral_amount: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `revokeApproval`function with signature `revokeApproval(address,address)` and selector `[211, 191, 231, 106]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "revokeApproval", abi = "revokeApproval(address,address)")] + pub struct RevokeApprovalCall { + pub asset: ethers::core::types::Address, + pub spender: ethers::core::types::Address, + } + #[doc = "Container type for all input parameters for the `slippage`function with signature `slippage()` and selector `[62, 3, 42, 59]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "slippage", abi = "slippage()")] + pub struct SlippageCall; + #[doc = "Container type for all input parameters for the `withdraw`function with signature `withdraw(uint256,address,bytes,bytes)` and selector `[201, 17, 27, 215]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdraw", abi = "withdraw(uint256,address,bytes,bytes)")] + pub struct WithdrawCall( + pub ethers::core::types::U256, + pub ethers::core::types::Address, + pub ethers::core::types::Bytes, + pub ethers::core::types::Bytes, + ); + #[doc = "Container type for all input parameters for the `withdrawableFrom`function with signature `withdrawableFrom(bytes,bytes)` and selector `[250, 80, 229, 210]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdrawableFrom", abi = "withdrawableFrom(bytes,bytes)")] + pub struct WithdrawableFromCall( + pub ethers::core::types::Bytes, + pub ethers::core::types::Bytes, + ); + #[derive(Debug, Clone, PartialEq, Eq, ethers :: contract :: EthAbiType)] + pub enum MorphoBlueCollateralAdaptorV1Calls { + AccrueInterest(AccrueInterestCall), + AddCollateral(AddCollateralCall), + AssetOf(AssetOfCall), + AssetsUsed(AssetsUsedCall), + BalanceOf(BalanceOfCall), + Deposit(DepositCall), + Identifier(IdentifierCall), + IsDebt(IsDebtCall), + MinimumHealthFactor(MinimumHealthFactorCall), + MorphoBlue(MorphoBlueCall), + RemoveCollateral(RemoveCollateralCall), + RevokeApproval(RevokeApprovalCall), + Slippage(SlippageCall), + Withdraw(WithdrawCall), + WithdrawableFrom(WithdrawableFromCall), + } + impl ethers::core::abi::AbiDecode for MorphoBlueCollateralAdaptorV1Calls { + fn decode(data: impl AsRef<[u8]>) -> Result { + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::AccrueInterest(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::AddCollateral(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::AssetOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::AssetsUsed(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::BalanceOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::Deposit(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::Identifier(decoded)); + } + if let Ok(decoded) = ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::IsDebt(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::MinimumHealthFactor( + decoded, + )); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::MorphoBlue(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::RemoveCollateral( + decoded, + )); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::RevokeApproval(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::Slippage(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::Withdraw(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueCollateralAdaptorV1Calls::WithdrawableFrom( + decoded, + )); + } + Err(ethers::core::abi::Error::InvalidData.into()) + } + } + impl ethers::core::abi::AbiEncode for MorphoBlueCollateralAdaptorV1Calls { + fn encode(self) -> Vec { + match self { + MorphoBlueCollateralAdaptorV1Calls::AccrueInterest(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::AddCollateral(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::AssetOf(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::AssetsUsed(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::BalanceOf(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::Deposit(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::Identifier(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::IsDebt(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::MinimumHealthFactor(element) => { + element.encode() + } + MorphoBlueCollateralAdaptorV1Calls::MorphoBlue(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::RemoveCollateral(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::RevokeApproval(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::Slippage(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::Withdraw(element) => element.encode(), + MorphoBlueCollateralAdaptorV1Calls::WithdrawableFrom(element) => element.encode(), + } + } + } + impl ::std::fmt::Display for MorphoBlueCollateralAdaptorV1Calls { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + MorphoBlueCollateralAdaptorV1Calls::AccrueInterest(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::AddCollateral(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::AssetOf(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::AssetsUsed(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::BalanceOf(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::Deposit(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::Identifier(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::IsDebt(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::MinimumHealthFactor(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::MorphoBlue(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::RemoveCollateral(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::RevokeApproval(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::Slippage(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::Withdraw(element) => element.fmt(f), + MorphoBlueCollateralAdaptorV1Calls::WithdrawableFrom(element) => element.fmt(f), + } + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: AccrueInterestCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::AccrueInterest(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: AddCollateralCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::AddCollateral(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: AssetOfCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::AssetOf(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: AssetsUsedCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::AssetsUsed(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: BalanceOfCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::BalanceOf(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: DepositCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::Deposit(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: IdentifierCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::Identifier(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: IsDebtCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::IsDebt(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: MinimumHealthFactorCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::MinimumHealthFactor(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: MorphoBlueCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::MorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: RemoveCollateralCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::RemoveCollateral(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: RevokeApprovalCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::RevokeApproval(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: SlippageCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::Slippage(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: WithdrawCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::Withdraw(var) + } + } + impl ::std::convert::From for MorphoBlueCollateralAdaptorV1Calls { + fn from(var: WithdrawableFromCall) -> Self { + MorphoBlueCollateralAdaptorV1Calls::WithdrawableFrom(var) + } + } + #[doc = "`MarketParams(address,address,address,address,uint256)`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthAbiType, + serde :: Deserialize, + serde :: Serialize, + )] + pub struct MarketParams { + pub loan_token: ethers::core::types::Address, + pub collateral_token: ethers::core::types::Address, + pub oracle: ethers::core::types::Address, + pub irm: ethers::core::types::Address, + pub lltv: ethers::core::types::U256, + } +} diff --git a/steward_abi/src/morpho_blue_debt_adaptor_v1.rs b/steward_abi/src/morpho_blue_debt_adaptor_v1.rs new file mode 100644 index 00000000..504980d3 --- /dev/null +++ b/steward_abi/src/morpho_blue_debt_adaptor_v1.rs @@ -0,0 +1,670 @@ +pub use morphobluedebtadaptorv1_mod::*; +#[allow(clippy::too_many_arguments)] +mod morphobluedebtadaptorv1_mod { + #![allow(clippy::enum_variant_names)] + #![allow(dead_code)] + #![allow(clippy::type_complexity)] + #![allow(unused_imports)] + use ethers::contract::{ + builders::{ContractCall, Event}, + Contract, Lazy, + }; + use ethers::core::{ + abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable}, + types::*, + }; + use ethers::providers::Middleware; + #[doc = "MorphoBlueDebtAdaptorV1 was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] + use std::sync::Arc; + pub static MORPHOBLUEDEBTADAPTORV1_ABI: ethers::contract::Lazy = + ethers::contract::Lazy::new(|| { + serde_json :: from_str ("[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_morphoBlue\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_healthFactor\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ConstructorHealthFactorTooLow\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ExternalReceiverBlocked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"asset\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"BaseAdaptor__PricingNotSupported\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__Slippage\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserDepositsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserWithdrawsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueAdaptors__MarketPositionsMustBeTracked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueDebtAdaptor__HealthFactorTooLow\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"accrueInterest\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetOf\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetsUsed\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20[]\",\n \"name\": \"assets\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_amountToBorrow\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"borrowFromMorphoBlue\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deposit\",\n \"outputs\": [],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"identifier\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isDebt\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"minimumHealthFactor\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"morphoBlue\",\n \"outputs\": [\n {\n \"internalType\": \"contract IMorpho\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_debtTokenRepayAmount\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"repayMorphoBlueDebt\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"asset\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeApproval\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"slippage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdrawableFrom\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n }\n]\n") . expect ("invalid abi") + }); + #[derive(Clone)] + pub struct MorphoBlueDebtAdaptorV1(ethers::contract::Contract); + impl std::ops::Deref for MorphoBlueDebtAdaptorV1 { + type Target = ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl std::fmt::Debug for MorphoBlueDebtAdaptorV1 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_tuple(stringify!(MorphoBlueDebtAdaptorV1)) + .field(&self.address()) + .finish() + } + } + impl<'a, M: ethers::providers::Middleware> MorphoBlueDebtAdaptorV1 { + #[doc = r" Creates a new contract instance with the specified `ethers`"] + #[doc = r" client at the given `Address`. The contract derefs to a `ethers::Contract`"] + #[doc = r" object"] + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + let contract = ethers::contract::Contract::new( + address.into(), + MORPHOBLUEDEBTADAPTORV1_ABI.clone(), + client, + ); + Self(contract) + } + #[doc = "Calls the contract's `accrueInterest` (0x151c1ade) function"] + pub fn accrue_interest( + &self, + market: MarketParams, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([21, 28, 26, 222], (market,)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetOf` (0xe170a9bf) function"] + pub fn asset_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([225, 112, 169, 191], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetsUsed` (0xaeffddde) function"] + pub fn assets_used( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall< + M, + ::std::vec::Vec, + > { + self.0 + .method_hash([174, 255, 221, 222], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `balanceOf` (0x78415365) function"] + pub fn balance_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([120, 65, 83, 101], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `borrowFromMorphoBlue` (0x13b70aba) function"] + pub fn borrow_from_morpho_blue( + &self, + market: MarketParams, + amount_to_borrow: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([19, 183, 10, 186], (market, amount_to_borrow)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `deposit` (0x69445c31) function"] + pub fn deposit( + &self, + p0: ethers::core::types::U256, + p1: ethers::core::types::Bytes, + p2: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([105, 68, 92, 49], (p0, p1, p2)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `identifier` (0x7998a1c4) function"] + pub fn identifier(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([121, 152, 161, 196], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `isDebt` (0x89353a09) function"] + pub fn is_debt(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([137, 53, 58, 9], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `minimumHealthFactor` (0x1caff8b1) function"] + pub fn minimum_health_factor( + &self, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([28, 175, 248, 177], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `morphoBlue` (0xe8ce1bfa) function"] + pub fn morpho_blue( + &self, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([232, 206, 27, 250], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `repayMorphoBlueDebt` (0x8fb75ebe) function"] + pub fn repay_morpho_blue_debt( + &self, + market: MarketParams, + debt_token_repay_amount: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([143, 183, 94, 190], (market, debt_token_repay_amount)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `revokeApproval` (0xd3bfe76a) function"] + pub fn revoke_approval( + &self, + asset: ethers::core::types::Address, + spender: ethers::core::types::Address, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([211, 191, 231, 106], (asset, spender)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `slippage` (0x3e032a3b) function"] + pub fn slippage(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([62, 3, 42, 59], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdraw` (0xc9111bd7) function"] + pub fn withdraw( + &self, + p0: ethers::core::types::U256, + p1: ethers::core::types::Address, + p2: ethers::core::types::Bytes, + p3: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([201, 17, 27, 215], (p0, p1, p2, p3)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdrawableFrom` (0xfa50e5d2) function"] + pub fn withdrawable_from( + &self, + p0: ethers::core::types::Bytes, + p1: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([250, 80, 229, 210], (p0, p1)) + .expect("method not found (this should never happen)") + } + } + #[doc = "Container type for all input parameters for the `accrueInterest`function with signature `accrueInterest((address,address,address,address,uint256))` and selector `[21, 28, 26, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "accrueInterest", + abi = "accrueInterest((address,address,address,address,uint256))" + )] + pub struct AccrueInterestCall { + pub market: MarketParams, + } + #[doc = "Container type for all input parameters for the `assetOf`function with signature `assetOf(bytes)` and selector `[225, 112, 169, 191]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetOf", abi = "assetOf(bytes)")] + pub struct AssetOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `assetsUsed`function with signature `assetsUsed(bytes)` and selector `[174, 255, 221, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetsUsed", abi = "assetsUsed(bytes)")] + pub struct AssetsUsedCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `balanceOf`function with signature `balanceOf(bytes)` and selector `[120, 65, 83, 101]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "balanceOf", abi = "balanceOf(bytes)")] + pub struct BalanceOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `borrowFromMorphoBlue`function with signature `borrowFromMorphoBlue((address,address,address,address,uint256),uint256)` and selector `[19, 183, 10, 186]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "borrowFromMorphoBlue", + abi = "borrowFromMorphoBlue((address,address,address,address,uint256),uint256)" + )] + pub struct BorrowFromMorphoBlueCall { + pub market: MarketParams, + pub amount_to_borrow: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `deposit`function with signature `deposit(uint256,bytes,bytes)` and selector `[105, 68, 92, 49]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "deposit", abi = "deposit(uint256,bytes,bytes)")] + pub struct DepositCall( + pub ethers::core::types::U256, + pub ethers::core::types::Bytes, + pub ethers::core::types::Bytes, + ); + #[doc = "Container type for all input parameters for the `identifier`function with signature `identifier()` and selector `[121, 152, 161, 196]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "identifier", abi = "identifier()")] + pub struct IdentifierCall; + #[doc = "Container type for all input parameters for the `isDebt`function with signature `isDebt()` and selector `[137, 53, 58, 9]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "isDebt", abi = "isDebt()")] + pub struct IsDebtCall; + #[doc = "Container type for all input parameters for the `minimumHealthFactor`function with signature `minimumHealthFactor()` and selector `[28, 175, 248, 177]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "minimumHealthFactor", abi = "minimumHealthFactor()")] + pub struct MinimumHealthFactorCall; + #[doc = "Container type for all input parameters for the `morphoBlue`function with signature `morphoBlue()` and selector `[232, 206, 27, 250]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "morphoBlue", abi = "morphoBlue()")] + pub struct MorphoBlueCall; + #[doc = "Container type for all input parameters for the `repayMorphoBlueDebt`function with signature `repayMorphoBlueDebt((address,address,address,address,uint256),uint256)` and selector `[143, 183, 94, 190]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "repayMorphoBlueDebt", + abi = "repayMorphoBlueDebt((address,address,address,address,uint256),uint256)" + )] + pub struct RepayMorphoBlueDebtCall { + pub market: MarketParams, + pub debt_token_repay_amount: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `revokeApproval`function with signature `revokeApproval(address,address)` and selector `[211, 191, 231, 106]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "revokeApproval", abi = "revokeApproval(address,address)")] + pub struct RevokeApprovalCall { + pub asset: ethers::core::types::Address, + pub spender: ethers::core::types::Address, + } + #[doc = "Container type for all input parameters for the `slippage`function with signature `slippage()` and selector `[62, 3, 42, 59]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "slippage", abi = "slippage()")] + pub struct SlippageCall; + #[doc = "Container type for all input parameters for the `withdraw`function with signature `withdraw(uint256,address,bytes,bytes)` and selector `[201, 17, 27, 215]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdraw", abi = "withdraw(uint256,address,bytes,bytes)")] + pub struct WithdrawCall( + pub ethers::core::types::U256, + pub ethers::core::types::Address, + pub ethers::core::types::Bytes, + pub ethers::core::types::Bytes, + ); + #[doc = "Container type for all input parameters for the `withdrawableFrom`function with signature `withdrawableFrom(bytes,bytes)` and selector `[250, 80, 229, 210]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdrawableFrom", abi = "withdrawableFrom(bytes,bytes)")] + pub struct WithdrawableFromCall( + pub ethers::core::types::Bytes, + pub ethers::core::types::Bytes, + ); + #[derive(Debug, Clone, PartialEq, Eq, ethers :: contract :: EthAbiType)] + pub enum MorphoBlueDebtAdaptorV1Calls { + AccrueInterest(AccrueInterestCall), + AssetOf(AssetOfCall), + AssetsUsed(AssetsUsedCall), + BalanceOf(BalanceOfCall), + BorrowFromMorphoBlue(BorrowFromMorphoBlueCall), + Deposit(DepositCall), + Identifier(IdentifierCall), + IsDebt(IsDebtCall), + MinimumHealthFactor(MinimumHealthFactorCall), + MorphoBlue(MorphoBlueCall), + RepayMorphoBlueDebt(RepayMorphoBlueDebtCall), + RevokeApproval(RevokeApprovalCall), + Slippage(SlippageCall), + Withdraw(WithdrawCall), + WithdrawableFrom(WithdrawableFromCall), + } + impl ethers::core::abi::AbiDecode for MorphoBlueDebtAdaptorV1Calls { + fn decode(data: impl AsRef<[u8]>) -> Result { + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::AccrueInterest(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::AssetOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::AssetsUsed(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::BalanceOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::BorrowFromMorphoBlue(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::Deposit(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::Identifier(decoded)); + } + if let Ok(decoded) = ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::IsDebt(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::MinimumHealthFactor(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::MorphoBlue(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::RepayMorphoBlueDebt(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::RevokeApproval(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::Slippage(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::Withdraw(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueDebtAdaptorV1Calls::WithdrawableFrom(decoded)); + } + Err(ethers::core::abi::Error::InvalidData.into()) + } + } + impl ethers::core::abi::AbiEncode for MorphoBlueDebtAdaptorV1Calls { + fn encode(self) -> Vec { + match self { + MorphoBlueDebtAdaptorV1Calls::AccrueInterest(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::AssetOf(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::AssetsUsed(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::BalanceOf(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::BorrowFromMorphoBlue(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::Deposit(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::Identifier(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::IsDebt(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::MinimumHealthFactor(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::MorphoBlue(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::RepayMorphoBlueDebt(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::RevokeApproval(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::Slippage(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::Withdraw(element) => element.encode(), + MorphoBlueDebtAdaptorV1Calls::WithdrawableFrom(element) => element.encode(), + } + } + } + impl ::std::fmt::Display for MorphoBlueDebtAdaptorV1Calls { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + MorphoBlueDebtAdaptorV1Calls::AccrueInterest(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::AssetOf(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::AssetsUsed(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::BalanceOf(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::BorrowFromMorphoBlue(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::Deposit(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::Identifier(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::IsDebt(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::MinimumHealthFactor(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::MorphoBlue(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::RepayMorphoBlueDebt(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::RevokeApproval(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::Slippage(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::Withdraw(element) => element.fmt(f), + MorphoBlueDebtAdaptorV1Calls::WithdrawableFrom(element) => element.fmt(f), + } + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: AccrueInterestCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::AccrueInterest(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: AssetOfCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::AssetOf(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: AssetsUsedCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::AssetsUsed(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: BalanceOfCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::BalanceOf(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: BorrowFromMorphoBlueCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::BorrowFromMorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: DepositCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::Deposit(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: IdentifierCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::Identifier(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: IsDebtCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::IsDebt(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: MinimumHealthFactorCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::MinimumHealthFactor(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: MorphoBlueCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::MorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: RepayMorphoBlueDebtCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::RepayMorphoBlueDebt(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: RevokeApprovalCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::RevokeApproval(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: SlippageCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::Slippage(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: WithdrawCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::Withdraw(var) + } + } + impl ::std::convert::From for MorphoBlueDebtAdaptorV1Calls { + fn from(var: WithdrawableFromCall) -> Self { + MorphoBlueDebtAdaptorV1Calls::WithdrawableFrom(var) + } + } + #[doc = "`MarketParams(address,address,address,address,uint256)`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthAbiType, + serde :: Deserialize, + serde :: Serialize, + )] + pub struct MarketParams { + pub loan_token: ethers::core::types::Address, + pub collateral_token: ethers::core::types::Address, + pub oracle: ethers::core::types::Address, + pub irm: ethers::core::types::Address, + pub lltv: ethers::core::types::U256, + } +} diff --git a/steward_abi/src/morpho_blue_supply_adaptor_v1.rs b/steward_abi/src/morpho_blue_supply_adaptor_v1.rs new file mode 100644 index 00000000..1d0bda3f --- /dev/null +++ b/steward_abi/src/morpho_blue_supply_adaptor_v1.rs @@ -0,0 +1,640 @@ +pub use morphobluesupplyadaptorv1_mod::*; +#[allow(clippy::too_many_arguments)] +mod morphobluesupplyadaptorv1_mod { + #![allow(clippy::enum_variant_names)] + #![allow(dead_code)] + #![allow(clippy::type_complexity)] + #![allow(unused_imports)] + use ethers::contract::{ + builders::{ContractCall, Event}, + Contract, Lazy, + }; + use ethers::core::{ + abi::{Abi, Detokenize, InvalidOutputType, Token, Tokenizable}, + types::*, + }; + use ethers::providers::Middleware; + #[doc = "MorphoBlueSupplyAdaptorV1 was auto-generated with ethers-rs Abigen. More information at: https://github.com/gakonst/ethers-rs"] + use std::sync::Arc; + pub static MORPHOBLUESUPPLYADAPTORV1_ABI: ethers::contract::Lazy = + ethers::contract::Lazy::new(|| { + serde_json :: from_str ("[\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"_morphoBlue\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ConstructorHealthFactorTooLow\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__ExternalReceiverBlocked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"asset\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"BaseAdaptor__PricingNotSupported\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__Slippage\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserDepositsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [],\n \"name\": \"BaseAdaptor__UserWithdrawsNotAllowed\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueAdaptors__MarketPositionsMustBeTracked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"MorphoBlueSupplyAdaptor__MarketPositionsMustBeTracked\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n }\n ],\n \"name\": \"accrueInterest\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetOf\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"assetsUsed\",\n \"outputs\": [\n {\n \"internalType\": \"contract ERC20[]\",\n \"name\": \"assets\",\n \"type\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"assets\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"deposit\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"identifier\",\n \"outputs\": [\n {\n \"internalType\": \"bytes32\",\n \"name\": \"\",\n \"type\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"isDebt\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_assets\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"lendToMorphoBlue\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"morphoBlue\",\n \"outputs\": [\n {\n \"internalType\": \"contract IMorpho\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"contract ERC20\",\n \"name\": \"asset\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"revokeApproval\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"slippage\",\n \"outputs\": [\n {\n \"internalType\": \"uint32\",\n \"name\": \"\",\n \"type\": \"uint32\"\n }\n ],\n \"stateMutability\": \"pure\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"assets\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"receiver\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"configurationData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdraw\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"loanToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"collateralToken\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"oracle\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"irm\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"lltv\",\n \"type\": \"uint256\"\n }\n ],\n \"internalType\": \"struct MarketParams\",\n \"name\": \"_market\",\n \"type\": \"tuple\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"_assets\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"withdrawFromMorphoBlue\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"bytes\",\n \"name\": \"adaptorData\",\n \"type\": \"bytes\"\n },\n {\n \"internalType\": \"bytes\",\n \"name\": \"configurationData\",\n \"type\": \"bytes\"\n }\n ],\n \"name\": \"withdrawableFrom\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"withdrawableSupply\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n]\n") . expect ("invalid abi") + }); + #[derive(Clone)] + pub struct MorphoBlueSupplyAdaptorV1(ethers::contract::Contract); + impl std::ops::Deref for MorphoBlueSupplyAdaptorV1 { + type Target = ethers::contract::Contract; + fn deref(&self) -> &Self::Target { + &self.0 + } + } + impl std::fmt::Debug for MorphoBlueSupplyAdaptorV1 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_tuple(stringify!(MorphoBlueSupplyAdaptorV1)) + .field(&self.address()) + .finish() + } + } + impl<'a, M: ethers::providers::Middleware> MorphoBlueSupplyAdaptorV1 { + #[doc = r" Creates a new contract instance with the specified `ethers`"] + #[doc = r" client at the given `Address`. The contract derefs to a `ethers::Contract`"] + #[doc = r" object"] + pub fn new>( + address: T, + client: ::std::sync::Arc, + ) -> Self { + let contract = ethers::contract::Contract::new( + address.into(), + MORPHOBLUESUPPLYADAPTORV1_ABI.clone(), + client, + ); + Self(contract) + } + #[doc = "Calls the contract's `accrueInterest` (0x151c1ade) function"] + pub fn accrue_interest( + &self, + market: MarketParams, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([21, 28, 26, 222], (market,)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetOf` (0xe170a9bf) function"] + pub fn asset_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([225, 112, 169, 191], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `assetsUsed` (0xaeffddde) function"] + pub fn assets_used( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall< + M, + ::std::vec::Vec, + > { + self.0 + .method_hash([174, 255, 221, 222], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `balanceOf` (0x78415365) function"] + pub fn balance_of( + &self, + adaptor_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([120, 65, 83, 101], adaptor_data) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `deposit` (0x69445c31) function"] + pub fn deposit( + &self, + assets: ethers::core::types::U256, + adaptor_data: ethers::core::types::Bytes, + p2: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([105, 68, 92, 49], (assets, adaptor_data, p2)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `identifier` (0x7998a1c4) function"] + pub fn identifier(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([121, 152, 161, 196], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `isDebt` (0x89353a09) function"] + pub fn is_debt(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([137, 53, 58, 9], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `lendToMorphoBlue` (0x02ebe67c) function"] + pub fn lend_to_morpho_blue( + &self, + market: MarketParams, + assets: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([2, 235, 230, 124], (market, assets)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `morphoBlue` (0xe8ce1bfa) function"] + pub fn morpho_blue( + &self, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([232, 206, 27, 250], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `revokeApproval` (0xd3bfe76a) function"] + pub fn revoke_approval( + &self, + asset: ethers::core::types::Address, + spender: ethers::core::types::Address, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([211, 191, 231, 106], (asset, spender)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `slippage` (0x3e032a3b) function"] + pub fn slippage(&self) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([62, 3, 42, 59], ()) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdraw` (0xc9111bd7) function"] + pub fn withdraw( + &self, + assets: ethers::core::types::U256, + receiver: ethers::core::types::Address, + adaptor_data: ethers::core::types::Bytes, + configuration_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash( + [201, 17, 27, 215], + (assets, receiver, adaptor_data, configuration_data), + ) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdrawFromMorphoBlue` (0x3765d228) function"] + pub fn withdraw_from_morpho_blue( + &self, + market: MarketParams, + assets: ethers::core::types::U256, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([55, 101, 210, 40], (market, assets)) + .expect("method not found (this should never happen)") + } + #[doc = "Calls the contract's `withdrawableFrom` (0xfa50e5d2) function"] + pub fn withdrawable_from( + &self, + adaptor_data: ethers::core::types::Bytes, + configuration_data: ethers::core::types::Bytes, + ) -> ethers::contract::builders::ContractCall { + self.0 + .method_hash([250, 80, 229, 210], (adaptor_data, configuration_data)) + .expect("method not found (this should never happen)") + } + } + #[doc = "Container type for all input parameters for the `accrueInterest`function with signature `accrueInterest((address,address,address,address,uint256))` and selector `[21, 28, 26, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "accrueInterest", + abi = "accrueInterest((address,address,address,address,uint256))" + )] + pub struct AccrueInterestCall { + pub market: MarketParams, + } + #[doc = "Container type for all input parameters for the `assetOf`function with signature `assetOf(bytes)` and selector `[225, 112, 169, 191]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetOf", abi = "assetOf(bytes)")] + pub struct AssetOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `assetsUsed`function with signature `assetsUsed(bytes)` and selector `[174, 255, 221, 222]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "assetsUsed", abi = "assetsUsed(bytes)")] + pub struct AssetsUsedCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `balanceOf`function with signature `balanceOf(bytes)` and selector `[120, 65, 83, 101]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "balanceOf", abi = "balanceOf(bytes)")] + pub struct BalanceOfCall { + pub adaptor_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `deposit`function with signature `deposit(uint256,bytes,bytes)` and selector `[105, 68, 92, 49]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "deposit", abi = "deposit(uint256,bytes,bytes)")] + pub struct DepositCall { + pub assets: ethers::core::types::U256, + pub adaptor_data: ethers::core::types::Bytes, + pub p2: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `identifier`function with signature `identifier()` and selector `[121, 152, 161, 196]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "identifier", abi = "identifier()")] + pub struct IdentifierCall; + #[doc = "Container type for all input parameters for the `isDebt`function with signature `isDebt()` and selector `[137, 53, 58, 9]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "isDebt", abi = "isDebt()")] + pub struct IsDebtCall; + #[doc = "Container type for all input parameters for the `lendToMorphoBlue`function with signature `lendToMorphoBlue((address,address,address,address,uint256),uint256)` and selector `[2, 235, 230, 124]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "lendToMorphoBlue", + abi = "lendToMorphoBlue((address,address,address,address,uint256),uint256)" + )] + pub struct LendToMorphoBlueCall { + pub market: MarketParams, + pub assets: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `morphoBlue`function with signature `morphoBlue()` and selector `[232, 206, 27, 250]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "morphoBlue", abi = "morphoBlue()")] + pub struct MorphoBlueCall; + #[doc = "Container type for all input parameters for the `revokeApproval`function with signature `revokeApproval(address,address)` and selector `[211, 191, 231, 106]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "revokeApproval", abi = "revokeApproval(address,address)")] + pub struct RevokeApprovalCall { + pub asset: ethers::core::types::Address, + pub spender: ethers::core::types::Address, + } + #[doc = "Container type for all input parameters for the `slippage`function with signature `slippage()` and selector `[62, 3, 42, 59]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "slippage", abi = "slippage()")] + pub struct SlippageCall; + #[doc = "Container type for all input parameters for the `withdraw`function with signature `withdraw(uint256,address,bytes,bytes)` and selector `[201, 17, 27, 215]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdraw", abi = "withdraw(uint256,address,bytes,bytes)")] + pub struct WithdrawCall { + pub assets: ethers::core::types::U256, + pub receiver: ethers::core::types::Address, + pub adaptor_data: ethers::core::types::Bytes, + pub configuration_data: ethers::core::types::Bytes, + } + #[doc = "Container type for all input parameters for the `withdrawFromMorphoBlue`function with signature `withdrawFromMorphoBlue((address,address,address,address,uint256),uint256)` and selector `[55, 101, 210, 40]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall( + name = "withdrawFromMorphoBlue", + abi = "withdrawFromMorphoBlue((address,address,address,address,uint256),uint256)" + )] + pub struct WithdrawFromMorphoBlueCall { + pub market: MarketParams, + pub assets: ethers::core::types::U256, + } + #[doc = "Container type for all input parameters for the `withdrawableFrom`function with signature `withdrawableFrom(bytes,bytes)` and selector `[250, 80, 229, 210]`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthCall, + ethers :: contract :: EthDisplay, + serde :: Deserialize, + serde :: Serialize, + )] + #[ethcall(name = "withdrawableFrom", abi = "withdrawableFrom(bytes,bytes)")] + pub struct WithdrawableFromCall { + pub adaptor_data: ethers::core::types::Bytes, + pub configuration_data: ethers::core::types::Bytes, + } + #[derive(Debug, Clone, PartialEq, Eq, ethers :: contract :: EthAbiType)] + pub enum MorphoBlueSupplyAdaptorV1Calls { + AccrueInterest(AccrueInterestCall), + AssetOf(AssetOfCall), + AssetsUsed(AssetsUsedCall), + BalanceOf(BalanceOfCall), + Deposit(DepositCall), + Identifier(IdentifierCall), + IsDebt(IsDebtCall), + LendToMorphoBlue(LendToMorphoBlueCall), + MorphoBlue(MorphoBlueCall), + RevokeApproval(RevokeApprovalCall), + Slippage(SlippageCall), + Withdraw(WithdrawCall), + WithdrawFromMorphoBlue(WithdrawFromMorphoBlueCall), + WithdrawableFrom(WithdrawableFromCall), + } + impl ethers::core::abi::AbiDecode for MorphoBlueSupplyAdaptorV1Calls { + fn decode(data: impl AsRef<[u8]>) -> Result { + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::AccrueInterest(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::AssetOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::AssetsUsed(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::BalanceOf(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::Deposit(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::Identifier(decoded)); + } + if let Ok(decoded) = ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::IsDebt(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::LendToMorphoBlue(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::MorphoBlue(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::RevokeApproval(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::Slippage(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::Withdraw(decoded)); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::WithdrawFromMorphoBlue( + decoded, + )); + } + if let Ok(decoded) = + ::decode(data.as_ref()) + { + return Ok(MorphoBlueSupplyAdaptorV1Calls::WithdrawableFrom(decoded)); + } + Err(ethers::core::abi::Error::InvalidData.into()) + } + } + impl ethers::core::abi::AbiEncode for MorphoBlueSupplyAdaptorV1Calls { + fn encode(self) -> Vec { + match self { + MorphoBlueSupplyAdaptorV1Calls::AccrueInterest(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::AssetOf(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::AssetsUsed(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::BalanceOf(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::Deposit(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::Identifier(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::IsDebt(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::LendToMorphoBlue(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::MorphoBlue(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::RevokeApproval(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::Slippage(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::Withdraw(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::WithdrawFromMorphoBlue(element) => element.encode(), + MorphoBlueSupplyAdaptorV1Calls::WithdrawableFrom(element) => element.encode(), + } + } + } + impl ::std::fmt::Display for MorphoBlueSupplyAdaptorV1Calls { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + match self { + MorphoBlueSupplyAdaptorV1Calls::AccrueInterest(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::AssetOf(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::AssetsUsed(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::BalanceOf(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::Deposit(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::Identifier(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::IsDebt(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::LendToMorphoBlue(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::MorphoBlue(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::RevokeApproval(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::Slippage(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::Withdraw(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::WithdrawFromMorphoBlue(element) => element.fmt(f), + MorphoBlueSupplyAdaptorV1Calls::WithdrawableFrom(element) => element.fmt(f), + } + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: AccrueInterestCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::AccrueInterest(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: AssetOfCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::AssetOf(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: AssetsUsedCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::AssetsUsed(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: BalanceOfCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::BalanceOf(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: DepositCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::Deposit(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: IdentifierCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::Identifier(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: IsDebtCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::IsDebt(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: LendToMorphoBlueCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::LendToMorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: MorphoBlueCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::MorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: RevokeApprovalCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::RevokeApproval(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: SlippageCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::Slippage(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: WithdrawCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::Withdraw(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: WithdrawFromMorphoBlueCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::WithdrawFromMorphoBlue(var) + } + } + impl ::std::convert::From for MorphoBlueSupplyAdaptorV1Calls { + fn from(var: WithdrawableFromCall) -> Self { + MorphoBlueSupplyAdaptorV1Calls::WithdrawableFrom(var) + } + } + #[doc = "`MarketParams(address,address,address,address,uint256)`"] + #[derive( + Clone, + Debug, + Default, + Eq, + PartialEq, + ethers :: contract :: EthAbiType, + serde :: Deserialize, + serde :: Serialize, + )] + pub struct MarketParams { + pub loan_token: ethers::core::types::Address, + pub collateral_token: ethers::core::types::Address, + pub oracle: ethers::core::types::Address, + pub irm: ethers::core::types::Address, + pub lltv: ethers::core::types::U256, + } +} diff --git a/steward_abi_build/src/main.rs b/steward_abi_build/src/main.rs index 65952405..75c54e23 100644 --- a/steward_abi_build/src/main.rs +++ b/steward_abi_build/src/main.rs @@ -66,6 +66,12 @@ fn main() { "CellarWithMultiAssetDepositV1", "cellar_with_multi_asset_deposit_v1", ), + ("MorphoBlueSupplyAdaptorV1", "morpho_blue_supply_adaptor_v1"), + ( + "MorphoBlueCollateralAdaptorV1", + "morpho_blue_collateral_adaptor_v1", + ), + ("MorphoBlueDebtAdaptorV1", "morpho_blue_debt_adaptor_v1"), ]; contracts diff --git a/steward_proto_go/steward_proto/aave_v3_debt_token_flash_loan.pb.go b/steward_proto_go/steward_proto/aave_v3_debt_token_flash_loan.pb.go index f885d7c4..172c83bd 100644 --- a/steward_proto_go/steward_proto/aave_v3_debt_token_flash_loan.pb.go +++ b/steward_proto_go/steward_proto/aave_v3_debt_token_flash_loan.pb.go @@ -225,6 +225,9 @@ type AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan struct { // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_ConvexCurveV1Calls // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CurveV1Calls // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_AuraErc4626V1Calls + // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueCollateralV1Calls + // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueDebtV1Calls + // *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueSupplyV1Calls CallData isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData `protobuf_oneof:"call_data"` } @@ -470,6 +473,27 @@ func (x *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan) GetAur return nil } +func (x *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan) GetMorphoBlueCollateralV1Calls() *MorphoBlueCollateralAdaptorV1Calls { + if x, ok := x.GetCallData().(*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueCollateralV1Calls); ok { + return x.MorphoBlueCollateralV1Calls + } + return nil +} + +func (x *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan) GetMorphoBlueDebtV1Calls() *MorphoBlueDebtAdaptorV1Calls { + if x, ok := x.GetCallData().(*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueDebtV1Calls); ok { + return x.MorphoBlueDebtV1Calls + } + return nil +} + +func (x *AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan) GetMorphoBlueSupplyV1Calls() *MorphoBlueSupplyAdaptorV1Calls { + if x, ok := x.GetCallData().(*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueSupplyV1Calls); ok { + return x.MorphoBlueSupplyV1Calls + } + return nil +} + type isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData interface { isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() } @@ -614,6 +638,21 @@ type AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_AuraErc4626 AuraErc4626V1Calls *AuraERC4626AdaptorV1Calls `protobuf:"bytes,29,opt,name=aura_erc4626_v1_calls,json=auraErc4626V1Calls,proto3,oneof"` } +type AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueCollateralV1Calls struct { + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralV1Calls *MorphoBlueCollateralAdaptorV1Calls `protobuf:"bytes,30,opt,name=morpho_blue_collateral_v1_calls,json=morphoBlueCollateralV1Calls,proto3,oneof"` +} + +type AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueDebtV1Calls struct { + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtV1Calls *MorphoBlueDebtAdaptorV1Calls `protobuf:"bytes,31,opt,name=morpho_blue_debt_v1_calls,json=morphoBlueDebtV1Calls,proto3,oneof"` +} + +type AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueSupplyV1Calls struct { + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyV1Calls *MorphoBlueSupplyAdaptorV1Calls `protobuf:"bytes,32,opt,name=morpho_blue_supply_v1_calls,json=morphoBlueSupplyV1Calls,proto3,oneof"` +} + func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_UniswapV3V1Calls) isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() { } @@ -698,6 +737,15 @@ func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CurveV1Ca func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_AuraErc4626V1Calls) isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() { } +func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueCollateralV1Calls) isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() { +} + +func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueDebtV1Calls) isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() { +} + +func (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueSupplyV1Calls) isAaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CallData() { +} + var File_adaptors_aave_aave_v3_debt_token_flash_loan_proto protoreflect.FileDescriptor var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_rawDesc = []byte{ @@ -739,6 +787,14 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x61, 0x61, 0x76, 0x65, 0x5f, 0x76, 0x33, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x26, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, + 0x65, 0x62, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, @@ -766,7 +822,7 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_rawDesc = []byte{ 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x72, 0x61, 0x78, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x66, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xeb, 0x18, 0x0a, 0x21, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, + 0x74, 0x6f, 0x22, 0xb5, 0x1b, 0x0a, 0x21, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x56, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x6f, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x73, @@ -785,7 +841,7 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_rawDesc = []byte{ 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xb6, 0x16, 0x0a, 0x1d, 0x41, 0x64, 0x61, 0x70, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x80, 0x19, 0x0a, 0x1d, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x61, 0x70, @@ -964,16 +1020,37 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_rawDesc = []byte{ 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x72, 0x61, 0x45, 0x52, 0x43, 0x34, 0x36, 0x32, 0x36, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x12, 0x61, 0x75, 0x72, 0x61, 0x45, 0x72, 0x63, 0x34, 0x36, 0x32, 0x36, 0x56, 0x31, 0x43, 0x61, - 0x6c, 0x6c, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x6d, 0x0a, 0x26, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, - 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x63, 0x61, - 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x73, 0x74, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, - 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, - 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6c, 0x73, 0x12, 0x76, 0x0a, 0x1f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, + 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x76, 0x31, + 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, + 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, + 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x1b, + 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x64, 0x0a, 0x19, 0x6d, + 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x5f, + 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, + 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, + 0x73, 0x12, 0x6a, 0x0a, 0x1b, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, + 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, + 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, + 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x0b, 0x0a, + 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6d, 0x0a, 0x26, 0x41, 0x61, + 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x64, 0x61, + 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x43, + 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, + 0x2e, 0x41, 0x61, 0x76, 0x65, 0x56, 0x33, 0x44, 0x65, 0x62, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, + 0x61, 0x6e, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1022,6 +1099,9 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_goTypes = []interface (*ConvexCurveAdaptorV1Calls)(nil), // 29: steward.v3.ConvexCurveAdaptorV1Calls (*CurveAdaptorV1Calls)(nil), // 30: steward.v3.CurveAdaptorV1Calls (*AuraERC4626AdaptorV1Calls)(nil), // 31: steward.v3.AuraERC4626AdaptorV1Calls + (*MorphoBlueCollateralAdaptorV1Calls)(nil), // 32: steward.v3.MorphoBlueCollateralAdaptorV1Calls + (*MorphoBlueDebtAdaptorV1Calls)(nil), // 33: steward.v3.MorphoBlueDebtAdaptorV1Calls + (*MorphoBlueSupplyAdaptorV1Calls)(nil), // 34: steward.v3.MorphoBlueSupplyAdaptorV1Calls } var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_depIdxs = []int32{ 2, // 0: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.flash_loan:type_name -> steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.FlashLoan @@ -1055,11 +1135,14 @@ var file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_depIdxs = []int32{ 29, // 28: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.convex_curve_v1_calls:type_name -> steward.v3.ConvexCurveAdaptorV1Calls 30, // 29: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.curve_v1_calls:type_name -> steward.v3.CurveAdaptorV1Calls 31, // 30: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.aura_erc4626_v1_calls:type_name -> steward.v3.AuraERC4626AdaptorV1Calls - 31, // [31:31] is the sub-list for method output_type - 31, // [31:31] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 32, // 31: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.morpho_blue_collateral_v1_calls:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1Calls + 33, // 32: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.morpho_blue_debt_v1_calls:type_name -> steward.v3.MorphoBlueDebtAdaptorV1Calls + 34, // 33: steward.v3.AaveV3DebtTokenAdaptorV1FlashLoan.AdaptorCallForAaveV3FlashLoan.morpho_blue_supply_v1_calls:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1Calls + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_init() } @@ -1081,6 +1164,9 @@ func file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_init() { file_adaptors_morpho_morpho_aave_v3_a_token_collateral_proto_init() file_adaptors_morpho_morpho_aave_v3_a_token_p2p_proto_init() file_adaptors_morpho_morpho_aave_v3_debt_token_proto_init() + file_adaptors_morpho_morpho_blue_collateral_proto_init() + file_adaptors_morpho_morpho_blue_debt_proto_init() + file_adaptors_morpho_morpho_blue_supply_proto_init() file_adaptors_uniswap_uniswap_v3_proto_init() file_adaptors_uniswap_swap_with_uniswap_proto_init() file_adaptors_fees_and_reserves_proto_init() @@ -1171,6 +1257,9 @@ func file_adaptors_aave_aave_v3_debt_token_flash_loan_proto_init() { (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_ConvexCurveV1Calls)(nil), (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_CurveV1Calls)(nil), (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_AuraErc4626V1Calls)(nil), + (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueCollateralV1Calls)(nil), + (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueDebtV1Calls)(nil), + (*AaveV3DebtTokenAdaptorV1FlashLoan_AdaptorCallForAaveV3FlashLoan_MorphoBlueSupplyV1Calls)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/steward_proto_go/steward_proto/balancer_pool_flash_loan.pb.go b/steward_proto_go/steward_proto/balancer_pool_flash_loan.pb.go index 02080578..3d95508a 100644 --- a/steward_proto_go/steward_proto/balancer_pool_flash_loan.pb.go +++ b/steward_proto_go/steward_proto/balancer_pool_flash_loan.pb.go @@ -224,6 +224,9 @@ type BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan struct { // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_ConvexCurveV1Calls // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CurveV1Calls // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_AuraErc4626V1Calls + // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueCollateralV1Calls + // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueDebtV1Calls + // *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueSupplyV1Calls CallData isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData `protobuf_oneof:"call_data"` } @@ -469,6 +472,27 @@ func (x *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan) Get return nil } +func (x *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan) GetMorphoBlueCollateralV1Calls() *MorphoBlueCollateralAdaptorV1Calls { + if x, ok := x.GetCallData().(*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueCollateralV1Calls); ok { + return x.MorphoBlueCollateralV1Calls + } + return nil +} + +func (x *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan) GetMorphoBlueDebtV1Calls() *MorphoBlueDebtAdaptorV1Calls { + if x, ok := x.GetCallData().(*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueDebtV1Calls); ok { + return x.MorphoBlueDebtV1Calls + } + return nil +} + +func (x *BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan) GetMorphoBlueSupplyV1Calls() *MorphoBlueSupplyAdaptorV1Calls { + if x, ok := x.GetCallData().(*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueSupplyV1Calls); ok { + return x.MorphoBlueSupplyV1Calls + } + return nil +} + type isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData interface { isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() } @@ -613,6 +637,21 @@ type BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_AuraErc4 AuraErc4626V1Calls *AuraERC4626AdaptorV1Calls `protobuf:"bytes,30,opt,name=aura_erc4626_v1_calls,json=auraErc4626V1Calls,proto3,oneof"` } +type BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueCollateralV1Calls struct { + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralV1Calls *MorphoBlueCollateralAdaptorV1Calls `protobuf:"bytes,31,opt,name=morpho_blue_collateral_v1_calls,json=morphoBlueCollateralV1Calls,proto3,oneof"` +} + +type BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueDebtV1Calls struct { + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtV1Calls *MorphoBlueDebtAdaptorV1Calls `protobuf:"bytes,32,opt,name=morpho_blue_debt_v1_calls,json=morphoBlueDebtV1Calls,proto3,oneof"` +} + +type BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueSupplyV1Calls struct { + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyV1Calls *MorphoBlueSupplyAdaptorV1Calls `protobuf:"bytes,33,opt,name=morpho_blue_supply_v1_calls,json=morphoBlueSupplyV1Calls,proto3,oneof"` +} + func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_UniswapV3V1Calls) isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() { } @@ -697,6 +736,15 @@ func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CurveV func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_AuraErc4626V1Calls) isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() { } +func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueCollateralV1Calls) isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() { +} + +func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueDebtV1Calls) isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() { +} + +func (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueSupplyV1Calls) isBalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CallData() { +} + var File_adaptors_balancer_balancer_pool_flash_loan_proto protoreflect.FileDescriptor var file_adaptors_balancer_balancer_pool_flash_loan_proto_rawDesc = []byte{ @@ -738,6 +786,14 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x61, 0x61, 0x76, 0x65, 0x5f, 0x76, 0x33, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x26, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, + 0x65, 0x62, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, + 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, @@ -765,7 +821,7 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_rawDesc = []byte{ 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x72, 0x61, 0x78, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x66, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xf4, 0x18, 0x0a, 0x1e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, + 0x74, 0x6f, 0x22, 0xbe, 0x1b, 0x0a, 0x1e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x60, 0x0a, 0x0f, 0x6d, 0x61, 0x6b, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x6f, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, @@ -784,7 +840,7 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_rawDesc = []byte{ 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x2e, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, - 0xc7, 0x16, 0x0a, 0x23, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x46, + 0x91, 0x19, 0x0a, 0x23, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x46, 0x6f, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, @@ -963,16 +1019,37 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_rawDesc = []byte{ 0x25, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x72, 0x61, 0x45, 0x52, 0x43, 0x34, 0x36, 0x32, 0x36, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x12, 0x61, 0x75, 0x72, 0x61, 0x45, 0x72, - 0x63, 0x34, 0x36, 0x32, 0x36, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x0b, 0x0a, 0x09, - 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x67, 0x0a, 0x23, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, - 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x73, - 0x12, 0x40, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, - 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x05, 0x63, 0x61, 0x6c, - 0x6c, 0x73, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x34, 0x36, 0x32, 0x36, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x76, 0x0a, 0x1f, + 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, + 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, + 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x56, 0x31, 0x43, + 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x64, 0x0a, 0x19, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, + 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, + 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, + 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, + 0x73, 0x48, 0x00, 0x52, 0x15, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, + 0x65, 0x62, 0x74, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x6a, 0x0a, 0x1b, 0x6d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, + 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, + 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, + 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x6d, + 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x56, + 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x67, 0x0a, 0x23, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, + 0x6f, 0x6f, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, + 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x40, 0x0a, 0x05, 0x63, 0x61, + 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, + 0x6f, 0x6f, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x46, 0x6c, 0x61, 0x73, + 0x68, 0x4c, 0x6f, 0x61, 0x6e, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x10, 0x5a, 0x0e, + 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1021,6 +1098,9 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_goTypes = []interface{ (*ConvexCurveAdaptorV1Calls)(nil), // 29: steward.v3.ConvexCurveAdaptorV1Calls (*CurveAdaptorV1Calls)(nil), // 30: steward.v3.CurveAdaptorV1Calls (*AuraERC4626AdaptorV1Calls)(nil), // 31: steward.v3.AuraERC4626AdaptorV1Calls + (*MorphoBlueCollateralAdaptorV1Calls)(nil), // 32: steward.v3.MorphoBlueCollateralAdaptorV1Calls + (*MorphoBlueDebtAdaptorV1Calls)(nil), // 33: steward.v3.MorphoBlueDebtAdaptorV1Calls + (*MorphoBlueSupplyAdaptorV1Calls)(nil), // 34: steward.v3.MorphoBlueSupplyAdaptorV1Calls } var file_adaptors_balancer_balancer_pool_flash_loan_proto_depIdxs = []int32{ 2, // 0: steward.v3.BalancerPoolAdaptorV1FlashLoan.make_flash_loan:type_name -> steward.v3.BalancerPoolAdaptorV1FlashLoan.MakeFlashLoan @@ -1054,11 +1134,14 @@ var file_adaptors_balancer_balancer_pool_flash_loan_proto_depIdxs = []int32{ 29, // 28: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.convex_curve_v1_calls:type_name -> steward.v3.ConvexCurveAdaptorV1Calls 30, // 29: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.curve_v1_calls:type_name -> steward.v3.CurveAdaptorV1Calls 31, // 30: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.aura_erc4626_v1_calls:type_name -> steward.v3.AuraERC4626AdaptorV1Calls - 31, // [31:31] is the sub-list for method output_type - 31, // [31:31] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 32, // 31: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.morpho_blue_collateral_v1_calls:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1Calls + 33, // 32: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.morpho_blue_debt_v1_calls:type_name -> steward.v3.MorphoBlueDebtAdaptorV1Calls + 34, // 33: steward.v3.BalancerPoolAdaptorV1FlashLoan.AdaptorCallForBalancerPoolFlashLoan.morpho_blue_supply_v1_calls:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1Calls + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_adaptors_balancer_balancer_pool_flash_loan_proto_init() } @@ -1080,6 +1163,9 @@ func file_adaptors_balancer_balancer_pool_flash_loan_proto_init() { file_adaptors_morpho_morpho_aave_v3_a_token_collateral_proto_init() file_adaptors_morpho_morpho_aave_v3_a_token_p2p_proto_init() file_adaptors_morpho_morpho_aave_v3_debt_token_proto_init() + file_adaptors_morpho_morpho_blue_collateral_proto_init() + file_adaptors_morpho_morpho_blue_debt_proto_init() + file_adaptors_morpho_morpho_blue_supply_proto_init() file_adaptors_uniswap_uniswap_v3_proto_init() file_adaptors_uniswap_swap_with_uniswap_proto_init() file_adaptors_fees_and_reserves_proto_init() @@ -1170,6 +1256,9 @@ func file_adaptors_balancer_balancer_pool_flash_loan_proto_init() { (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_ConvexCurveV1Calls)(nil), (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_CurveV1Calls)(nil), (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_AuraErc4626V1Calls)(nil), + (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueCollateralV1Calls)(nil), + (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueDebtV1Calls)(nil), + (*BalancerPoolAdaptorV1FlashLoan_AdaptorCallForBalancerPoolFlashLoan_MorphoBlueSupplyV1Calls)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/steward_proto_go/steward_proto/cellar_v2.pb.go b/steward_proto_go/steward_proto/cellar_v2.pb.go index 6365d328..87d13781 100644 --- a/steward_proto_go/steward_proto/cellar_v2.pb.go +++ b/steward_proto_go/steward_proto/cellar_v2.pb.go @@ -467,6 +467,9 @@ type AdaptorCall struct { // *AdaptorCall_ConvexCurveV1Calls // *AdaptorCall_CurveV1Calls // *AdaptorCall_AuraErc4626V1Calls + // *AdaptorCall_MorphoBlueCollateralV1Calls + // *AdaptorCall_MorphoBlueDebtV1Calls + // *AdaptorCall_MorphoBlueSupplyV1Calls CallData isAdaptorCall_CallData `protobuf_oneof:"call_data"` } @@ -733,6 +736,27 @@ func (x *AdaptorCall) GetAuraErc4626V1Calls() *AuraERC4626AdaptorV1Calls { return nil } +func (x *AdaptorCall) GetMorphoBlueCollateralV1Calls() *MorphoBlueCollateralAdaptorV1Calls { + if x, ok := x.GetCallData().(*AdaptorCall_MorphoBlueCollateralV1Calls); ok { + return x.MorphoBlueCollateralV1Calls + } + return nil +} + +func (x *AdaptorCall) GetMorphoBlueDebtV1Calls() *MorphoBlueDebtAdaptorV1Calls { + if x, ok := x.GetCallData().(*AdaptorCall_MorphoBlueDebtV1Calls); ok { + return x.MorphoBlueDebtV1Calls + } + return nil +} + +func (x *AdaptorCall) GetMorphoBlueSupplyV1Calls() *MorphoBlueSupplyAdaptorV1Calls { + if x, ok := x.GetCallData().(*AdaptorCall_MorphoBlueSupplyV1Calls); ok { + return x.MorphoBlueSupplyV1Calls + } + return nil +} + type isAdaptorCall_CallData interface { isAdaptorCall_CallData() } @@ -892,6 +916,21 @@ type AdaptorCall_AuraErc4626V1Calls struct { AuraErc4626V1Calls *AuraERC4626AdaptorV1Calls `protobuf:"bytes,32,opt,name=aura_erc4626_v1_calls,json=auraErc4626V1Calls,proto3,oneof"` } +type AdaptorCall_MorphoBlueCollateralV1Calls struct { + // Represents function calls for the MorphoBlueCollateralAdaptorV1 + MorphoBlueCollateralV1Calls *MorphoBlueCollateralAdaptorV1Calls `protobuf:"bytes,33,opt,name=morpho_blue_collateral_v1_calls,json=morphoBlueCollateralV1Calls,proto3,oneof"` +} + +type AdaptorCall_MorphoBlueDebtV1Calls struct { + // Represents function calls for the MorphoBlueDebtAdaptorV1 + MorphoBlueDebtV1Calls *MorphoBlueDebtAdaptorV1Calls `protobuf:"bytes,34,opt,name=morpho_blue_debt_v1_calls,json=morphoBlueDebtV1Calls,proto3,oneof"` +} + +type AdaptorCall_MorphoBlueSupplyV1Calls struct { + // Represents function calls for the MorphoBlueSupplyAdaptorV1 + MorphoBlueSupplyV1Calls *MorphoBlueSupplyAdaptorV1Calls `protobuf:"bytes,35,opt,name=morpho_blue_supply_v1_calls,json=morphoBlueSupplyV1Calls,proto3,oneof"` +} + func (*AdaptorCall_UniswapV3V1Calls) isAdaptorCall_CallData() {} func (*AdaptorCall_AaveATokenV1Calls) isAdaptorCall_CallData() {} @@ -954,6 +993,12 @@ func (*AdaptorCall_CurveV1Calls) isAdaptorCall_CallData() {} func (*AdaptorCall_AuraErc4626V1Calls) isAdaptorCall_CallData() {} +func (*AdaptorCall_MorphoBlueCollateralV1Calls) isAdaptorCall_CallData() {} + +func (*AdaptorCall_MorphoBlueDebtV1Calls) isAdaptorCall_CallData() {} + +func (*AdaptorCall_MorphoBlueSupplyV1Calls) isAdaptorCall_CallData() {} + // // Insert a trusted position to the list of positions used by the cellar at a given index. // @@ -4533,7 +4578,15 @@ var file_cellar_v2_proto_rawDesc = []byte{ 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x32, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x61, 0x61, 0x76, 0x65, 0x5f, 0x76, 0x33, 0x5f, 0x64, 0x65, - 0x62, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x62, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, + 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, + 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x61, 0x64, + 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, + 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, + 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x76, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x75, 0x6e, 0x69, 0x73, @@ -5110,7 +5163,7 @@ var file_cellar_v2_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x92, 0x19, + 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xdc, 0x1b, 0x0a, 0x0b, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x54, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x73, 0x77, @@ -5311,9 +5364,30 @@ var file_cellar_v2_proto_rawDesc = []byte{ 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x75, 0x72, 0x61, 0x45, 0x52, 0x43, 0x34, 0x36, 0x32, 0x36, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x12, 0x61, 0x75, 0x72, 0x61, 0x45, 0x72, 0x63, 0x34, 0x36, 0x32, 0x36, 0x56, 0x31, - 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x76, 0x0a, 0x1f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, + 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, + 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, + 0x52, 0x1b, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x64, 0x0a, + 0x19, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x62, + 0x74, 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, + 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x15, 0x6d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x56, 0x31, 0x43, 0x61, + 0x6c, 0x6c, 0x73, 0x12, 0x6a, 0x0a, 0x1b, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, + 0x75, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x76, 0x31, 0x5f, 0x63, 0x61, 0x6c, + 0x6c, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, + 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, + 0x61, 0x6c, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x17, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, + 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x42, + 0x0b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x42, 0x10, 0x5a, 0x0e, + 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5419,6 +5493,9 @@ var file_cellar_v2_proto_goTypes = []interface{}{ (*ConvexCurveAdaptorV1Calls)(nil), // 86: steward.v3.ConvexCurveAdaptorV1Calls (*CurveAdaptorV1Calls)(nil), // 87: steward.v3.CurveAdaptorV1Calls (*AuraERC4626AdaptorV1Calls)(nil), // 88: steward.v3.AuraERC4626AdaptorV1Calls + (*MorphoBlueCollateralAdaptorV1Calls)(nil), // 89: steward.v3.MorphoBlueCollateralAdaptorV1Calls + (*MorphoBlueDebtAdaptorV1Calls)(nil), // 90: steward.v3.MorphoBlueDebtAdaptorV1Calls + (*MorphoBlueSupplyAdaptorV1Calls)(nil), // 91: steward.v3.MorphoBlueSupplyAdaptorV1Calls } var file_cellar_v2_proto_depIdxs = []int32{ 4, // 0: steward.v3.CellarV2.add_position:type_name -> steward.v3.CellarV2.AddPosition @@ -5468,54 +5545,57 @@ var file_cellar_v2_proto_depIdxs = []int32{ 86, // 44: steward.v3.AdaptorCall.convex_curve_v1_calls:type_name -> steward.v3.ConvexCurveAdaptorV1Calls 87, // 45: steward.v3.AdaptorCall.curve_v1_calls:type_name -> steward.v3.CurveAdaptorV1Calls 88, // 46: steward.v3.AdaptorCall.aura_erc4626_v1_calls:type_name -> steward.v3.AuraERC4626AdaptorV1Calls - 3, // 47: steward.v3.CellarV2.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall - 17, // 48: steward.v3.CellarV2_2.FunctionCall.add_position:type_name -> steward.v3.CellarV2_2.AddPosition - 18, // 49: steward.v3.CellarV2_2.FunctionCall.call_on_adaptor:type_name -> steward.v3.CellarV2_2.CallOnAdaptor - 19, // 50: steward.v3.CellarV2_2.FunctionCall.remove_position:type_name -> steward.v3.CellarV2_2.RemovePosition - 20, // 51: steward.v3.CellarV2_2.FunctionCall.set_holding_position:type_name -> steward.v3.CellarV2_2.SetHoldingPosition - 21, // 52: steward.v3.CellarV2_2.FunctionCall.set_strategist_payout_address:type_name -> steward.v3.CellarV2_2.SetStrategistPayoutAddress - 22, // 53: steward.v3.CellarV2_2.FunctionCall.swap_positions:type_name -> steward.v3.CellarV2_2.SwapPositions - 24, // 54: steward.v3.CellarV2_2.FunctionCall.set_rebalance_deviation:type_name -> steward.v3.CellarV2_2.SetRebalanceDeviation - 23, // 55: steward.v3.CellarV2_2.FunctionCall.set_share_lock_period:type_name -> steward.v3.CellarV2_2.SetShareLockPeriod - 25, // 56: steward.v3.CellarV2_2.FunctionCall.initiate_shutdown:type_name -> steward.v3.CellarV2_2.InitiateShutdown - 26, // 57: steward.v3.CellarV2_2.FunctionCall.set_strategist_platform_cut:type_name -> steward.v3.CellarV2_2.SetStrategistPlatformCut - 27, // 58: steward.v3.CellarV2_2.FunctionCall.lift_shutdown:type_name -> steward.v3.CellarV2_2.LiftShutdown - 28, // 59: steward.v3.CellarV2_2.FunctionCall.add_adaptor_to_catalogue:type_name -> steward.v3.CellarV2_2.AddAdaptorToCatalogue - 30, // 60: steward.v3.CellarV2_2.FunctionCall.add_position_to_catalogue:type_name -> steward.v3.CellarV2_2.AddPositionToCatalogue - 31, // 61: steward.v3.CellarV2_2.FunctionCall.remove_adaptor_from_catalogue:type_name -> steward.v3.CellarV2_2.RemoveAdaptorFromCatalogue - 32, // 62: steward.v3.CellarV2_2.FunctionCall.remove_position_from_catalogue:type_name -> steward.v3.CellarV2_2.RemovePositionFromCatalogue - 33, // 63: steward.v3.CellarV2_2.FunctionCall.cache_price_router:type_name -> steward.v3.CellarV2_2.CachePriceRouter - 3, // 64: steward.v3.CellarV2_2.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall - 16, // 65: steward.v3.CellarV2_2.Multicall.function_calls:type_name -> steward.v3.CellarV2_2.FunctionCall - 35, // 66: steward.v3.CellarV2_5.FunctionCall.add_position:type_name -> steward.v3.CellarV2_5.AddPosition - 36, // 67: steward.v3.CellarV2_5.FunctionCall.call_on_adaptor:type_name -> steward.v3.CellarV2_5.CallOnAdaptor - 37, // 68: steward.v3.CellarV2_5.FunctionCall.remove_position:type_name -> steward.v3.CellarV2_5.RemovePosition - 38, // 69: steward.v3.CellarV2_5.FunctionCall.set_holding_position:type_name -> steward.v3.CellarV2_5.SetHoldingPosition - 39, // 70: steward.v3.CellarV2_5.FunctionCall.set_strategist_payout_address:type_name -> steward.v3.CellarV2_5.SetStrategistPayoutAddress - 40, // 71: steward.v3.CellarV2_5.FunctionCall.swap_positions:type_name -> steward.v3.CellarV2_5.SwapPositions - 42, // 72: steward.v3.CellarV2_5.FunctionCall.set_rebalance_deviation:type_name -> steward.v3.CellarV2_5.SetRebalanceDeviation - 41, // 73: steward.v3.CellarV2_5.FunctionCall.set_share_lock_period:type_name -> steward.v3.CellarV2_5.SetShareLockPeriod - 43, // 74: steward.v3.CellarV2_5.FunctionCall.initiate_shutdown:type_name -> steward.v3.CellarV2_5.InitiateShutdown - 44, // 75: steward.v3.CellarV2_5.FunctionCall.set_strategist_platform_cut:type_name -> steward.v3.CellarV2_5.SetStrategistPlatformCut - 45, // 76: steward.v3.CellarV2_5.FunctionCall.lift_shutdown:type_name -> steward.v3.CellarV2_5.LiftShutdown - 46, // 77: steward.v3.CellarV2_5.FunctionCall.add_adaptor_to_catalogue:type_name -> steward.v3.CellarV2_5.AddAdaptorToCatalogue - 48, // 78: steward.v3.CellarV2_5.FunctionCall.add_position_to_catalogue:type_name -> steward.v3.CellarV2_5.AddPositionToCatalogue - 49, // 79: steward.v3.CellarV2_5.FunctionCall.remove_adaptor_from_catalogue:type_name -> steward.v3.CellarV2_5.RemoveAdaptorFromCatalogue - 50, // 80: steward.v3.CellarV2_5.FunctionCall.remove_position_from_catalogue:type_name -> steward.v3.CellarV2_5.RemovePositionFromCatalogue - 51, // 81: steward.v3.CellarV2_5.FunctionCall.increase_share_supply_cap:type_name -> steward.v3.CellarV2_5.IncreaseShareSupplyCap - 52, // 82: steward.v3.CellarV2_5.FunctionCall.decrease_share_supply_cap:type_name -> steward.v3.CellarV2_5.DecreaseShareSupplyCap - 53, // 83: steward.v3.CellarV2_5.FunctionCall.set_share_price_oracle:type_name -> steward.v3.CellarV2_5.SetSharePriceOracle - 54, // 84: steward.v3.CellarV2_5.FunctionCall.cache_price_router:type_name -> steward.v3.CellarV2_5.CachePriceRouter - 55, // 85: steward.v3.CellarV2_5.FunctionCall.force_position_out:type_name -> steward.v3.CellarV2_5.ForcePositionOut - 56, // 86: steward.v3.CellarV2_5.FunctionCall.set_alternative_asset_data:type_name -> steward.v3.CellarV2_5.SetAlternativeAssetData - 57, // 87: steward.v3.CellarV2_5.FunctionCall.drop_alternative_asset_data:type_name -> steward.v3.CellarV2_5.DropAlternativeAssetData - 3, // 88: steward.v3.CellarV2_5.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall - 34, // 89: steward.v3.CellarV2_5.Multicall.function_calls:type_name -> steward.v3.CellarV2_5.FunctionCall - 90, // [90:90] is the sub-list for method output_type - 90, // [90:90] is the sub-list for method input_type - 90, // [90:90] is the sub-list for extension type_name - 90, // [90:90] is the sub-list for extension extendee - 0, // [0:90] is the sub-list for field type_name + 89, // 47: steward.v3.AdaptorCall.morpho_blue_collateral_v1_calls:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1Calls + 90, // 48: steward.v3.AdaptorCall.morpho_blue_debt_v1_calls:type_name -> steward.v3.MorphoBlueDebtAdaptorV1Calls + 91, // 49: steward.v3.AdaptorCall.morpho_blue_supply_v1_calls:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1Calls + 3, // 50: steward.v3.CellarV2.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall + 17, // 51: steward.v3.CellarV2_2.FunctionCall.add_position:type_name -> steward.v3.CellarV2_2.AddPosition + 18, // 52: steward.v3.CellarV2_2.FunctionCall.call_on_adaptor:type_name -> steward.v3.CellarV2_2.CallOnAdaptor + 19, // 53: steward.v3.CellarV2_2.FunctionCall.remove_position:type_name -> steward.v3.CellarV2_2.RemovePosition + 20, // 54: steward.v3.CellarV2_2.FunctionCall.set_holding_position:type_name -> steward.v3.CellarV2_2.SetHoldingPosition + 21, // 55: steward.v3.CellarV2_2.FunctionCall.set_strategist_payout_address:type_name -> steward.v3.CellarV2_2.SetStrategistPayoutAddress + 22, // 56: steward.v3.CellarV2_2.FunctionCall.swap_positions:type_name -> steward.v3.CellarV2_2.SwapPositions + 24, // 57: steward.v3.CellarV2_2.FunctionCall.set_rebalance_deviation:type_name -> steward.v3.CellarV2_2.SetRebalanceDeviation + 23, // 58: steward.v3.CellarV2_2.FunctionCall.set_share_lock_period:type_name -> steward.v3.CellarV2_2.SetShareLockPeriod + 25, // 59: steward.v3.CellarV2_2.FunctionCall.initiate_shutdown:type_name -> steward.v3.CellarV2_2.InitiateShutdown + 26, // 60: steward.v3.CellarV2_2.FunctionCall.set_strategist_platform_cut:type_name -> steward.v3.CellarV2_2.SetStrategistPlatformCut + 27, // 61: steward.v3.CellarV2_2.FunctionCall.lift_shutdown:type_name -> steward.v3.CellarV2_2.LiftShutdown + 28, // 62: steward.v3.CellarV2_2.FunctionCall.add_adaptor_to_catalogue:type_name -> steward.v3.CellarV2_2.AddAdaptorToCatalogue + 30, // 63: steward.v3.CellarV2_2.FunctionCall.add_position_to_catalogue:type_name -> steward.v3.CellarV2_2.AddPositionToCatalogue + 31, // 64: steward.v3.CellarV2_2.FunctionCall.remove_adaptor_from_catalogue:type_name -> steward.v3.CellarV2_2.RemoveAdaptorFromCatalogue + 32, // 65: steward.v3.CellarV2_2.FunctionCall.remove_position_from_catalogue:type_name -> steward.v3.CellarV2_2.RemovePositionFromCatalogue + 33, // 66: steward.v3.CellarV2_2.FunctionCall.cache_price_router:type_name -> steward.v3.CellarV2_2.CachePriceRouter + 3, // 67: steward.v3.CellarV2_2.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall + 16, // 68: steward.v3.CellarV2_2.Multicall.function_calls:type_name -> steward.v3.CellarV2_2.FunctionCall + 35, // 69: steward.v3.CellarV2_5.FunctionCall.add_position:type_name -> steward.v3.CellarV2_5.AddPosition + 36, // 70: steward.v3.CellarV2_5.FunctionCall.call_on_adaptor:type_name -> steward.v3.CellarV2_5.CallOnAdaptor + 37, // 71: steward.v3.CellarV2_5.FunctionCall.remove_position:type_name -> steward.v3.CellarV2_5.RemovePosition + 38, // 72: steward.v3.CellarV2_5.FunctionCall.set_holding_position:type_name -> steward.v3.CellarV2_5.SetHoldingPosition + 39, // 73: steward.v3.CellarV2_5.FunctionCall.set_strategist_payout_address:type_name -> steward.v3.CellarV2_5.SetStrategistPayoutAddress + 40, // 74: steward.v3.CellarV2_5.FunctionCall.swap_positions:type_name -> steward.v3.CellarV2_5.SwapPositions + 42, // 75: steward.v3.CellarV2_5.FunctionCall.set_rebalance_deviation:type_name -> steward.v3.CellarV2_5.SetRebalanceDeviation + 41, // 76: steward.v3.CellarV2_5.FunctionCall.set_share_lock_period:type_name -> steward.v3.CellarV2_5.SetShareLockPeriod + 43, // 77: steward.v3.CellarV2_5.FunctionCall.initiate_shutdown:type_name -> steward.v3.CellarV2_5.InitiateShutdown + 44, // 78: steward.v3.CellarV2_5.FunctionCall.set_strategist_platform_cut:type_name -> steward.v3.CellarV2_5.SetStrategistPlatformCut + 45, // 79: steward.v3.CellarV2_5.FunctionCall.lift_shutdown:type_name -> steward.v3.CellarV2_5.LiftShutdown + 46, // 80: steward.v3.CellarV2_5.FunctionCall.add_adaptor_to_catalogue:type_name -> steward.v3.CellarV2_5.AddAdaptorToCatalogue + 48, // 81: steward.v3.CellarV2_5.FunctionCall.add_position_to_catalogue:type_name -> steward.v3.CellarV2_5.AddPositionToCatalogue + 49, // 82: steward.v3.CellarV2_5.FunctionCall.remove_adaptor_from_catalogue:type_name -> steward.v3.CellarV2_5.RemoveAdaptorFromCatalogue + 50, // 83: steward.v3.CellarV2_5.FunctionCall.remove_position_from_catalogue:type_name -> steward.v3.CellarV2_5.RemovePositionFromCatalogue + 51, // 84: steward.v3.CellarV2_5.FunctionCall.increase_share_supply_cap:type_name -> steward.v3.CellarV2_5.IncreaseShareSupplyCap + 52, // 85: steward.v3.CellarV2_5.FunctionCall.decrease_share_supply_cap:type_name -> steward.v3.CellarV2_5.DecreaseShareSupplyCap + 53, // 86: steward.v3.CellarV2_5.FunctionCall.set_share_price_oracle:type_name -> steward.v3.CellarV2_5.SetSharePriceOracle + 54, // 87: steward.v3.CellarV2_5.FunctionCall.cache_price_router:type_name -> steward.v3.CellarV2_5.CachePriceRouter + 55, // 88: steward.v3.CellarV2_5.FunctionCall.force_position_out:type_name -> steward.v3.CellarV2_5.ForcePositionOut + 56, // 89: steward.v3.CellarV2_5.FunctionCall.set_alternative_asset_data:type_name -> steward.v3.CellarV2_5.SetAlternativeAssetData + 57, // 90: steward.v3.CellarV2_5.FunctionCall.drop_alternative_asset_data:type_name -> steward.v3.CellarV2_5.DropAlternativeAssetData + 3, // 91: steward.v3.CellarV2_5.CallOnAdaptor.data:type_name -> steward.v3.AdaptorCall + 34, // 92: steward.v3.CellarV2_5.Multicall.function_calls:type_name -> steward.v3.CellarV2_5.FunctionCall + 93, // [93:93] is the sub-list for method output_type + 93, // [93:93] is the sub-list for method input_type + 93, // [93:93] is the sub-list for extension type_name + 93, // [93:93] is the sub-list for extension extendee + 0, // [0:93] is the sub-list for field type_name } func init() { file_cellar_v2_proto_init() } @@ -5540,6 +5620,9 @@ func file_cellar_v2_proto_init() { file_adaptors_morpho_morpho_aave_v3_a_token_collateral_proto_init() file_adaptors_morpho_morpho_aave_v3_a_token_p2p_proto_init() file_adaptors_morpho_morpho_aave_v3_debt_token_proto_init() + file_adaptors_morpho_morpho_blue_collateral_proto_init() + file_adaptors_morpho_morpho_blue_debt_proto_init() + file_adaptors_morpho_morpho_blue_supply_proto_init() file_adaptors_uniswap_uniswap_v3_proto_init() file_adaptors_uniswap_swap_with_uniswap_proto_init() file_adaptors_fees_and_reserves_proto_init() @@ -6303,6 +6386,9 @@ func file_cellar_v2_proto_init() { (*AdaptorCall_ConvexCurveV1Calls)(nil), (*AdaptorCall_CurveV1Calls)(nil), (*AdaptorCall_AuraErc4626V1Calls)(nil), + (*AdaptorCall_MorphoBlueCollateralV1Calls)(nil), + (*AdaptorCall_MorphoBlueDebtV1Calls)(nil), + (*AdaptorCall_MorphoBlueSupplyV1Calls)(nil), } file_cellar_v2_proto_msgTypes[16].OneofWrappers = []interface{}{ (*CellarV2_2_FunctionCall_AddPosition)(nil), diff --git a/steward_proto_go/steward_proto/common.pb.go b/steward_proto_go/steward_proto/common.pb.go index 617f2e76..e609868f 100644 --- a/steward_proto_go/steward_proto/common.pb.go +++ b/steward_proto_go/steward_proto/common.pb.go @@ -496,6 +496,92 @@ func (*OracleSwapParams_Univ2Params) isOracleSwapParams_Params() {} func (*OracleSwapParams_Univ3Params) isOracleSwapParams_Params() {} +// +// Represents parameters for a Morpho Blue market +type MarketParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the loan token + LoanToken string `protobuf:"bytes,1,opt,name=loan_token,json=loanToken,proto3" json:"loan_token,omitempty"` + // The address of the collateral token + CollateralToken string `protobuf:"bytes,2,opt,name=collateral_token,json=collateralToken,proto3" json:"collateral_token,omitempty"` + // The address of the oracle + Oracle string `protobuf:"bytes,3,opt,name=oracle,proto3" json:"oracle,omitempty"` + // The address of the interest rate model + Irm string `protobuf:"bytes,4,opt,name=irm,proto3" json:"irm,omitempty"` + // The loan-to-value ratio + Lltv string `protobuf:"bytes,5,opt,name=lltv,proto3" json:"lltv,omitempty"` +} + +func (x *MarketParams) Reset() { + *x = MarketParams{} + if protoimpl.UnsafeEnabled { + mi := &file_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MarketParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MarketParams) ProtoMessage() {} + +func (x *MarketParams) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MarketParams.ProtoReflect.Descriptor instead. +func (*MarketParams) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{6} +} + +func (x *MarketParams) GetLoanToken() string { + if x != nil { + return x.LoanToken + } + return "" +} + +func (x *MarketParams) GetCollateralToken() string { + if x != nil { + return x.CollateralToken + } + return "" +} + +func (x *MarketParams) GetOracle() string { + if x != nil { + return x.Oracle + } + return "" +} + +func (x *MarketParams) GetIrm() string { + if x != nil { + return x.Irm + } + return "" +} + +func (x *MarketParams) GetLltv() string { + if x != nil { + return x.Lltv + } + return "" +} + var File_common_proto protoreflect.FileDescriptor var file_common_proto_rawDesc = []byte{ @@ -543,13 +629,23 @@ var file_common_proto_rawDesc = []byte{ 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x69, 0x56, 0x33, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x53, 0x77, 0x61, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x76, 0x33, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2a, 0x4c, 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, - 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x56, 0x32, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x56, - 0x33, 0x10, 0x02, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x61, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x6d, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6c, + 0x74, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6c, 0x74, 0x76, 0x2a, 0x4c, + 0x0a, 0x08, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x58, + 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, + 0x5f, 0x55, 0x4e, 0x49, 0x56, 0x32, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x58, 0x43, 0x48, + 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x56, 0x33, 0x10, 0x02, 0x42, 0x10, 0x5a, 0x0e, + 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -565,7 +661,7 @@ func file_common_proto_rawDescGZIP() []byte { } var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_common_proto_goTypes = []interface{}{ (Exchange)(0), // 0: steward.v3.Exchange (*UniV2SwapParams)(nil), // 1: steward.v3.UniV2SwapParams @@ -574,6 +670,7 @@ var file_common_proto_goTypes = []interface{}{ (*UniV2OracleSwapParams)(nil), // 4: steward.v3.UniV2OracleSwapParams (*UniV3OracleSwapParams)(nil), // 5: steward.v3.UniV3OracleSwapParams (*OracleSwapParams)(nil), // 6: steward.v3.OracleSwapParams + (*MarketParams)(nil), // 7: steward.v3.MarketParams } var file_common_proto_depIdxs = []int32{ 1, // 0: steward.v3.SwapParams.univ2_params:type_name -> steward.v3.UniV2SwapParams @@ -665,6 +762,18 @@ func file_common_proto_init() { return nil } } + file_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarketParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_common_proto_msgTypes[2].OneofWrappers = []interface{}{ (*SwapParams_Univ2Params)(nil), @@ -680,7 +789,7 @@ func file_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/steward_proto_go/steward_proto/morpho_blue_collateral.pb.go b/steward_proto_go/steward_proto/morpho_blue_collateral.pb.go new file mode 100644 index 00000000..da460c98 --- /dev/null +++ b/steward_proto_go/steward_proto/morpho_blue_collateral.pb.go @@ -0,0 +1,462 @@ +// +// Protos for function calls to the Morpho Blue Collateral adaptor. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v4.25.1 +// source: adaptors/morpho/morpho_blue_collateral.proto + +package steward_proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents call data for the Morpho Blue Collateral adaptor. +type MorphoBlueCollateralAdaptorV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Function: + // *MorphoBlueCollateralAdaptorV1_RevokeApproval + // *MorphoBlueCollateralAdaptorV1_AddCollateral_ + // *MorphoBlueCollateralAdaptorV1_RemoveCollateral_ + Function isMorphoBlueCollateralAdaptorV1_Function `protobuf_oneof:"function"` +} + +func (x *MorphoBlueCollateralAdaptorV1) Reset() { + *x = MorphoBlueCollateralAdaptorV1{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueCollateralAdaptorV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueCollateralAdaptorV1) ProtoMessage() {} + +func (x *MorphoBlueCollateralAdaptorV1) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueCollateralAdaptorV1.ProtoReflect.Descriptor instead. +func (*MorphoBlueCollateralAdaptorV1) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_collateral_proto_rawDescGZIP(), []int{0} +} + +func (m *MorphoBlueCollateralAdaptorV1) GetFunction() isMorphoBlueCollateralAdaptorV1_Function { + if m != nil { + return m.Function + } + return nil +} + +func (x *MorphoBlueCollateralAdaptorV1) GetRevokeApproval() *RevokeApproval { + if x, ok := x.GetFunction().(*MorphoBlueCollateralAdaptorV1_RevokeApproval); ok { + return x.RevokeApproval + } + return nil +} + +func (x *MorphoBlueCollateralAdaptorV1) GetAddCollateral() *MorphoBlueCollateralAdaptorV1_AddCollateral { + if x, ok := x.GetFunction().(*MorphoBlueCollateralAdaptorV1_AddCollateral_); ok { + return x.AddCollateral + } + return nil +} + +func (x *MorphoBlueCollateralAdaptorV1) GetRemoveCollateral() *MorphoBlueCollateralAdaptorV1_RemoveCollateral { + if x, ok := x.GetFunction().(*MorphoBlueCollateralAdaptorV1_RemoveCollateral_); ok { + return x.RemoveCollateral + } + return nil +} + +type isMorphoBlueCollateralAdaptorV1_Function interface { + isMorphoBlueCollateralAdaptorV1_Function() +} + +type MorphoBlueCollateralAdaptorV1_RevokeApproval struct { + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval *RevokeApproval `protobuf:"bytes,1,opt,name=revoke_approval,json=revokeApproval,proto3,oneof"` +} + +type MorphoBlueCollateralAdaptorV1_AddCollateral_ struct { + // Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` + AddCollateral *MorphoBlueCollateralAdaptorV1_AddCollateral `protobuf:"bytes,2,opt,name=add_collateral,json=addCollateral,proto3,oneof"` +} + +type MorphoBlueCollateralAdaptorV1_RemoveCollateral_ struct { + // Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` + RemoveCollateral *MorphoBlueCollateralAdaptorV1_RemoveCollateral `protobuf:"bytes,3,opt,name=remove_collateral,json=removeCollateral,proto3,oneof"` +} + +func (*MorphoBlueCollateralAdaptorV1_RevokeApproval) isMorphoBlueCollateralAdaptorV1_Function() {} + +func (*MorphoBlueCollateralAdaptorV1_AddCollateral_) isMorphoBlueCollateralAdaptorV1_Function() {} + +func (*MorphoBlueCollateralAdaptorV1_RemoveCollateral_) isMorphoBlueCollateralAdaptorV1_Function() {} + +type MorphoBlueCollateralAdaptorV1Calls struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Calls []*MorphoBlueCollateralAdaptorV1 `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (x *MorphoBlueCollateralAdaptorV1Calls) Reset() { + *x = MorphoBlueCollateralAdaptorV1Calls{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueCollateralAdaptorV1Calls) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueCollateralAdaptorV1Calls) ProtoMessage() {} + +func (x *MorphoBlueCollateralAdaptorV1Calls) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueCollateralAdaptorV1Calls.ProtoReflect.Descriptor instead. +func (*MorphoBlueCollateralAdaptorV1Calls) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_collateral_proto_rawDescGZIP(), []int{1} +} + +func (x *MorphoBlueCollateralAdaptorV1Calls) GetCalls() []*MorphoBlueCollateralAdaptorV1 { + if x != nil { + return x.Calls + } + return nil +} + +// +// Allows strategists to add collateral to the respective cellar position on specified MB Market, enabling borrowing. +// +// Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` +type MorphoBlueCollateralAdaptorV1_AddCollateral struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of collateral to add + CollateralToDeposit string `protobuf:"bytes,2,opt,name=collateral_to_deposit,json=collateralToDeposit,proto3" json:"collateral_to_deposit,omitempty"` +} + +func (x *MorphoBlueCollateralAdaptorV1_AddCollateral) Reset() { + *x = MorphoBlueCollateralAdaptorV1_AddCollateral{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueCollateralAdaptorV1_AddCollateral) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueCollateralAdaptorV1_AddCollateral) ProtoMessage() {} + +func (x *MorphoBlueCollateralAdaptorV1_AddCollateral) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueCollateralAdaptorV1_AddCollateral.ProtoReflect.Descriptor instead. +func (*MorphoBlueCollateralAdaptorV1_AddCollateral) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_collateral_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *MorphoBlueCollateralAdaptorV1_AddCollateral) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueCollateralAdaptorV1_AddCollateral) GetCollateralToDeposit() string { + if x != nil { + return x.CollateralToDeposit + } + return "" +} + +// +// Allows strategists to remove collateral from the respective cellar position on specified MB Market. +// +// Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` +type MorphoBlueCollateralAdaptorV1_RemoveCollateral struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of collateral to remove + CollateralAmount string `protobuf:"bytes,2,opt,name=collateral_amount,json=collateralAmount,proto3" json:"collateral_amount,omitempty"` +} + +func (x *MorphoBlueCollateralAdaptorV1_RemoveCollateral) Reset() { + *x = MorphoBlueCollateralAdaptorV1_RemoveCollateral{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueCollateralAdaptorV1_RemoveCollateral) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueCollateralAdaptorV1_RemoveCollateral) ProtoMessage() {} + +func (x *MorphoBlueCollateralAdaptorV1_RemoveCollateral) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueCollateralAdaptorV1_RemoveCollateral.ProtoReflect.Descriptor instead. +func (*MorphoBlueCollateralAdaptorV1_RemoveCollateral) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_collateral_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *MorphoBlueCollateralAdaptorV1_RemoveCollateral) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueCollateralAdaptorV1_RemoveCollateral) GetCollateralAmount() string { + if x != nil { + return x.CollateralAmount + } + return "" +} + +var File_adaptors_morpho_morpho_blue_collateral_proto protoreflect.FileDescriptor + +var file_adaptors_morpho_morpho_blue_collateral_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x6f, + 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x13, 0x61, 0x64, 0x61, 0x70, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x04, + 0x0a, 0x1d, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x12, + 0x45, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x60, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, + 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x69, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, + 0x00, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x1a, 0x75, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, + 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x54, 0x6f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x71, 0x0a, 0x10, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x30, + 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6c, + 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0a, 0x0a, + 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, 0x22, 0x4d, 0x6f, 0x72, + 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, + 0x3f, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, + 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_adaptors_morpho_morpho_blue_collateral_proto_rawDescOnce sync.Once + file_adaptors_morpho_morpho_blue_collateral_proto_rawDescData = file_adaptors_morpho_morpho_blue_collateral_proto_rawDesc +) + +func file_adaptors_morpho_morpho_blue_collateral_proto_rawDescGZIP() []byte { + file_adaptors_morpho_morpho_blue_collateral_proto_rawDescOnce.Do(func() { + file_adaptors_morpho_morpho_blue_collateral_proto_rawDescData = protoimpl.X.CompressGZIP(file_adaptors_morpho_morpho_blue_collateral_proto_rawDescData) + }) + return file_adaptors_morpho_morpho_blue_collateral_proto_rawDescData +} + +var file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_adaptors_morpho_morpho_blue_collateral_proto_goTypes = []interface{}{ + (*MorphoBlueCollateralAdaptorV1)(nil), // 0: steward.v3.MorphoBlueCollateralAdaptorV1 + (*MorphoBlueCollateralAdaptorV1Calls)(nil), // 1: steward.v3.MorphoBlueCollateralAdaptorV1Calls + (*MorphoBlueCollateralAdaptorV1_AddCollateral)(nil), // 2: steward.v3.MorphoBlueCollateralAdaptorV1.AddCollateral + (*MorphoBlueCollateralAdaptorV1_RemoveCollateral)(nil), // 3: steward.v3.MorphoBlueCollateralAdaptorV1.RemoveCollateral + (*RevokeApproval)(nil), // 4: steward.v3.RevokeApproval + (*MarketParams)(nil), // 5: steward.v3.MarketParams +} +var file_adaptors_morpho_morpho_blue_collateral_proto_depIdxs = []int32{ + 4, // 0: steward.v3.MorphoBlueCollateralAdaptorV1.revoke_approval:type_name -> steward.v3.RevokeApproval + 2, // 1: steward.v3.MorphoBlueCollateralAdaptorV1.add_collateral:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1.AddCollateral + 3, // 2: steward.v3.MorphoBlueCollateralAdaptorV1.remove_collateral:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1.RemoveCollateral + 0, // 3: steward.v3.MorphoBlueCollateralAdaptorV1Calls.calls:type_name -> steward.v3.MorphoBlueCollateralAdaptorV1 + 5, // 4: steward.v3.MorphoBlueCollateralAdaptorV1.AddCollateral.market:type_name -> steward.v3.MarketParams + 5, // 5: steward.v3.MorphoBlueCollateralAdaptorV1.RemoveCollateral.market:type_name -> steward.v3.MarketParams + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_adaptors_morpho_morpho_blue_collateral_proto_init() } +func file_adaptors_morpho_morpho_blue_collateral_proto_init() { + if File_adaptors_morpho_morpho_blue_collateral_proto != nil { + return + } + file_adaptors_base_proto_init() + file_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueCollateralAdaptorV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueCollateralAdaptorV1Calls); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueCollateralAdaptorV1_AddCollateral); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueCollateralAdaptorV1_RemoveCollateral); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MorphoBlueCollateralAdaptorV1_RevokeApproval)(nil), + (*MorphoBlueCollateralAdaptorV1_AddCollateral_)(nil), + (*MorphoBlueCollateralAdaptorV1_RemoveCollateral_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_adaptors_morpho_morpho_blue_collateral_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_adaptors_morpho_morpho_blue_collateral_proto_goTypes, + DependencyIndexes: file_adaptors_morpho_morpho_blue_collateral_proto_depIdxs, + MessageInfos: file_adaptors_morpho_morpho_blue_collateral_proto_msgTypes, + }.Build() + File_adaptors_morpho_morpho_blue_collateral_proto = out.File + file_adaptors_morpho_morpho_blue_collateral_proto_rawDesc = nil + file_adaptors_morpho_morpho_blue_collateral_proto_goTypes = nil + file_adaptors_morpho_morpho_blue_collateral_proto_depIdxs = nil +} diff --git a/steward_proto_go/steward_proto/morpho_blue_debt.pb.go b/steward_proto_go/steward_proto/morpho_blue_debt.pb.go new file mode 100644 index 00000000..cc0471e1 --- /dev/null +++ b/steward_proto_go/steward_proto/morpho_blue_debt.pb.go @@ -0,0 +1,463 @@ +// +// Protos for function calls to the Morpho Blue Debt adaptor. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v4.25.1 +// source: adaptors/morpho/morpho_blue_debt.proto + +package steward_proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents call data for the Morpho Blue Debt adaptor. +type MorphoBlueDebtAdaptorV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Function: + // *MorphoBlueDebtAdaptorV1_RevokeApproval + // *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue_ + // *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt_ + Function isMorphoBlueDebtAdaptorV1_Function `protobuf_oneof:"function"` +} + +func (x *MorphoBlueDebtAdaptorV1) Reset() { + *x = MorphoBlueDebtAdaptorV1{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueDebtAdaptorV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueDebtAdaptorV1) ProtoMessage() {} + +func (x *MorphoBlueDebtAdaptorV1) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueDebtAdaptorV1.ProtoReflect.Descriptor instead. +func (*MorphoBlueDebtAdaptorV1) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_debt_proto_rawDescGZIP(), []int{0} +} + +func (m *MorphoBlueDebtAdaptorV1) GetFunction() isMorphoBlueDebtAdaptorV1_Function { + if m != nil { + return m.Function + } + return nil +} + +func (x *MorphoBlueDebtAdaptorV1) GetRevokeApproval() *RevokeApproval { + if x, ok := x.GetFunction().(*MorphoBlueDebtAdaptorV1_RevokeApproval); ok { + return x.RevokeApproval + } + return nil +} + +func (x *MorphoBlueDebtAdaptorV1) GetBorrowFromMorphoBlue() *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue { + if x, ok := x.GetFunction().(*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue_); ok { + return x.BorrowFromMorphoBlue + } + return nil +} + +func (x *MorphoBlueDebtAdaptorV1) GetRepayMorphoBlueDebt() *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt { + if x, ok := x.GetFunction().(*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt_); ok { + return x.RepayMorphoBlueDebt + } + return nil +} + +type isMorphoBlueDebtAdaptorV1_Function interface { + isMorphoBlueDebtAdaptorV1_Function() +} + +type MorphoBlueDebtAdaptorV1_RevokeApproval struct { + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval *RevokeApproval `protobuf:"bytes,1,opt,name=revoke_approval,json=revokeApproval,proto3,oneof"` +} + +type MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue_ struct { + // Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` + BorrowFromMorphoBlue *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue `protobuf:"bytes,2,opt,name=borrow_from_morpho_blue,json=borrowFromMorphoBlue,proto3,oneof"` +} + +type MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt_ struct { + // Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` + RepayMorphoBlueDebt *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt `protobuf:"bytes,3,opt,name=repay_morpho_blue_debt,json=repayMorphoBlueDebt,proto3,oneof"` +} + +func (*MorphoBlueDebtAdaptorV1_RevokeApproval) isMorphoBlueDebtAdaptorV1_Function() {} + +func (*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue_) isMorphoBlueDebtAdaptorV1_Function() {} + +func (*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt_) isMorphoBlueDebtAdaptorV1_Function() {} + +type MorphoBlueDebtAdaptorV1Calls struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Calls []*MorphoBlueDebtAdaptorV1 `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (x *MorphoBlueDebtAdaptorV1Calls) Reset() { + *x = MorphoBlueDebtAdaptorV1Calls{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueDebtAdaptorV1Calls) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueDebtAdaptorV1Calls) ProtoMessage() {} + +func (x *MorphoBlueDebtAdaptorV1Calls) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueDebtAdaptorV1Calls.ProtoReflect.Descriptor instead. +func (*MorphoBlueDebtAdaptorV1Calls) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_debt_proto_rawDescGZIP(), []int{1} +} + +func (x *MorphoBlueDebtAdaptorV1Calls) GetCalls() []*MorphoBlueDebtAdaptorV1 { + if x != nil { + return x.Calls + } + return nil +} + +// +// Allows strategists borrow a specific amount of an asset on Morpho Blue +// +// Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` +type MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of the debt token to borrow + AmountToBorrow string `protobuf:"bytes,2,opt,name=amount_to_borrow,json=amountToBorrow,proto3" json:"amount_to_borrow,omitempty"` +} + +func (x *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) Reset() { + *x = MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) ProtoMessage() {} + +func (x *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue.ProtoReflect.Descriptor instead. +func (*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_debt_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue) GetAmountToBorrow() string { + if x != nil { + return x.AmountToBorrow + } + return "" +} + +// +// Allows strategists to repay loan debt on Morph Blue Lending Market. Make sure to call addInterest() beforehand to ensure we are repaying what is required. +// +// Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` +type MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of the debt token to repay + DebtTokenRepayAmount string `protobuf:"bytes,2,opt,name=debt_token_repay_amount,json=debtTokenRepayAmount,proto3" json:"debt_token_repay_amount,omitempty"` +} + +func (x *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) Reset() { + *x = MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) ProtoMessage() {} + +func (x *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt.ProtoReflect.Descriptor instead. +func (*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_debt_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt) GetDebtTokenRepayAmount() string { + if x != nil { + return x.DebtTokenRepayAmount + } + return "" +} + +var File_adaptors_morpho_morpho_blue_debt_proto protoreflect.FileDescriptor + +var file_adaptors_morpho_morpho_blue_debt_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, + 0x62, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x13, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x04, 0x0a, 0x17, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, + 0x72, 0x56, 0x31, 0x12, 0x45, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, + 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x71, 0x0a, 0x17, 0x62, 0x6f, + 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, + 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x74, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, + 0x2e, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x14, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x46, + 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x12, 0x6e, 0x0a, + 0x16, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, + 0x75, 0x65, 0x5f, 0x64, 0x65, 0x62, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, + 0x56, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, + 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x70, 0x61, 0x79, 0x4d, + 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x1a, 0x72, 0x0a, + 0x14, 0x42, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x6f, 0x42, 0x6f, 0x72, 0x72, 0x6f, + 0x77, 0x1a, 0x7e, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x61, 0x79, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, + 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x17, 0x64, 0x65, + 0x62, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x62, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x61, 0x79, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x59, 0x0a, + 0x1c, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, + 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x39, 0x0a, + 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, + 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, + 0x42, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x62, 0x74, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, + 0x31, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_adaptors_morpho_morpho_blue_debt_proto_rawDescOnce sync.Once + file_adaptors_morpho_morpho_blue_debt_proto_rawDescData = file_adaptors_morpho_morpho_blue_debt_proto_rawDesc +) + +func file_adaptors_morpho_morpho_blue_debt_proto_rawDescGZIP() []byte { + file_adaptors_morpho_morpho_blue_debt_proto_rawDescOnce.Do(func() { + file_adaptors_morpho_morpho_blue_debt_proto_rawDescData = protoimpl.X.CompressGZIP(file_adaptors_morpho_morpho_blue_debt_proto_rawDescData) + }) + return file_adaptors_morpho_morpho_blue_debt_proto_rawDescData +} + +var file_adaptors_morpho_morpho_blue_debt_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_adaptors_morpho_morpho_blue_debt_proto_goTypes = []interface{}{ + (*MorphoBlueDebtAdaptorV1)(nil), // 0: steward.v3.MorphoBlueDebtAdaptorV1 + (*MorphoBlueDebtAdaptorV1Calls)(nil), // 1: steward.v3.MorphoBlueDebtAdaptorV1Calls + (*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue)(nil), // 2: steward.v3.MorphoBlueDebtAdaptorV1.BorrowFromMorphoBlue + (*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt)(nil), // 3: steward.v3.MorphoBlueDebtAdaptorV1.RepayMorphoBlueDebt + (*RevokeApproval)(nil), // 4: steward.v3.RevokeApproval + (*MarketParams)(nil), // 5: steward.v3.MarketParams +} +var file_adaptors_morpho_morpho_blue_debt_proto_depIdxs = []int32{ + 4, // 0: steward.v3.MorphoBlueDebtAdaptorV1.revoke_approval:type_name -> steward.v3.RevokeApproval + 2, // 1: steward.v3.MorphoBlueDebtAdaptorV1.borrow_from_morpho_blue:type_name -> steward.v3.MorphoBlueDebtAdaptorV1.BorrowFromMorphoBlue + 3, // 2: steward.v3.MorphoBlueDebtAdaptorV1.repay_morpho_blue_debt:type_name -> steward.v3.MorphoBlueDebtAdaptorV1.RepayMorphoBlueDebt + 0, // 3: steward.v3.MorphoBlueDebtAdaptorV1Calls.calls:type_name -> steward.v3.MorphoBlueDebtAdaptorV1 + 5, // 4: steward.v3.MorphoBlueDebtAdaptorV1.BorrowFromMorphoBlue.market:type_name -> steward.v3.MarketParams + 5, // 5: steward.v3.MorphoBlueDebtAdaptorV1.RepayMorphoBlueDebt.market:type_name -> steward.v3.MarketParams + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_adaptors_morpho_morpho_blue_debt_proto_init() } +func file_adaptors_morpho_morpho_blue_debt_proto_init() { + if File_adaptors_morpho_morpho_blue_debt_proto != nil { + return + } + file_adaptors_base_proto_init() + file_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueDebtAdaptorV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueDebtAdaptorV1Calls); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_adaptors_morpho_morpho_blue_debt_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MorphoBlueDebtAdaptorV1_RevokeApproval)(nil), + (*MorphoBlueDebtAdaptorV1_BorrowFromMorphoBlue_)(nil), + (*MorphoBlueDebtAdaptorV1_RepayMorphoBlueDebt_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_adaptors_morpho_morpho_blue_debt_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_adaptors_morpho_morpho_blue_debt_proto_goTypes, + DependencyIndexes: file_adaptors_morpho_morpho_blue_debt_proto_depIdxs, + MessageInfos: file_adaptors_morpho_morpho_blue_debt_proto_msgTypes, + }.Build() + File_adaptors_morpho_morpho_blue_debt_proto = out.File + file_adaptors_morpho_morpho_blue_debt_proto_rawDesc = nil + file_adaptors_morpho_morpho_blue_debt_proto_goTypes = nil + file_adaptors_morpho_morpho_blue_debt_proto_depIdxs = nil +} diff --git a/steward_proto_go/steward_proto/morpho_blue_supply.pb.go b/steward_proto_go/steward_proto/morpho_blue_supply.pb.go new file mode 100644 index 00000000..f50f4ea4 --- /dev/null +++ b/steward_proto_go/steward_proto/morpho_blue_supply.pb.go @@ -0,0 +1,460 @@ +// +// Protos for function calls to the Morpho Blue Supply adaptor. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v4.25.1 +// source: adaptors/morpho/morpho_blue_supply.proto + +package steward_proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents call data for the Morpho Blue Supply adaptor. +type MorphoBlueSupplyAdaptorV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Function: + // *MorphoBlueSupplyAdaptorV1_RevokeApproval + // *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue_ + // *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue_ + Function isMorphoBlueSupplyAdaptorV1_Function `protobuf_oneof:"function"` +} + +func (x *MorphoBlueSupplyAdaptorV1) Reset() { + *x = MorphoBlueSupplyAdaptorV1{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueSupplyAdaptorV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueSupplyAdaptorV1) ProtoMessage() {} + +func (x *MorphoBlueSupplyAdaptorV1) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueSupplyAdaptorV1.ProtoReflect.Descriptor instead. +func (*MorphoBlueSupplyAdaptorV1) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_supply_proto_rawDescGZIP(), []int{0} +} + +func (m *MorphoBlueSupplyAdaptorV1) GetFunction() isMorphoBlueSupplyAdaptorV1_Function { + if m != nil { + return m.Function + } + return nil +} + +func (x *MorphoBlueSupplyAdaptorV1) GetRevokeApproval() *RevokeApproval { + if x, ok := x.GetFunction().(*MorphoBlueSupplyAdaptorV1_RevokeApproval); ok { + return x.RevokeApproval + } + return nil +} + +func (x *MorphoBlueSupplyAdaptorV1) GetLendToMorphoBlue() *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue { + if x, ok := x.GetFunction().(*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue_); ok { + return x.LendToMorphoBlue + } + return nil +} + +func (x *MorphoBlueSupplyAdaptorV1) GetWithdrawFromMorphoBlue() *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue { + if x, ok := x.GetFunction().(*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue_); ok { + return x.WithdrawFromMorphoBlue + } + return nil +} + +type isMorphoBlueSupplyAdaptorV1_Function interface { + isMorphoBlueSupplyAdaptorV1_Function() +} + +type MorphoBlueSupplyAdaptorV1_RevokeApproval struct { + // Represents function `revokeApproval(ERC20 asset, address spender)` + RevokeApproval *RevokeApproval `protobuf:"bytes,1,opt,name=revoke_approval,json=revokeApproval,proto3,oneof"` +} + +type MorphoBlueSupplyAdaptorV1_LendToMorphoBlue_ struct { + // Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` + LendToMorphoBlue *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue `protobuf:"bytes,2,opt,name=lend_to_morpho_blue,json=lendToMorphoBlue,proto3,oneof"` +} + +type MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue_ struct { + // Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` + WithdrawFromMorphoBlue *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue `protobuf:"bytes,3,opt,name=withdraw_from_morpho_blue,json=withdrawFromMorphoBlue,proto3,oneof"` +} + +func (*MorphoBlueSupplyAdaptorV1_RevokeApproval) isMorphoBlueSupplyAdaptorV1_Function() {} + +func (*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue_) isMorphoBlueSupplyAdaptorV1_Function() {} + +func (*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue_) isMorphoBlueSupplyAdaptorV1_Function() {} + +type MorphoBlueSupplyAdaptorV1Calls struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Calls []*MorphoBlueSupplyAdaptorV1 `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (x *MorphoBlueSupplyAdaptorV1Calls) Reset() { + *x = MorphoBlueSupplyAdaptorV1Calls{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueSupplyAdaptorV1Calls) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueSupplyAdaptorV1Calls) ProtoMessage() {} + +func (x *MorphoBlueSupplyAdaptorV1Calls) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueSupplyAdaptorV1Calls.ProtoReflect.Descriptor instead. +func (*MorphoBlueSupplyAdaptorV1Calls) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_supply_proto_rawDescGZIP(), []int{1} +} + +func (x *MorphoBlueSupplyAdaptorV1Calls) GetCalls() []*MorphoBlueSupplyAdaptorV1 { + if x != nil { + return x.Calls + } + return nil +} + +// +// Allows strategists to lend a specific amount for an asset on Morpho Blue +// +// Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` +type MorphoBlueSupplyAdaptorV1_LendToMorphoBlue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of the loan token to lend + Assets string `protobuf:"bytes,2,opt,name=assets,proto3" json:"assets,omitempty"` +} + +func (x *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) Reset() { + *x = MorphoBlueSupplyAdaptorV1_LendToMorphoBlue{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) ProtoMessage() {} + +func (x *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueSupplyAdaptorV1_LendToMorphoBlue.ProtoReflect.Descriptor instead. +func (*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_supply_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueSupplyAdaptorV1_LendToMorphoBlue) GetAssets() string { + if x != nil { + return x.Assets + } + return "" +} + +// +// Allows strategists to withdraw the underlying asset plus interest +// +// Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` +type MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of a Morpho Blue Market + Market *MarketParams `protobuf:"bytes,1,opt,name=market,proto3" json:"market,omitempty"` + // The amount of the loan token to lend + Assets string `protobuf:"bytes,2,opt,name=assets,proto3" json:"assets,omitempty"` +} + +func (x *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) Reset() { + *x = MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue{} + if protoimpl.UnsafeEnabled { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) ProtoMessage() {} + +func (x *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) ProtoReflect() protoreflect.Message { + mi := &file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue.ProtoReflect.Descriptor instead. +func (*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) Descriptor() ([]byte, []int) { + return file_adaptors_morpho_morpho_blue_supply_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) GetMarket() *MarketParams { + if x != nil { + return x.Market + } + return nil +} + +func (x *MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue) GetAssets() string { + if x != nil { + return x.Assets + } + return "" +} + +var File_adaptors_morpho_morpho_blue_supply_proto protoreflect.FileDescriptor + +var file_adaptors_morpho_morpho_blue_supply_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, + 0x6f, 0x2f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x74, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x13, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x04, 0x0a, 0x19, 0x4d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x12, 0x45, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0e, + 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x67, + 0x0a, 0x13, 0x6c, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, + 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x73, 0x74, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, + 0x6c, 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, + 0x56, 0x31, 0x2e, 0x4c, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, + 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x4d, 0x6f, 0x72, + 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x12, 0x79, 0x0a, 0x19, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x5f, + 0x62, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x74, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, + 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, + 0x31, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, + 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x16, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, + 0x75, 0x65, 0x1a, 0x5c, 0x0a, 0x10, 0x4c, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x4d, 0x6f, 0x72, 0x70, + 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x1a, 0x62, 0x0a, 0x16, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x46, 0x72, 0x6f, 0x6d, + 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x61, + 0x72, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x5d, 0x0a, 0x1e, 0x4d, 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x79, 0x41, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x43, 0x61, 0x6c, + 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x6f, 0x72, 0x70, 0x68, 0x6f, 0x42, 0x6c, 0x75, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x41, + 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x31, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, + 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x74, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_adaptors_morpho_morpho_blue_supply_proto_rawDescOnce sync.Once + file_adaptors_morpho_morpho_blue_supply_proto_rawDescData = file_adaptors_morpho_morpho_blue_supply_proto_rawDesc +) + +func file_adaptors_morpho_morpho_blue_supply_proto_rawDescGZIP() []byte { + file_adaptors_morpho_morpho_blue_supply_proto_rawDescOnce.Do(func() { + file_adaptors_morpho_morpho_blue_supply_proto_rawDescData = protoimpl.X.CompressGZIP(file_adaptors_morpho_morpho_blue_supply_proto_rawDescData) + }) + return file_adaptors_morpho_morpho_blue_supply_proto_rawDescData +} + +var file_adaptors_morpho_morpho_blue_supply_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_adaptors_morpho_morpho_blue_supply_proto_goTypes = []interface{}{ + (*MorphoBlueSupplyAdaptorV1)(nil), // 0: steward.v3.MorphoBlueSupplyAdaptorV1 + (*MorphoBlueSupplyAdaptorV1Calls)(nil), // 1: steward.v3.MorphoBlueSupplyAdaptorV1Calls + (*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue)(nil), // 2: steward.v3.MorphoBlueSupplyAdaptorV1.LendToMorphoBlue + (*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue)(nil), // 3: steward.v3.MorphoBlueSupplyAdaptorV1.WithdrawFromMorphoBlue + (*RevokeApproval)(nil), // 4: steward.v3.RevokeApproval + (*MarketParams)(nil), // 5: steward.v3.MarketParams +} +var file_adaptors_morpho_morpho_blue_supply_proto_depIdxs = []int32{ + 4, // 0: steward.v3.MorphoBlueSupplyAdaptorV1.revoke_approval:type_name -> steward.v3.RevokeApproval + 2, // 1: steward.v3.MorphoBlueSupplyAdaptorV1.lend_to_morpho_blue:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1.LendToMorphoBlue + 3, // 2: steward.v3.MorphoBlueSupplyAdaptorV1.withdraw_from_morpho_blue:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1.WithdrawFromMorphoBlue + 0, // 3: steward.v3.MorphoBlueSupplyAdaptorV1Calls.calls:type_name -> steward.v3.MorphoBlueSupplyAdaptorV1 + 5, // 4: steward.v3.MorphoBlueSupplyAdaptorV1.LendToMorphoBlue.market:type_name -> steward.v3.MarketParams + 5, // 5: steward.v3.MorphoBlueSupplyAdaptorV1.WithdrawFromMorphoBlue.market:type_name -> steward.v3.MarketParams + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_adaptors_morpho_morpho_blue_supply_proto_init() } +func file_adaptors_morpho_morpho_blue_supply_proto_init() { + if File_adaptors_morpho_morpho_blue_supply_proto != nil { + return + } + file_adaptors_base_proto_init() + file_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueSupplyAdaptorV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueSupplyAdaptorV1Calls); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_adaptors_morpho_morpho_blue_supply_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MorphoBlueSupplyAdaptorV1_RevokeApproval)(nil), + (*MorphoBlueSupplyAdaptorV1_LendToMorphoBlue_)(nil), + (*MorphoBlueSupplyAdaptorV1_WithdrawFromMorphoBlue_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_adaptors_morpho_morpho_blue_supply_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_adaptors_morpho_morpho_blue_supply_proto_goTypes, + DependencyIndexes: file_adaptors_morpho_morpho_blue_supply_proto_depIdxs, + MessageInfos: file_adaptors_morpho_morpho_blue_supply_proto_msgTypes, + }.Build() + File_adaptors_morpho_morpho_blue_supply_proto = out.File + file_adaptors_morpho_morpho_blue_supply_proto_rawDesc = nil + file_adaptors_morpho_morpho_blue_supply_proto_goTypes = nil + file_adaptors_morpho_morpho_blue_supply_proto_depIdxs = nil +} diff --git a/steward_proto_rust/Cargo.toml b/steward_proto_rust/Cargo.toml index eb2902e6..6bf93cee 100644 --- a/steward_proto_rust/Cargo.toml +++ b/steward_proto_rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "steward_proto" -version = "3.7.0" +version = "3.8.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/steward_proto_rust/src/prost/descriptor.bin b/steward_proto_rust/src/prost/descriptor.bin index 4f2b3027a5277b1ad5f6fd93d1f0ce2c4425751b..2f5fa66aa393e2fd6895dd30d0c9a1446b5cd98e 100644 GIT binary patch delta 23703 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

mL`DKa(siHLhI# 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 delta 17056 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 H7v26F8N~u3 diff --git a/steward_proto_rust/src/prost/steward.v3.rs b/steward_proto_rust/src/prost/steward.v3.rs index 89cad5b5..d5029530 100644 --- a/steward_proto_rust/src/prost/steward.v3.rs +++ b/steward_proto_rust/src/prost/steward.v3.rs @@ -269,6 +269,26 @@ pub mod oracle_swap_params { } } /// +/// Represents parameters for a Morpho Blue market +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MarketParams { + /// The address of the loan token + #[prost(string, tag = "1")] + pub loan_token: ::prost::alloc::string::String, + /// The address of the collateral token + #[prost(string, tag = "2")] + pub collateral_token: ::prost::alloc::string::String, + /// The address of the oracle + #[prost(string, tag = "3")] + pub oracle: ::prost::alloc::string::String, + /// The address of the interest rate model + #[prost(string, tag = "4")] + pub irm: ::prost::alloc::string::String, + /// The loan-to-value ratio + #[prost(string, tag = "5")] + pub lltv: ::prost::alloc::string::String, +} +/// /// Exchange selector #[derive( serde::Deserialize, @@ -763,6 +783,61 @@ pub struct Claim { #[prost(bytes = "vec", repeated, tag = "2")] pub proof: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, } +/// Represents call data for the Morpho Blue Debt adaptor. +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueDebtAdaptorV1 { + ///**** BASE ADAPTOR FUNCTIONS **** + #[prost(oneof = "morpho_blue_debt_adaptor_v1::Function", tags = "1, 2, 3")] + pub function: ::core::option::Option, +} +/// Nested message and enum types in `MorphoBlueDebtAdaptorV1`. +pub mod morpho_blue_debt_adaptor_v1 { + /// + /// Allows strategists borrow a specific amount of an asset on Morpho Blue + /// + /// Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct BorrowFromMorphoBlue { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of the debt token to borrow + #[prost(string, tag = "2")] + pub amount_to_borrow: ::prost::alloc::string::String, + } + /// + /// Allows strategists to repay loan debt on Morph Blue Lending Market. Make sure to call addInterest() beforehand to ensure we are repaying what is required. + /// + /// Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct RepayMorphoBlueDebt { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of the debt token to repay + #[prost(string, tag = "2")] + pub debt_token_repay_amount: ::prost::alloc::string::String, + } + ///**** BASE ADAPTOR FUNCTIONS **** + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Oneof)] + pub enum Function { + /// Represents function `revokeApproval(ERC20 asset, address spender)` + #[prost(message, tag = "1")] + RevokeApproval(super::RevokeApproval), + //**** ADAPTOR-SPECIFIC FUNCTIONS **** + /// Represents function `borrowFromMorphoBlue(MarketParams memory _market, uint256 _amountToBorrow)` + #[prost(message, tag = "2")] + BorrowFromMorphoBlue(BorrowFromMorphoBlue), + /// Represents function `repayMorphoBlueDebt(MarketParams memory _market, uint256 _debtTokenRepayAmount)` + #[prost(message, tag = "3")] + RepayMorphoBlueDebt(RepayMorphoBlueDebt), + } +} +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueDebtAdaptorV1Calls { + #[prost(message, repeated, tag = "1")] + pub calls: ::prost::alloc::vec::Vec, +} /// Represents call data for the Morpho Aave V2 AToken adaptor. #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct MorphoAaveV2aTokenAdaptorV1 { @@ -1013,6 +1088,119 @@ pub struct MorphoAaveV3DebtTokenAdaptorV1Calls { #[prost(message, repeated, tag = "1")] pub calls: ::prost::alloc::vec::Vec, } +/// Represents call data for the Morpho Blue Collateral adaptor. +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueCollateralAdaptorV1 { + ///**** BASE ADAPTOR FUNCTIONS **** + #[prost( + oneof = "morpho_blue_collateral_adaptor_v1::Function", + tags = "1, 2, 3" + )] + pub function: ::core::option::Option, +} +/// Nested message and enum types in `MorphoBlueCollateralAdaptorV1`. +pub mod morpho_blue_collateral_adaptor_v1 { + /// + /// Allows strategists to add collateral to the respective cellar position on specified MB Market, enabling borrowing. + /// + /// Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct AddCollateral { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of collateral to add + #[prost(string, tag = "2")] + pub collateral_to_deposit: ::prost::alloc::string::String, + } + /// + /// Allows strategists to remove collateral from the respective cellar position on specified MB Market. + /// + /// Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct RemoveCollateral { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of collateral to remove + #[prost(string, tag = "2")] + pub collateral_amount: ::prost::alloc::string::String, + } + ///**** BASE ADAPTOR FUNCTIONS **** + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Oneof)] + pub enum Function { + /// Represents function `revokeApproval(ERC20 asset, address spender)` + #[prost(message, tag = "1")] + RevokeApproval(super::RevokeApproval), + //**** ADAPTOR-SPECIFIC FUNCTIONS **** + /// Represents function `addCollateral(MarketParams memory _market, uint256 _collateralToDeposit)` + #[prost(message, tag = "2")] + AddCollateral(AddCollateral), + /// Represents function `removeCollateral(MarketParams memory _market, uint256 _collateralAmount)` + #[prost(message, tag = "3")] + RemoveCollateral(RemoveCollateral), + } +} +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueCollateralAdaptorV1Calls { + #[prost(message, repeated, tag = "1")] + pub calls: ::prost::alloc::vec::Vec, +} +/// Represents call data for the Morpho Blue Supply adaptor. +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueSupplyAdaptorV1 { + ///**** BASE ADAPTOR FUNCTIONS **** + #[prost(oneof = "morpho_blue_supply_adaptor_v1::Function", tags = "1, 2, 3")] + pub function: ::core::option::Option, +} +/// Nested message and enum types in `MorphoBlueSupplyAdaptorV1`. +pub mod morpho_blue_supply_adaptor_v1 { + /// + /// Allows strategists to lend a specific amount for an asset on Morpho Blue + /// + /// Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct LendToMorphoBlue { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of the loan token to lend + #[prost(string, tag = "2")] + pub assets: ::prost::alloc::string::String, + } + /// + /// Allows strategists to withdraw the underlying asset plus interest + /// + /// Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] + pub struct WithdrawFromMorphoBlue { + /// Identifier of a Morpho Blue Market + #[prost(message, optional, tag = "1")] + pub market: ::core::option::Option, + /// The amount of the loan token to lend + #[prost(string, tag = "2")] + pub assets: ::prost::alloc::string::String, + } + ///**** BASE ADAPTOR FUNCTIONS **** + #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Oneof)] + pub enum Function { + /// Represents function `revokeApproval(ERC20 asset, address spender)` + #[prost(message, tag = "1")] + RevokeApproval(super::RevokeApproval), + //**** ADAPTOR-SPECIFIC FUNCTIONS **** + /// Represents function `lendToMorphoBlue(MarketParams memory _market, uint256 _assets)` + #[prost(message, tag = "2")] + LendToMorphoBlue(LendToMorphoBlue), + /// Represents function `withdrawFromMorphoBlue(MarketParams memory _market, uint256 _assets)` + #[prost(message, tag = "3")] + WithdrawFromMorphoBlue(WithdrawFromMorphoBlue), + } +} +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] +pub struct MorphoBlueSupplyAdaptorV1Calls { + #[prost(message, repeated, tag = "1")] + pub calls: ::prost::alloc::vec::Vec, +} /// Represents call data for the Morpho Aave V2 Debt Token adaptor. #[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct MorphoAaveV2DebtTokenAdaptorV1 { @@ -2724,7 +2912,7 @@ pub mod aave_v3_debt_token_adaptor_v1_flash_loan { /// The function call data for the adaptor #[prost( oneof = "adaptor_call_for_aave_v3_flash_loan::CallData", - tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29" + tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32" )] pub call_data: ::core::option::Option, } @@ -2821,6 +3009,15 @@ pub mod aave_v3_debt_token_adaptor_v1_flash_loan { /// Represents function calls for the AuraERC4626AdaptorV1 #[prost(message, tag = "29")] AuraErc4626V1Calls(super::super::AuraErc4626AdaptorV1Calls), + /// Represents function calls for the MorphoBlueCollateralAdaptorV1 + #[prost(message, tag = "30")] + MorphoBlueCollateralV1Calls(super::super::MorphoBlueCollateralAdaptorV1Calls), + /// Represents function calls for the MorphoBlueDebtAdaptorV1 + #[prost(message, tag = "31")] + MorphoBlueDebtV1Calls(super::super::MorphoBlueDebtAdaptorV1Calls), + /// Represents function calls for the MorphoBlueSupplyAdaptorV1 + #[prost(message, tag = "32")] + MorphoBlueSupplyV1Calls(super::super::MorphoBlueSupplyAdaptorV1Calls), } } } @@ -2862,7 +3059,7 @@ pub mod balancer_pool_adaptor_v1_flash_loan { /// The function call data for the adaptor #[prost( oneof = "adaptor_call_for_balancer_pool_flash_loan::CallData", - tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30" + tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33" )] pub call_data: ::core::option::Option, } @@ -2959,6 +3156,15 @@ pub mod balancer_pool_adaptor_v1_flash_loan { /// Represents function calls for the AuraERC4626AdaptorV1 #[prost(message, tag = "30")] AuraErc4626V1Calls(super::super::AuraErc4626AdaptorV1Calls), + /// Represents function calls for the MorphoBlueCollateralAdaptorV1 + #[prost(message, tag = "31")] + MorphoBlueCollateralV1Calls(super::super::MorphoBlueCollateralAdaptorV1Calls), + /// Represents function calls for the MorphoBlueDebtAdaptorV1 + #[prost(message, tag = "32")] + MorphoBlueDebtV1Calls(super::super::MorphoBlueDebtAdaptorV1Calls), + /// Represents function calls for the MorphoBlueSupplyAdaptorV1 + #[prost(message, tag = "33")] + MorphoBlueSupplyV1Calls(super::super::MorphoBlueSupplyAdaptorV1Calls), } } } @@ -3760,7 +3966,7 @@ pub struct AdaptorCall { /// The function call data for the adaptor #[prost( oneof = "adaptor_call::CallData", - tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32" + tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35" )] pub call_data: ::core::option::Option, } @@ -3862,6 +4068,15 @@ pub mod adaptor_call { /// Represents function calls for the AuraERC4626AdaptorV1 #[prost(message, tag = "32")] AuraErc4626V1Calls(super::AuraErc4626AdaptorV1Calls), + /// Represents function calls for the MorphoBlueCollateralAdaptorV1 + #[prost(message, tag = "33")] + MorphoBlueCollateralV1Calls(super::MorphoBlueCollateralAdaptorV1Calls), + /// Represents function calls for the MorphoBlueDebtAdaptorV1 + #[prost(message, tag = "34")] + MorphoBlueDebtV1Calls(super::MorphoBlueDebtAdaptorV1Calls), + /// Represents function calls for the MorphoBlueSupplyAdaptorV1 + #[prost(message, tag = "35")] + MorphoBlueSupplyV1Calls(super::MorphoBlueSupplyAdaptorV1Calls), } } ///