Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayanski committed Jan 8, 2025
1 parent 652c94a commit 8796f49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/contracts/adapters/oracle/examples/register_ans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use abstract_pyth_adapter::PYTH;
use cw_orch::daemon::networks::parse_network;
use cw_orch::prelude::*;

fn deploy_oracle(networks: Vec<ChainInfo>) -> anyhow::Result<()> {
fn register_ans(networks: Vec<ChainInfo>) -> anyhow::Result<()> {
// run for each requested network
for network in networks {
let chain = DaemonBuilder::new(network.clone()).build()?;
Expand Down Expand Up @@ -47,5 +47,5 @@ fn main() -> anyhow::Result<()> {
.map(|n| parse_network(n).unwrap())
.collect();

deploy_oracle(networks)
register_ans(networks)
}
9 changes: 6 additions & 3 deletions modules/contracts/adapters/oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,18 @@ pub mod interface {
use std::collections::HashMap;

pub fn pyth_addresses() -> HashMap<String, Addr> {
HashMap::from([
[
(XION_TESTNET_1.chain_id, PYTH_XION_TEST_ADDRESS),
(PION_1.chain_id, PYTH_PION_ADDRESS),
(OSMO_5.chain_id, PYTH_OSMO_TEST_ADDRESS),
(NEUTRON_1.chain_id, PYTH_NEUTRON_ADDRESS),
(OSMOSIS_1.chain_id, PYTH_OSMOSIS_ADDRESS),
])
]
.map(|(key, value)| (key.to_string(), Addr::unchecked(value)))
.into()
}
Source: https://docs.pyth.network/price-feeds/contract-addresses/cosmwasm

// Source: https://docs.pyth.network/price-feeds/contract-addresses/cosmwasm
pub const PYTH_XION_TEST_ADDRESS: &str =
"xion1w39ctwxxhxxc2kxarycjxj9rndn65gf8daek7ggarwh3rq3zl0lqqllnmt";
pub const PYTH_PION_ADDRESS: &str =
Expand Down

0 comments on commit 8796f49

Please sign in to comment.