Skip to content

Commit cc114f7

Browse files
authored
chore(xc-admin): custom solana rpc for executor (#1731)
* Allow rpc override * ci
1 parent dcf7a31 commit cc114f7

File tree

1 file changed

+5
-1
lines changed
  • governance/xc_admin/packages/crank_executor/src

1 file changed

+5
-1
lines changed

governance/xc_admin/packages/crank_executor/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const VAULT: PublicKey = new PublicKey(envOrErr("VAULT"));
1717
const KEYPAIR: Keypair = Keypair.fromSecretKey(
1818
Uint8Array.from(JSON.parse(fs.readFileSync(envOrErr("WALLET"), "ascii")))
1919
);
20+
const SOLANA_RPC = process.env.SOLANA_RPC;
2021
const COMMITMENT: Commitment =
2122
(process.env.COMMITMENT as Commitment) ?? "confirmed";
2223
const COMPUTE_UNIT_PRICE_MICROLAMPORTS: number | undefined = process.env
@@ -26,7 +27,10 @@ const COMPUTE_UNIT_PRICE_MICROLAMPORTS: number | undefined = process.env
2627

2728
async function run() {
2829
const squad = new SquadsMesh({
29-
connection: new Connection(getPythClusterApiUrl(CLUSTER), COMMITMENT),
30+
connection: new Connection(
31+
SOLANA_RPC ?? getPythClusterApiUrl(CLUSTER),
32+
COMMITMENT
33+
),
3034
wallet: new NodeWallet(KEYPAIR),
3135
multisigProgramId: DEFAULT_MULTISIG_PROGRAM_ID,
3236
});

0 commit comments

Comments
 (0)