This commit is contained in:
Conner Gallagher 2023-06-28 13:58:03 -06:00
parent 8f72e0d747
commit e84a992d83
3 changed files with 4 additions and 31 deletions

View File

@ -1,29 +0,0 @@
import * as sbv2 from "./src";
import { Connection } from "@solana/web3.js";
async function main() {
const program = await sbv2.SwitchboardProgram.load(
"devnet",
new Connection(
"https://switchbo-switchbo-6225.devnet.rpcpool.com/f6fb9f02-0777-498b-b8f5-67cbb1fc0d14"
),
sbv2.loadKeypair(
"~/switchboard_environments_v2/devnet/upgrade_authority/upgrade_authority.json"
)
);
const [programState] = await sbv2.AttestationProgramStateAccount.getOrCreate(
program
);
console.log(`Initialized: ${programState.publicKey.toBase58()}`);
}
main()
.then(() => {
// console.log("Executed successfully");
})
.catch((err) => {
console.error(err);
});

View File

@ -77,7 +77,7 @@ describe("Vrf Pool Tests", () => {
rpcUrl: "http://0.0.0.0:8899",
oracleKey: oracle1.publicKey.toBase58(),
secretPath: "~/.config/solana/id.json",
silent: true,
silent: false,
});
chalkString("payer", ctx.program.walletPubkey.toBase58());

View File

@ -8,7 +8,9 @@ use std::cell::Ref;
// VrfPoolRemove
// TODO: VrfPoolAdd (Can be done off-chain)
#[derive(Default, Debug, Copy, Clone, AnchorDeserialize, AnchorSerialize)]
#[repr(packed)]
#[zero_copy(unsafe)]
#[derive(Default, Debug)]
pub struct VrfPoolRow {
pub timestamp: i64,
pub pubkey: Pubkey,