Skip to content
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

Open
wants to merge 5 commits into
base: feature/unit-test-of-ya-bonus
Choose a base branch
from

Conversation

taiki1frsh
Copy link
Contributor

close #64

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;
Copy link
Collaborator

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 } => {
Copy link
Collaborator

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]
Copy link
Collaborator

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);
Copy link
Collaborator

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)
// }
Copy link
Collaborator

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;
Copy link
Collaborator

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>,
// }
Copy link
Collaborator

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants