Skip to content

Commit

Permalink
svm: clean up again
Browse files Browse the repository at this point in the history
Signed-off-by: bingyuyap <[email protected]>
  • Loading branch information
bingyuyap committed Nov 26, 2024
1 parent 45a759e commit 6857847
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion svm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion svm/programs/wormhole-guardian-adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions svm/programs/wormhole-guardian-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- #### Consistency Level (TBC)
#### Consistency Level

The `consistencyLevel` parameter is passed into the `IWormhole` `publishMessage` call. It configures whether the Wormhole network should publish the message immediately (value 200), when the block is marked safe (value 201) or when the block is finalized (any other value). The consistency level is immutable. -->
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:

Expand Down
1 change: 1 addition & 0 deletions svm/programs/wormhole-guardian-adapter/src/state/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ impl From<Finality> for wormhole_anchor_sdk::wormhole::Finality {
#[account]
#[derive(InitSpace)]
pub struct Config {
/// Used for seed derivation
pub bump: u8,
pub admin: Option<Pubkey>,
pub pending_admin: Option<Pubkey>,
Expand Down
2 changes: 2 additions & 0 deletions svm/programs/wormhole-guardian-adapter/src/state/peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}
Expand Down

0 comments on commit 6857847

Please sign in to comment.