This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/add-missing-pool-info
- Loading branch information
Showing
29 changed files
with
135 additions
and
1,725 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
bindings/src/account_history/msg/query_resp/get_storage_size.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use cosmwasm_schema::cw_serde; | ||
|
||
#[cw_serde] | ||
pub struct StorageSizeResp { | ||
pub user_address_queue_data_size: u128, | ||
pub history_data_size: u128, | ||
pub old_history_2_data_size: u128, | ||
} |
51 changes: 0 additions & 51 deletions
51
bindings/src/account_history/msg/query_resp/membership_tier_response.rs
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
contracts/account-history-contract/src/action/execute/clean_up_storage.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use cosmwasm_std::{DepsMut, Response, StdResult}; | ||
|
||
use crate::states::{HISTORY, OLD_HISTORY_2, USER_ADDRESS_QUEUE}; | ||
use elys_bindings::{ElysMsg, ElysQuery}; | ||
|
||
pub fn clean_up_storage(deps: &mut DepsMut<ElysQuery>, limit: u64) -> StdResult<Response<ElysMsg>> { | ||
// Delete history values | ||
for _ in 0..limit { | ||
if let Some(val) = HISTORY.first(deps.storage)? { | ||
HISTORY.remove(deps.storage, &val.0); | ||
} | ||
if let Some(val) = OLD_HISTORY_2.first(deps.storage)? { | ||
OLD_HISTORY_2.remove(deps.storage, &val.0); | ||
} | ||
if !USER_ADDRESS_QUEUE.is_empty(deps.storage).unwrap() { | ||
let _ = USER_ADDRESS_QUEUE.pop_front(deps.storage); | ||
} | ||
} | ||
Ok(Response::default()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
contracts/account-history-contract/src/action/query/get_membership_tier.rs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
138 changes: 0 additions & 138 deletions
138
contracts/account-history-contract/src/action/sudo/update_account_chain.rs
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
contracts/account-history-contract/src/action/sudo/update_metadata_prices.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use crate::states::METADATA; | ||
use cosmwasm_std::{DepsMut, Response, StdResult}; | ||
use elys_bindings::{ElysMsg, ElysQuerier, ElysQuery}; | ||
|
||
pub fn update_metadata_prices(deps: DepsMut<ElysQuery>) -> StdResult<Response<ElysMsg>> { | ||
let querier = ElysQuerier::new(&deps.querier); | ||
|
||
// update metadata prices | ||
let mut metadata = METADATA.load(deps.storage)?; | ||
metadata = metadata.update_prices(&querier)?; | ||
METADATA.save(deps.storage, &metadata)?; | ||
|
||
Ok(Response::default()) | ||
} |
Oops, something went wrong.