-
Notifications
You must be signed in to change notification settings - Fork 0
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
Impl distribution #66
base: feature/unit-test-of-ya-bonus
Are you sure you want to change the base?
Impl distribution #66
Conversation
use crate::msgs::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; | ||
use crate::query::bonus_windows::query_bonus_windows; | ||
use crate::query::distribution_amount::query_distribution_amount; | ||
// use crate::query::distribution_amount::query_distribution_amount; |
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.
Could remove this commented code
to_binary(&query_distribution_amount(deps, bonus_window_id)?) | ||
} | ||
} => to_binary(&query_vault_share_staking(deps, bonus_window_id, vault_id, address)?), | ||
// QueryMsg::DistributionAmount { bonus_window_id } => { |
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.
Is this PR ready for review? I see some commented codebase
deps | ||
} | ||
|
||
// #[test] |
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 you remove this line?
@@ -68,5 +68,8 @@ fn test_delete_bonus_window() { | |||
let bonus_windows = query_bonus_windows(deps.as_ref()); | |||
assert_eq!(0, bonus_windows.unwrap().len()); | |||
query_bonus_window(deps.as_ref(), 0).unwrap_err(); | |||
|
|||
let voted_vault = query_voted_vaults(deps.as_ref(), 0).unwrap_err(); | |||
// assert_eq!(voted_vault.len(), 2); |
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.
This check has been disabled for some reason
// todo!() | ||
// // let resp = DistributionAmountResp {}; | ||
// // Ok(resp) | ||
// } |
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.
whole code seems to be commented for this file
@@ -1,5 +1,5 @@ | |||
pub mod bonus_windows; | |||
pub mod distribution_amount; | |||
// pub mod distribution_amount; |
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 you remoce this code if not used?
// bonus_window_id: u64, | ||
// for_all: Vec<Distribution>, | ||
// for_winners: Vec<Distribution>, | ||
// } |
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 you remove this one as well?
}); | ||
send_msgs.push(send_msg); | ||
} | ||
Ok(send_msgs) |
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.
Is it fine to distribute the reward on a single message? I think it would overflow the block gas limit if the number of users are more than 1000
close #64