repo_id
stringclasses 563
values | file_path
stringlengths 40
166
| content
stringlengths 1
2.94M
| __index_level_0__
int64 0
0
|
|---|---|---|---|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/tsconfig.json
|
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs"
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/tsconfig.lib.json
|
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../dist/out-tsc",
"declaration": true,
"types": ["node"],
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/.eslintrc.json
|
{
"extends": ["../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
"@nx/dependency-checks": [
"error",
{
"ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"]
}
]
}
}
]
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/tsconfig.spec.json
|
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/jest.config.ts
|
/* eslint-disable */
import { readFileSync } from 'fs';
// Reading the SWC compilation config and remove the "exclude"
// for the test files to be compiled by SWC
const { exclude: _, ...swcJestConfig } = JSON.parse(
readFileSync(`${__dirname}/.swcrc`, 'utf-8')
);
// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves.
// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude"
if (swcJestConfig.swcrc === undefined) {
swcJestConfig.swcrc = false;
}
// Uncomment if using global setup/teardown files being transformed via swc
// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries
// jest needs EsModule Interop to find the default exported setup/teardown functions
// swcJestConfig.module.noInterop = false;
export default {
displayName: 'anchor',
preset: '../jest.preset.js',
transform: {
'^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
},
moduleFileExtensions: ['ts', 'js', 'html'],
testEnvironment: '',
coverageDirectory: '../coverage/anchor',
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
import * as anchor from '@coral-xyz/anchor';
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs/journal/Cargo.toml
|
[package]
name = "journal"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "journal"
[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []
idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = "0.30.1"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs/journal/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs/journal
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/programs/journal/src/lib.rs
|
use anchor_lang::prelude::*;
// This is your program's public key and it will update
// automatically when you build the project.
declare_id!("94L2mJxVu6ZMmHaGsCHRQ65Kk2mea6aTnwWjSdfSsmBC");
#[program]
mod journal {
use super::*;
pub fn create_journal_entry(
ctx: Context<CreateEntry>,
title: String,
message: String,
) -> Result<()> {
msg!("Journal Entry Created");
msg!("Title: {}", title);
msg!("Message: {}", message);
let journal_entry = &mut ctx.accounts.journal_entry;
journal_entry.owner = ctx.accounts.owner.key();
journal_entry.title = title;
journal_entry.message = message;
Ok(())
}
pub fn update_journal_entry(
ctx: Context<UpdateEntry>,
title: String,
message: String,
) -> Result<()> {
msg!("Journal Entry Updated");
msg!("Title: {}", title);
msg!("Message: {}", message);
let journal_entry = &mut ctx.accounts.journal_entry;
journal_entry.message = message;
Ok(())
}
pub fn delete_journal_entry(_ctx: Context<DeleteEntry>, title: String) -> Result<()> {
msg!("Journal entry titled {} deleted", title);
Ok(())
}
}
#[account]
pub struct JournalEntryState {
pub owner: Pubkey,
pub title: String,
pub message: String,
}
#[derive(Accounts)]
#[instruction(title: String, message: String)]
pub struct CreateEntry<'info> {
#[account(
init,
seeds = [title.as_bytes(), owner.key().as_ref()],
bump,
payer = owner,
space = 8 + 32 + 4 + title.len() + 4 + message.len()
)]
pub journal_entry: Account<'info, JournalEntryState>,
#[account(mut)]
pub owner: Signer<'info>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
#[instruction(title: String, message: String)]
pub struct UpdateEntry<'info> {
#[account(
mut,
seeds = [title.as_bytes(), owner.key().as_ref()],
bump,
realloc = 8 + 32 + 4 + title.len() + 4 + message.len(),
realloc::payer = owner,
realloc::zero = true,
)]
pub journal_entry: Account<'info, JournalEntryState>,
#[account(mut)]
pub owner: Signer<'info>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
#[instruction(title: String)]
pub struct DeleteEntry<'info> {
#[account(
mut,
seeds = [title.as_bytes(), owner.key().as_ref()],
bump,
close= owner,
)]
pub journal_entry: Account<'info, JournalEntryState>,
#[account(mut)]
pub owner: Signer<'info>,
pub system_program: Program<'info, System>,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/src/journal-exports.ts
|
// Here we export some useful types and functions for interacting with the Anchor program.
import { AnchorProvider, Program } from "@coral-xyz/anchor";
import { Cluster, PublicKey } from "@solana/web3.js";
import JournalIDL from "../target/idl/journal.json";
import type { Journal } from "../target/types/journal";
// Re-export the generated IDL and type
export { Journal, JournalIDL };
// After updating your program ID (e.g. after running `anchor keys sync`) update the value below.
export const JOURNAL_PROGRAM_ID = new PublicKey(
"EZB64BQPMPzGNEV6XvrxTSPcQHCXaRF7aXMgunxQ6LNh"
);
// This is a helper function to get the Counter Anchor program.
export function getJournalProgram(provider: AnchorProvider) {
return new Program(JournalIDL as Journal, provider);
}
// This is a helper function to get the program ID for the Journal program depending on the cluster.
export function getJournalProgramId(cluster: Cluster) {
switch (cluster) {
case "devnet":
case "testnet":
case "mainnet-beta":
default:
return JOURNAL_PROGRAM_ID;
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor
|
solana_public_repos/developer-bootcamp-2024/project-4-crud-app/anchor/src/index.ts
|
// This file was generated by preset-anchor. Programs are exported from this file.
export * from './journal-exports';
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/Cargo.toml
|
[workspace]
members = [
"programs/*"
]
resolver = "2"
[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/metadata.json
|
{
"name": "Token Lottery Ticket #",
"symbol": "TLT",
"description": "Lottery Ticket",
"image": "https://img.freepik.com/free-photo/old-used-brown-torn-ticket-stub-isolated_1101-3193.jpg"
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/Anchor.toml
|
[toolchain]
[features]
resolution = true
skip-lint = false
[programs.devnet]
token_lottery = "2RTh2Y4e2N421EbSnUYTKdGqDHJH7etxZb3VrWDMpNMY"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "localnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
[[test.validator.clone]]
address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/package.json
|
{
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1",
"@solana/spl-token": "^0.4.8",
"@switchboard-xyz/on-demand": "^1.2.16",
"anchor-bankrun": "^0.4.0",
"solana-bankrun": "^0.3.0"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"prettier": "^2.6.2",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/tsconfig.json
|
{
"compilerOptions": {
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true,
"resolveJsonModule": true
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle2.json
|
{"account":{"data":["gB4Q8apJNzbu2RwBx+WKXfFdQYab7k2od3Kr3BZVt193IlcJcGCycRoLDcaXA20WJC/iNF7nk4mNt3Vp/+SSD9MD3mw9cx9vBAAAAAAAAADVuKRmAAAAAFXzrWYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkC9G7+i8g0HKjNZbB5bH38jNh/rhxxFkyHpwgg47dUfq3T+q8bFm0wl+jQl5cz4f4sBhZxe+7XouV/yfpP19ogAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWOzkz4ZGbPT0UQ/MX6PWYdv5BXdUAc9ppTDTxXv5HY7hRZXVVxec2IxUGWQKd1STA51qVfQZnD4XIS/o+9kI+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"8Vjo4QEbmB9QhhBu6QiTy66G1tw8WomtFVWECMi3a71y"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/setup-local.sh
|
solana account -u m --output json-compact --output-file oracle7.json 3DNK48NH6jvay2nHBiW3wk5yWegD9C2crk2vd9aznRz6
solana account -u m --output json-compact --output-file oracle6.json 7EyXLrFUtoRoYKhPBnRpjyo2nGTsfGgo2d7XcPb4TwPF
solana account -u m --output json-compact --output-file oracle5.json 2RN1v42zWzzKhLty3Dgen1vbRc4eBsE8PCHanvaSLwJc
solana account -u m --output json-compact --output-file oracle4.json CXyurDdbo9JR5Xh9QuknMJSsuGM3aQdsa38ZVrKSjp1c
solana account -u m --output json-compact --output-file oracle3.json GLc9EQ5ARgnBJvM59wU6eNjaeAEeBa1Gj7jp8rT5NJ8v
solana account -u m --output json-compact --output-file oracle2.json 8Vjo4QEbmB9QhhBu6QiTy66G1tw8WomtFVWECMi3a71y
solana account -u m --output json-compact --output-file oracle1.json BuZBFufhjGn1HDUCukJYognbeoQQW8ACZJq5sWoQPnGe
solana account -u m --output json-compact --output-file oracle0.json GcNZRMqGSEyEULZnLDD3ParcHTgFBrNfUdUCDtThP55e
solana account -u m --output json-compact --output-file randomness_queue.json A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w
solana account -u m --output json-compact --output-file sb_randomness_config.json 7Gs9n5FQMeC9XcEhg281bRZ6VHRrCvqp5Yq1j78HkvNa
solana program dump -u m SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv ondemand.so
solana program dump -u m SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f switchboard.so
solana program dump -u m metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s metadata.so
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle3.json
|
{"account":{"data":["gB4Q8apJNzb16uEUf2Nct4zUVUVFIWE7pWxLbFa0bvfl4avUt+Qm/RoLDcaXA20WJC/iNF7nk4mNt3Vp/+SSD9MD3mw9cx9vBAAAAAAAAAA9uaRmAAAAAL3zrWYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL01fic19UGENWixkuScpKt6aV/j6vzj9uQFTbbju1dx6Uw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xAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"GLc9EQ5ARgnBJvM59wU6eNjaeAEeBa1Gj7jp8rT5NJ8v"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/randomness_queue.json
|
{"account":{"data":["2cI3f7hTigEd1I0O4f5wWbKGZQe4T19CWddAjIEuiL1iYKSRT3omBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":44599680,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":6280},"pubkey":"A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle4.json
|
{"account":{"data":["gB4Q8apJNzYmqVYWNRSk80uEJltwyu7x1ti4pv8rEAlZ4kN0ztK94A0xV0VIaTJ6Z1KP9dybIZ5Vbx0K687elIe3LXUEeCXABAAAAAAAAAD9HKpmAAAAAH1Xs2YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuKMt0Q3pM9lN2jiJkWohtCuE1BsoGYtp2P1mbG2f+mWPzxSh5Scc6ZHR2oV6T2lSp4udQSUaVOwWOuJHdXo96gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"CXyurDdbo9JR5Xh9QuknMJSsuGM3aQdsa38ZVrKSjp1c"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/start-validator.sh
|
solana-test-validator --account 3DNK48NH6jvay2nHBiW3wk5yWegD9C2crk2vd9aznRz6 oracle7.json --account 7EyXLrFUtoRoYKhPBnRpjyo2nGTsfGgo2d7XcPb4TwPF oracle6.json --account 2RN1v42zWzzKhLty3Dgen1vbRc4eBsE8PCHanvaSLwJc oracle5.json --account CXyurDdbo9JR5Xh9QuknMJSsuGM3aQdsa38ZVrKSjp1c oracle4.json --account GLc9EQ5ARgnBJvM59wU6eNjaeAEeBa1Gj7jp8rT5NJ8v oracle3.json --account 8Vjo4QEbmB9QhhBu6QiTy66G1tw8WomtFVWECMi3a71y oracle2.json --account BuZBFufhjGn1HDUCukJYognbeoQQW8ACZJq5sWoQPnGe oracle1.json --account GcNZRMqGSEyEULZnLDD3ParcHTgFBrNfUdUCDtThP55e oracle0.json --bpf-program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s metadata.so --bpf-program SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f switchboard.so --account A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w randomness_queue.json --bpf-program SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv ondemand.so --account 7Gs9n5FQMeC9XcEhg281bRZ6VHRrCvqp5Yq1j78HkvNa sb_randomness_config.json -r
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle5.json
|
{"account":{"data":["gB4Q8apJNzbNNadcFLigDR9vxXC5NtFfWjpDrRdZ4LzD4kIAw/cB5A0xV0VIaTJ6Z1KP9dybIZ5Vbx0K687elIe3LXUEeCXABAAAAAAAAADJ+qlmAAAAAEk1s2YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"2RN1v42zWzzKhLty3Dgen1vbRc4eBsE8PCHanvaSLwJc"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/sb_randomness_config.json
|
{"account":{"data":["2JJrXmhLtrH/AQEAAAAAAB3UjQ7h/nBZsoZlB7hPX0JZ10CMgS6IvWJgpJFPeiYFlj/q0NRVwCQ0XsHDcmhDaTu+ZCaCWGKm04upzNjlvXwAAAAAAAAAABAnAAAAAAAAvQUAAAAAAAAAAAAAAAAAAMJWvRAAAAAAvgUAAAAAAAAAAAAAAAAAANJ9vRAAAAAAvAUAAAAAAAAAAAAAAAAAALIvvRAAAAAAtfHKhPf6Xd9Z6MWFm59AZW3+GjAQaViJ0PNaJaoHtAkGc1LZBlQk7js/ZuPztVCZ4HCR0BvjImQLVKD7GV1SoyF6g+ojs0BUMUk8r/Pc4URUmcJ+SKuM13Z772voBjdLIQFnAjwDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAA","base64"],"executable":false,"lamports":15757440,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":2136},"pubkey":"7Gs9n5FQMeC9XcEhg281bRZ6VHRrCvqp5Yq1j78HkvNa"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle6.json
|
{"account":{"data":["gB4Q8apJNzYw3YumCiOYfNKandQMGu62sHCRmj27INgqSAKi5mWPvBoLDcaXA20WJC/iNF7nk4mNt3Vp/+SSD9MD3mw9cx9vBAAAAAAAAAC9uKRmAAAAAD3zrWYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAx6j5wBljoqNlEdknPkB1KPkPQwgjc/vykmzy0uiOnVcGntMMEsnJuR/EdSdevh7rMzeHNvmkI29xgCBmNgQ2IwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWOzkz4ZGbPT0UQ/MX6PWYdv5BXdUAc9ppTDTxXv5HY5Y7OTPhkZs9PRRD8xfo9Zh2/kFd1QBz2mlMNPFe/kdjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"7EyXLrFUtoRoYKhPBnRpjyo2nGTsfGgo2d7XcPb4TwPF"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/package.json
|
{
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@solana/spl-token": "^0.4.8",
"@switchboard-xyz/on-demand": "^1.2.15"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"prettier": "^2.6.2",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle7.json
|
{"account":{"data":["gB4Q8apJNzab5tWaOGUwtRtgfr14Z1lXDbsUYuxemm7vrNm7EJBzng0xV0VIaTJ6Z1KP9dybIZ5Vbx0K687elIe3LXUEeCXABAAAAAAAAACyY6lmAAAAADKesmYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqzaW/aT8E8MB82KypM43HEIPKEBp3aBzDiB23COOQmFpzVLh2+EI4FpvEijAFYznnq6rKco+QCOrG9EP+T2EJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4UWV1VcXnNiMVBlkCndUkwOdalX0GZw+FyEv6PvZCPnveuq4Fx1fR086kNKGKUiLFLlHOmwDL939FK+ErnJ/jwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"3DNK48NH6jvay2nHBiW3wk5yWegD9C2crk2vd9aznRz6"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle0.json
|
{"account":{"data":["gB4Q8apJNzY3t8KUU+RLM7jpZhmHS4T6m/PeCL0QTlOYSy0GflH1Ww0xV0VIaTJ6Z1KP9dybIZ5Vbx0K687elIe3LXUEeCXABAAAAAAAAADSDKpmAAAAAFJHs2YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAu2+CkEGjBOhCu/12SM4imS/OZtqdiij7x9417/UP+5D6LM9wsYuwShWP+tzU0ExLOlBctAykY13akEP84+h6nwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWOzkz4ZGb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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"GcNZRMqGSEyEULZnLDD3ParcHTgFBrNfUdUCDtThP55e"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/setup/oracle1.json
|
{"account":{"data":["gB4Q8apJNz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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==","base64"],"executable":false,"lamports":34410240,"owner":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","rentEpoch":18446744073709551615,"space":4816},"pubkey":"BuZBFufhjGn1HDUCukJYognbeoQQW8ACZJq5sWoQPnGe"}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/tests/token-lottery.ts
|
import * as anchor from "@coral-xyz/anchor";
import * as sb from "@switchboard-xyz/on-demand";
import { Program } from "@coral-xyz/anchor";
import { TokenLottery } from "../target/types/token_lottery";
import { TOKEN_PROGRAM_ID } from "@coral-xyz/anchor/dist/cjs/utils/token";
import { getAssociatedTokenAddressSync } from "@solana/spl-token";
describe("token-lottery", () => {
// Configure the client to use the local cluster.
const provider = anchor.AnchorProvider.env();
const connection = provider.connection;
const wallet = provider.wallet as anchor.Wallet;
anchor.setProvider(provider);
const program = anchor.workspace.TokenLottery as Program<TokenLottery>;
let switchboardProgram;
const rngKp = anchor.web3.Keypair.generate();
const TOKEN_METADATA_PROGRAM_ID = new anchor.web3.PublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s');
before("Loading switchboard program", async () => {
const switchboardIDL = await anchor.Program.fetchIdl(
sb.SB_ON_DEMAND_PID,
{connection: new anchor.web3.Connection("https://mainnet.helius-rpc.com/?api-key=792d0c03-a2b0-469e-b4ad-1c3f2308158c")}
);
switchboardProgram = new anchor.Program(switchboardIDL, provider);
});
async function buyTicket() {
const buyTicketIx = await program.methods.buyTicket()
.accounts({
tokenProgram: TOKEN_PROGRAM_ID,
})
.instruction();
const blockhashContext = await connection.getLatestBlockhash();
const computeIx = anchor.web3.ComputeBudgetProgram.setComputeUnitLimit({
units: 300000
});
const priorityIx = anchor.web3.ComputeBudgetProgram.setComputeUnitPrice({
microLamports: 1
});
const tx = new anchor.web3.Transaction({
blockhash: blockhashContext.blockhash,
lastValidBlockHeight: blockhashContext.lastValidBlockHeight,
feePayer: wallet.payer.publicKey,
}).add(buyTicketIx)
.add(computeIx)
.add(priorityIx);
const sig = await anchor.web3.sendAndConfirmTransaction(connection, tx, [wallet.payer]);
console.log("buy ticket ", sig);
}
it("Is initialized!", async () => {
const slot = await connection.getSlot();
console.log("Current slot", slot);
const mint = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from('collection_mint')],
program.programId,
)[0];
const metadata = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from('metadata'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), mint.toBuffer()],
TOKEN_METADATA_PROGRAM_ID,
)[0];
const masterEdition = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from('metadata'), TOKEN_METADATA_PROGRAM_ID.toBuffer(), mint.toBuffer(), Buffer.from('edition')],
TOKEN_METADATA_PROGRAM_ID,
)[0];
const initConfigIx = await program.methods.initializeConfig(
new anchor.BN(0),
new anchor.BN(slot + 10),
new anchor.BN(10000),
).instruction();
const initLotteryIx = await program.methods.initializeLottery()
.accounts({
masterEdition: masterEdition,
metadata: metadata,
tokenProgram: TOKEN_PROGRAM_ID,
})
.instruction();
const blockhashContext = await connection.getLatestBlockhash();
const tx = new anchor.web3.Transaction({
blockhash: blockhashContext.blockhash,
lastValidBlockHeight: blockhashContext.lastValidBlockHeight,
feePayer: wallet.payer.publicKey,
}).add(initConfigIx)
.add(initLotteryIx);
const sig = await anchor.web3.sendAndConfirmTransaction(connection, tx, [wallet.payer]);
console.log(sig);
});
it("Is buying tickets!", async () => {
await buyTicket();
await buyTicket();
await buyTicket();
await buyTicket();
await buyTicket();
});
it("Is committing and revealing a winner", async () => {
const queue = new anchor.web3.PublicKey("A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w");
const queueAccount = new sb.Queue(switchboardProgram, queue);
console.log("Queue account", queue.toString());
try {
await queueAccount.loadData();
} catch (err) {
console.log("Queue account not found");
process.exit(1);
}
const [randomness, ix] = await sb.Randomness.create(switchboardProgram, rngKp, queue);
console.log("Created randomness account..");
console.log("Randomness account", randomness.pubkey.toBase58());
console.log("rkp account", rngKp.publicKey.toBase58());
const createRandomnessTx = await sb.asV0Tx({
connection: connection,
ixs: [ix],
payer: wallet.publicKey,
signers: [wallet.payer, rngKp],
computeUnitPrice: 75_000,
computeUnitLimitMultiple: 1.3,
});
const blockhashContext = await connection.getLatestBlockhashAndContext();
const createRandomnessSignature = await connection.sendTransaction(createRandomnessTx);
await connection.confirmTransaction({
signature: createRandomnessSignature,
blockhash: blockhashContext.value.blockhash,
lastValidBlockHeight: blockhashContext.value.lastValidBlockHeight
});
console.log(
"Transaction Signature for randomness account creation: ",
createRandomnessSignature
);
const sbCommitIx = await randomness.commitIx(queue);
const commitIx = await program.methods.commitAWinner()
.accounts(
{
randomnessAccountData: randomness.pubkey
}
)
.instruction();
const commitTx = await sb.asV0Tx({
connection: switchboardProgram.provider.connection,
ixs: [sbCommitIx, commitIx],
payer: wallet.publicKey,
signers: [wallet.payer],
computeUnitPrice: 75_000,
computeUnitLimitMultiple: 1.3,
});
const commitSignature = await connection.sendTransaction(commitTx);
await connection.confirmTransaction({
signature: commitSignature,
blockhash: blockhashContext.value.blockhash,
lastValidBlockHeight: blockhashContext.value.lastValidBlockHeight
});
console.log(
"Transaction Signature for commit: ",
commitSignature
);
const sbRevealIx = await randomness.revealIx();
const revealIx = await program.methods.chooseAWinner()
.accounts({
randomnessAccountData: randomness.pubkey
})
.instruction();
const revealTx = await sb.asV0Tx({
connection: switchboardProgram.provider.connection,
ixs: [sbRevealIx, revealIx],
payer: wallet.publicKey,
signers: [wallet.payer],
computeUnitPrice: 75_000,
computeUnitLimitMultiple: 1.3,
});
const revealSignature = await connection.sendTransaction(revealTx);
await connection.confirmTransaction({
signature: commitSignature,
blockhash: blockhashContext.value.blockhash,
lastValidBlockHeight: blockhashContext.value.lastValidBlockHeight
});
console.log(" Transaction Signature revealTx", revealSignature);
});
it("Is claiming a prize", async () => {
const tokenLotteryAddress = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from('token_lottery')],
program.programId,
)[0];
const lotteryConfig = await program.account.tokenLottery.fetch(tokenLotteryAddress);
console.log("Lottery winner", lotteryConfig.winner);
console.log("Lottery config", lotteryConfig);
const tokenAccounts = await connection.getParsedTokenAccountsByOwner(wallet.publicKey, {programId: TOKEN_PROGRAM_ID});
tokenAccounts.value.forEach(async (account) => {
console.log("Token account mint", account.account.data.parsed.info.mint);
console.log("Token account address", account.pubkey.toBase58());
});
const winningMint = anchor.web3.PublicKey.findProgramAddressSync(
[new anchor.BN(lotteryConfig.winner).toArrayLike(Buffer, 'le', 8)],
program.programId,
)[0];
console.log("Winning mint", winningMint.toBase58());
const winningTokenAddress = getAssociatedTokenAddressSync(
winningMint,
wallet.publicKey
);
console.log("Winning token address", winningTokenAddress.toBase58());
const claimIx = await program.methods.claimPrize()
.accounts({
tokenProgram: TOKEN_PROGRAM_ID,
})
.instruction();
const blockhashContext = await connection.getLatestBlockhash();
const claimTx = new anchor.web3.Transaction({
blockhash: blockhashContext.blockhash,
lastValidBlockHeight: blockhashContext.lastValidBlockHeight,
feePayer: wallet.payer.publicKey,
}).add(claimIx);
const claimSig = await anchor.web3.sendAndConfirmTransaction(connection, claimTx, [wallet.payer]);
console.log(claimSig);
});
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/tests/ondemand-idl.json
|
{"address":"SBondMDrcV3K4kxZR1HNVT7osZxAHVHgYXL5Ze1oMUv","metadata":{"name":"sb_on_demand","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"guardian_quote_verify","discriminator":[168,36,93,156,157,150,148,45],"accounts":[{"name":"guardian","writable":true},{"name":"oracle","writable":true},{"name":"authority","signer":true,"relations":["oracle"]},{"name":"guardian_queue","writable":true,"relations":["state"]},{"name":"state"},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"GuardianQuoteVerifyParams"}}}]},{"name":"guardian_register","discriminator":[159,76,53,117,219,29,116,135],"accounts":[{"name":"oracle","writable":true},{"name":"state"},{"name":"guardian_queue","relations":["state"]},{"name":"authority","signer":true,"relations":["state"]}],"args":[{"name":"params","type":{"defined":{"name":"GuardianRegisterParams"}}}]},{"name":"guardian_unregister","discriminator":[215,19,61,120,155,224,120,60],"accounts":[{"name":"oracle","writable":true},{"name":"state"},{"name":"guardian_queue","writable":true,"relations":["state"]},{"name":"authority","signer":true,"relations":["state"]}],"args":[{"name":"params","type":{"defined":{"name":"GuardianUnregisterParams"}}}]},{"name":"oracle_heartbeat","discriminator":[10,175,217,130,111,35,117,54],"accounts":[{"name":"oracle","writable":true},{"name":"oracle_stats","writable":true,"pda":{"seeds":[{"kind":"const","value":[79,114,97,99,108,101,83,116,97,116,115]},{"kind":"account","path":"oracle"}]}},{"name":"oracle_signer","signer":true},{"name":"queue","writable":true,"relations":["oracle","gc_node"]},{"name":"gc_node","writable":true},{"name":"program_state","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"native_mint","address":"So11111111111111111111111111111111111111112"},{"name":"queue_escrow","writable":true},{"name":"stake_program","address":"SBSTk6t52R89MmCdD739Rdd97HdbTQUFHe41vCX7pTt","relations":["program_state"]},{"name":"delegation_pool","writable":true},{"name":"delegation_group","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"OracleHeartbeatParams"}}}]},{"name":"oracle_init","discriminator":[21,158,66,65,60,221,148,61],"accounts":[{"name":"oracle","writable":true,"signer":true},{"name":"oracle_stats","writable":true,"pda":{"seeds":[{"kind":"const","value":[79,114,97,99,108,101,83,116,97,116,115]},{"kind":"account","path":"oracle"}]}},{"name":"program_state","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"lut_signer"},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"stake_program","relations":["program_state"]},{"name":"stake_pool","relations":["program_state"]}],"args":[{"name":"params","type":{"defined":{"name":"OracleInitParams"}}}]},{"name":"oracle_set_configs","discriminator":[129,111,223,4,191,188,70,180],"accounts":[{"name":"oracle"},{"name":"authority","signer":true,"relations":["oracle"]}],"args":[{"name":"params","type":{"defined":{"name":"OracleSetConfigsParams"}}}]},{"name":"oracle_update_delegation","discriminator":[46,198,113,223,160,189,118,90],"accounts":[{"name":"oracle","writable":true},{"name":"oracle_stats","pda":{"seeds":[{"kind":"const","value":[79,114,97,99,108,101,83,116,97,116,115]},{"kind":"account","path":"oracle"}]}},{"name":"queue","relations":["oracle"]},{"name":"authority","signer":true},{"name":"program_state","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"delegation_pool","writable":true},{"name":"lut_signer"},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"switch_mint"},{"name":"native_mint","address":"So11111111111111111111111111111111111111112"},{"name":"wsol_vault","writable":true},{"name":"switch_vault","writable":true},{"name":"stake_program","relations":["program_state"]},{"name":"stake_pool"},{"name":"delegation_group"}],"args":[{"name":"params","type":{"defined":{"name":"OracleUpdateDelegationParams"}}}]},{"name":"permission_set","discriminator":[211,122,185,120,129,182,55,103],"accounts":[{"name":"authority","signer":true},{"name":"granter"}],"args":[{"name":"params","type":{"defined":{"name":"PermissionSetParams"}}}]},{"name":"pull_feed_close","discriminator":[19,134,50,142,177,215,196,83],"accounts":[{"name":"pull_feed","writable":true},{"name":"reward_escrow","writable":true},{"name":"lut","writable":true},{"name":"lut_signer"},{"name":"payer","writable":true,"signer":true},{"name":"state"},{"name":"authority","writable":true,"signer":true,"relations":["pull_feed"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedCloseParams"}}}]},{"name":"pull_feed_init","discriminator":[198,130,53,198,235,61,143,40],"accounts":[{"name":"pull_feed","writable":true,"signer":true},{"name":"queue"},{"name":"authority"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_state"},{"name":"reward_escrow","writable":true,"pda":{"seeds":[{"kind":"account","path":"pull_feed"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wrapped_sol_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"wrapped_sol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"lut_signer"},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedInitParams"}}}]},{"name":"pull_feed_set_configs","discriminator":[217,45,11,246,64,26,82,168],"accounts":[{"name":"pull_feed","writable":true},{"name":"authority","signer":true,"relations":["pull_feed"]}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedSetConfigsParams"}}}]},{"name":"pull_feed_submit_response","discriminator":[150,22,215,166,143,93,48,137],"accounts":[{"name":"feed","writable":true},{"name":"queue","relations":["feed"]},{"name":"program_state"},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedSubmitResponseParams"}}}]},{"name":"pull_feed_submit_response_many","discriminator":[47,156,45,25,200,71,37,215],"accounts":[{"name":"queue"},{"name":"program_state"},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedSubmitResponseManyParams"}}}]},{"name":"pull_feed_submit_response_many_v2","discriminator":[135,109,121,201,47,231,8,162],"accounts":[{"name":"queue"},{"name":"program_state"},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"ix_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedSubmitResponseManyParamsV2"}}}]},{"name":"pull_feed_submit_response_v2","discriminator":[80,42,8,149,217,20,176,249],"accounts":[{"name":"feed","writable":true},{"name":"queue","relations":["feed"]},{"name":"program_state"},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"ix_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PullFeedSubmitResponseParamsV2"}}}]},{"name":"queue_add_mr_enclave","discriminator":[199,255,81,50,60,133,171,138],"accounts":[{"name":"queue","writable":true},{"name":"authority","signer":true,"relations":["queue"]},{"name":"program_authority"},{"name":"state"}],"args":[{"name":"params","type":{"defined":{"name":"QueueAddMrEnclaveParams"}}}]},{"name":"queue_allow_subsidies","discriminator":[94,203,82,157,188,138,202,108],"accounts":[{"name":"queue","writable":true},{"name":"authority","signer":true,"relations":["state"]},{"name":"state","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"QueueAllowSubsidiesParams"}}}]},{"name":"queue_garbage_collect","discriminator":[187,208,104,247,16,91,96,98],"accounts":[{"name":"queue","writable":true},{"name":"oracle","writable":true},{"name":"authority","signer":true,"relations":["queue"]}],"args":[{"name":"params","type":{"defined":{"name":"QueueGarbageCollectParams"}}}]},{"name":"queue_init","discriminator":[144,18,99,145,133,27,207,13],"accounts":[{"name":"queue","writable":true,"signer":true},{"name":"queue_escrow","writable":true,"pda":{"seeds":[{"kind":"account","path":"queue"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"native_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"authority"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"native_mint","address":"So11111111111111111111111111111111111111112"},{"name":"program_state"},{"name":"lut_signer","writable":true},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"params","type":{"defined":{"name":"QueueInitParams"}}}]},{"name":"queue_init_delegation_group","discriminator":[239,146,75,158,20,166,159,14],"accounts":[{"name":"queue","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_state"},{"name":"lut_signer"},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"delegation_group","writable":true},{"name":"stake_program","relations":["program_state"]},{"name":"stake_pool"}],"args":[{"name":"params","type":{"defined":{"name":"QueueInitDelegationGroupParams"}}}]},{"name":"queue_remove_mr_enclave","discriminator":[3,64,135,33,190,133,68,252],"accounts":[{"name":"queue","writable":true},{"name":"authority","signer":true,"relations":["queue"]},{"name":"program_authority"},{"name":"state"}],"args":[{"name":"params","type":{"defined":{"name":"QueueRemoveMrEnclaveParams"}}}]},{"name":"queue_set_configs","discriminator":[54,183,243,199,49,103,142,48],"accounts":[{"name":"queue","writable":true},{"name":"authority","signer":true},{"name":"state"}],"args":[{"name":"params","type":{"defined":{"name":"QueueSetConfigsParams"}}}]},{"name":"randomness_commit","discriminator":[52,170,152,201,179,133,242,141],"accounts":[{"name":"randomness","writable":true},{"name":"queue","relations":["randomness","oracle"]},{"name":"oracle","writable":true},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"authority","signer":true,"relations":["randomness"]}],"args":[{"name":"params","type":{"defined":{"name":"RandomnessCommitParams"}}}]},{"name":"randomness_init","discriminator":[9,9,204,33,50,116,113,15],"accounts":[{"name":"randomness","writable":true,"signer":true},{"name":"reward_escrow","writable":true,"pda":{"seeds":[{"kind":"account","path":"randomness"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wrapped_sol_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"authority","signer":true},{"name":"queue","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"wrapped_sol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"program_state"},{"name":"lut_signer"},{"name":"lut","writable":true},{"name":"address_lookup_table_program","address":"AddressLookupTab1e1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"RandomnessInitParams"}}}]},{"name":"randomness_reveal","discriminator":[197,181,187,10,30,58,20,73],"accounts":[{"name":"randomness","writable":true},{"name":"oracle","relations":["randomness"]},{"name":"queue","relations":["oracle"]},{"name":"stats","writable":true,"pda":{"seeds":[{"kind":"const","value":[79,114,97,99,108,101,82,97,110,100,111,109,110,101,115,115,83,116,97,116,115]},{"kind":"account","path":"oracle"}]}},{"name":"authority","signer":true,"relations":["randomness"]},{"name":"payer","writable":true,"signer":true},{"name":"recent_slothashes","address":"SysvarS1otHashes111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"reward_escrow","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"wrapped_sol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"program_state"}],"args":[{"name":"params","type":{"defined":{"name":"RandomnessRevealParams"}}}]},{"name":"state_init","discriminator":[103,241,106,190,217,153,87,105],"accounts":[{"name":"state","writable":true,"pda":{"seeds":[{"kind":"const","value":[83,84,65,84,69]}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"StateInitParams"}}}]},{"name":"state_set_configs","discriminator":[40,98,76,37,206,9,47,144],"accounts":[{"name":"state","writable":true},{"name":"authority","signer":true,"relations":["state"]},{"name":"queue","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"StateSetConfigsParams"}}}]}],"accounts":[{"name":"OracleAccountData","discriminator":[128,30,16,241,170,73,55,54]},{"name":"OracleStatsAccountData","discriminator":[180,157,178,234,240,27,152,179]},{"name":"PullFeedAccountData","discriminator":[196,27,108,196,10,215,219,40]},{"name":"QueueAccountData","discriminator":[217,194,55,127,184,83,138,1]},{"name":"RandomnessAccountData","discriminator":[10,66,229,135,220,239,217,114]},{"name":"State","discriminator":[216,146,107,94,104,75,182,177]}],"events":[{"name":"GarbageCollectionEvent","discriminator":[232,235,2,188,8,143,145,237]},{"name":"GuardianQuoteVerifyEvent","discriminator":[31,37,39,6,214,186,33,115]},{"name":"OracleHeartbeatEvent","discriminator":[52,29,166,2,94,7,188,13]},{"name":"OracleInitEvent","discriminator":[89,193,219,200,1,83,167,24]},{"name":"OracleQuoteOverrideEvent","discriminator":[78,204,191,210,164,196,244,65]},{"name":"OracleQuoteRotateEvent","discriminator":[26,189,196,192,225,127,26,228]},{"name":"OracleQuoteVerifyRequestEvent","discriminator":[203,209,79,0,20,71,226,202]},{"name":"PermissionSetEvent","discriminator":[148,86,123,0,102,20,119,206]},{"name":"PullFeedErrorValueEvent","discriminator":[225,80,192,95,14,12,83,192]},{"name":"PullFeedValueEvents","discriminator":[86,7,231,28,122,161,117,69]},{"name":"QueueAddMrEnclaveEvent","discriminator":[170,186,175,38,216,51,69,175]},{"name":"QueueInitEvent","discriminator":[44,137,99,227,107,8,30,105]},{"name":"QueueRemoveMrEnclaveEvent","discriminator":[4,105,196,60,84,122,203,196]},{"name":"RandomnessCommitEvent","discriminator":[88,60,172,90,112,10,206,147]}],"errors":[{"code":6000,"name":"GenericError"},{"code":6001,"name":"InvalidQuote"},{"code":6002,"name":"InsufficientQueue"},{"code":6003,"name":"QueueFull"},{"code":6004,"name":"InvalidEnclaveSigner"},{"code":6005,"name":"InvalidSigner"},{"code":6006,"name":"MrEnclaveAlreadyExists"},{"code":6007,"name":"MrEnclaveAtCapacity"},{"code":6008,"name":"MrEnclaveDoesntExist"},{"code":6009,"name":"PermissionDenied"},{"code":6010,"name":"InvalidQueue"},{"code":6011,"name":"IncorrectMrEnclave"},{"code":6012,"name":"InvalidAuthority"},{"code":6013,"name":"InvalidMrEnclave"},{"code":6014,"name":"InvalidTimestamp"},{"code":6015,"name":"InvalidOracleIdx"},{"code":6016,"name":"InvalidSecpSignature"},{"code":6017,"name":"InvalidGuardianQueue"},{"code":6018,"name":"InvalidIndex"},{"code":6019,"name":"InvalidOracleQueue"},{"code":6020,"name":"InvalidPermission"},{"code":6021,"name":"InvalidePermissionedAccount"},{"code":6022,"name":"InvalidEpochRotate"},{"code":6023,"name":"InvalidEpochFinalize"},{"code":6024,"name":"InvalidEscrow"},{"code":6025,"name":"IllegalOracle"},{"code":6026,"name":"IllegalExecuteAttempt"},{"code":6027,"name":"IllegalFeedValue"},{"code":6028,"name":"InvalidOracleFeedStats"},{"code":6029,"name":"InvalidStateAuthority"},{"code":6030,"name":"NotEnoughSamples"},{"code":6031,"name":"OracleIsVerified"},{"code":6032,"name":"QueueIsEmpty"},{"code":6033,"name":"SecpRecoverFailure"},{"code":6034,"name":"StaleSample"},{"code":6035,"name":"SwitchboardRandomnessTooOld"},{"code":6036,"name":"EpochIdMismatch"},{"code":6037,"name":"GuardianAlreadyVoted"},{"code":6038,"name":"RandomnessNotRequested"},{"code":6039,"name":"InvalidSlotNumber"},{"code":6040,"name":"RandomnessOracleKeyExpired"},{"code":6041,"name":"InvalidAdvisory"},{"code":6042,"name":"InvalidOracleStats"},{"code":6043,"name":"InvalidStakeProgram"},{"code":6044,"name":"InvalidStakePool"},{"code":6045,"name":"InvalidDelegationPool"},{"code":6046,"name":"UnparsableAccount"},{"code":6047,"name":"InvalidInstruction"},{"code":6048,"name":"OracleAlreadyVerified"},{"code":6049,"name":"GuardianNotVerified"}],"types":[{"name":"CurrentResult","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"value","docs":["The median value of the submissions needed for quorom size"],"type":"i128"},{"name":"std_dev","docs":["The standard deviation of the submissions needed for quorom size"],"type":"i128"},{"name":"mean","docs":["The mean of the submissions needed for quorom size"],"type":"i128"},{"name":"range","docs":["The range of the submissions needed for quorom size"],"type":"i128"},{"name":"min_value","docs":["The minimum value of the submissions needed for quorom size"],"type":"i128"},{"name":"max_value","docs":["The maximum value of the submissions needed for quorom size"],"type":"i128"},{"name":"num_samples","docs":["The number of samples used to calculate this result"],"type":"u8"},{"name":"padding1","type":{"array":["u8",7]}},{"name":"slot","docs":["The slot at which this value was signed."],"type":"u64"},{"name":"min_slot","docs":["The slot at which the first considered submission was made"],"type":"u64"},{"name":"max_slot","docs":["The slot at which the last considered submission was made"],"type":"u64"}]}},{"name":"GarbageCollectionEvent","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"queue","type":"pubkey"}]}},{"name":"GuardianQuoteVerifyEvent","type":{"kind":"struct","fields":[{"name":"quote","type":"pubkey"},{"name":"queue","type":"pubkey"},{"name":"oracle","type":"pubkey"}]}},{"name":"GuardianQuoteVerifyParams","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mr_enclave","type":{"array":["u8",32]}},{"name":"idx","type":"u32"},{"name":"ed25519_key","type":"pubkey"},{"name":"secp256k1_key","type":{"array":["u8",64]}},{"name":"slot","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"},{"name":"advisories","type":{"vec":"u32"}}]}},{"name":"GuardianRegisterParams","type":{"kind":"struct","fields":[]}},{"name":"GuardianUnregisterParams","type":{"kind":"struct","fields":[]}},{"name":"MegaSlotInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reserved1","type":"u64"},{"name":"slot_end","type":"u64"},{"name":"perf_goal","type":"i64"},{"name":"current_signature_count","type":"i64"}]}},{"name":"MultiSubmission","type":{"kind":"struct","fields":[{"name":"values","type":{"vec":"i128"}},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]}},{"name":"MultiSubmissionV2","type":{"kind":"struct","fields":[{"name":"values","type":{"vec":"i128"}},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]}},{"name":"OracleAccountData","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"enclave","docs":["Represents the state of the quote verifiers enclave."],"type":{"defined":{"name":"Quote"}}},{"name":"authority","docs":["The authority of the EnclaveAccount which is permitted to make account changes."],"type":"pubkey"},{"name":"queue","docs":["Queue used for attestation to verify a MRENCLAVE measurement."],"type":"pubkey"},{"name":"created_at","docs":["The unix timestamp when the quote was created."],"type":"i64"},{"name":"last_heartbeat","docs":["The last time the quote heartbeated on-chain."],"type":"i64"},{"name":"secp_authority","type":{"array":["u8",64]}},{"name":"gateway_uri","docs":["URI location of the verifier's gateway."],"type":{"array":["u8",64]}},{"name":"permissions","type":"u64"},{"name":"is_on_queue","docs":["Whether the quote is located on the AttestationQueues buffer."],"type":"u8"},{"name":"_padding1","type":{"array":["u8",7]}},{"name":"lut_slot","type":"u64"},{"name":"last_reward_epoch","type":"u64"},{"name":"_ebuf4","type":{"array":["u8",16]}},{"name":"_ebuf3","type":{"array":["u8",32]}},{"name":"_ebuf2","type":{"array":["u8",64]}},{"name":"_ebuf1","type":{"array":["u8",1024]}}]}},{"name":"OracleEpochInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"id","type":"u64"},{"name":"reserved1","type":"u64"},{"name":"slot_end","type":"u64"},{"name":"slash_score","type":"u64"},{"name":"reward_score","type":"u64"},{"name":"stake_score","type":"u64"}]}},{"name":"OracleHeartbeatEvent","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"queue","type":"pubkey"}]}},{"name":"OracleHeartbeatParams","type":{"kind":"struct","fields":[{"name":"gateway_uri","type":{"option":{"array":["u8",64]}}}]}},{"name":"OracleInitEvent","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"}]}},{"name":"OracleInitParams","type":{"kind":"struct","fields":[{"name":"recent_slot","type":"u64"},{"name":"authority","type":"pubkey"},{"name":"queue","type":"pubkey"},{"name":"secp_authority","type":{"option":{"array":["u8",64]}}}]}},{"name":"OracleQuoteOverrideEvent","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"queue","type":"pubkey"}]}},{"name":"OracleQuoteRotateEvent","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"}]}},{"name":"OracleQuoteVerifyRequestEvent","type":{"kind":"struct","fields":[{"name":"quote","type":"pubkey"},{"name":"oracle","type":"pubkey"}]}},{"name":"OracleSetConfigsParams","type":{"kind":"struct","fields":[{"name":"new_authority","type":{"option":"pubkey"}},{"name":"new_secp_authority","type":{"option":{"array":["u8",64]}}}]}},{"name":"OracleStatsAccountData","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"oracle","type":"pubkey"},{"name":"finalized_epoch","docs":["The last epoch that has completed. cleared after registered with the","staking program."],"type":{"defined":{"name":"OracleEpochInfo"}}},{"name":"current_epoch","docs":["The current epoch info being used by the oracle. for stake. Will moved","to finalized_epoch as soon as the epoch is over."],"type":{"defined":{"name":"OracleEpochInfo"}}},{"name":"mega_slot_info","type":{"defined":{"name":"MegaSlotInfo"}}},{"name":"last_transfer_slot","type":"u64"},{"name":"bump","type":"u8"},{"name":"padding1","type":{"array":["u8",7]}},{"name":"_ebuf","docs":["Reserved."],"type":{"array":["u8",1024]}}]}},{"name":"OracleSubmission","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"oracle","docs":["The public key of the oracle that submitted this value."],"type":"pubkey"},{"name":"slot","docs":["The slot at which this value was signed."],"type":"u64"},{"name":"padding1","type":{"array":["u8",8]}},{"name":"value","docs":["The value that was submitted."],"type":"i128"}]}},{"name":"OracleUpdateDelegationParams","type":{"kind":"struct","fields":[{"name":"recent_slot","type":"u64"}]}},{"name":"PermissionSetEvent","type":{"kind":"struct","fields":[{"name":"permission","type":"pubkey"}]}},{"name":"PermissionSetParams","type":{"kind":"struct","fields":[{"name":"permission","type":"u8"},{"name":"enable","type":"bool"}]}},{"name":"PullFeedAccountData","docs":["A representation of the data in a pull feed account."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"submissions","docs":["The oracle submissions for this feed."],"type":{"array":[{"defined":{"name":"OracleSubmission"}},32]}},{"name":"authority","docs":["The public key of the authority that can update the feed hash that","this account will use for registering updates."],"type":"pubkey"},{"name":"queue","docs":["The public key of the queue which oracles must be bound to in order to","submit data to this feed."],"type":"pubkey"},{"name":"feed_hash","docs":["SHA-256 hash of the job schema oracles will execute to produce data","for this feed."],"type":{"array":["u8",32]}},{"name":"initialized_at","docs":["The slot at which this account was initialized."],"type":"i64"},{"name":"permissions","type":"u64"},{"name":"max_variance","type":"u64"},{"name":"min_responses","type":"u32"},{"name":"name","type":{"array":["u8",32]}},{"name":"_padding1","type":{"array":["u8",3]}},{"name":"min_sample_size","type":"u8"},{"name":"last_update_timestamp","type":"i64"},{"name":"lut_slot","type":"u64"},{"name":"ipfs_hash","type":{"array":["u8",32]}},{"name":"result","type":{"defined":{"name":"CurrentResult"}}},{"name":"max_staleness","type":"u32"},{"name":"_ebuf4","type":{"array":["u8",20]}},{"name":"_ebuf3","type":{"array":["u8",24]}},{"name":"_ebuf2","type":{"array":["u8",256]}},{"name":"_ebuf1","type":{"array":["u8",512]}}]}},{"name":"PullFeedCloseParams","type":{"kind":"struct","fields":[]}},{"name":"PullFeedErrorValueEvent","type":{"kind":"struct","fields":[{"name":"feed","type":"pubkey"},{"name":"oracle","type":"pubkey"}]}},{"name":"PullFeedInitParams","type":{"kind":"struct","fields":[{"name":"feed_hash","type":{"array":["u8",32]}},{"name":"max_variance","type":"u64"},{"name":"min_responses","type":"u32"},{"name":"name","type":{"array":["u8",32]}},{"name":"recent_slot","type":"u64"},{"name":"ipfs_hash","type":{"array":["u8",32]}},{"name":"min_sample_size","type":"u8"},{"name":"max_staleness","type":"u32"}]}},{"name":"PullFeedSetConfigsParams","type":{"kind":"struct","fields":[{"name":"feed_hash","type":{"option":{"array":["u8",32]}}},{"name":"authority","type":{"option":"pubkey"}},{"name":"max_variance","type":{"option":"u64"}},{"name":"min_responses","type":{"option":"u32"}},{"name":"name","type":{"option":{"array":["u8",32]}}},{"name":"ipfs_hash","type":{"option":{"array":["u8",32]}}},{"name":"min_sample_size","type":{"option":"u8"}},{"name":"max_staleness","type":{"option":"u32"}}]}},{"name":"PullFeedSubmitResponseManyParams","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"submissions","type":{"vec":{"defined":{"name":"MultiSubmission"}}}}]}},{"name":"PullFeedSubmitResponseManyParamsV2","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"submissions","type":{"vec":{"defined":{"name":"MultiSubmissionV2"}}}}]}},{"name":"PullFeedSubmitResponseParams","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"submissions","type":{"vec":{"defined":{"name":"Submission"}}}}]}},{"name":"PullFeedSubmitResponseParamsV2","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"submissions","type":{"vec":{"defined":{"name":"SubmissionV2"}}}}]}},{"name":"PullFeedValueEvents","type":{"kind":"struct","fields":[{"name":"feeds","type":{"vec":"pubkey"}},{"name":"oracles","type":{"vec":"pubkey"}},{"name":"values","type":{"vec":{"vec":"i128"}}},{"name":"reward","type":"u32"}]}},{"name":"QueueAccountData","docs":["An Queue represents a round-robin queue of oracle oracles who attest on-chain","whether a Switchboard Function was executed within an enclave against an expected set of","enclave measurements.","","For an oracle to join the queue, the oracle must first submit their enclave quote on-chain and","wait for an existing oracle to attest their quote. If the oracle's quote matches an expected","measurement within the queues mr_enclaves config, it is granted permissions and will start","being assigned update requests."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","docs":["The address of the authority which is permitted to add/remove allowed enclave measurements."],"type":"pubkey"},{"name":"mr_enclaves","docs":["Allowed enclave measurements."],"type":{"array":[{"array":["u8",32]},32]}},{"name":"oracle_keys","docs":["The addresses of the quote oracles who have a valid","verification status and have heartbeated on-chain recently."],"type":{"array":["pubkey",128]}},{"name":"max_quote_verification_age","docs":["The maximum allowable time until a EnclaveAccount needs to be re-verified on-chain."],"type":"i64"},{"name":"last_heartbeat","docs":["The unix timestamp when the last quote oracle heartbeated on-chain."],"type":"i64"},{"name":"node_timeout","type":"i64"},{"name":"oracle_min_stake","docs":["The minimum number of lamports a quote oracle needs to lock-up in order to heartbeat and verify other quotes."],"type":"u64"},{"name":"allow_authority_override_after","type":"i64"},{"name":"mr_enclaves_len","docs":["The number of allowed enclave measurements."],"type":"u32"},{"name":"oracle_keys_len","docs":["The length of valid quote oracles for the given attestation queue."],"type":"u32"},{"name":"reward","docs":["The reward paid to quote oracles for attesting on-chain."],"type":"u32"},{"name":"curr_idx","docs":["Incrementer used to track the current quote oracle permitted to run any available functions."],"type":"u32"},{"name":"gc_idx","docs":["Incrementer used to garbage collect and remove stale quote oracles."],"type":"u32"},{"name":"require_authority_heartbeat_permission","type":"u8"},{"name":"require_authority_verify_permission","type":"u8"},{"name":"require_usage_permissions","type":"u8"},{"name":"signer_bump","type":"u8"},{"name":"mint","type":"pubkey"},{"name":"lut_slot","type":"u64"},{"name":"allow_subsidies","type":"u8"},{"name":"_ebuf6","docs":["Reserved."],"type":{"array":["u8",23]}},{"name":"_ebuf5","type":{"array":["u8",32]}},{"name":"_ebuf4","type":{"array":["u8",64]}},{"name":"_ebuf3","type":{"array":["u8",128]}},{"name":"_ebuf2","type":{"array":["u8",256]}},{"name":"_ebuf1","type":{"array":["u8",512]}}]}},{"name":"QueueAddMrEnclaveEvent","type":{"kind":"struct","fields":[{"name":"queue","type":"pubkey"},{"name":"mr_enclave","type":{"array":["u8",32]}}]}},{"name":"QueueAddMrEnclaveParams","type":{"kind":"struct","fields":[{"name":"mr_enclave","type":{"array":["u8",32]}}]}},{"name":"QueueAllowSubsidiesParams","type":{"kind":"struct","fields":[{"name":"allow_subsidies","type":"u8"}]}},{"name":"QueueGarbageCollectParams","type":{"kind":"struct","fields":[{"name":"idx","type":"u32"}]}},{"name":"QueueInitDelegationGroupParams","type":{"kind":"struct","fields":[]}},{"name":"QueueInitEvent","type":{"kind":"struct","fields":[{"name":"queue","type":"pubkey"}]}},{"name":"QueueInitParams","type":{"kind":"struct","fields":[{"name":"allow_authority_override_after","type":"u32"},{"name":"require_authority_heartbeat_permission","type":"bool"},{"name":"require_usage_permissions","type":"bool"},{"name":"max_quote_verification_age","type":"u32"},{"name":"reward","type":"u32"},{"name":"node_timeout","type":"u32"},{"name":"recent_slot","type":"u64"}]}},{"name":"QueueRemoveMrEnclaveEvent","type":{"kind":"struct","fields":[{"name":"queue","type":"pubkey"},{"name":"mr_enclave","type":{"array":["u8",32]}}]}},{"name":"QueueRemoveMrEnclaveParams","type":{"kind":"struct","fields":[{"name":"mr_enclave","type":{"array":["u8",32]}}]}},{"name":"QueueSetConfigsParams","type":{"kind":"struct","fields":[{"name":"authority","type":{"option":"pubkey"}},{"name":"reward","type":{"option":"u32"}},{"name":"node_timeout","type":{"option":"i64"}}]}},{"name":"Quote","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"enclave_signer","docs":["The address of the signer generated within an enclave."],"type":"pubkey"},{"name":"mr_enclave","docs":["The quotes MRENCLAVE measurement dictating the contents of the secure enclave."],"type":{"array":["u8",32]}},{"name":"verification_status","docs":["The VerificationStatus of the quote."],"type":"u8"},{"name":"padding1","type":{"array":["u8",7]}},{"name":"verification_timestamp","docs":["The unix timestamp when the quote was last verified."],"type":"i64"},{"name":"valid_until","docs":["The unix timestamp when the quotes verification status expires."],"type":"i64"},{"name":"quote_registry","docs":["The off-chain registry where the verifiers quote can be located."],"type":{"array":["u8",32]}},{"name":"registry_key","docs":["Key to lookup the buffer data on IPFS or an alternative decentralized storage solution."],"type":{"array":["u8",64]}},{"name":"secp256k1_signer","docs":["The secp256k1 public key of the enclave signer. Derived from the enclave_signer."],"type":{"array":["u8",64]}},{"name":"last_ed25519_signer","type":"pubkey"},{"name":"last_secp256k1_signer","type":{"array":["u8",64]}},{"name":"last_rotate_slot","type":"u64"},{"name":"guardian_approvers","type":{"array":["pubkey",64]}},{"name":"guardian_approvers_len","type":"u8"},{"name":"padding2","type":{"array":["u8",7]}},{"name":"staging_ed25519_signer","type":"pubkey"},{"name":"staging_secp256k1_signer","type":{"array":["u8",64]}},{"name":"_ebuf4","docs":["Reserved."],"type":{"array":["u8",32]}},{"name":"_ebuf3","type":{"array":["u8",128]}},{"name":"_ebuf2","type":{"array":["u8",256]}},{"name":"_ebuf1","type":{"array":["u8",512]}}]}},{"name":"RandomnessAccountData","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"queue","type":"pubkey"},{"name":"seed_slothash","type":{"array":["u8",32]}},{"name":"seed_slot","type":"u64"},{"name":"oracle","type":"pubkey"},{"name":"reveal_slot","type":"u64"},{"name":"value","type":{"array":["u8",32]}},{"name":"lut_slot","type":"u64"},{"name":"_ebuf3","type":{"array":["u8",24]}},{"name":"_ebuf2","type":{"array":["u8",64]}},{"name":"_ebuf1","type":{"array":["u8",128]}},{"name":"active_secp256k1_signer","type":{"array":["u8",64]}},{"name":"active_secp256k1_expiration","type":"i64"}]}},{"name":"RandomnessCommitEvent","type":{"kind":"struct","fields":[{"name":"randomness_account","type":"pubkey"},{"name":"oracle","type":"pubkey"},{"name":"slot","type":"u64"},{"name":"slothash","type":{"array":["u8",32]}}]}},{"name":"RandomnessCommitParams","type":{"kind":"struct","fields":[]}},{"name":"RandomnessInitParams","type":{"kind":"struct","fields":[{"name":"recent_slot","type":"u64"}]}},{"name":"RandomnessRevealParams","type":{"kind":"struct","fields":[{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"},{"name":"value","type":{"array":["u8",32]}}]}},{"name":"State","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"test_only_disable_mr_enclave_check","type":"u8"},{"name":"enable_staking","type":"u8"},{"name":"padding1","type":{"array":["u8",5]}},{"name":"authority","type":"pubkey"},{"name":"guardian_queue","type":"pubkey"},{"name":"reserved1","type":"u64"},{"name":"epoch_length","type":"u64"},{"name":"current_epoch","type":{"defined":{"name":"StateEpochInfo"}}},{"name":"next_epoch","type":{"defined":{"name":"StateEpochInfo"}}},{"name":"finalized_epoch","type":{"defined":{"name":"StateEpochInfo"}}},{"name":"stake_pool","type":"pubkey"},{"name":"stake_program","type":"pubkey"},{"name":"switch_mint","type":"pubkey"},{"name":"sgx_advisories","type":{"array":["u16",32]}},{"name":"advisories_len","type":"u8"},{"name":"padding2","type":"u8"},{"name":"flat_reward_cut_percentage","type":"u8"},{"name":"enable_slashing","type":"u8"},{"name":"subsidy_amount","type":"u32"},{"name":"lut_slot","type":"u64"},{"name":"base_reward","type":"u32"},{"name":"_ebuf6","type":{"array":["u8",28]}},{"name":"_ebuf5","type":{"array":["u8",32]}},{"name":"_ebuf4","type":{"array":["u8",64]}},{"name":"_ebuf3","type":{"array":["u8",128]}},{"name":"_ebuf2","type":{"array":["u8",512]}},{"name":"_ebuf1","type":{"array":["u8",1024]}}]}},{"name":"StateEpochInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"id","type":"u64"},{"name":"_reserved1","type":"u64"},{"name":"slot_end","type":"u64"}]}},{"name":"StateInitParams","type":{"kind":"struct","fields":[]}},{"name":"StateSetConfigsParams","type":{"kind":"struct","fields":[{"name":"new_authority","type":"pubkey"},{"name":"test_only_disable_mr_enclave_check","type":"u8"},{"name":"stake_pool","type":"pubkey"},{"name":"stake_program","type":"pubkey"},{"name":"add_advisory","type":"u16"},{"name":"rm_advisory","type":"u16"},{"name":"epoch_length","type":"u32"},{"name":"reset_epochs","type":"bool"},{"name":"switch_mint","type":"pubkey"},{"name":"enable_staking","type":"u8"},{"name":"subsidy_amount","type":"u32"},{"name":"base_reward","type":"u32"}]}},{"name":"Submission","type":{"kind":"struct","fields":[{"name":"value","type":"i128"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"},{"name":"offset","type":"u8"}]}},{"name":"SubmissionV2","type":{"kind":"struct","fields":[{"name":"value","type":"i128"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"},{"name":"offset","type":"u8"}]}}]}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs/token-lottery/Cargo.toml
|
[package]
name = "token-lottery"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "token_lottery"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = { version="0.30.1", features=["init-if-needed"]}
anchor-spl = { version="0.30.1", features=["metadata"]}
mpl-token-metadata = "4.1.2"
solana-program = "1.18.17"
switchboard-on-demand = "0.1.13"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs/token-lottery/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs/token-lottery
|
solana_public_repos/developer-bootcamp-2024/project-9-token-lottery/programs/token-lottery/src/lib.rs
|
use anchor_lang::prelude::*;
use anchor_lang::system_program;
use anchor_spl::{
associated_token::AssociatedToken,
token_interface::{mint_to, Mint, MintTo, TokenAccount, TokenInterface}
};
use switchboard_on_demand::accounts::RandomnessAccountData;
use anchor_spl::metadata::{
Metadata,
MetadataAccount,
CreateMetadataAccountsV3,
CreateMasterEditionV3,
SignMetadata,
SetAndVerifySizedCollectionItem,
create_master_edition_v3,
create_metadata_accounts_v3,
sign_metadata,
set_and_verify_sized_collection_item,
mpl_token_metadata::types::{
CollectionDetails,
Creator,
DataV2,
},
};
declare_id!("2RTh2Y4e2N421EbSnUYTKdGqDHJH7etxZb3VrWDMpNMY");
#[constant]
pub const NAME: &str = "Token Lottery Ticket #";
#[constant]
pub const URI: &str = "Token Lottery";
#[constant]
pub const SYMBOL: &str = "TICKET";
#[program]
pub mod token_lottery {
use super::*;
pub fn initialize_config(ctx: Context<InitializeConifg>, start: u64, end: u64, price: u64) -> Result<()> {
ctx.accounts.token_lottery.bump = ctx.bumps.token_lottery;
ctx.accounts.token_lottery.lottery_start = start;
ctx.accounts.token_lottery.lottery_end = end;
ctx.accounts.token_lottery.price = price;
ctx.accounts.token_lottery.authority = ctx.accounts.payer.key();
ctx.accounts.token_lottery.randomness_account = Pubkey::default();
ctx.accounts.token_lottery.ticket_num = 0;
ctx.accounts.token_lottery.winner_chosen = false;
Ok(())
}
pub fn initialize_lottery(ctx: Context<InitializeLottery>) -> Result<()> {
// Create Collection Mint
let signer_seeds: &[&[&[u8]]] = &[&[
b"collection_mint".as_ref(),
&[ctx.bumps.collection_mint],
]];
msg!("Creating mint accounts");
mint_to(
CpiContext::new_with_signer(
ctx.accounts.token_program.to_account_info(),
MintTo {
mint: ctx.accounts.collection_mint.to_account_info(),
to: ctx.accounts.collection_token_account.to_account_info(),
authority: ctx.accounts.collection_mint.to_account_info(),
},
signer_seeds,
),
1,
)?;
msg!("Creating metadata accounts");
create_metadata_accounts_v3(
CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
CreateMetadataAccountsV3 {
metadata: ctx.accounts.metadata.to_account_info(),
mint: ctx.accounts.collection_mint.to_account_info(),
mint_authority: ctx.accounts.collection_mint.to_account_info(), // use pda mint address as mint authority
update_authority: ctx.accounts.collection_mint.to_account_info(), // use pda mint as update authority
payer: ctx.accounts.payer.to_account_info(),
system_program: ctx.accounts.system_program.to_account_info(),
rent: ctx.accounts.rent.to_account_info(),
},
&signer_seeds,
),
DataV2 {
name: NAME.to_string(),
symbol: SYMBOL.to_string(),
uri: URI.to_string(),
seller_fee_basis_points: 0,
creators: Some(vec![Creator {
address: ctx.accounts.collection_mint.key(),
verified: false,
share: 100,
}]),
collection: None,
uses: None,
},
true,
true,
Some(CollectionDetails::V1 { size: 0 }), // set as collection nft
)?;
msg!("Creating Master edition accounts");
create_master_edition_v3(
CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
CreateMasterEditionV3 {
payer: ctx.accounts.payer.to_account_info(),
mint: ctx.accounts.collection_mint.to_account_info(),
edition: ctx.accounts.master_edition.to_account_info(),
mint_authority: ctx.accounts.collection_mint.to_account_info(),
update_authority: ctx.accounts.collection_mint.to_account_info(),
metadata: ctx.accounts.metadata.to_account_info(),
token_program: ctx.accounts.token_program.to_account_info(),
system_program: ctx.accounts.system_program.to_account_info(),
rent: ctx.accounts.rent.to_account_info(),
},
&signer_seeds,
),
Some(0),
)?;
msg!("verifying collection");
sign_metadata(CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
SignMetadata {
creator: ctx.accounts.collection_mint.to_account_info(),
metadata: ctx.accounts.metadata.to_account_info(),
},
&signer_seeds,
))?;
Ok(())
}
pub fn buy_ticket(ctx: Context<BuyTicket>) -> Result<()> {
let clock = Clock::get()?;
let ticket_name = NAME.to_owned() + ctx.accounts.token_lottery.ticket_num.to_string().as_str();
if clock.slot < ctx.accounts.token_lottery.lottery_start ||
clock.slot > ctx.accounts.token_lottery.lottery_end {
return Err(ErrorCode::LotteryNotOpen.into());
}
system_program::transfer(
CpiContext::new(
ctx.accounts.system_program.to_account_info(),
system_program::Transfer {
from: ctx.accounts.payer.to_account_info(),
to: ctx.accounts.token_lottery.to_account_info(),
},
),
ctx.accounts.token_lottery.price,
)?;
ctx.accounts.token_lottery.lottery_pot_amount += ctx.accounts.token_lottery.price;
let signer_seeds: &[&[&[u8]]] = &[&[
b"collection_mint".as_ref(),
&[ctx.bumps.collection_mint],
]];
// Mint Ticket
mint_to(
CpiContext::new_with_signer(
ctx.accounts.token_program.to_account_info(),
MintTo {
mint: ctx.accounts.ticket_mint.to_account_info(),
to: ctx.accounts.destination.to_account_info(),
authority: ctx.accounts.collection_mint.to_account_info(),
},
signer_seeds,
),
1,
)?;
create_metadata_accounts_v3(
CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
CreateMetadataAccountsV3 {
metadata: ctx.accounts.metadata.to_account_info(),
mint: ctx.accounts.ticket_mint.to_account_info(),
mint_authority: ctx.accounts.collection_mint.to_account_info(),
update_authority: ctx.accounts.collection_mint.to_account_info(),
payer: ctx.accounts.payer.to_account_info(),
system_program: ctx.accounts.system_program.to_account_info(),
rent: ctx.accounts.rent.to_account_info(),
},
&signer_seeds,
),
DataV2 {
name: ticket_name,
symbol: SYMBOL.to_string(),
uri: URI.to_string(),
seller_fee_basis_points: 0,
creators: None,
collection: None,
uses: None,
},
true,
true,
None,
)?;
create_master_edition_v3(
CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
CreateMasterEditionV3 {
payer: ctx.accounts.payer.to_account_info(),
mint: ctx.accounts.ticket_mint.to_account_info(),
edition: ctx.accounts.master_edition.to_account_info(),
mint_authority: ctx.accounts.collection_mint.to_account_info(),
update_authority: ctx.accounts.collection_mint.to_account_info(),
metadata: ctx.accounts.metadata.to_account_info(),
token_program: ctx.accounts.token_program.to_account_info(),
system_program: ctx.accounts.system_program.to_account_info(),
rent: ctx.accounts.rent.to_account_info(),
},
&signer_seeds,
),
Some(0),
)?;
// verify nft as part of collection
set_and_verify_sized_collection_item(
CpiContext::new_with_signer(
ctx.accounts.token_metadata_program.to_account_info(),
SetAndVerifySizedCollectionItem {
metadata: ctx.accounts.metadata.to_account_info(),
collection_authority: ctx.accounts.collection_mint.to_account_info(),
payer: ctx.accounts.payer.to_account_info(),
update_authority: ctx.accounts.collection_mint.to_account_info(),
collection_mint: ctx.accounts.collection_mint.to_account_info(),
collection_metadata: ctx.accounts.collection_metadata.to_account_info(),
collection_master_edition: ctx
.accounts
.collection_master_edition
.to_account_info(),
},
&signer_seeds,
),
None,
)?;
ctx.accounts.token_lottery.ticket_num += 1;
Ok(())
}
pub fn commit_a_winner(ctx: Context<CommitWinner>) -> Result<()> {
let clock = Clock::get()?;
let token_lottery = &mut ctx.accounts.token_lottery;
if ctx.accounts.payer.key() != token_lottery.authority {
return Err(ErrorCode::NotAuthorized.into());
}
let randomness_data = RandomnessAccountData::parse(ctx.accounts.randomness_account_data.data.borrow()).unwrap();
if randomness_data.seed_slot != clock.slot - 1 {
return Err(ErrorCode::RandomnessAlreadyRevealed.into());
}
token_lottery.randomness_account = ctx.accounts.randomness_account_data.key();
Ok(())
}
pub fn choose_a_winner(ctx: Context<ChooseWinner>) -> Result<()> {
let clock = Clock::get()?;
let token_lottery = &mut ctx.accounts.token_lottery;
if ctx.accounts.randomness_account_data.key() != token_lottery.randomness_account {
return Err(ErrorCode::IncorrectRandomnessAccount.into());
}
if ctx.accounts.payer.key() != token_lottery.authority {
return Err(ErrorCode::NotAuthorized.into());
}
if clock.slot < token_lottery.lottery_end {
msg!("Current slot: {}", clock.slot);
msg!("End slot: {}", token_lottery.lottery_end);
return Err(ErrorCode::LotteryNotCompleted.into());
}
require!(token_lottery.winner_chosen == false, ErrorCode::WinnerChosen);
let randomness_data =
RandomnessAccountData::parse(ctx.accounts.randomness_account_data.data.borrow()).unwrap();
let revealed_random_value = randomness_data.get_value(&clock)
.map_err(|_| ErrorCode::RandomnessNotResolved)?;
msg!("Randomness result: {}", revealed_random_value[0]);
msg!("Ticket num: {}", token_lottery.ticket_num);
let randomness_result =
revealed_random_value[0] as u64 % token_lottery.ticket_num;
msg!("Winner: {}", randomness_result);
token_lottery.winner = randomness_result;
token_lottery.winner_chosen = true;
Ok(())
}
pub fn claim_prize(ctx: Context<ClaimPrize>) -> Result<()> {
// Check if winner has been chosen
msg!("Winner chosen: {}", ctx.accounts.token_lottery.winner_chosen);
require!(ctx.accounts.token_lottery.winner_chosen, ErrorCode::WinnerNotChosen);
// Check if token is a part of the collection
require!(ctx.accounts.metadata.collection.as_ref().unwrap().verified, ErrorCode::NotVerifiedTicket);
require!(ctx.accounts.metadata.collection.as_ref().unwrap().key == ctx.accounts.collection_mint.key(), ErrorCode::IncorrectTicket);
let ticket_name = NAME.to_owned() + &ctx.accounts.token_lottery.winner.to_string();
let metadata_name = ctx.accounts.metadata.name.replace("\u{0}", "");
msg!("Ticket name: {}", ticket_name);
msg!("Metdata name: {}", metadata_name);
// Check if the winner has the winning ticket
require!(metadata_name == ticket_name, ErrorCode::IncorrectTicket);
require!(ctx.accounts.destination.amount > 0, ErrorCode::IncorrectTicket);
**ctx.accounts.token_lottery.to_account_info().try_borrow_mut_lamports()? -= ctx.accounts.token_lottery.lottery_pot_amount;
**ctx.accounts.payer.try_borrow_mut_lamports()? += ctx.accounts.token_lottery.lottery_pot_amount;
ctx.accounts.token_lottery.lottery_pot_amount = 0;
Ok(())
}
}
#[derive(Accounts)]
pub struct ClaimPrize<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
mut,
seeds = [b"token_lottery".as_ref()],
bump = token_lottery.bump,
)]
pub token_lottery: Account<'info, TokenLottery>,
#[account(
mut,
seeds = [b"collection_mint".as_ref()],
bump,
)]
pub collection_mint: InterfaceAccount<'info, Mint>,
#[account(
seeds = [token_lottery.winner.to_le_bytes().as_ref()],
bump,
)]
pub ticket_mint: InterfaceAccount<'info, Mint>,
#[account(
seeds = [b"metadata", token_metadata_program.key().as_ref(), ticket_mint.key().as_ref()],
bump,
seeds::program = token_metadata_program.key(),
)]
pub metadata: Account<'info, MetadataAccount>,
#[account(
associated_token::mint = ticket_mint,
associated_token::authority = payer,
associated_token::token_program = token_program,
)]
pub destination: InterfaceAccount<'info, TokenAccount>,
#[account(
mut,
seeds = [b"metadata", token_metadata_program.key().as_ref(), collection_mint.key().as_ref()],
bump,
seeds::program = token_metadata_program.key(),
)]
pub collection_metadata: Account<'info, MetadataAccount>,
pub token_program: Interface<'info, TokenInterface>,
pub system_program: Program<'info, System>,
pub token_metadata_program: Program<'info, Metadata>,
}
#[derive(Accounts)]
pub struct CommitWinner<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
mut,
seeds = [b"token_lottery".as_ref()],
bump = token_lottery.bump,
)]
pub token_lottery: Account<'info, TokenLottery>,
/// CHECK: The account's data is validated manually within the handler.
pub randomness_account_data: UncheckedAccount<'info>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct ChooseWinner<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
mut,
seeds = [b"token_lottery".as_ref()],
bump = token_lottery.bump,
)]
pub token_lottery: Account<'info, TokenLottery>,
/// CHECK: The account's data is validated manually within the handler.
pub randomness_account_data: UncheckedAccount<'info>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct BuyTicket<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
mut,
seeds = [b"token_lottery".as_ref()],
bump = token_lottery.bump
)]
pub token_lottery: Account<'info, TokenLottery>,
#[account(
init,
payer = payer,
seeds = [token_lottery.ticket_num.to_le_bytes().as_ref()],
bump,
mint::decimals = 0,
mint::authority = collection_mint,
mint::freeze_authority = collection_mint,
mint::token_program = token_program
)]
pub ticket_mint: InterfaceAccount<'info, Mint>,
#[account(
init,
payer = payer,
associated_token::mint = ticket_mint,
associated_token::authority = payer,
associated_token::token_program = token_program,
)]
pub destination: InterfaceAccount<'info, TokenAccount>,
#[account(
mut,
seeds = [b"metadata", token_metadata_program.key().as_ref(),
ticket_mint.key().as_ref()],
bump,
seeds::program = token_metadata_program.key(),
)]
/// CHECK: This account will be initialized by the metaplex program
pub metadata: UncheckedAccount<'info>,
#[account(
mut,
seeds = [b"metadata", token_metadata_program.key().as_ref(),
ticket_mint.key().as_ref(), b"edition"],
bump,
seeds::program = token_metadata_program.key(),
)]
/// CHECK: This account will be initialized by the metaplex program
pub master_edition: UncheckedAccount<'info>,
#[account(
mut,
seeds = [b"metadata", token_metadata_program.key().as_ref(), collection_mint.key().as_ref()],
bump,
seeds::program = token_metadata_program.key(),
)]
/// CHECK: This account will be initialized by the metaplex program
pub collection_metadata: UncheckedAccount<'info>,
#[account(
mut,
seeds = [b"metadata", token_metadata_program.key().as_ref(),
collection_mint.key().as_ref(), b"edition"],
bump,
seeds::program = token_metadata_program.key(),
)]
/// CHECK: This account will be initialized by the metaplex program
pub collection_master_edition: UncheckedAccount<'info>,
#[account(
mut,
seeds = [b"collection_mint".as_ref()],
bump,
)]
pub collection_mint: InterfaceAccount<'info, Mint>,
pub associated_token_program: Program<'info, AssociatedToken>,
pub token_program: Interface<'info, TokenInterface>,
pub system_program: Program<'info, System>,
pub token_metadata_program: Program<'info, Metadata>,
pub rent: Sysvar<'info, Rent>,
}
#[derive(Accounts)]
pub struct InitializeConifg<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
init,
payer = payer,
space = 8 + TokenLottery::INIT_SPACE,
// Challenge: Make this be able to run more than 1 lottery at a time
seeds = [b"token_lottery".as_ref()],
bump
)]
pub token_lottery: Box<Account<'info, TokenLottery>>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct InitializeLottery<'info> {
#[account(mut)]
pub payer: Signer<'info>,
#[account(
init,
payer = payer,
mint::decimals = 0,
mint::authority = collection_mint,
mint::freeze_authority = collection_mint,
seeds = [b"collection_mint".as_ref()],
bump,
)]
pub collection_mint: Box<InterfaceAccount<'info, Mint>>,
/// CHECK: This account will be initialized by the metaplex program
#[account(mut)]
pub metadata: UncheckedAccount<'info>,
/// CHECK: This account will be initialized by the metaplex program
#[account(mut)]
pub master_edition: UncheckedAccount<'info>,
#[account(
init_if_needed,
payer = payer,
seeds = [b"collection_token_account".as_ref()],
bump,
token::mint = collection_mint,
token::authority = collection_token_account
)]
pub collection_token_account: Box<InterfaceAccount<'info, TokenAccount>>,
pub token_program: Interface<'info, TokenInterface>,
pub associated_token_program: Program<'info, AssociatedToken>,
pub system_program: Program<'info, System>,
pub token_metadata_program: Program<'info, Metadata>,
pub rent: Sysvar<'info, Rent>,
}
#[account]
#[derive(InitSpace)]
pub struct TokenLottery {
pub bump: u8,
pub winner: u64,
pub winner_chosen: bool,
pub lottery_start: u64,
pub lottery_end: u64,
// Is it good practice to store SOL on an account used for something else?
pub lottery_pot_amount: u64,
pub ticket_num: u64,
pub price: u64,
pub randomness_account: Pubkey,
pub authority: Pubkey,
}
#[error_code]
pub enum ErrorCode {
#[msg("Incorrect randomness account")]
IncorrectRandomnessAccount,
#[msg("Lottery not completed")]
LotteryNotCompleted,
#[msg("Lottery is not open")]
LotteryNotOpen,
#[msg("Not authorized")]
NotAuthorized,
#[msg("Randomness already revealed")]
RandomnessAlreadyRevealed,
#[msg("Randomness not resolved")]
RandomnessNotResolved,
#[msg("Winner not chosen")]
WinnerNotChosen,
#[msg("Winner already chosen")]
WinnerChosen,
#[msg("Ticket is not verified")]
NotVerifiedTicket,
#[msg("Incorrect ticket")]
IncorrectTicket,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/Cargo.toml
|
[workspace]
members = [
"programs/*"
]
resolver = "2"
[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/.prettierignore
|
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/Anchor.toml
|
[toolchain]
[features]
resolution = true
skip-lint = false
[programs.localnet]
bank_three = "H2vvatVxBg1LufZqsXBuc4BHgK5TKLmrGY7rSEK2dD2L"
fake_bank = "FxCXeDFCSXMPaTB7PQBTKuPHiowPxGQoQaTTL4x2tKQo"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/package.json
|
{
"license": "ISC",
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5",
"prettier": "^2.6.2"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/tsconfig.json
|
{
"compilerOptions": {
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/tests/bank_three.ts
|
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { BankThree } from "../target/types/bank_three";
import { FakeBank } from "../target/types/fake_bank";
import { assert } from "chai";
describe("bank_three", () => {
const provider = anchor.AnchorProvider.env();
const connection = provider.connection;
const wallet = provider.wallet as anchor.Wallet;
anchor.setProvider(provider);
const program = anchor.workspace.BankThree as Program<BankThree>;
const programFakeBank = anchor.workspace.FakeBank as Program<FakeBank>;
const authority = new anchor.web3.Keypair();
const amount = 1_000_000; // 1million lamports
const [vault] = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from("vault")],
program.programId
);
const [fakeBank] = anchor.web3.PublicKey.findProgramAddressSync(
[Buffer.from("bank")],
programFakeBank.programId
);
before(async () => {
const transferAmount = 1 * anchor.web3.LAMPORTS_PER_SOL;
const transferTx = new anchor.web3.Transaction().add(
anchor.web3.SystemProgram.transfer({
fromPubkey: wallet.publicKey,
toPubkey: authority.publicKey,
lamports: transferAmount,
})
);
await provider.sendAndConfirm(transferTx);
});
it("Deposit to Bank", async () => {
const transaction = await program.methods
.deposit(new anchor.BN(amount))
.accounts({ authority: authority.publicKey })
.transaction();
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[authority],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
});
it("Create Fake Bank", async () => {
const transaction = await programFakeBank.methods
.initialize(vault)
.accounts({ fakeAuthority: wallet.publicKey })
.transaction();
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[wallet.payer],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
});
it("Withdraw from Bank", async () => {
const walletInitialBalance = await connection.getBalance(wallet.publicKey, {
commitment: "confirmed",
});
const transaction = await program.methods
.withdraw(new anchor.BN(amount))
.accounts({ authority: wallet.publicKey, bank: fakeBank })
.transaction();
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[wallet.payer],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
const walletFinalBalance = await connection.getBalance(wallet.publicKey, {
commitment: "confirmed",
});
assert.equal(walletFinalBalance, walletInitialBalance + amount);
});
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/bank_three/Cargo.toml
|
[package]
name = "bank_three"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "bank_three"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = { version = "0.30.1", features = ["init-if-needed"] }
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/bank_three/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/bank_three
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/bank_three/src/lib.rs
|
use anchor_lang::prelude::*;
use anchor_lang::system_program::{transfer, Transfer};
declare_id!("H2vvatVxBg1LufZqsXBuc4BHgK5TKLmrGY7rSEK2dD2L");
#[program]
pub mod bank_three {
use super::*;
pub fn deposit(ctx: Context<Deposit>, amount: u64) -> Result<()> {
let bank_account = &mut ctx.accounts.bank;
if !bank_account.is_initialized {
bank_account.is_initialized = true;
bank_account.authority = ctx.accounts.authority.key();
bank_account.vault = ctx.accounts.vault.key();
}
transfer(
CpiContext::new(
ctx.accounts.system_program.to_account_info(),
Transfer {
from: ctx.accounts.authority.to_account_info(),
to: ctx.accounts.vault.to_account_info(),
},
),
amount,
)?;
Ok(())
}
pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
// Manual deserialization of account data
let bank_account = ctx.accounts.bank.try_borrow_data()?;
let mut account_data_slice: &[u8] = &bank_account;
let bank_state = Bank::try_deserialize(&mut account_data_slice)?;
// Authority Check
if bank_state.authority != ctx.accounts.authority.key() {
return Err(ProgramError::InvalidAccountData.into());
}
let signer_seeds: &[&[&[u8]]] = &[&[b"vault", &[ctx.bumps.vault]]];
transfer(
CpiContext::new(
ctx.accounts.system_program.to_account_info(),
Transfer {
from: ctx.accounts.vault.to_account_info(),
to: ctx.accounts.authority.to_account_info(),
},
)
.with_signer(signer_seeds),
amount,
)?;
Ok(())
}
}
#[derive(Accounts)]
pub struct Deposit<'info> {
#[account(mut)]
pub authority: Signer<'info>,
#[account(
init_if_needed,
payer = authority,
space = 8 + Bank::INIT_SPACE,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
#[account(
mut,
seeds = [b"vault"],
bump,
)]
pub vault: SystemAccount<'info>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct Withdraw<'info> {
#[account(mut)]
pub authority: Signer<'info>,
pub bank: AccountInfo<'info>,
#[account(
mut,
seeds = [b"vault"],
bump,
)]
pub vault: SystemAccount<'info>,
pub system_program: Program<'info, System>,
}
#[account]
#[derive(InitSpace, Debug)]
pub struct Bank {
pub authority: Pubkey,
pub vault: Pubkey,
pub is_initialized: bool,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/fake_bank/Cargo.toml
|
[package]
name = "fake_bank"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "fake_bank"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = "0.30.1"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/fake_bank/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/fake_bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_three/programs/fake_bank/src/lib.rs
|
use anchor_lang::prelude::*;
declare_id!("FxCXeDFCSXMPaTB7PQBTKuPHiowPxGQoQaTTL4x2tKQo");
#[program]
pub mod fake_bank {
use super::*;
pub fn initialize(ctx: Context<Initialize>, vault_address: Pubkey) -> Result<()> {
*ctx.accounts.bank = Bank {
authority: ctx.accounts.fake_authority.key(),
vault: vault_address,
is_initialized: true,
};
msg!("{:#?}", ctx.accounts.bank);
Ok(())
}
}
#[derive(Accounts)]
pub struct Initialize<'info> {
#[account(mut)]
pub fake_authority: Signer<'info>,
#[account(
init,
payer = fake_authority,
space = 8 + Bank::INIT_SPACE,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
pub system_program: Program<'info, System>,
}
#[account]
#[derive(InitSpace, Debug)]
pub struct Bank {
pub authority: Pubkey,
pub vault: Pubkey,
pub is_initialized: bool,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/Cargo.toml
|
[workspace]
members = [
"programs/*"
]
resolver = "2"
[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/.prettierignore
|
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/Anchor.toml
|
[toolchain]
[features]
resolution = true
skip-lint = false
[programs.localnet]
bank_one = "HAAzYF1LMBi8R2avDaa4s2VZyMyGzA1RGQNFPXPjctZo"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/package.json
|
{
"license": "ISC",
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5",
"prettier": "^2.6.2"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/tsconfig.json
|
{
"compilerOptions": {
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/tests/bank_one.ts
|
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { BankOne } from "../target/types/bank_one";
import { assert } from "chai";
describe("bank_one", () => {
const provider = anchor.AnchorProvider.env();
const connection = provider.connection;
const wallet = provider.wallet as anchor.Wallet;
anchor.setProvider(provider);
const program = anchor.workspace.BankOne as Program<BankOne>;
const authority = new anchor.web3.Keypair();
const amount = 1_000_000; // 1million lamports
before(async () => {
const transferAmount = 1 * anchor.web3.LAMPORTS_PER_SOL;
const transferTx = new anchor.web3.Transaction().add(
anchor.web3.SystemProgram.transfer({
fromPubkey: wallet.publicKey,
toPubkey: authority.publicKey,
lamports: transferAmount,
})
);
await provider.sendAndConfirm(transferTx);
});
it("Deposit", async () => {
const transaction = await program.methods
.deposit(new anchor.BN(amount))
.accounts({ authority: authority.publicKey })
.transaction();
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[authority],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
});
it("Withdraw", async () => {
const walletInitialBalance = await connection.getBalance(wallet.publicKey);
const depositInstruction = await program.methods
.deposit(new anchor.BN(0))
.accounts({ authority: wallet.publicKey })
.instruction();
const withdrawInstruction = await program.methods
.withdraw(new anchor.BN(amount))
.accounts({ authority: wallet.publicKey })
.instruction();
const transaction = new anchor.web3.Transaction().add(
depositInstruction,
withdrawInstruction
);
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[wallet.payer],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
const walletFinalBalance = await connection.getBalance(wallet.publicKey, {
commitment: "confirmed",
});
assert.equal(walletFinalBalance, walletInitialBalance + amount);
});
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs/bank_one/Cargo.toml
|
[package]
name = "bank_one"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "bank_one"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = { version = "0.30.1", features = ["init-if-needed"] }
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs/bank_one/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs/bank_one
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_one/programs/bank_one/src/lib.rs
|
use anchor_lang::prelude::*;
use anchor_lang::system_program::{transfer, Transfer};
declare_id!("HAAzYF1LMBi8R2avDaa4s2VZyMyGzA1RGQNFPXPjctZo");
#[program]
pub mod bank_one {
use super::*;
pub fn deposit(ctx: Context<Deposit>, amount: u64) -> Result<()> {
*ctx.accounts.bank = Bank {
authority: ctx.accounts.authority.key(),
bank_balance: ctx.accounts.bank.bank_balance + amount,
bump: ctx.bumps.bank,
};
msg!("{:#?}", ctx.accounts.bank);
transfer(
CpiContext::new(
ctx.accounts.system_program.to_account_info(),
Transfer {
from: ctx.accounts.authority.to_account_info(),
to: ctx.accounts.bank.to_account_info(),
},
),
amount,
)?;
Ok(())
}
pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
ctx.accounts.bank.bank_balance -= amount;
ctx.accounts.bank.sub_lamports(amount)?;
ctx.accounts.authority.add_lamports(amount)?;
msg!("{:#?}", ctx.accounts.bank);
Ok(())
}
}
#[derive(Accounts)]
pub struct Deposit<'info> {
#[account(mut)]
pub authority: Signer<'info>,
#[account(
init_if_needed,
payer = authority,
space = 8 + Bank::INIT_SPACE,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct Withdraw<'info> {
#[account(mut)]
pub authority: Signer<'info>,
#[account(
mut,
has_one = authority,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
}
#[account]
#[derive(InitSpace, Debug)]
pub struct Bank {
pub authority: Pubkey,
pub bank_balance: u64,
pub bump: u8,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/Cargo.toml
|
[workspace]
members = [
"programs/*"
]
resolver = "2"
[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/.prettierignore
|
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/Anchor.toml
|
[toolchain]
[features]
resolution = true
skip-lint = false
[programs.localnet]
bank_two = "B8o5MhGbbxCxM5ugMZ8WKUpxrDKSUAHktdSQRSCa1S6i"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/package.json
|
{
"license": "ISC",
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1"
},
"devDependencies": {
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^10.0.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5",
"prettier": "^2.6.2"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/tsconfig.json
|
{
"compilerOptions": {
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/tests/bank_two.ts
|
import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { BankTwo } from "../target/types/bank_two";
import { assert } from "chai";
describe("bank_two", () => {
const provider = anchor.AnchorProvider.env();
const connection = provider.connection;
const wallet = provider.wallet as anchor.Wallet;
anchor.setProvider(provider);
const program = anchor.workspace.BankTwo as Program<BankTwo>;
const authority = new anchor.web3.Keypair();
const amount = 1_000_000; // 1million lamports
before(async () => {
const transferAmount = 1 * anchor.web3.LAMPORTS_PER_SOL;
const transferTx = new anchor.web3.Transaction().add(
anchor.web3.SystemProgram.transfer({
fromPubkey: wallet.publicKey,
toPubkey: authority.publicKey,
lamports: transferAmount,
})
);
await provider.sendAndConfirm(transferTx);
});
it("Deposit", async () => {
const transaction = await program.methods
.deposit(new anchor.BN(amount))
.accounts({ authority: authority.publicKey })
.transaction();
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[authority],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
});
it("Withdraw", async () => {
const walletInitialBalance = await connection.getBalance(wallet.publicKey);
const updateAuthorityInstruction = await program.methods
.updateAuthority()
.accounts({
newAuthority: wallet.publicKey,
})
.instruction();
const withdrawInstruction = await program.methods
.withdraw(new anchor.BN(amount))
.accounts({ authority: wallet.publicKey })
.instruction();
const transaction = new anchor.web3.Transaction().add(
updateAuthorityInstruction,
withdrawInstruction
);
const transactionSignature = await anchor.web3.sendAndConfirmTransaction(
connection,
transaction,
[wallet.payer],
{ commitment: "confirmed" }
);
console.log("Your transaction signature", transactionSignature);
const walletFinalBalance = await connection.getBalance(wallet.publicKey, {
commitment: "confirmed",
});
assert.equal(walletFinalBalance, walletInitialBalance + amount);
});
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs/bank_two/Cargo.toml
|
[package]
name = "bank_two"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "bank_two"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build"]
[dependencies]
anchor-lang = { version = "0.30.1", features = ["init-if-needed"] }
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs/bank_two/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs/bank_two
|
solana_public_repos/developer-bootcamp-2024/project-12-attack-the-bank/bank_two/programs/bank_two/src/lib.rs
|
use anchor_lang::prelude::*;
use anchor_lang::system_program::{transfer, Transfer};
declare_id!("B8o5MhGbbxCxM5ugMZ8WKUpxrDKSUAHktdSQRSCa1S6i");
#[program]
pub mod bank_two {
use super::*;
pub fn deposit(ctx: Context<Deposit>, amount: u64) -> Result<()> {
let bank_account = &mut ctx.accounts.bank;
bank_account.bank_balance += amount;
if !bank_account.is_initialized {
bank_account.is_initialized = true;
bank_account.authority = ctx.accounts.authority.key();
bank_account.bump = ctx.bumps.bank;
}
msg!("{:#?}", bank_account);
transfer(
CpiContext::new(
ctx.accounts.system_program.to_account_info(),
Transfer {
from: ctx.accounts.authority.to_account_info(),
to: ctx.accounts.bank.to_account_info(),
},
),
amount,
)?;
Ok(())
}
pub fn withdraw(ctx: Context<Withdraw>, amount: u64) -> Result<()> {
ctx.accounts.bank.bank_balance -= amount;
ctx.accounts.bank.sub_lamports(amount)?;
ctx.accounts.authority.add_lamports(amount)?;
msg!("{:#?}", ctx.accounts.bank);
Ok(())
}
pub fn update_authority(ctx: Context<UpdateAuthority>) -> Result<()> {
ctx.accounts.bank.authority = ctx.accounts.new_authority.key();
msg!("{:#?}", ctx.accounts.bank);
Ok(())
}
}
#[derive(Accounts)]
pub struct Deposit<'info> {
#[account(mut)]
pub authority: Signer<'info>,
#[account(
init_if_needed,
payer = authority,
space = 8 + Bank::INIT_SPACE,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
pub system_program: Program<'info, System>,
}
#[derive(Accounts)]
pub struct Withdraw<'info> {
#[account(mut)]
pub authority: Signer<'info>,
#[account(
mut,
has_one = authority,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
}
#[derive(Accounts)]
pub struct UpdateAuthority<'info> {
pub authority: SystemAccount<'info>,
pub new_authority: SystemAccount<'info>,
#[account(
mut,
has_one = authority,
seeds = [b"bank"],
bump,
)]
pub bank: Account<'info, Bank>,
}
#[account]
#[derive(InitSpace, Debug)]
pub struct Bank {
pub authority: Pubkey,
pub bank_balance: u64,
pub is_initialized: bool,
pub bump: u8,
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/Cargo.toml
|
[workspace]
members = [
"programs/*"
]
resolver = "2"
[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1
[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/.prettierignore
|
.anchor
.DS_Store
target
node_modules
dist
build
test-ledger
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/Anchor.toml
|
[toolchain]
[features]
resolution = true
skip-lint = false
[programs.localnet]
swap = "DAehvmx2vZoWCJi7Qo3Y4YF5vrEWHQRJ288kqKwDy5DV"
[registry]
url = "https://api.apr.dev"
[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"
[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/package.json
|
{
"license": "ISC",
"scripts": {
"lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w",
"lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1",
"@solana-developers/helpers": "^2.4.0",
"@solana/spl-token": "^0.4.8"
},
"devDependencies": {
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"prettier": "^2.6.2",
"ts-mocha": "^10.0.0",
"typescript": "^4.3.5"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/tsconfig.json
|
{
"compilerOptions": {
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/migrations/deploy.ts
|
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.
const anchor = require("@coral-xyz/anchor");
module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);
// Add your deploy script here.
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/tests/swap.ts
|
import { randomBytes } from "node:crypto";
import * as anchor from "@coral-xyz/anchor";
import { BN, type Program } from "@coral-xyz/anchor";
import {
TOKEN_2022_PROGRAM_ID,
type TOKEN_PROGRAM_ID,
getAssociatedTokenAddressSync,
} from "@solana/spl-token";
import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
import { assert } from "chai";
import type { Swap } from "../target/types/swap";
import {
confirmTransaction,
createAccountsMintsAndTokenAccounts,
makeKeypairs,
} from "@solana-developers/helpers";
// Work on both Token Program and new Token Extensions Program
const TOKEN_PROGRAM: typeof TOKEN_2022_PROGRAM_ID | typeof TOKEN_PROGRAM_ID =
TOKEN_2022_PROGRAM_ID;
const SECONDS = 1000;
// Tests must complete within half this time otherwise
// they are marked as slow. Since Anchor involves a little
// network IO, these tests usually take about 15 seconds.
const ANCHOR_SLOW_TEST_THRESHOLD = 40 * SECONDS;
const getRandomBigNumber = (size = 8) => {
return new BN(randomBytes(size));
};
describe("swap", async () => {
// Use the cluster and the keypair from Anchor.toml
const provider = anchor.AnchorProvider.env();
anchor.setProvider(provider);
// See https://github.com/coral-xyz/anchor/issues/3122
const user = (provider.wallet as anchor.Wallet).payer;
const payer = user;
const connection = provider.connection;
const program = anchor.workspace.Swap as Program<Swap>;
// We're going to reuse these accounts across multiple tests
const accounts: Record<string, PublicKey> = {
tokenProgram: TOKEN_PROGRAM,
};
let alice: anchor.web3.Keypair;
let bob: anchor.web3.Keypair;
let tokenMintA: anchor.web3.Keypair;
let tokenMintB: anchor.web3.Keypair;
[alice, bob, tokenMintA, tokenMintB] = makeKeypairs(4);
const tokenAOfferedAmount = new BN(1_000_000);
const tokenBWantedAmount = new BN(1_000_000);
before(
"Creates Alice and Bob accounts, 2 token mints, and associated token accounts for both tokens for both users",
async () => {
const usersMintsAndTokenAccounts =
await createAccountsMintsAndTokenAccounts(
[
// Alice's token balances
[
// 1_000_000_000 of token A
1_000_000_000,
// 0 of token B
0,
],
// Bob's token balances
[
// 0 of token A
0,
// 1_000_000_000 of token B
1_000_000_000,
],
],
1 * LAMPORTS_PER_SOL,
connection,
payer
);
const users = usersMintsAndTokenAccounts.users;
alice = users[0];
bob = users[1];
const mints = usersMintsAndTokenAccounts.mints;
tokenMintA = mints[0];
tokenMintB = mints[1];
const tokenAccounts = usersMintsAndTokenAccounts.tokenAccounts;
const aliceTokenAccountA = tokenAccounts[0][0];
const aliceTokenAccountB = tokenAccounts[0][1];
const bobTokenAccountA = tokenAccounts[1][0];
const bobTokenAccountB = tokenAccounts[1][1];
// Save the accounts for later use
accounts.maker = alice.publicKey;
accounts.taker = bob.publicKey;
accounts.tokenMintA = tokenMintA.publicKey;
accounts.makerTokenAccountA = aliceTokenAccountA;
accounts.takerTokenAccountA = bobTokenAccountA;
accounts.tokenMintB = tokenMintB.publicKey;
accounts.makerTokenAccountB = aliceTokenAccountB;
accounts.takerTokenAccountB = bobTokenAccountB;
}
);
it("Puts the tokens Alice offers into the vault when Alice makes an offer", async () => {
// Pick a random ID for the offer we'll make
const offerId = getRandomBigNumber();
// Then determine the account addresses we'll use for the offer and the vault
const offer = PublicKey.findProgramAddressSync(
[
Buffer.from("offer"),
accounts.maker.toBuffer(),
offerId.toArrayLike(Buffer, "le", 8),
],
program.programId
)[0];
const vault = getAssociatedTokenAddressSync(
accounts.tokenMintA,
offer,
true,
TOKEN_PROGRAM
);
accounts.offer = offer;
accounts.vault = vault;
const transactionSignature = await program.methods
.makeOffer(offerId, tokenAOfferedAmount, tokenBWantedAmount)
.accounts({ ...accounts })
.signers([alice])
.rpc();
await confirmTransaction(connection, transactionSignature);
// Check our vault contains the tokens offered
const vaultBalanceResponse = await connection.getTokenAccountBalance(vault);
const vaultBalance = new BN(vaultBalanceResponse.value.amount);
assert(vaultBalance.eq(tokenAOfferedAmount));
// Check our Offer account contains the correct data
const offerAccount = await program.account.offer.fetch(offer);
assert(offerAccount.maker.equals(alice.publicKey));
assert(offerAccount.tokenMintA.equals(accounts.tokenMintA));
assert(offerAccount.tokenMintB.equals(accounts.tokenMintB));
assert(offerAccount.tokenBWantedAmount.eq(tokenBWantedAmount));
}).slow(ANCHOR_SLOW_TEST_THRESHOLD);
it("Puts the tokens from the vault into Bob's account, and gives Alice Bob's tokens, when Bob takes an offer", async () => {
const transactionSignature = await program.methods
.takeOffer()
.accounts({ ...accounts })
.signers([bob])
.rpc();
await confirmTransaction(connection, transactionSignature);
// Check the offered tokens are now in Bob's account
// (note: there is no before balance as Bob didn't have any offered tokens before the transaction)
const bobTokenAccountBalanceAfterResponse =
await connection.getTokenAccountBalance(accounts.takerTokenAccountA);
const bobTokenAccountBalanceAfter = new BN(
bobTokenAccountBalanceAfterResponse.value.amount
);
assert(bobTokenAccountBalanceAfter.eq(tokenAOfferedAmount));
// Check the wanted tokens are now in Alice's account
// (note: there is no before balance as Alice didn't have any wanted tokens before the transaction)
const aliceTokenAccountBalanceAfterResponse =
await connection.getTokenAccountBalance(accounts.makerTokenAccountB);
const aliceTokenAccountBalanceAfter = new BN(
aliceTokenAccountBalanceAfterResponse.value.amount
);
assert(aliceTokenAccountBalanceAfter.eq(tokenBWantedAmount));
}).slow(ANCHOR_SLOW_TEST_THRESHOLD);
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/Cargo.toml
|
[package]
name = "swap"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
name = "swap"
[features]
default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = { version = "0.30.1", features=["init-if-needed"]}
anchor-spl = "0.30.1"
solana-program= "=2.0.3"
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/Xargo.toml
|
[target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/constants.rs
|
use anchor_lang::prelude::*;
#[constant]
pub const SEED: &str = "anchor";
pub const ANCHOR_DISCRIMINATOR: usize = 8;
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/error.rs
|
use anchor_lang::prelude::*;
#[error_code]
pub enum ErrorCode {
#[msg("Custom error message")]
CustomError,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/lib.rs
|
pub mod constants;
pub mod error;
pub mod instructions;
pub mod state;
use anchor_lang::prelude::*;
pub use constants::*;
pub use instructions::*;
pub use state::*;
declare_id!("DAehvmx2vZoWCJi7Qo3Y4YF5vrEWHQRJ288kqKwDy5DV");
#[program]
pub mod swap {
use super::*;
pub fn make_offer(
context: Context<MakeOffer>,
id: u64,
token_a_offered_amount: u64,
token_b_wanted_amount: u64,
) -> Result<()> {
instructions::make_offer::send_offered_tokens_to_vault(&context, token_a_offered_amount)?;
instructions::make_offer::save_offer(context, id, token_b_wanted_amount)
}
pub fn take_offer(context: Context<TakeOffer>) -> Result<()> {
instructions::take_offer::send_wanted_tokens_to_maker(&context)?;
instructions::take_offer::withdraw_and_close_vault(context)
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/instructions/mod.rs
|
pub mod make_offer;
pub use make_offer::*;
pub mod take_offer;
pub use take_offer::*;
pub mod shared;
pub use shared::*;
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/instructions/take_offer.rs
|
use anchor_lang::prelude::*;
use anchor_spl::{
associated_token::AssociatedToken,
token_interface::{
close_account, transfer_checked, CloseAccount, Mint, TokenAccount, TokenInterface,
TransferChecked,
},
};
use crate::Offer;
use super::transfer_tokens;
#[derive(Accounts)]
pub struct TakeOffer<'info> {
#[account(mut)]
pub taker: Signer<'info>,
#[account(mut)]
pub maker: SystemAccount<'info>,
pub token_mint_a: InterfaceAccount<'info, Mint>,
pub token_mint_b: InterfaceAccount<'info, Mint>,
#[account(
init_if_needed,
payer = taker,
associated_token::mint = token_mint_a,
associated_token::authority = taker,
associated_token::token_program = token_program,
)]
pub taker_token_account_a: Box<InterfaceAccount<'info, TokenAccount>>,
#[account(
mut,
associated_token::mint = token_mint_b,
associated_token::authority = taker,
associated_token::token_program = token_program,
)]
pub taker_token_account_b: Box<InterfaceAccount<'info, TokenAccount>>,
#[account(
init_if_needed,
payer = taker,
associated_token::mint = token_mint_b,
associated_token::authority = maker,
associated_token::token_program = token_program,
)]
pub maker_token_account_b: Box<InterfaceAccount<'info, TokenAccount>>,
#[account(
mut,
close = maker,
has_one = maker,
has_one = token_mint_a,
has_one = token_mint_b,
seeds = [b"offer", maker.key().as_ref(), offer.id.to_le_bytes().as_ref()],
bump = offer.bump
)]
offer: Account<'info, Offer>,
#[account(
mut,
associated_token::mint = token_mint_a,
associated_token::authority = offer,
associated_token::token_program = token_program,
)]
vault: InterfaceAccount<'info, TokenAccount>,
pub system_program: Program<'info, System>,
pub token_program: Interface<'info, TokenInterface>,
pub associated_token_program: Program<'info, AssociatedToken>,
}
pub fn send_wanted_tokens_to_maker(context: &Context<TakeOffer>) -> Result<()> {
transfer_tokens(
&context.accounts.taker_token_account_b,
&context.accounts.maker_token_account_b,
&context.accounts.offer.token_b_wanted_amount,
&context.accounts.token_mint_b,
&context.accounts.taker,
&context.accounts.token_program,
)
}
pub fn withdraw_and_close_vault(context: Context<TakeOffer>) -> Result<()> {
let seeds = &[
b"offer",
context.accounts.maker.to_account_info().key.as_ref(),
&context.accounts.offer.id.to_le_bytes()[..],
&[context.accounts.offer.bump],
];
let signer_seeds = [&seeds[..]];
let accounts = TransferChecked {
from: context.accounts.vault.to_account_info(),
to: context.accounts.taker_token_account_a.to_account_info(),
mint: context.accounts.token_mint_a.to_account_info(),
authority: context.accounts.offer.to_account_info(),
};
let cpi_context = CpiContext::new_with_signer(
context.accounts.token_program.to_account_info(),
accounts,
&signer_seeds,
);
transfer_checked(
cpi_context,
context.accounts.vault.amount,
context.accounts.token_mint_a.decimals,
)?;
let accounts = CloseAccount {
account: context.accounts.vault.to_account_info(),
destination: context.accounts.taker.to_account_info(),
authority: context.accounts.offer.to_account_info(),
};
let cpi_context = CpiContext::new_with_signer(
context.accounts.token_program.to_account_info(),
accounts,
&signer_seeds,
);
close_account(cpi_context)
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/instructions/shared.rs
|
use anchor_lang::prelude::*;
use anchor_spl::token_interface::{
transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked,
};
pub fn transfer_tokens<'info>(
from: &InterfaceAccount<'info, TokenAccount>,
to: &InterfaceAccount<'info, TokenAccount>,
amount: &u64,
mint: &InterfaceAccount<'info, Mint>,
authority: &Signer<'info>,
token_program: &Interface<'info, TokenInterface>,
) -> Result<()> {
let transfer_accounts_options = TransferChecked {
from: from.to_account_info(),
mint: mint.to_account_info(),
to: to.to_account_info(),
authority: authority.to_account_info(),
};
let cpi_context = CpiContext::new(token_program.to_account_info(), transfer_accounts_options);
transfer_checked(cpi_context, *amount, mint.decimals)
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/instructions/make_offer.rs
|
use anchor_lang::prelude::*;
use anchor_spl::{
associated_token::AssociatedToken,
token_interface::{Mint, TokenAccount, TokenInterface},
};
use crate::{Offer, ANCHOR_DISCRIMINATOR};
use super::transfer_tokens;
#[derive(Accounts)]
#[instruction(id: u64)]
pub struct MakeOffer<'info> {
#[account(mut)]
pub maker: Signer<'info>,
#[account(mint::token_program = token_program)]
pub token_mint_a: InterfaceAccount<'info, Mint>,
#[account(mint::token_program = token_program)]
pub token_mint_b: InterfaceAccount<'info, Mint>,
#[account(
mut,
associated_token::mint = token_mint_a,
associated_token::authority = maker,
associated_token::token_program = token_program
)]
pub maker_token_account_a: InterfaceAccount<'info, TokenAccount>,
#[account(
init,
payer = maker,
space = ANCHOR_DISCRIMINATOR + Offer::INIT_SPACE,
seeds = [b"offer", maker.key().as_ref(), id.to_le_bytes().as_ref()],
bump
)]
pub offer: Account<'info, Offer>,
#[account(
init,
payer = maker,
associated_token::mint = token_mint_a,
associated_token::authority = offer,
associated_token::token_program = token_program
)]
pub vault: InterfaceAccount<'info, TokenAccount>,
pub system_program: Program<'info, System>,
pub token_program: Interface<'info, TokenInterface>,
pub associated_token_program: Program<'info, AssociatedToken>,
}
pub fn send_offered_tokens_to_vault(
context: &Context<MakeOffer>,
token_a_offered_amount: u64,
) -> Result<()> {
transfer_tokens(
&context.accounts.maker_token_account_a,
&context.accounts.vault,
&token_a_offered_amount,
&context.accounts.token_mint_a,
&context.accounts.maker,
&context.accounts.token_program,
)
}
pub fn save_offer(context: Context<MakeOffer>, id: u64, token_b_wanted_amount: u64) -> Result<()> {
context.accounts.offer.set_inner(Offer {
id,
maker: context.accounts.maker.key(),
token_mint_a: context.accounts.token_mint_a.key(),
token_mint_b: context.accounts.token_mint_b.key(),
token_b_wanted_amount,
bump: context.bumps.offer,
});
Ok(())
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/state/offer.rs
|
use anchor_lang::prelude::*;
#[account]
#[derive(InitSpace)]
pub struct Offer {
pub id: u64,
pub maker: Pubkey,
pub token_mint_a: Pubkey,
pub token_mint_b: Pubkey,
pub token_b_wanted_amount: u64,
pub bump: u8,
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src
|
solana_public_repos/developer-bootcamp-2024/project-7-swap/programs/swap/src/state/mod.rs
|
pub mod offer;
pub use offer::*;
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/jest.preset.js
|
const nxPreset = require('@nx/jest/preset').default;
module.exports = { ...nxPreset };
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/nx.json
|
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "master",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/eslint.config.js",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s",
"!{projectRoot}/test-setup.[jt]s"
],
"sharedGlobals": []
},
"targetDefaults": {
"@nx/next:build": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/eslint:lint": {
"cache": true,
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore",
"{workspaceRoot}/eslint.config.js"
]
},
"@nx/rollup:rollup": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"@nx/jest:jest": {
"cache": true,
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
},
"generators": {
"@nx/next": {
"application": {
"style": "css",
"linter": "eslint"
}
}
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/LICENSE
|
MIT License
Copyright (c) 2024 jacobcreech
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/vercel.json
|
{
"buildCommand": "npm run build",
"outputDirectory": "dist/web/.next"
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/tsconfig.base.json
|
{
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"lib": ["es2020", "dom"],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
"@/*": ["./web/*"],
"@voting-dapp/anchor": ["anchor/src/index.ts"]
}
},
"exclude": ["node_modules", "tmp"]
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/package.json
|
{
"name": "@voting-dapp/source",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"anchor": "nx run anchor:anchor",
"anchor-build": "nx run anchor:anchor build",
"anchor-localnet": "nx run anchor:anchor localnet",
"anchor-test": "nx run anchor:anchor test",
"feature": "nx generate @solana-developers/preset-react:feature",
"build": "nx build web",
"dev": "nx serve web"
},
"private": true,
"dependencies": {
"@coral-xyz/anchor": "^0.30.0",
"@solana-developers/preset-next": "3.0.1",
"@solana/actions": "^1.2.0",
"@solana/spl-token": "0.4.6",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react-ui": "^0.9.35",
"@solana/web3.js": "1.91.9",
"@tabler/icons-react": "3.5.0",
"@tailwindcss/typography": "0.5.13",
"@tanstack/react-query": "5.40.0",
"@tanstack/react-query-next-experimental": "5.40.0",
"bs58": "5.0.0",
"buffer": "6.0.3",
"daisyui": "4.11.1",
"encoding": "0.1.13",
"jotai": "2.8.3",
"next": "14.0.4",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hot-toast": "2.4.1",
"tslib": "^2.3.0"
},
"devDependencies": {
"@nx/eslint": "19.0.0",
"@nx/eslint-plugin": "19.0.0",
"@nx/jest": "19.0.0",
"@nx/js": "19.0.0",
"@nx/next": "19.0.0",
"@nx/rollup": "19.0.0",
"@nx/workspace": "19.0.0",
"@swc-node/register": "~1.8.0",
"@swc/cli": "~0.3.12",
"@swc/core": "~1.3.85",
"@swc/helpers": "~0.5.2",
"@swc/jest": "0.2.20",
"@types/jest": "^29.4.0",
"@types/node": "18.16.9",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "^7.3.0",
"@typescript-eslint/parser": "^7.3.0",
"autoprefixer": "10.4.13",
"eslint": "~8.57.0",
"eslint-config-next": "14.0.4",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"nx": "19.0.0",
"postcss": "8.4.21",
"prettier": "^2.6.2",
"tailwindcss": "3.2.7",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "~5.4.2"
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/jest.config.ts
|
import { getJestProjectsAsync } from '@nx/jest';
export default async () => ({
projects: await getJestProjectsAsync(),
});
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/tailwind.config.js
|
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind');
const { join } = require('path');
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
join(
__dirname,
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}'
),
...createGlobPatternsForDependencies(__dirname),
],
theme: {
extend: {},
},
plugins: [require('daisyui')],
};
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/project.json
|
{
"name": "web",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "web",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/next:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
"outputPath": "dist/web"
},
"configurations": {
"development": {
"outputPath": "web"
},
"production": {}
}
},
"serve": {
"executor": "@nx/next:server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "web:build",
"dev": true,
"port": 3000
},
"configurations": {
"development": {
"buildTarget": "web:build:development",
"dev": true
},
"production": {
"buildTarget": "web:build:production",
"dev": false
}
}
},
"export": {
"executor": "@nx/next:export",
"options": {
"buildTarget": "web:build:production"
}
},
"lint": {
"executor": "@nx/eslint:lint"
}
}
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/next.config.js
|
//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next');
/**
* @type {import('@nx/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
webpack: (config) => {
config.externals = [
...(config.externals || []),
'bigint',
'node-gyp-build',
];
return config;
},
nx: {
// Set this to true if you would like to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
},
};
const plugins = [
// Add more Next.js plugins to this list if needed.
withNx,
];
module.exports = composePlugins(...plugins)(nextConfig);
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/next-env.d.ts
|
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/tsconfig.json
|
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"jsx": "preserve",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": [
"**/*.ts",
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"../web/.next/types/**/*.ts",
"../dist/web/.next/types/**/*.ts",
"next-env.d.ts",
".next/types/**/*.ts"
],
"exclude": ["node_modules", "jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/index.d.ts
|
/* eslint-disable @typescript-eslint/no-explicit-any */
declare module '*.svg' {
const content: any;
export const ReactComponent: any;
export default content;
}
| 0
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks
|
solana_public_repos/developer-bootcamp-2024/project-3-blinks/web/postcss.config.js
|
const { join } = require('path');
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build
// option from your application's configuration (i.e. project.json).
//
// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries
module.exports = {
plugins: {
tailwindcss: {
config: join(__dirname, 'tailwind.config.js'),
},
autoprefixer: {},
},
};
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.