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

feat: LIDO-76. Strategy contract #17

Merged
merged 4 commits into from
Jan 15, 2024
Merged

Conversation

albertandrejev
Copy link
Member

@albertandrejev albertandrejev changed the base branch from main to feat/LIDO-75-validator-set December 21, 2023 20:30
@oldremez oldremez changed the base branch from feat/LIDO-75-validator-set to main December 26, 2023 15:35
@oldremez oldremez changed the base branch from main to feat/LIDO-77-distribution December 26, 2023 15:43
@oldremez oldremez changed the base branch from feat/LIDO-77-distribution to main December 26, 2023 15:44
@albertandrejev albertandrejev force-pushed the feat/LIDO-76-strategy-contract branch 3 times, most recently from 3e8b226 to 3a5b908 Compare January 11, 2024 16:29
@albertandrejev albertandrejev force-pushed the feat/LIDO-76-strategy-contract branch from 3a5b908 to ee8b76e Compare January 12, 2024 13:32
Comment on lines 134 to 142
let validator_denom_delegation = account_delegations
.delegations
.iter()
.find(|delegation| {
delegation.validator == validator.valoper_address
&& delegation.amount.denom == denom
})
.map(|delegation| delegation.amount.amount)
.unwrap_or_default();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not critical: it would be a bit optimal ( O(N^2) -> O(N) ) to prepare set of delegations into a Map<String, UInt128> before this cycle


use lido_staking_base::{
msg::validatorsstats::{ExecuteMsg, InstantiateMsg, MigrateMsg},
state::validatorsstats::QueryMsg,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's move messages into messages

@albertandrejev albertandrejev requested a review from ratik January 15, 2024 10:51
@oldremez oldremez merged commit 9bc9990 into main Jan 15, 2024
11 checks passed
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.

3 participants