Skip to content

Commit 2743293

Browse files
kcsongoraadam-10
andauthored
solana/wormhole-governance: allow specifying wormhole address from env (#724)
Co-authored-by: Adam <[email protected]>
1 parent ca7493e commit 2743293

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

solana/programs/wormhole-governance/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ idl-build = [
1818
"anchor-lang/idl-build",
1919
]
2020

21+
bridge-address-from-env = [ "wormhole-anchor-sdk/bridge-address-from-env" ]
2122
mainnet = [ "wormhole-anchor-sdk/mainnet" ]
2223
solana-devnet = [ "wormhole-anchor-sdk/solana-devnet" ]
2324
tilt-devnet = [ "wormhole-anchor-sdk/tilt-devnet" ]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Wormhole Governance program
2+
3+
This program is designed to be a generic governance program that can be used to execute arbitrary instructions on behalf of a guardian set.
4+
The program being governed simply needs to expose admin instructions that can be invoked by a signer account (that's checked by the program's access control logic).
5+
6+
If the signer is set to be the "governance" PDA of this program, then the governance instruction is able to invoke the program's admin instructions.
7+
8+
# Building
9+
10+
The program interacts with the Wormhole program, and as such, needs to be aware of Wormhole's address. By default, the solana mainnet address is supplied. To override this, we can build like this:
11+
12+
```sh
13+
BRIDGE_ADDRESS=worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth cargo build-sbf --no-default-features --features bridge-address-from-env
14+
```

0 commit comments

Comments
 (0)