diff --git a/svm/Cargo.toml b/svm/Cargo.toml index e35d22c..a5839e9 100644 --- a/svm/Cargo.toml +++ b/svm/Cargo.toml @@ -16,7 +16,7 @@ codegen-units = 1 [workspace.dependencies] anchor-lang = "0.30.1" cfg-if = "1.0" +universal-address = "0.1.0" wormhole-io = "0.1" wormhole-anchor-sdk = "0.30.1-alpha.3" wormhole-solana-utils = "0.3.0-alpha.1" -universal-address = "0.1.0" diff --git a/svm/programs/wormhole-guardian-adapter/Cargo.toml b/svm/programs/wormhole-guardian-adapter/Cargo.toml index eb4f695..f8d02cc 100644 --- a/svm/programs/wormhole-guardian-adapter/Cargo.toml +++ b/svm/programs/wormhole-guardian-adapter/Cargo.toml @@ -28,7 +28,7 @@ tilt-devnet2 = ["tilt-devnet"] [dependencies] anchor-lang = { workspace = true, features = ["init-if-needed", "event-cpi"] } cfg-if.workspace = true +universal-address.workspace = true wormhole-anchor-sdk.workspace = true wormhole-io.workspace = true wormhole-solana-utils.workspace = true -universal-address.workspace = true diff --git a/svm/programs/wormhole-guardian-adapter/README.md b/svm/programs/wormhole-guardian-adapter/README.md index d92883f..9293cd7 100644 --- a/svm/programs/wormhole-guardian-adapter/README.md +++ b/svm/programs/wormhole-guardian-adapter/README.md @@ -58,15 +58,15 @@ All of these parameters are part of the program state. They are stored in the `C #### Admin -The Admin Pubkey is used to administer the WormholeGuardiansAdapter. The admin is the only account that is allowed to call `setPeer`. Additionally, only the admin may call `updateAdmin`, `transferAdmin` and `discardAdmin` to update the admin contract. +The Admin Pubkey is used to administer the WormholeGuardiansAdapter. The admin is the only account that is allowed to call `setPeer`. Additionally, only the admin may call `updateAdmin`, `transferAdmin` and `discardAdmin` to update the admin Pubkey. #### Wormhole Program The Wormhole program should be set to the canonical Wormhole Core program on this chain. The Wormhole program ID is immutable. The WormholeGuardiansAdapter uses the Wormhole program to send and validate messages. - +The `consistency_level` parameter is passed into the `wormhole-anchor-sdk` `post_message` call during the `pick_up_message` invocation. It configures whether the Wormhole network should publish the message when the block is marked confirmed or when the block is finalized. The consistency level is immutable. ### Program Administration: diff --git a/svm/programs/wormhole-guardian-adapter/src/state/config.rs b/svm/programs/wormhole-guardian-adapter/src/state/config.rs index 80847ce..1469145 100644 --- a/svm/programs/wormhole-guardian-adapter/src/state/config.rs +++ b/svm/programs/wormhole-guardian-adapter/src/state/config.rs @@ -20,6 +20,7 @@ impl From for wormhole_anchor_sdk::wormhole::Finality { #[account] #[derive(InitSpace)] pub struct Config { + /// Used for seed derivation pub bump: u8, pub admin: Option, pub pending_admin: Option, diff --git a/svm/programs/wormhole-guardian-adapter/src/state/peer.rs b/svm/programs/wormhole-guardian-adapter/src/state/peer.rs index 8fe890e..7b8af3e 100644 --- a/svm/programs/wormhole-guardian-adapter/src/state/peer.rs +++ b/svm/programs/wormhole-guardian-adapter/src/state/peer.rs @@ -3,7 +3,9 @@ use anchor_lang::prelude::*; #[account] #[derive(InitSpace, Debug)] pub struct Peer { + /// Used for seed derivation pub bump: u8, + /// Used for seed derivation pub chain: u16, pub contract: [u8; 32], }