-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add "to do" tests #307
base: main
Are you sure you want to change the base?
Add "to do" tests #307
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
let invested_funds = defindex_contract.fetch_current_invested_funds().get(test.token0.address.clone()).unwrap(); | ||
let idle_funds = defindex_contract.fetch_current_idle_funds().get(test.token0.address.clone()).unwrap(); | ||
assert_eq!(invested_funds, (amount_to_invest * 4)); | ||
assert_eq!(idle_funds, deposit_amount - (amount_to_invest * 4)); | ||
|
||
|
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.
Add a deposit(,,_,true) here
|
||
assert_eq!(invested_funds, total_invested); | ||
assert_eq!(idle_funds, total_deposit - total_invested); | ||
|
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.
add a deposit(,,_,false) here
let strategy_params = create_strategy_params_token0(&test); | ||
|
||
// initialize with 1 asset, 3 strategies | ||
let assets: Vec<AssetStrategySet> = sorobanvec![ |
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.
Can we make several assets, several strategies ?
|
||
//withdraw from strategy | ||
let withdraw_amount = 2_00_000; | ||
let withdraw_result = strategy_client_1.withdraw(&withdraw_amount, &defindex_contract.address); |
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.
Me parece extraño que se pueda hacer esto @joaquinsoza @esteblock
This PR implements all to-do tests: