Skip to content

Commit

Permalink
chore(xc-admin): custom solana rpc for executor (#1731)
Browse files Browse the repository at this point in the history
* Allow rpc override

* ci
  • Loading branch information
guibescos authored Jun 25, 2024
1 parent dcf7a31 commit cc114f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion governance/xc_admin/packages/crank_executor/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const VAULT: PublicKey = new PublicKey(envOrErr("VAULT"));
const KEYPAIR: Keypair = Keypair.fromSecretKey(
Uint8Array.from(JSON.parse(fs.readFileSync(envOrErr("WALLET"), "ascii")))
);
const SOLANA_RPC = process.env.SOLANA_RPC;
const COMMITMENT: Commitment =
(process.env.COMMITMENT as Commitment) ?? "confirmed";
const COMPUTE_UNIT_PRICE_MICROLAMPORTS: number | undefined = process.env
Expand All @@ -26,7 +27,10 @@ const COMPUTE_UNIT_PRICE_MICROLAMPORTS: number | undefined = process.env

async function run() {
const squad = new SquadsMesh({
connection: new Connection(getPythClusterApiUrl(CLUSTER), COMMITMENT),
connection: new Connection(
SOLANA_RPC ?? getPythClusterApiUrl(CLUSTER),
COMMITMENT
),
wallet: new NodeWallet(KEYPAIR),
multisigProgramId: DEFAULT_MULTISIG_PROGRAM_ID,
});
Expand Down

0 comments on commit cc114f7

Please sign in to comment.