Comments (2)
When i do add some arguments, I'm getting errors that i'm not sure how to debug.
Please add working examples :)
In my case, the stack trace is weird- not sure why this failure would occur. I'm passing a performance fee of 10
:
>>> tx = v.addStrategy(strategy, 0, Wei("1000 ether"), 2 ** 256 - 1, 10, {"from": gov})
Transaction sent: 0xf0659fa10bc327144a5a71a52166ca387aefd2d714f455e31e141886c8e91560
Gas price: 0.0 gwei Gas limit: 12000000 Nonce: 7
Vault.addStrategy confirmed (reverted) Block: 13615439 Gas used: 11812895 (98.44%)
>>> tx.traceback()
Traceback for '0xf0659fa10bc327144a5a71a52166ca387aefd2d714f455e31e141886c8e91560':
Trace step 655, program counter 9513:
File "Vyper_contract.vy", line 1198, in Vyper_contract.addStrategy:
performanceFee: performanceFee,
from brownie-strategy-mix.
This is the addStrategy signature:
addStrategy(
strategy: address,
debtRatio: uint256,
minDebtPerHarvest: uint256,
maxDebtPerHarvest: uint256,
performanceFee: uint256,
profitLimitRatio: uint256 = 100, # 1%
lossLimitRatio: uint256 = 1 # 0.01%
)
You are adding the strategy with a debtRatio
set to zero that won't break but will not allocate funds to the strategy.
I suggest something like:
vault.addStrategy(strategy, 1000, 0, 2 ** 256 - 1, 1_000, {"from": gov})
from brownie-strategy-mix.
Related Issues (20)
- Explore importing Integration Test suite using Strategy test suite in Vaults HOT 3
- Bump vaults version to use 0.3.2 HOT 1
- Add as part of test suite a check for handling airdrops of want token on strategy HOT 4
- Test should use strategy.estimatedTotalAssets() instead of token.balanceOf(new_strategy.address) HOT 4
- Upgrade to Vaults 0.3.3
- Add support for solidity 0.8 to sync with vaults PR HOT 4
- Add ethToWant to Strategy.sol
- Make sure _assessFees isn't called twice within the same block
- add liquidateAllPositions
- tests: initialize should take management parameter.
- add matching tags for releases based of yearn vaults repo HOT 1
- fix failing CI in Master HOT 1
- Import deploy script from Yearn-Vaults HOT 8
- Add integration with Tenderly to improve debugging HOT 2
- Not working with ganache v7.0.0-alpha.1 HOT 1
- Cannot add strategy: Contract 'VaultAPI' object has no attribute 'addStrategy' HOT 4
- README Instructions Contain Typo
- Accessing Vault via local ABI does not work HOT 9
- README.md instructions for ganache are incorrect. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brownie-strategy-mix.