Skip to content

Commit

Permalink
Update wormhole endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Dec 8, 2023
1 parent 93e9c49 commit 40d641e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions governance/multisig_wh_message_builder/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export const CONFIG: Record<Cluster, Config> = {
devnet: {
wormholeClusterName: "TESTNET",
vault: new PublicKey("6baWtW1zTUVMSJHJQVxDUXWzqrQeYBr6mu31j3bTKwY3"),
wormholeRpcEndpoint: "https://wormhole-v2-testnet-api.certus.one",
wormholeRpcEndpoint: "https://api.testnet.wormholescan.io",
},
mainnet: {
wormholeClusterName: "MAINNET",
vault: new PublicKey("FVQyHcooAtThJ83XFrNnv74BcinbRH3bRmfFamAHBfuj"),
wormholeRpcEndpoint: "https://wormhole-v2-mainnet-api.certus.one",
wormholeRpcEndpoint: "https://api.wormholescan.io",
},
localdevnet: {
wormholeClusterName: "DEVNET",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const OFFSET: number = Number(process.env.OFFSET ?? "-1");
const COMMITMENT: Commitment =
(process.env.COMMITMENT as Commitment) ?? "confirmed";

const GUARDIAN_RPC = process.env.GUARDIAN_RPC;

async function run() {
const provider = new AnchorProvider(
new Connection(getPythClusterApiUrl(CLUSTER), COMMITMENT),
Expand All @@ -65,7 +67,7 @@ async function run() {
? (claimRecord.sequence as BN).toNumber()
: -1;
lastSequenceNumber = Math.max(lastSequenceNumber, OFFSET);
const wormholeApi = WORMHOLE_API_ENDPOINT[CLUSTER];
const wormholeApi = GUARDIAN_RPC ?? WORMHOLE_API_ENDPOINT[CLUSTER];
const productAccountToSymbol: { [key: string]: string } = {};
while (true) {
lastSequenceNumber += 1;
Expand Down
12 changes: 6 additions & 6 deletions governance/xc_admin/packages/xc_admin_common/src/wormhole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export const WORMHOLE_ADDRESS: Record<PythCluster, PublicKey | undefined> = {
testnet: undefined,
};

// Source : https://book.wormhole.com/reference/rpcnodes.html
// Source : https://docs.wormhole.com/wormhole/reference/sdk-docs#mainnet-guardian-rpc
export const WORMHOLE_API_ENDPOINT: Record<PythCluster, string | undefined> = {
"mainnet-beta": "https://wormhole-v2-mainnet-api.certus.one",
"pythtest-conformance": "https://wormhole-v2-testnet-api.certus.one",
"pythtest-crosschain": "https://wormhole-v2-testnet-api.certus.one",
devnet: "https://wormhole-v2-testnet-api.certus.one",
pythnet: "https://wormhole-v2-mainnet-api.certus.one",
"mainnet-beta": "https://api.wormholescan.io",
"pythtest-conformance": "https://api.testnet.wormholescan.io",
"pythtest-crosschain": "https://api.testnet.wormholescan.io",
devnet: "https://api.testnet.wormholescan.io",
pythnet: "https://api.wormholescan.io",
localnet: undefined,
testnet: undefined,
};

0 comments on commit 40d641e

Please sign in to comment.