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
error: EDMM feature was requested in manifest, but SGX driver doesn't support it | |
load_enclave() failed with error: Operation not permitted (EPERM) |
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
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle Error: failed to get info about account AGYdbiu4DdxbhfqasZ9PXmxmtZhXXkq3mLrSaV7Riyt2: TypeError: fetch failed | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at r.<anonymous> (/home/node/sbv2-oracle/dist/index.js:35:44180) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at s (/home/node/sbv2-oracle/dist/index.js:1:47964) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at Generator.<anonymous> (/home/node/sbv2-oracle/dist/index.js:1:49302) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at Generator.throw (/home/node/sbv2-oracle/dist/index.js:1:48323) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at yVn (/home/node/sbv2-oracle/dist/index.js:1:45344) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle at u (/home/node/sbv2-oracle/dist/index.js:1:45581) | |
solana-permissionless-oracle-idx-1-5c7cf5d95b-nbhk7 solana-oracle |
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 fn create_account_from_pda(ctx: Context<CreateAccountFromPda>, space: u64) -> ProgramResult { | |
let pda_account = &ctx.accounts.pda_account; | |
let new_account = &ctx.accounts.new_account; | |
// Create account with seeds and bump | |
let seeds = &[b"your_pda_seed", &[pda_account.bump]]; | |
let signer = &[&seeds[..]]; | |
// Invoke the system program to create the account | |
let rent = Rent::get()?; |
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
diff --git a/charts/switchboard-oracle/templates/oracle-deployment.yaml b/charts/switchboard-oracle/templates/oracle-deployment.yaml | |
index fcd513a..e68ce14 100644 | |
--- a/charts/switchboard-oracle/templates/oracle-deployment.yaml | |
+++ b/charts/switchboard-oracle/templates/oracle-deployment.yaml | |
@@ -1,7 +1,7 @@ | |
{{- $values := .Values -}} | |
{{- range $index, $key := .Values.oracleKeys }} | |
apiVersion: apps/v1 | |
-kind: Deployment | |
+kind: StatefulSet |
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
#[derive(EthAbiType, EthAbiCodec, Default, Debug, Clone)] | |
pub struct Params { | |
callback: Address, | |
} | |
#[sb_function(expiration_seconds = 120, gas_limit = 5_500_000)] | |
async fn sb_function(client: SbMiddleware, _call_id: Address, params: Params) -> SbResult { | |
let receiver_contract = Receiver::new(params.callback, client.into()); | |
let mut random = [0u8; 32]; | |
Gramine::read_rand(random.as_mut_slice()).map_err(|_| SbError::SgxRandReadFail)?; |
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
ISwitchboard switchboard = ISwitchboard(SWITCHBOARD_PID); | |
address callId = switchboard.sendRequest{value: msg.value}( | |
functionId, | |
YOUR_PARAMAETERS_HERE | |
); |
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
use tokio; | |
use balancer_sdk; | |
use balancer_sdk::Web3; | |
use web3; | |
use ethcontract; | |
use balancer_sdk::helpers::build_web3; | |
use balancer_sdk::helpers::*; | |
use balancer_sdk::*; | |
use balancer_sdk::{Address, U256}; | |
use balancer_sdk::helpers::*; |
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
$ sb solana function test --parameters $PARAMETERS --cluster devnet | |
Finished dev [unoptimized + debuginfo] target(s) in 0.16s | |
Running `target/debug/arena-matchmaking-function` | |
Function result finished successfully. | |
Note that some Switchboard accounts are placeholders since we do not require you to provide a function or function request account | |
Emitted instructions (First instruction is the Switchboard verify instruction): | |
[ | |
{ | |
"keys": [ |
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 { PublicKey, Keypair, Cluster, Connection } from "@solana/web3.js"; | |
import { Program, Provider } from "@coral-xyz/anchor"; | |
import * as anchor from "@coral-xyz/anchor"; | |
import { | |
FunctionAccount, | |
SwitchboardProgram, | |
} from "@switchboard-xyz/solana.js"; | |
import * as types from "@switchboard-xyz/solana.js/lib/generated/attestation-program/index.js"; | |
const COMMITMENT = "processed"; |
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
use switchboard_solana::prelude::*; | |
use std::str::FromStr; | |
use solana_sdk::signer::keypair::Keypair; | |
use anchor_client::Client; | |
use bytemuck; | |
fn main() { | |
let pid = Pubkey::from_str("sbattyXrzedoNATfc4L31wC9Mhxsi1BmFhTiN8gDshx").unwrap(); | |
let cluster_str = std::env::var("CLUSTER").expect("env variable CLUSTER expected"); | |
let cluster = Cluster::from_str(&cluster_str).expect("cluster is not parseable"); |