-
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.
feat:Convex, Curve, Aura adaptors support + Turbo eETH permissions (#236
) * Curve, Convex Curve, and Aura adaptor protos * Generate new adaptor proto bindings * Add new adaptor ABIs * Generate new adaptor ABI bindings * Convex Curve adaptor handler * Fix field name in proto * Add missing proto field * Curve adaptor handlers * Rename Aura proto to match contract name * Fix one more proto field misname * Aura adaptor handlers * Clippy * Add requested permissions for Turbo eETH * Bump version to 3.7.0 * Fmt * Waking up CI * Waking up CI * Add dockerfile changes made in main * Fix proto comment and include new adaptors in balancer flash loan adaptors * Fix adaptor const sorting * Delete incorrect ABI artifact * Fix uniswap adaptor addresses * Fix const nits
- Loading branch information
Showing
70 changed files
with
8,987 additions
and
1,357 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,40 @@ | ||
/* | ||
* Protos for function calls to the Aura ERC4626 adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Aura ERC4626 adaptor V1 | ||
message AuraERC4626AdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `getRewards(IBaseRewardPool _auraPool, bool _claimExtras)` | ||
GetRewards get_rewards = 2; | ||
} | ||
|
||
/* | ||
* Allows strategist to get rewards for an Aura pool. | ||
* | ||
* Represents function `getRewards(IBaseRewardPool _auraPool, bool _claimExtras)` */ | ||
message GetRewards { | ||
// The address of the Aura pool to get rewards for | ||
string aura_pool = 1; | ||
// Whether to claim extra rewards associated with the pool | ||
bool claim_extras = 2; | ||
} | ||
} | ||
|
||
message AuraERC4626AdaptorV1Calls { | ||
repeated AuraERC4626AdaptorV1 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Protos for function calls to the Convex Curve adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Convex Curve adaptor V1 | ||
message ConvexCurveAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `depositLPTInConvexAndStake(uint256 _pid, address baseRewardPool, ERC20 _lpt, CurvePool _pool, bytes4 _selector, uint256 _amount)` | ||
DepositLPTInConvexAndStake deposit_lpt_in_convex_and_stake = 2; | ||
// Represents function `withdrawFromBaseRewardPoolAsLPTaddress(_baseRewardPool, uint256 _amount, bool _claim)` | ||
WithdrawFromBaseRewardPoolAsLPT withdraw_from_base_reward_pool_as_lpt = 3; | ||
// Represents function `getRewards(address _baseRewardPool, bool _claimExtras)` | ||
GetRewards get_rewards = 4; | ||
} | ||
|
||
/* | ||
* Allows strategists to deposit and stake LPTs into Convex markets via the respective Convex market Booster contract | ||
* | ||
* Represents function `depositLPTInConvexAndStake(uint256 _pid, address baseRewardPool, ERC20 _lpt, CurvePool _pool, bytes4 _selector, uint256 _amount)` | ||
*/ | ||
message DepositLPTInConvexAndStake { | ||
string pid = 1; | ||
string base_reward_pool = 2; | ||
string lpt = 3; | ||
string pool = 4; | ||
string selector = 5; | ||
string amount_to_deposit = 6; | ||
} | ||
|
||
/* | ||
* Allows strategists to withdraw from Convex markets via Booster contract w/ or w/o claiming rewards | ||
* | ||
* Represents function `withdrawFromBaseRewardPoolAsLPTaddress(_baseRewardPool, uint256 _amount, bool _claim)` | ||
*/ | ||
message WithdrawFromBaseRewardPoolAsLPT { | ||
string base_reward_pool = 1; | ||
string amount_to_withdraw = 2; | ||
bool claim = 3; | ||
} | ||
|
||
/* | ||
* Allows strategists to get rewards for an Convex Booster without withdrawing/unwrapping from Convex market | ||
* | ||
* Represents function `getRewards(address _baseRewardPool, bool _claimExtras)` | ||
*/ | ||
message GetRewards { | ||
string base_reward_pool = 1; | ||
bool claim_extras = 2; | ||
} | ||
} | ||
|
||
message ConvexCurveAdaptorV1Calls { | ||
repeated ConvexCurveAdaptorV1 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,165 @@ | ||
/* | ||
* Protos for function calls to the Curve adaptor. | ||
*/ | ||
|
||
syntax = "proto3"; | ||
package steward.v3; | ||
|
||
option go_package = "/steward_proto"; | ||
|
||
import "adaptors/base.proto"; | ||
|
||
// Represents call data for the Curve adaptor V1 | ||
message CurveAdaptorV1 { | ||
oneof function { | ||
/***** BASE ADAPTOR FUNCTIONS *****/ | ||
|
||
// Represents function `revokeApproval(ERC20 asset, address spender)` | ||
RevokeApproval revoke_approval = 1; | ||
|
||
/***** ADAPTOR-SPECIFIC FUNCTIONS *****/ | ||
|
||
// Represents function `addLiquidity(address pool, ERC20 lpToken, uint256[] orderedUnderlyingTokenAmounts, uint256 minLPAmount, CurveGauge gauge, bytes4 selector)` | ||
AddLiquidity add_liquidity = 2; | ||
// Represents function `addLiquidityETH(address pool, ERC20 lpToken, uint256[] orderedMinimumUnderlyingTokenAmountsOut, uint256 minLPAmount, bool useUnderlying, CurveGauge gauge, bytes4 selector)` | ||
AddLiquidityETH add_liquidity_eth = 3; | ||
// Represents function `removeLiquidity(address pool, ERC20 lpToken, uint256 lpTokenAmount, uint256[] orderedMinimumUnderlyingTokenAmountsOut, CurveGauge gauge, bytes4 selector)` | ||
RemoveLiquidity remove_liquidity = 4; | ||
// Represents function `removeLiquidityETH(address pool, ERC20 lpToken, uint256 lpTokenAmount, uint256[] orderedMinimumUnderlyingTokenAmountsOut, bool useUnderlying, CurveGauge gauge, bytes4 selector)` | ||
RemoveLiquidityETH remove_liquidity_eth = 5; | ||
// Represents function `stakeInGauge(ERC20 lpToken, CurveGauge gauge, uint256 amount, CurvePool pool, bytes4 selector)` | ||
StakeInGauge stake_in_gauge = 6; | ||
// Represents function `unstakeFromGauge(CurveGauge gauge, uint256 amount)` | ||
UnstakeFromGauge unstake_from_gauge = 7; | ||
// Represents function `claimRewards(CurveGauge gauge)` | ||
ClaimRewards claim_rewards = 8; | ||
} | ||
|
||
/* | ||
* Allows strategist to add liquidity to Curve pairs that do NOT use the native asset. | ||
* | ||
* Represents function `addLiquidity(address pool, ERC20 lpToken, uint256[] orderedUnderlyingTokenAmounts, uint256 minLPAmount, CurveGauge gauge, bytes4 selector)` | ||
*/ | ||
message AddLiquidity { | ||
// Address of the Curve pool | ||
string pool = 1; | ||
// Address of the LP token | ||
string lp_token = 2; | ||
// Minimum amount of each underlying token to receive | ||
repeated string ordered_underlying_token_amounts = 3; | ||
// Minimum amount of LP tokens to receive | ||
string min_lp_amount = 4; | ||
// Address of the Curve gauge | ||
string gauge = 5; | ||
// Selector of the function to call | ||
string selector = 6; | ||
} | ||
|
||
/* | ||
* Allows strategist to add liquidity to Curve pairs that use the native asset. | ||
* | ||
* Represents function `addLiquidityETH(address pool, ERC20 lpToken, uint256[] orderedUnderlyingTokenAmounts, uint256 minLPAmount, bool useUnderlying, CurveGauge gauge, bytes4 selector)` | ||
*/ | ||
message AddLiquidityETH { | ||
// Address of the Curve pool | ||
string pool = 1; | ||
// Address of the LP token | ||
string lp_token = 2; | ||
// Minimum amount of each underlying token to receive | ||
repeated string ordered_underlying_token_amounts = 3; | ||
// Minimum amount of LP tokens to receive | ||
string min_lp_amount = 4; | ||
// Whether to use the underlying asset or the wrapped asset | ||
bool use_underlying = 5; | ||
// Address of the Curve gauge | ||
string gauge = 6; | ||
// Selector of the function to call | ||
string selector = 7; | ||
} | ||
|
||
/* | ||
* Allows strategist to remove liquidity from Curve pairs that do NOT use the native asset. | ||
* | ||
* Represents function `removeLiquidity(address pool, ERC20 lpToken, uint256 lpTokenAmount, uint256[] orderedMinimumUnderlyingTokenAmountsOut, CurveGauge gauge, bytes4 selector)` | ||
*/ | ||
message RemoveLiquidity { | ||
// Address of the Curve pool | ||
string pool = 1; | ||
// Address of the LP token | ||
string lp_token = 2; | ||
// Amount of LP tokens to remove | ||
string lp_token_amount = 3; | ||
// Minimum amount of each underlying token to receive | ||
repeated string ordered_minimum_underlying_token_amounts_out = 4; | ||
// Address of the Curve gauge | ||
string gauge = 5; | ||
// Selector of the function to call | ||
string selector = 6; | ||
} | ||
|
||
/* | ||
* Allows strategist to remove liquidity from Curve pairs that use the native asset. | ||
* | ||
* Represents function `removeLiquidityETH(address pool, ERC20 lpToken, uint256 lpTokenAmount, uint256[] orderedMinimumUnderlyingTokenAmountsOut, bool useUnderlying, CurveGauge gauge, bytes4 selector)` | ||
*/ | ||
message RemoveLiquidityETH { | ||
// Address of the Curve pool | ||
string pool = 1; | ||
// Address of the LP token | ||
string lp_token = 2; | ||
// Amount of LP tokens to remove | ||
string lp_token_amount = 3; | ||
// Minimum amount of each underlying token to receive | ||
repeated string ordered_minimum_underlying_token_amounts_out = 4; | ||
// Whether to use the underlying asset or the wrapped asset | ||
bool use_underlying = 5; | ||
// Address of the Curve gauge | ||
string gauge = 6; | ||
// Selector of the function to call | ||
string selector = 7; | ||
} | ||
|
||
/* | ||
* Allows strategist to stake Curve LP tokens in their gauge. | ||
* | ||
* Represents function `stakeInGauge(ERC20 lpToken, CurveGauge gauge, uint256 amount, CurvePool pool, bytes4 selector)` | ||
*/ | ||
message StakeInGauge { | ||
// Address of the LP token | ||
string lp_token = 1; | ||
// Address of the Curve gauge | ||
string gauge = 2; | ||
// Amount of LP tokens to stake | ||
string amount = 3; | ||
// Address of the Curve pool | ||
string pool = 4; | ||
// Selector of the function to call | ||
string selector = 5; | ||
} | ||
|
||
/* | ||
* Allows strategist to unstake Curve LP tokens from their gauge. | ||
* | ||
* Represents function `unstakeFromGauge(CurveGauge gauge, uint256 amount)` | ||
*/ | ||
message UnstakeFromGauge { | ||
// Address of the Curve gauge | ||
string gauge = 1; | ||
// Amount of LP tokens to unstake | ||
string amount = 2; | ||
} | ||
|
||
/* | ||
* Allows strategist to claim rewards from a gauge. | ||
* | ||
* Represents function `claimRewards(CurveGauge gauge)` | ||
*/ | ||
message ClaimRewards { | ||
// Address of the Curve gauge | ||
string gauge = 1; | ||
} | ||
} | ||
|
||
message CurveAdaptorV1Calls { | ||
repeated CurveAdaptorV1 calls = 1; | ||
} |
Oops, something went wrong.