Skip to content

Commit 5d3a9a1

Browse files
devin-ai-integration[bot]Jayant Krishnamurthy
andcommitted
refactor: update cosmwasm contract to use pythnet_sdk legacy module
Co-Authored-By: Jayant Krishnamurthy <[email protected]>
1 parent 2d09312 commit 5d3a9a1

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

target_chains/cosmwasm/contracts/pyth/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,16 @@ generic-array = { version = "0.14.4" }
3333
hex = "0.4.2"
3434
lazy_static = "1.4.0"
3535
bigint = "4"
36-
pyth-wormhole-attester-sdk = { path = "../../../../wormhole_attester/sdk/rust" }
36+
pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk", features = ["test-utils"] }
3737
pyth-sdk = "0.7.0"
3838
byteorder = "1.4.3"
3939
cosmwasm-schema = "1.1.9"
4040
osmosis-std = "0.15.2"
4141
pyth-sdk-cw = { path = "../../sdk/rust" }
42-
pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk" }
4342
wormhole-cosmwasm = {git = "https://github.com/wormhole-foundation/wormhole", tag="rust-sdk-2024-01-25"}
4443

4544
[dev-dependencies]
4645
cosmwasm-vm = { version = "1.0.0", default-features = false }
4746
serde_json = "1.0"
48-
pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk", features = ["test-utils"] }
4947
serde_wormhole = "0.1.0"
5048
wormhole-vaas-serde = "0.1.0"

target_chains/cosmwasm/contracts/pyth/src/contract.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use {
3131
error::PythContractError, ExecuteMsg, Price, PriceFeed, PriceFeedResponse, PriceIdentifier,
3232
QueryMsg,
3333
},
34-
pyth_wormhole_attester_sdk::{BatchPriceAttestation, PriceAttestation, PriceStatus},
34+
pythnet_sdk::legacy::{BatchPriceAttestation, PriceAttestation, PriceStatus},
3535
pythnet_sdk::{
3636
accumulators::merkle::MerkleRoot,
3737
hashers::keccak256_160::Keccak160,
@@ -753,7 +753,7 @@ mod test {
753753
},
754754
pyth_sdk::UnixTimestamp,
755755
pyth_sdk_cw::PriceIdentifier,
756-
pyth_wormhole_attester_sdk::PriceAttestation,
756+
pythnet_sdk::legacy::PriceAttestation,
757757
pythnet_sdk::{
758758
accumulators::{merkle::MerkleTree, Accumulator},
759759
messages::{PriceFeedMessage, TwapMessage},

target_chains/cosmwasm/contracts/pyth/src/governance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use {
22
crate::state::PythDataSource,
33
byteorder::{BigEndian, ReadBytesExt, WriteBytesExt},
44
cosmwasm_std::Binary,
5-
pyth_wormhole_attester_sdk::ErrBox,
5+
pythnet_sdk::legacy::ErrBox,
66
schemars::JsonSchema,
77
serde::{Deserialize, Serialize},
88
std::{convert::TryFrom, io::Write},

0 commit comments

Comments
 (0)