-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
39,092 additions
and
612 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Protos for function calls to the Morpho Aave V2 AToken adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Morpho Aave V2 AToken adaptor. | ||
message MorphoAaveV2ATokenAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `depositToAaveV2Morpho(IAaveToken aToken, uint256 amountToDeposit)` | ||
DepositToAaveV2Morpho deposit_to_aave_v2_morpho = 2; | ||
// Represents function `withdrawFromAaveV2Morpho(IAaveToken aToken, uint256 amountToWithdraw)` | ||
WithdrawFromAaveV2Morpho withdraw_from_aave_v2_morpho = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to lend assets on Morpho. | ||
* | ||
* Represents function `depositToAaveV2Morpho(IAaveToken aToken, uint256 amountToDeposit)` | ||
*/ | ||
message DepositToAaveV2Morpho { | ||
// The address of the Aave V2 aToken to deposit to. | ||
string a_token = 1; | ||
|
||
// The amount of the asset to deposit. | ||
string amount_to_deposit = 2; | ||
} | ||
|
||
/* | ||
* Allows strategists to withdraw assets from Morpho. | ||
* | ||
* Represents function `withdrawFromAaveV2Morpho(IAaveToken aToken, uint256 amountToWithdraw)` | ||
*/ | ||
message WithdrawFromAaveV2Morpho { | ||
// The address of the Aave V2 aToken to withdraw from. | ||
string a_token = 1; | ||
|
||
// The amount of the asset to withdraw. | ||
string amount_to_withdraw = 2; | ||
} | ||
|
||
} | ||
|
||
message MorphoAaveV2ATokenAdaptorV1Calls { | ||
repeated MorphoAaveV2ATokenAdaptorV1 calls = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Protos for function calls to the Morpho Aave V2 Debt Token adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Morpho Aave V2 Debt Token adaptor. | ||
message MorphoAaveV2DebtTokenAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `borrowFromAaveV2Morpho(address aToken, uint256 amountToBorrow)` | ||
BorrowFromAaveV2Morpho borrow_from_aave_v2_morpho = 2; | ||
// Represents function `repayAaveV2MorphoDebt(IAaveToken aToken, uint256 amountToRepay)` | ||
RepayAaveV2MorphoDebt repay_aave_v2_morpho_debt = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to borrow assets from Aave. | ||
* | ||
* Represents function `borrowFromAaveV2Morpho(address aToken, uint256 amountToBorrow)` | ||
*/ | ||
message BorrowFromAaveV2Morpho { | ||
// The address of the Aave V2 aToken to borrow. | ||
string a_token = 1; | ||
|
||
// The amount of the asset to borrow. | ||
string amount_to_borrow = 2; | ||
} | ||
|
||
/* | ||
* Allows strategists to repay loan debt on Aave. | ||
* | ||
* Represents function `repayAaveV2MorphoDebt(IAaveToken aToken, uint256 amountToRepay)` | ||
*/ | ||
message RepayAaveV2MorphoDebt { | ||
// The address of the Aave V2 aToken to repay. | ||
string a_token = 1; | ||
|
||
// The amount of the asset to repay. | ||
string amount_to_repay = 2; | ||
} | ||
|
||
} | ||
|
||
message MorphoAaveV2DebtTokenAdaptorV1Calls { | ||
repeated MorphoAaveV2DebtTokenAdaptorV1 calls = 1; | ||
} |
57 changes: 57 additions & 0 deletions
57
proto/adaptors/morpho/morpho_aave_v3_a_token_collateral.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Protos for function calls to the Morpho Aave V3 AToken Collateral adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Morpho Aave V3 AToken Collateral adaptor. | ||
message MorphoAaveV3ATokenCollateralAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `depositToAaveV3Morpho(ERC20 tokenToDeposit, uint256 amountToDeposit)` | ||
DepositToAaveV3Morpho deposit_to_aave_v3_morpho = 2; | ||
// Represents function `withdrawFromAaveV3Morpho(ERC20 tokenToWithdraw, uint256 amountToWithdraw)` | ||
WithdrawFromAaveV3Morpho withdraw_from_aave_v3_morpho = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to lend assets on Morpho | ||
* | ||
* Represents function `depositToAaveV3Morpho(ERC20 tokenToDeposit, uint256 amountToDeposit)` | ||
*/ | ||
message DepositToAaveV3Morpho { | ||
// The address of the token to deposit | ||
string token_to_deposit = 1; | ||
|
||
// The amount of tokens to deposit | ||
string amount_to_deposit = 2; | ||
} | ||
|
||
/* | ||
* Allows strategists to withdraw assets from Morpho | ||
* | ||
* Represents function `withdrawFromAaveV3Morpho(ERC20 tokenToWithdraw, uint256 amountToWithdraw)` | ||
*/ | ||
message WithdrawFromAaveV3Morpho { | ||
// The address of the token to withdraw | ||
string token_to_withdraw = 1; | ||
|
||
// The amount of tokens to withdraw | ||
string amount_to_withdraw = 2; | ||
} | ||
} | ||
|
||
message MorphoAaveV3ATokenCollateralAdaptorV1Calls { | ||
repeated MorphoAaveV3ATokenCollateralAdaptorV1 calls = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Protos for function calls to the Morpho Aave V3 AToken P2P adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Morpho Aave V3 A Token P2P adaptor. | ||
message MorphoAaveV3ATokenP2PAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `depositToAaveV3Morpho(ERC20 tokenToDeposit, uint256 amountToDeposit, uint256 maxIterations)` | ||
DepositToAaveV3Morpho deposit_to_aave_v3_morpho = 2; | ||
// Represents function `withdrawFromAaveV3Morpho(ERC20 tokenToWithdraw, uint256 amountToWithdraw, uint256 maxIterations)` | ||
WithdrawFromAaveV3Morpho withdraw_from_aave_v3_morpho = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to lend assets on Morpho | ||
* | ||
* Represents function `depositToAaveV3Morpho(ERC20 tokenToDeposit, uint256 amountToDeposit, uint256 maxIterations)` | ||
*/ | ||
message DepositToAaveV3Morpho { | ||
// The address of the token to deposit | ||
string token_to_deposit = 1; | ||
|
||
// The amount of tokens to deposit | ||
string amount_to_deposit = 2; | ||
|
||
// The maximum number of iterations to run | ||
string max_iterations = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to withdraw assets from Morpho | ||
* | ||
* Represents function `withdrawFromAaveV3Morpho(ERC20 tokenToWithdraw, uint256 amountToWithdraw, uint256 maxIterations)` | ||
*/ | ||
message WithdrawFromAaveV3Morpho { | ||
// The address of the token to withdraw | ||
string token_to_withdraw = 1; | ||
|
||
// The amount of tokens to withdraw | ||
string amount_to_withdraw = 2; | ||
|
||
// The maximum number of iterations to run | ||
string max_iterations = 3; | ||
} | ||
} | ||
|
||
message MorphoAaveV3ATokenP2PAdaptorV1Calls { | ||
repeated MorphoAaveV3ATokenP2PAdaptorV1 calls = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Protos for function calls to the Morpho Aave V3 Debt Token adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Morpho Aave V3 Debt Token adaptor. | ||
message MorphoAaveV3DebtTokenAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `borrowFromAaveV3Morpho(address underlying, uint256 amountToBorrow, uint256 maxIterations)` | ||
BorrowFromAaveV3Morpho borrow_from_aave_v3_morpho = 2; | ||
// Represents function `repayAaveV3MorphoDebt(ERC20 tokenToRepay, uint256 amountToRepay)` | ||
RepayAaveV3MorphoDebt repay_aave_v3_morpho_debt = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to borrow assets from Morpho | ||
* | ||
* Represents function `borrowFromAaveV3Morpho(address underlying, uint256 amountToBorrow, uint256 maxIterations)` | ||
*/ | ||
message BorrowFromAaveV3Morpho { | ||
// The underlying asset to borrow | ||
string underlying = 1; | ||
|
||
// The amount of the underlying asset to borrow | ||
string amount_to_borrow = 2; | ||
|
||
// The maximum number of iterations to perform | ||
string max_iterations = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to repay loan debt on Morpho | ||
* | ||
* Represents function `repayAaveV3MorphoDebt(ERC20 tokenToRepay, uint256 amountToRepay)` | ||
*/ | ||
message RepayAaveV3MorphoDebt { | ||
// The token to repay | ||
string token_to_repay = 1; | ||
|
||
// The amount of the token to repay | ||
string amount_to_repay = 2; | ||
} | ||
} | ||
|
||
message MorphoAaveV3DebtTokenAdaptorV1Calls { | ||
repeated MorphoAaveV3DebtTokenAdaptorV1 calls = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.