-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set wd fee to 0 on all bsc strats #61
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.5.0 <0.8.0; | ||
|
||
interface IStrategy { | ||
function want() external view returns (address); | ||
|
||
function deposit() external; | ||
|
||
// NOTE: must exclude any tokens used in the yield | ||
// Controller role - withdraw should return to Controller | ||
function withdrawOther(address) external returns (uint256 balance); | ||
|
||
// Controller | Vault role - withdraw should always return to Vault | ||
function withdraw(uint256) external; | ||
|
||
// Controller | Vault role - withdraw should always return to Vault | ||
function withdrawAll() external returns (uint256); | ||
|
||
function balanceOf() external view returns (uint256); | ||
|
||
function getName() external pure returns (string memory); | ||
|
||
function setStrategist(address _strategist) external; | ||
|
||
function setWithdrawalFee(uint256 _withdrawalFee) external; | ||
|
||
function setPerformanceFeeStrategist(uint256 _performanceFeeStrategist) | ||
external; | ||
|
||
function setPerformanceFeeGovernance(uint256 _performanceFeeGovernance) | ||
external; | ||
|
||
function setGovernance(address _governance) external; | ||
|
||
function setController(address _controller) external; | ||
|
||
function tend() external; | ||
|
||
function harvest() external; | ||
} |
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,95 @@ | ||
pragma solidity >=0.6.2; | ||
|
||
interface IPancakeRouter01 { | ||
function factory() external pure returns (address); | ||
function WETH() external pure returns (address); | ||
|
||
function addLiquidity( | ||
address tokenA, | ||
address tokenB, | ||
uint amountADesired, | ||
uint amountBDesired, | ||
uint amountAMin, | ||
uint amountBMin, | ||
address to, | ||
uint deadline | ||
) external returns (uint amountA, uint amountB, uint liquidity); | ||
function addLiquidityETH( | ||
address token, | ||
uint amountTokenDesired, | ||
uint amountTokenMin, | ||
uint amountETHMin, | ||
address to, | ||
uint deadline | ||
) external payable returns (uint amountToken, uint amountETH, uint liquidity); | ||
function removeLiquidity( | ||
address tokenA, | ||
address tokenB, | ||
uint liquidity, | ||
uint amountAMin, | ||
uint amountBMin, | ||
address to, | ||
uint deadline | ||
) external returns (uint amountA, uint amountB); | ||
function removeLiquidityETH( | ||
address token, | ||
uint liquidity, | ||
uint amountTokenMin, | ||
uint amountETHMin, | ||
address to, | ||
uint deadline | ||
) external returns (uint amountToken, uint amountETH); | ||
function removeLiquidityWithPermit( | ||
address tokenA, | ||
address tokenB, | ||
uint liquidity, | ||
uint amountAMin, | ||
uint amountBMin, | ||
address to, | ||
uint deadline, | ||
bool approveMax, uint8 v, bytes32 r, bytes32 s | ||
) external returns (uint amountA, uint amountB); | ||
function removeLiquidityETHWithPermit( | ||
address token, | ||
uint liquidity, | ||
uint amountTokenMin, | ||
uint amountETHMin, | ||
address to, | ||
uint deadline, | ||
bool approveMax, uint8 v, bytes32 r, bytes32 s | ||
) external returns (uint amountToken, uint amountETH); | ||
function swapExactTokensForTokens( | ||
uint amountIn, | ||
uint amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint deadline | ||
) external returns (uint[] memory amounts); | ||
function swapTokensForExactTokens( | ||
uint amountOut, | ||
uint amountInMax, | ||
address[] calldata path, | ||
address to, | ||
uint deadline | ||
) external returns (uint[] memory amounts); | ||
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) | ||
external | ||
payable | ||
returns (uint[] memory amounts); | ||
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) | ||
external | ||
returns (uint[] memory amounts); | ||
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) | ||
external | ||
returns (uint[] memory amounts); | ||
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) | ||
external | ||
payable | ||
returns (uint[] memory amounts); | ||
|
||
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); | ||
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); | ||
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); | ||
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); | ||
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); | ||
} |
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,44 @@ | ||
pragma solidity >=0.6.2; | ||
|
||
import './IPancakeRouter01.sol'; | ||
|
||
interface IPancakeRouter02 is IPancakeRouter01 { | ||
function removeLiquidityETHSupportingFeeOnTransferTokens( | ||
address token, | ||
uint liquidity, | ||
uint amountTokenMin, | ||
uint amountETHMin, | ||
address to, | ||
uint deadline | ||
) external returns (uint amountETH); | ||
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( | ||
address token, | ||
uint liquidity, | ||
uint amountTokenMin, | ||
uint amountETHMin, | ||
address to, | ||
uint deadline, | ||
bool approveMax, uint8 v, bytes32 r, bytes32 s | ||
) external returns (uint amountETH); | ||
|
||
function swapExactTokensForTokensSupportingFeeOnTransferTokens( | ||
uint amountIn, | ||
uint amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint deadline | ||
) external; | ||
function swapExactETHForTokensSupportingFeeOnTransferTokens( | ||
uint amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint deadline | ||
) external payable; | ||
function swapExactTokensForETHSupportingFeeOnTransferTokens( | ||
uint amountIn, | ||
uint amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint deadline | ||
) external; | ||
} |
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,15 @@ | ||
from brownie import interface | ||
|
||
from great_ape_safe import GreatApeSafe | ||
from helpers.addresses import registry | ||
|
||
|
||
def main(): | ||
""" | ||
set withdrawal fees to 0 on all three bsc setts | ||
""" | ||
ops = GreatApeSafe(registry.bsc.badger_wallets.ops_multisig) | ||
for addr in registry.bsc.strategies.values(): | ||
strat = interface.IStrategy(addr, owner=ops.account) | ||
strat.setWithdrawalFee(0) | ||
ops.post_safe_tx() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface.ERC20
doesnt work, because brownie will then also interpret lp tokens as an ERC20, thus excluding the lp methods.