Skip to content

Commit 05bd9b4

Browse files
ali-behjatiReisen
authored andcommitted
Use wormhole sdk
1 parent d93154a commit 05bd9b4

File tree

3 files changed

+11
-62
lines changed

3 files changed

+11
-62
lines changed

hermes/Cargo.lock

Lines changed: 5 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hermes/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ tokio = { version = "1.26.0", features = ["full"] }
3434
typescript-type-def = { version = "0.5.5" }
3535
log = { version = "0.4.17" }
3636

37-
# Parse Wormhole VAAs from our own patch. TODO: Replace with released version when wormhole releases it
38-
wormhole-core = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana"}
39-
4037
# Parse Wormhole attester price attestations.
4138
pythnet-sdk = { path = "../pythnet/pythnet_sdk/", version = "=1.13.6" }
4239

@@ -63,5 +60,8 @@ derive_builder = "0.12.0"
6360
byteorder = "1.4.3"
6461
serde_qs = { version = "0.12.0", features = ["axum"] }
6562

63+
serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1"}
64+
wormhole-sdk = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" }
65+
6666
[patch.crates-io]
67-
serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole" }
67+
serde_wormhole = { git = "https://github.com/wormhole-foundation/wormhole", tag = "v2.17.1" }

hermes/src/store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use {
3636
ops::Rem,
3737
time::Duration,
3838
},
39-
wormhole::VAA,
39+
wormhole_sdk::Vaa,
4040
};
4141

4242
pub mod proof;
@@ -75,7 +75,7 @@ impl Store {
7575
pub async fn store_update(&self, update: Update) -> Result<()> {
7676
let ring_index = match update {
7777
Update::Vaa(vaa_bytes) => {
78-
let vaa = VAA::from_bytes(vaa_bytes.clone())?;
78+
let vaa = serde_wormhole::from_slice::<Vaa<Vec<u8>>>(&vaa_bytes)?;
7979
let payload = WormholePayload::try_from_bytes(&vaa.payload, &vaa_bytes)?;
8080

8181
// FIXME: Validate the VAA

0 commit comments

Comments
 (0)