This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "BSKT / USDC", | |
"tasks": [ | |
{ | |
"cacheTask": { | |
"cacheItems": [ | |
{ | |
"variableName": "USDC_TO_BSKT_1000", | |
"job": { | |
"tasks": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub use switchboard_solana::get_ixn_discriminator; | |
pub use switchboard_solana::prelude::*; | |
pub use switchboard_utils::protos::http::http_task; | |
pub use switchboard_utils::reqwest; | |
#[tokio::main(worker_threads = 12)] | |
async fn main() { | |
println!("Hello, world!"); | |
let runner = FunctionRunner::from_env(None).unwrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Deribit BTC IV - 1D", | |
"tasks": [ | |
{ | |
"cacheTask": { | |
"cacheItems": [ | |
{ | |
"variableName": "ENDING_TIMESTAMP", | |
"job": { | |
"tasks": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tasks": [ | |
{ | |
"cacheTask": { | |
"cacheItems": [ | |
{ | |
"variableName": "CURRENT_TIMESTAMP", | |
"job": { | |
"tasks": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { clusterApiUrl, Connection } from '@solana/web3.js'; | |
import { | |
AccountNotFoundError, | |
AggregatorAccount, | |
LeaseAccount, | |
SwitchboardProgram, | |
} from '@switchboard-xyz/solana.js'; | |
async function main() { | |
const program = await SwitchboardProgram.load( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"tasks": [ | |
{ | |
"httpTask": { | |
"url": "https://mywebsite.org/path", | |
"method": "METHOD_POST", | |
"headers": [ | |
{ | |
"key": "MY_HEADER_KEY", | |
"value": "MY_HEADER_VALUE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"publicKey": "KcvZpQegBPZBfMq16aj1B6C7L8DegXAK6G1P18ViwNz", | |
"name": "STARS / USD", | |
"metadata": "", | |
"queuePubkey": "5JYwqvKkqp35w8Nq3ba4z1WYUeJQ1rB36V8XvaGp6zn1", | |
"oracleRequestBatchSize": 4, | |
"minOracleResults": 2, | |
"minJobResults": 1, | |
"minUpdateDelaySeconds": 1800, | |
"startAfter": "0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"publicKey": "JA1GQW8ta1LjNn3h1vZmhL3fWEdZ6F9QfZHvPB4y7fLm", | |
"name": "GST/USD", | |
"metadata": "", | |
"queuePubkey": "5JYwqvKkqp35w8Nq3ba4z1WYUeJQ1rB36V8XvaGp6zn1", | |
"oracleRequestBatchSize": 3, | |
"minOracleResults": 2, | |
"minJobResults": 2, | |
"minUpdateDelaySeconds": 60, | |
"startAfter": "0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"publicKey": "GWHWp77EvL3vDr8G8YtWYAyczJTQSGLWWVKtcVSiDFtJ", | |
"name": "LARIX / USD", | |
"metadata": "", | |
"queuePubkey": "5JYwqvKkqp35w8Nq3ba4z1WYUeJQ1rB36V8XvaGp6zn1", | |
"oracleRequestBatchSize": 3, | |
"minOracleResults": 3, | |
"minJobResults": 3, | |
"minUpdateDelaySeconds": 180, | |
"startAfter": "0", |
NewerOlder