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 4f2b3027..2f5fa66a 100644 Binary files a/steward_proto_rust/src/prost/descriptor.bin and b/steward_proto_rust/src/prost/descriptor.bin differ 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), } } ///