-
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.
* Add alternative asset protos to Cellar 2.5 API * Add CellarWithMultiAssetDeposit abi bindings * Update multi asset ABI to fixed version * Git ignore DS_Store files * Fmt * Handlers for multi asset commit functions * Update test certs * Protos for Morpho Blue adaptors * Morpho Blue ABIs + bindings * Fix typos in proto * Wire up morpho blue adaptor handlers * fmt * get ci running * get ci running * Add Morpho Blue position permissions * Fix unwrap * Fix lazy eval * Bump to v3.8.0
- Loading branch information
Showing
36 changed files
with
5,968 additions
and
124 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 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; | ||
} |
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 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; | ||
} |
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 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; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
name = "steward" | ||
authors = [] | ||
version = "3.7.0" | ||
version = "3.8.0" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
|
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
Oops, something went wrong.