updated examples

This commit is contained in:
Conner Gallagher 2023-06-29 10:34:38 -06:00
parent 3ffdc92298
commit f5bfc0d502
6 changed files with 24 additions and 22 deletions

View File

@ -16,9 +16,9 @@ no-log-ix-name = []
cpi = ["no-entrypoint"]
[dependencies]
bytemuck = "1.13.1"
switchboard-solana = { path = "../../../rust/switchboard-solana", version = "0.6.7" }
# switchboard-solana = { version = "^0.5.2", path = "../../../rust/switchboard-solana" }
anchor-lang = "^0.28.0"
anchor-spl = "^0.28.0"
solana-program = "1.16.1"
bytemuck = "1.13.1"
# anchor-lang = "^0.28.0"
# anchor-spl = "^0.28.0"
# solana-program = "1.16.1"

View File

@ -1,8 +1,8 @@
use crate::*;
use anchor_lang::prelude::*;
use anchor_lang::solana_program::clock;
use anchor_spl::token::Token;
pub use switchboard_solana::{VrfLiteAccountData, VrfLiteClose, VrfCloseParams, PERMISSION_SEED};
// pub use switchboard_solana::{VrfLiteAccountData, VrfLiteClose, VrfCloseParams, PERMISSION_SEED};
#[derive(Accounts)]
#[instruction(params: CloseStateParams)]

View File

@ -1,6 +1,6 @@
use crate::*;
use anchor_lang::prelude::*;
pub use switchboard_solana::VrfLiteAccountData;
// use anchor_lang::prelude::*;
// pub use switchboard_solana::VrfLiteAccountData;
#[derive(Accounts)]
#[instruction(params: InitStateParams)]

View File

@ -1,11 +1,11 @@
use crate::*;
use anchor_lang::prelude::*;
// use anchor_lang::prelude::*;
use anchor_lang::solana_program::clock;
use anchor_spl::token::Token;
pub use switchboard_solana::{
OracleQueueAccountData, PermissionAccountData, SbState, VrfLiteAccountData, VrfLiteRequestRandomness,
VrfSetCallback,
};
// pub use switchboard_solana::{
// OracleQueueAccountData, PermissionAccountData, SbState, VrfLiteAccountData, VrfLiteRequestRandomness,
// VrfSetCallback,
// };
#[derive(Accounts)]
#[instruction(params: RequestResultParams)] // rpc parameters hint

View File

@ -1,8 +1,8 @@
pub mod actions;
pub use actions::*;
pub use anchor_lang::prelude::*;
use anchor_spl::token::TokenAccount;
pub use switchboard_solana::prelude::*;
pub use switchboard_solana::SWITCHBOARD_PROGRAM_ID;

View File

@ -29,6 +29,8 @@ describe("anchor-vrf-lite-parser test", () => {
const provider = AnchorProvider.env();
anchor.setProvider(provider);
console.log(anchor.workspace);
const vrfClientProgram: anchor.Program<AnchorVrfLiteParser> =
anchor.workspace.AnchorVrfLiteParser;
@ -76,7 +78,7 @@ describe("anchor-vrf-lite-parser test", () => {
switchboard = await SwitchboardTestContext.loadFromProvider(provider, {
// You can provide a keypair to so the PDA schemes dont change between test runs
name: "Test Queue",
keypair: SwitchboardTestContext.loadKeypair("~/.keypairs/queue.json"),
// keypair: SwitchboardTestContext.loadKeypair("~/.keypairs/queue.json"),
queueSize: 10,
reward: 0,
minStake: 0,
@ -84,13 +86,13 @@ describe("anchor-vrf-lite-parser test", () => {
unpermissionedFeeds: true,
unpermissionedVrf: true,
enableBufferRelayers: true,
oracle: {
name: "Test Oracle",
enable: true,
stakingWalletKeypair: SwitchboardTestContext.loadKeypair(
"~/.keypairs/oracleWallet.json"
),
},
// oracle: {
// name: "Test Oracle",
// enable: true,
// stakingWalletKeypair: SwitchboardTestContext.loadKeypair(
// "~/.keypairs/oracleWallet.json"
// ),
// },
});
queueAccount = switchboard.queue;
queue = await queueAccount.loadData();