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.
- Loading branch information
1 parent
b2e982b
commit 7a14bbd
Showing
3 changed files
with
22 additions
and
1 deletion.
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
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()) | ||
} |
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