Skip to content

Instantly share code, notes, and snippets.

@gallynaut
Created June 21, 2023 22:52
Show Gist options
  • Save gallynaut/8074774aa128a8294517164fb82714a7 to your computer and use it in GitHub Desktop.
Save gallynaut/8074774aa128a8294517164fb82714a7 to your computer and use it in GitHub Desktop.
load NodeOracle from image tag
const oracle = new NodeOracle({
chain: "solana",
// use the latest testnet (devnet) version of the oracle
imageTag: "testnet-2.0.7",
// disables production capabilities like monitoring and alerts
network: "localnet",
rpcUrl: provider.connection.rpcEndpoint,
oracleKey: switchboard.oracle.publicKey.toBase58(),
// path to the payer keypair so the oracle can pay for txns
secretPath: switchboard.walletPath || "~/.config/solana/id.json",
// set to true to suppress oracle logs in the console
silent: false,
// optional env variables to speed up the workflow
envVariables: {
VERBOSE: "1",
DEBUG: "1",
DISABLE_NONCE_QUEUE: "1",
DISABLE_METRICS: "1",
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment