@@ -9,16 +9,13 @@ import {
99import { Transaction , Connection , PublicKey } from "@solana/web3.js" ;
1010import { BN } from "bn.js" ;
1111import { Constants } from "pyth-staking-wasm" ;
12- import {
13- EPOCH_DURATION ,
14- AUTHORITY_KEYPAIR ,
15- GOVERNANCE_PROGRAM ,
16- RPC_NODE ,
17- REALM ,
18- } from "./mainnet_beta" ;
12+ import { EPOCH_DURATION , AUTHORITY_KEYPAIR , RPC_NODE } from "./mainnet_beta" ;
1913
14+ import { GOVERNANCE_ADDRESS , REALM_ID } from "../constants" ;
2015// Actual transaction hash :
2116// mainnet-beta : vjUE28suh1yt42aRtsj8mwYpz4zM17WQo4ujfXCDGQ5WK1z5G2JATYvEduh1vdMt2pT9auVLJnoCQMtiyEP3aYC
17+ // devnet : 3gKKKPGAfV15yV1Ce6Tn9vmwbeRnMHcyrvDxDpPhHAEr6L8VAe4N3rkNizhLGa7cM19xQaJykt6rxjx651fFRqXM
18+
2219async function main ( ) {
2320 const tx = new Transaction ( ) ;
2421
@@ -50,9 +47,9 @@ async function main() {
5047
5148 await withCreateGovernance (
5249 tx . instructions ,
53- GOVERNANCE_PROGRAM , // Address of our instance of the governance program
50+ GOVERNANCE_ADDRESS ( ) , // Address of our instance of the governance program
5451 PROGRAM_VERSION_V2 , // Version of the onchain program
55- REALM , // Address of the Pyth realms
52+ REALM_ID , // Address of the Pyth realms
5653 undefined , // This is a generic governance so no initial governed account
5754 governanceConfig ,
5855 new PublicKey ( 0 ) , // The realm authority is creating it, so this doesn't need to be defined
0 commit comments