├── programs └── jackpot_smart_contract │ ├── src │ ├── events.rs │ ├── state │ │ ├── mod.rs │ │ ├── config.rs │ │ └── gameground.rs │ ├── instructions │ │ ├── mod.rs │ │ ├── user │ │ │ ├── mod.rs │ │ │ ├── claim_reward.rs │ │ │ └── join_game.rs │ │ └── admin │ │ │ ├── mod.rs │ │ │ ├── set_winner.rs │ │ │ ├── configure.rs │ │ │ └── create_game.rs │ ├── constants.rs │ ├── misc.rs │ ├── lib.rs │ ├── errors.rs │ └── utils.rs │ ├── Xargo.toml │ └── Cargo.toml ├── .prettierignore ├── .gitignore ├── 1.json ├── tsconfig.json ├── Cargo.toml ├── lib ├── constant.ts ├── util.ts └── scripts.ts ├── Anchor.toml ├── package.json ├── README.md ├── cli ├── command.ts ├── utils.ts └── scripts.ts ├── idl ├── jackpot_smart_contract.json └── jackpot_smart_contract.ts └── yarn.lock /programs/jackpot_smart_contract/src/events.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod config; 2 | pub mod gameground; 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | node_modules 5 | dist 6 | build 7 | test-ledger 8 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod admin; 2 | pub use admin::*; 3 | pub mod user; 4 | pub use user::*; 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | **/*.rs.bk 5 | node_modules 6 | test-ledger 7 | .yarn 8 | keys 9 | tests 10 | migrations -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/user/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod join_game; 2 | pub use join_game::*; 3 | pub mod claim_reward; 4 | pub use claim_reward::*; 5 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/admin/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod configure; 2 | pub mod create_game; 3 | pub use create_game::*; 4 | pub mod set_winner; 5 | pub use set_winner::*; 6 | -------------------------------------------------------------------------------- /1.json: -------------------------------------------------------------------------------- 1 | [71,24,40,147,111,177,215,136,246,47,250,244,174,50,132,153,68,196,180,255,28,129,162,88,119,230,135,245,83,173,112,17,30,202,248,74,0,103,180,238,158,144,231,161,207,165,247,32,19,210,215,235,213,216,218,193,234,252,8,65,33,87,72,226] -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["./node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/constants.rs: -------------------------------------------------------------------------------- 1 | pub const CONFIG: &str = "config"; 2 | pub const GLOBAL: &str = "global"; 3 | pub const METADATA: &str = "metadata"; 4 | pub const LAMPORT_DECIMALS: u8 = 9; 5 | pub const TOKEN_LAUNCH: &str = "token_launch"; 6 | pub const GAME_GROUND: &str = "BONDING_CURVE"; 7 | -------------------------------------------------------------------------------- /lib/constant.ts: -------------------------------------------------------------------------------- 1 | import { Cluster, PublicKey } from "@solana/web3.js"; 2 | 3 | export const SEED_CONFIG = "config"; 4 | export const GAME_GROUND = "BONDING_CURVE"; 5 | const cluster: Cluster = "devnet"; 6 | 7 | export const TEST_INITIAL_PLATFORM_FEE = 100; 8 | export const TEST_INITIAL_MIN_DEPOSIT_AMOUNT = 100_000_000; 9 | export const TEST_INITIAL_MAX_JOINER_COUNT = 100; -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | anchor_version = "0.30.1" 3 | 4 | [features] 5 | resolution = true 6 | skip-lint = false 7 | 8 | [programs.devnet] 9 | jackpot_smart_contract = "CKaQ1zwbTdYoVjBfWMUiZGzTbf8wHfc2ExTRTM79kj7w" 10 | 11 | [programs.localnet] 12 | jackpot_smart_contract = "CKaQ1zwbTdYoVjBfWMUiZGzTbf8wHfc2ExTRTM79kj7w" 13 | 14 | [registry] 15 | url = "https://api.apr.dev" 16 | 17 | [provider] 18 | cluster = "https://devnet.helius-rpc.com/?api-key=7387c4ee-fe6a-43a6-96ea-05e6534aa500" 19 | wallet = "../key/uu.json" 20 | 21 | [scripts] 22 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "ISC", 3 | "scripts": { 4 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 5 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", 6 | "script": "ts-node ./cli/command.ts" 7 | }, 8 | "dependencies": { 9 | "@coral-xyz/anchor": "^0.30.1", 10 | "@orao-network/solana-vrf": "^0.4.0", 11 | "commander": "^13.0.0", 12 | "@solana/web3.js": "^1.68.0" 13 | }, 14 | "devDependencies": { 15 | "chai": "^4.3.4", 16 | "mocha": "^9.0.3", 17 | "ts-mocha": "^10.0.0", 18 | "@types/bn.js": "^5.1.0", 19 | "@types/chai": "^4.3.0", 20 | "@types/mocha": "^9.0.0", 21 | "typescript": "^4.3.5", 22 | "prettier": "^2.6.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "jackpot_smart_contract" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "jackpot_smart_contract" 10 | 11 | [features] 12 | default = [] 13 | cpi = ["no-entrypoint"] 14 | no-entrypoint = [] 15 | no-idl = [] 16 | no-log-ix-name = [] 17 | idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] 18 | 19 | [dependencies] 20 | anchor-lang = { version = "0.30.1", features = ["init-if-needed"] } 21 | anchor-spl = { version = "0.30.1", features = ["metadata"] } 22 | orao-solana-vrf = { version = "0.5.0", default-features = false, features = ["cpi"] } 23 | 24 | 25 | solana-program = "1.18.18" 26 | spl-token = "=4.0.3" 27 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/misc.rs: -------------------------------------------------------------------------------- 1 | use std::mem::size_of; 2 | 3 | use anchor_lang::{ 4 | solana_program::{account_info::AccountInfo, program_error::ProgramError}, 5 | AccountDeserialize, 6 | }; 7 | 8 | use orao_solana_vrf::state::RandomnessAccountData; 9 | 10 | pub fn get_account_data(account_info: &AccountInfo) -> Result { 11 | if account_info.data_is_empty() { 12 | return Err(ProgramError::UninitializedAccount); 13 | } 14 | 15 | let account = RandomnessAccountData::try_deserialize(&mut &account_info.data.borrow()[..])?; 16 | 17 | if false { 18 | Err(ProgramError::UninitializedAccount) 19 | } else { 20 | Ok(account) 21 | } 22 | } 23 | 24 | /// Derives last round outcome. 25 | pub fn current_state(randomness: &RandomnessAccountData) -> u64 { 26 | if let Some(randomness) = randomness.fulfilled_randomness() { 27 | let value = randomness[0..size_of::()].try_into().unwrap(); 28 | 29 | return u64::from_le_bytes(value); 30 | } else { 31 | return 0; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/util.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Transaction, 3 | Connection, 4 | } from "@solana/web3.js"; 5 | 6 | import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet"; 7 | 8 | export const execTx = async ( 9 | transaction: Transaction, 10 | connection: Connection, 11 | payer: NodeWallet, 12 | commitment: "confirmed" | "finalized" = 'confirmed' 13 | ) => { 14 | try { 15 | // Sign the transaction with payer wallet 16 | const signedTx = await payer.signTransaction(transaction); 17 | 18 | // Serialize, send and confirm the transaction 19 | const rawTransaction = signedTx.serialize() 20 | 21 | console.log(await connection.simulateTransaction(signedTx)); 22 | 23 | // return; 24 | const txid = await connection.sendRawTransaction(rawTransaction, { 25 | skipPreflight: true, 26 | maxRetries: 2, 27 | preflightCommitment: "processed" 28 | }); 29 | console.log(`https://solscan.io/tx/${txid}?cluster=custom&customUrl=${connection.rpcEndpoint}`); 30 | 31 | const confirmed = await connection.confirmTransaction(txid, commitment); 32 | 33 | console.log("err ", confirmed.value.err) 34 | } catch (e) { 35 | console.log(e); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | pub mod constants; 3 | pub mod errors; 4 | // pub mod events; 5 | pub mod instructions; 6 | pub mod misc; 7 | pub mod state; 8 | pub mod utils; 9 | 10 | use instructions::{claim_reward::*, configure::*, create_game::*, join_game::*, set_winner::*}; 11 | 12 | use state::config::*; 13 | 14 | declare_id!("CKaQ1zwbTdYoVjBfWMUiZGzTbf8wHfc2ExTRTM79kj7w"); 15 | 16 | #[program] 17 | pub mod jackpot_smart_contract { 18 | 19 | use super::*; 20 | 21 | pub fn configure(ctx: Context, new_config: Config) -> Result<()> { 22 | msg!("configure: {:#?}", new_config); 23 | ctx.accounts.handler(new_config, ctx.bumps.config) 24 | } 25 | 26 | pub fn create_game( 27 | ctx: Context, 28 | force: [u8; 32], 29 | round_time: i64, 30 | min_deposit_amount: u64, 31 | max_joiner_count: u64, 32 | ) -> Result<()> { 33 | ctx.accounts 34 | .handler(force, round_time, min_deposit_amount, max_joiner_count) 35 | } 36 | 37 | pub fn set_winner(ctx: Context, round_num: u64) -> Result<()> { 38 | ctx.accounts.handler(round_num) 39 | } 40 | 41 | pub fn join_game(ctx: Context, round_num: u64, amount: u64) -> Result<()> { 42 | ctx.accounts.handler(round_num, amount) 43 | } 44 | 45 | pub fn claim_reward(ctx: Context, round_num: u64) -> Result<()> { 46 | ctx.accounts.handler(round_num, ctx.bumps.global_vault) 47 | } 48 | } 49 | 50 | #[derive(Accounts)] 51 | pub struct Initialize {} 52 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/state/config.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; 3 | use core::fmt::Debug; 4 | 5 | #[account] 6 | #[derive(Debug)] 7 | pub struct Config { 8 | pub authority: Pubkey, 9 | 10 | pub payer_wallet: Pubkey, 11 | pub team_wallet: Pubkey, 12 | 13 | pub game_round: u64, 14 | pub platform_fee: u64, 15 | pub min_deposit_amount: u64, 16 | pub max_joiner_count: u64, 17 | 18 | pub initialized: bool, 19 | } 20 | 21 | #[derive(AnchorSerialize, AnchorDeserialize, Clone, PartialEq, Eq, Debug)] 22 | pub enum AmountConfig { 23 | Range { min: Option, max: Option }, 24 | Enum(Vec), 25 | } 26 | 27 | impl AmountConfig { 28 | pub fn validate(&self, value: &T) -> Result<()> { 29 | match self { 30 | Self::Range { min, max } => { 31 | if let Some(min) = min { 32 | if value < min { 33 | return Err(ValueTooSmall.into()); 34 | } 35 | } 36 | if let Some(max) = max { 37 | if value > max { 38 | return Err(ValueTooLarge.into()); 39 | } 40 | } 41 | 42 | Ok(()) 43 | } 44 | Self::Enum(options) => { 45 | if options.contains(value) { 46 | Ok(()) 47 | } else { 48 | Err(ValueInvalid.into()) 49 | } 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/errors.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | pub use ContractError::*; 4 | 5 | #[error_code] 6 | pub enum ContractError { 7 | #[msg("ValueTooSmall")] 8 | ValueTooSmall, 9 | 10 | #[msg("ValueTooLarge")] 11 | ValueTooLarge, 12 | 13 | #[msg("ValueInvalid")] 14 | ValueInvalid, 15 | 16 | #[msg("IncorrectAuthority")] 17 | IncorrectAuthority, 18 | 19 | #[msg("IncorrectTeamWalletAuthority")] 20 | IncorrectTeamWalletAuthority, 21 | 22 | #[msg("IncorrectPayerAuthority")] 23 | IncorrectPayerAuthority, 24 | 25 | #[msg("IncorrectConfigAccount")] 26 | IncorrectConfigAccount, 27 | 28 | #[msg("Overflow or underflow occured")] 29 | OverflowOrUnderflowOccurred, 30 | 31 | #[msg("Amount is invalid")] 32 | InvalidAmount, 33 | 34 | #[msg("Incorrect team wallet address")] 35 | IncorrectTeamWallet, 36 | 37 | #[msg("Can not deposit after the game is completed")] 38 | GameAlreadyCompleted, 39 | 40 | #[msg("Already set winner")] 41 | SetWinnerCompleted, 42 | 43 | #[msg("Game is not completed")] 44 | GameNotCompleted, 45 | 46 | #[msg("Winner already claimed")] 47 | WinnerClaimed, 48 | 49 | #[msg("Return amount is too small compared to the minimum received amount")] 50 | ReturnAmountTooSmall, 51 | 52 | #[msg("Global Not Initialized")] 53 | NotInitialized, 54 | 55 | #[msg("Invalid Global Authority")] 56 | InvalidGlobalAuthority, 57 | 58 | #[msg("Not enough SOL received to be valid.")] 59 | InsufficientSol, 60 | 61 | #[msg("Arithmetic Error")] 62 | ArithmeticError, 63 | 64 | #[msg("Math Overflow")] 65 | MathOverflow, 66 | 67 | #[msg("End time is error")] 68 | EndTimeError, 69 | 70 | #[msg("Round time is error")] 71 | RoundTimeError, 72 | 73 | #[msg("Minimum Deposit Amount is error")] 74 | MinDepositAmountError, 75 | 76 | #[msg("Maximum Joiner Count is error")] 77 | MaxJoinerCountError, 78 | 79 | #[msg("User count exceeds the maximum allowed limit")] 80 | UserCountOverError, 81 | 82 | #[msg("Randomness is still being fulfilled")] 83 | StillProcessing, 84 | 85 | #[msg("The deposit amount must be more than the minimum deposit amount.")] 86 | DepositAmountError, 87 | 88 | #[msg("This Round not exist")] 89 | RoundNumberError, 90 | } 91 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/user/claim_reward.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | constants::{CONFIG, GAME_GROUND, GLOBAL}, 3 | errors::*, 4 | state::{config::*, gameground::*}, 5 | utils::*, 6 | }; 7 | use anchor_lang::{prelude::*, system_program}; 8 | 9 | #[derive(Accounts)] 10 | #[instruction(round_num: u64)] 11 | pub struct ClaimReward<'info> { 12 | #[account( 13 | mut, 14 | seeds = [CONFIG.as_bytes()], 15 | bump, 16 | )] 17 | global_config: Box>, 18 | 19 | /// CHECK: global vault pda which stores SOL 20 | #[account( 21 | mut, 22 | seeds = [GLOBAL.as_bytes()], 23 | bump, 24 | )] 25 | pub global_vault: AccountInfo<'info>, 26 | 27 | #[account(mut, 28 | constraint = game_ground.winner == winner.key() @ ContractError::IncorrectAuthority)] 29 | winner: Signer<'info>, 30 | 31 | #[account(mut, 32 | constraint = global_config.payer_wallet == payer.key() @ ContractError::IncorrectPayerAuthority)] 33 | payer: Signer<'info>, 34 | 35 | #[account( 36 | mut, 37 | seeds = [GAME_GROUND.as_bytes(), round_num.to_le_bytes().as_ref()], 38 | bump 39 | )] 40 | game_ground: Box>, 41 | 42 | #[account(address = system_program::ID)] 43 | system_program: Program<'info, System>, 44 | } 45 | 46 | impl<'info> ClaimReward<'info> { 47 | pub fn handler(&mut self, round_num: u64, global_vault_bump: u8) -> Result<()> { 48 | require!( 49 | round_num < self.global_config.game_round, 50 | ContractError::RoundNumberError 51 | ); 52 | 53 | let game_ground = &mut self.game_ground; 54 | 55 | require!( 56 | game_ground.is_claimed == false, 57 | ContractError::WinnerClaimed 58 | ); 59 | 60 | require!( 61 | game_ground.is_completed == true, 62 | ContractError::GameNotCompleted 63 | ); 64 | 65 | let signer_seeds: &[&[&[u8]]] = &[&[GLOBAL.as_bytes(), &[global_vault_bump]]]; 66 | 67 | sol_transfer_with_signer( 68 | self.global_vault.to_account_info(), 69 | self.winner.to_account_info(), 70 | &self.system_program, 71 | signer_seeds, 72 | game_ground.total_deposit, 73 | )?; 74 | 75 | game_ground.is_claimed = true; 76 | 77 | Ok(()) 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/admin/set_winner.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | constants::{CONFIG, GAME_GROUND, GLOBAL}, 3 | errors::*, 4 | misc::*, 5 | state::{config::*, gameground::*}, 6 | }; 7 | use anchor_lang::{prelude::*, system_program}; 8 | use orao_solana_vrf::RANDOMNESS_ACCOUNT_SEED; 9 | 10 | #[derive(Accounts)] 11 | #[instruction(round_num: u64)] 12 | pub struct SetWinner<'info> { 13 | #[account( 14 | mut, 15 | seeds = [CONFIG.as_bytes()], 16 | bump, 17 | )] 18 | global_config: Box>, 19 | 20 | /// CHECK: global vault pda which stores SOL 21 | #[account( 22 | mut, 23 | seeds = [GLOBAL.as_bytes()], 24 | bump, 25 | )] 26 | pub global_vault: AccountInfo<'info>, 27 | 28 | #[account(mut, 29 | constraint = global_config.authority == creator.key() @ ContractError::IncorrectAuthority)] 30 | creator: Signer<'info>, 31 | 32 | #[account( 33 | mut, 34 | seeds = [GAME_GROUND.as_bytes(), round_num.to_le_bytes().as_ref()], 35 | bump 36 | )] 37 | game_ground: Box>, 38 | 39 | /// CHECK: 40 | #[account( 41 | mut, 42 | seeds = [RANDOMNESS_ACCOUNT_SEED, &game_ground.force], 43 | bump, 44 | seeds::program = orao_solana_vrf::ID 45 | )] 46 | pub random: AccountInfo<'info>, 47 | 48 | #[account(address = system_program::ID)] 49 | system_program: Program<'info, System>, 50 | } 51 | 52 | impl<'info> SetWinner<'info> { 53 | pub fn handler(&mut self, round_num: u64) -> Result<()> { 54 | require!( 55 | round_num < self.global_config.game_round, 56 | ContractError::RoundNumberError 57 | ); 58 | 59 | let game_ground = &mut self.game_ground; 60 | let timestamp = Clock::get()?.unix_timestamp; 61 | 62 | require!( 63 | game_ground.end_date <= timestamp, 64 | ContractError::GameNotCompleted 65 | ); 66 | require!( 67 | game_ground.is_completed == false, 68 | ContractError::SetWinnerCompleted 69 | ); 70 | 71 | let rand_acc = crate::misc::get_account_data(&self.random)?; 72 | 73 | let randomness = current_state(&rand_acc); 74 | if randomness == 0 { 75 | return err!(ContractError::StillProcessing); 76 | } 77 | 78 | game_ground.set_winner(randomness)?; 79 | game_ground.is_completed = true; 80 | 81 | Ok(()) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/state/gameground.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{prelude::*, AnchorDeserialize, AnchorSerialize}; 2 | 3 | #[account] 4 | #[derive(Debug)] 5 | pub struct GameGround { 6 | pub creator: Pubkey, 7 | pub game_round: u64, 8 | 9 | pub create_date: i64, 10 | pub start_date: i64, 11 | pub end_date: i64, 12 | pub round_time: i64, 13 | 14 | pub total_deposit: u64, 15 | pub rand: u64, 16 | pub winner: Pubkey, 17 | pub user_count: u64, 18 | pub min_deposit_amount: u64, 19 | pub max_joiner_count: u64, 20 | 21 | pub force: [u8; 32], 22 | pub is_completed: bool, 23 | pub is_claimed: bool, 24 | 25 | pub deposit_list: Vec, 26 | } 27 | 28 | impl GameGround { 29 | pub const INIT_SPACE: usize = 32 + // creator 30 | 8 + // game_round 31 | 8 + // create_date 32 | 8 + // start_date 33 | 8 + // end_date 34 | 8 + // round_time 35 | 8 + // total_deposit 36 | 8 + // rand 37 | 32 + // winner 38 | 8 + // user_count 39 | 8 + // min_deposit_amount 40 | 8 + // max_joiner_count 41 | 32 + // force [u8; 32] 42 | 1 + // is_completed (bool) 43 | 1 + // is_claimed (bool) 44 | (24 + 40); // Vec length prefix (for deposit_list) 45 | 46 | pub fn space(len: usize) -> usize { 47 | 8 + Self::INIT_SPACE + len * (32 + 8) 48 | } 49 | } 50 | 51 | #[derive(Debug, Clone, AnchorSerialize, AnchorDeserialize, InitSpace)] 52 | pub struct DepositInfo { 53 | pub user: Pubkey, 54 | pub amount: u64, 55 | } 56 | 57 | impl DepositInfo { 58 | pub const INIT_SPACE: usize = 32 + // user Pubkey 59 | 8; // amount 60 | } 61 | 62 | pub trait GameGroundAccount<'info> { 63 | fn append(&mut self, entrant: Pubkey, amount: u64); 64 | 65 | fn set_winner(&mut self, random_num: u64) -> Result<()>; 66 | } 67 | 68 | impl<'info> GameGroundAccount<'info> for Account<'info, GameGround> { 69 | fn append(&mut self, user: Pubkey, amount: u64) { 70 | if let Some(deposit) = self.deposit_list.iter_mut().find(|d| d.user == user) { 71 | // If the user already exists, add to their amount 72 | deposit.amount += amount; 73 | } else { 74 | // If user doesn't exist, add a new entry 75 | self.deposit_list.push(DepositInfo { user, amount }); 76 | self.user_count += 1; 77 | } 78 | self.total_deposit += amount; 79 | } 80 | 81 | fn set_winner(&mut self, random_num: u64) -> Result<()> { 82 | self.rand = random_num; 83 | let mut remaining = self.rand % self.total_deposit; 84 | 85 | for deposit in &self.deposit_list { 86 | if remaining > deposit.amount { 87 | remaining -= deposit.amount; 88 | } else { 89 | self.winner = deposit.user; 90 | msg!("winner: {:?}", self.winner); 91 | break; 92 | } 93 | } 94 | 95 | Ok(()) 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Casino Game Smart Contract(Casino-Jackpot) 2 | 3 | Casino Game Smart Contract: A decentralized casino(Jackpot) smart contract built on the Solana blockchain using the Anchor framework. This project implements a jackpot system with secure random number generation using ORAO Network's VRF (Verifiable Random Function). 4 | 5 | ## Contact 6 | 7 | If some have any question, contact here: [Twitter](https://x.com/gamedevcarron) | [Telegram](https://t.me/gamedevcarron) | [Discord](https://discord.gg/gamedevcarron) 8 | 9 | ## Contract Address 10 | 11 | - [Contract address](https://solscan.io/account/CKaQ1zwbTdYoVjBfWMUiZGzTbf8wHfc2ExTRTM79kj7w?cluster=devnet) 12 | 13 | ## Features 14 | 15 | - Decentralized jackpot system 16 | - Secure random number generation using ORAO Network VRF 17 | - Built with Anchor Framework 18 | - TypeScript client integration 19 | - Automated testing suite 20 | 21 | ## Prerequisites 22 | 23 | - Rust (latest stable version) 24 | - Node.js (v16 or later) 25 | - Yarn package manager 26 | - Solana CLI tools 27 | - Anchor Framework v0.30.1 28 | 29 | ## Installation 30 | 31 | 1. Clone the repository: 32 | ```bash 33 | git clone https://github.com/devcarron/casino-game-smartContract 34 | cd gamefi-jackpot-smart-contract 35 | ``` 36 | 37 | 2. Install dependencies: 38 | ```bash 39 | yarn install 40 | ``` 41 | 42 | 3. Build the program: 43 | ```bash 44 | anchor build 45 | ``` 46 | 47 | ## Configuration. 48 | 49 | The project is configured to use Solana's devnet by default. The configuration can be found in `Anchor.toml`. Make sure to: 50 | 51 | 1. Update the program ID in `Anchor.toml` if you're deploying to a new instance 52 | 2. Configure your wallet path in `Anchor.toml` 53 | 3. Set up your Helius RPC endpoint (currently configured for devnet) 54 | 55 | ## Project Structure 56 | 57 | ``` 58 | Casino_Smart_Contract/ 59 | ├── programs/ # Solana program directory 60 | │ └── jackpot_smart_contract/ # Main program code 61 | ├── cli/ # Command-line interface 62 | ├── idl/ # Interface Definition Language files 63 | ├── lib/ # Library code 64 | ├── tests/ # Test files 65 | └── Anchor.toml # Anchor configuration 66 | ``` 67 | 68 | ## Testing 69 | 70 | Run the test suite using: 71 | ```bash 72 | yarn script config 73 | yarn script create -t 60 -d 100000000 -j 100 74 | yarn script join -a 100000000 -g 2 75 | yarn script winner -g 2 76 | yarn script claim -g 2 77 | ``` 78 | 79 | ## Dependencies 80 | 81 | ### Main Dependencies 82 | - @coral-xyz/anchor: ^0.30.1 83 | - @orao-network/solana-vrf: ^0.4.0 84 | - @solana/web3.js: ^1.68.0 85 | - commander: ^13.0.0 86 | 87 | ### Development Dependencies 88 | - TypeScript 89 | - Mocha 90 | - Chai 91 | - Prettier 92 | 93 | ## Security 94 | 95 | This project uses ORAO Network's VRF for secure random number generation, ensuring fair and verifiable randomness in the jackpot system. 96 | 97 | ## License 98 | 99 | ISC License 100 | 101 | ## Contributing 102 | 103 | Contributions are welcome! Please feel free to submit a Pull Request. 104 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/admin/configure.rs: -------------------------------------------------------------------------------- 1 | use crate::errors::*; 2 | use crate::{ 3 | constants::{CONFIG, GLOBAL}, 4 | state::config::*, 5 | utils::sol_transfer_from_user, 6 | }; 7 | use anchor_lang::{prelude::*, system_program, Discriminator}; 8 | use borsh::BorshDeserialize; 9 | 10 | #[derive(Accounts)] 11 | pub struct Configure<'info> { 12 | #[account(mut)] 13 | payer: Signer<'info>, 14 | 15 | /// CHECK: initialization handled inside the instruction 16 | #[account( 17 | mut, 18 | seeds = [CONFIG.as_bytes()], 19 | bump, 20 | )] 21 | config: AccountInfo<'info>, 22 | 23 | /// CHECK: global vault pda which stores SOL 24 | #[account( 25 | mut, 26 | seeds = [GLOBAL.as_bytes()], 27 | bump, 28 | )] 29 | pub global_vault: AccountInfo<'info>, 30 | 31 | #[account(address = system_program::ID)] 32 | system_program: Program<'info, System>, 33 | } 34 | 35 | impl<'info> Configure<'info> { 36 | pub fn handler(&mut self, new_config: Config, config_bump: u8) -> Result<()> { 37 | let serialized_config = 38 | [&Config::DISCRIMINATOR, new_config.try_to_vec()?.as_slice()].concat(); 39 | let serialized_config_len = serialized_config.len(); 40 | let config_cost = Rent::get()?.minimum_balance(serialized_config_len); 41 | 42 | // init config pda 43 | if self.config.owner != &crate::ID { 44 | let cpi_context = CpiContext::new( 45 | self.system_program.to_account_info(), 46 | system_program::CreateAccount { 47 | from: self.payer.to_account_info(), 48 | to: self.config.to_account_info(), 49 | }, 50 | ); 51 | system_program::create_account( 52 | cpi_context.with_signer(&[&[CONFIG.as_bytes(), &[config_bump]]]), 53 | config_cost, 54 | serialized_config_len as u64, 55 | &crate::ID, 56 | )?; 57 | } else { 58 | let data = self.config.try_borrow_data()?; 59 | if data.len() < 8 || &data[0..8] != Config::DISCRIMINATOR { 60 | return err!(ContractError::IncorrectConfigAccount); 61 | } 62 | 63 | let config = Config::deserialize(&mut &data[8..])?; 64 | 65 | if config.authority != self.payer.key() { 66 | return err!(ContractError::IncorrectAuthority); 67 | } 68 | } 69 | 70 | let lamport_delta = (config_cost as i64) - (self.config.lamports() as i64); 71 | if lamport_delta > 0 { 72 | system_program::transfer( 73 | CpiContext::new( 74 | self.system_program.to_account_info(), 75 | system_program::Transfer { 76 | from: self.payer.to_account_info(), 77 | to: self.config.to_account_info(), 78 | }, 79 | ), 80 | lamport_delta as u64, 81 | )?; 82 | self.config.realloc(serialized_config_len, false)?; 83 | } 84 | 85 | (self.config.try_borrow_mut_data()?[..serialized_config_len]) 86 | .copy_from_slice(serialized_config.as_slice()); 87 | 88 | // initialize global vault if needed 89 | if self.global_vault.lamports() == 0 { 90 | sol_transfer_from_user( 91 | &self.payer, 92 | self.global_vault.clone(), 93 | &self.system_program, 94 | 1000000, 95 | )?; 96 | } 97 | Ok(()) 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /cli/command.ts: -------------------------------------------------------------------------------- 1 | import { program } from "commander"; 2 | import { PublicKey } from "@solana/web3.js"; 3 | import { 4 | configProject, 5 | setClusterConfig, 6 | createGame, 7 | setWinner, 8 | claimReward, 9 | joinGame 10 | } from "./scripts"; 11 | 12 | program.version("0.0.1"); 13 | 14 | programCommand("config").action(async (directory, cmd) => { 15 | const { env, keypair, rpc } = cmd.opts(); 16 | 17 | console.log("Solana Cluster:", env); 18 | console.log("Keypair Path:", keypair); 19 | console.log("RPC URL:", rpc); 20 | 21 | await setClusterConfig(env, keypair, rpc); 22 | 23 | await configProject(); 24 | }); 25 | 26 | programCommand("create") 27 | .requiredOption("-t, --time ", "round duration") 28 | .requiredOption("-d, --minDeposit ", "min deposit amount") 29 | .requiredOption("-j, --maxJoiner ", "max joiner count") 30 | .action(async (directory, cmd) => { 31 | const { env, keypair, rpc, time, minDeposit, maxJoiner } = cmd.opts(); 32 | 33 | console.log("Solana Cluster:", env); 34 | console.log("Keypair Path:", keypair); 35 | console.log("RPC URL:", rpc); 36 | 37 | await setClusterConfig(env, keypair, rpc); 38 | 39 | await createGame(time, minDeposit, maxJoiner); 40 | }); 41 | 42 | programCommand("winner") 43 | .requiredOption("-g, --roundNum ", "Round Number") 44 | .action(async (directory, cmd) => { 45 | const { env, keypair, rpc, roundNum } = cmd.opts(); 46 | 47 | console.log("Solana Cluster:", env); 48 | console.log("Keypair Path:", keypair); 49 | console.log("RPC URL:", rpc); 50 | 51 | await setClusterConfig(env, keypair, rpc); 52 | 53 | await setWinner(roundNum); 54 | }); 55 | 56 | programCommand("claim") 57 | .requiredOption("-g, --roundNum ", "Round Number") 58 | .action(async (directory, cmd) => { 59 | const { env, keypair, rpc, roundNum } = cmd.opts(); 60 | 61 | console.log("Solana Cluster:", env); 62 | console.log("Keypair Path:", keypair); 63 | console.log("RPC URL:", rpc); 64 | 65 | await setClusterConfig(env, keypair, rpc); 66 | 67 | await claimReward(roundNum); 68 | }); 69 | 70 | programCommand("join") 71 | .requiredOption("-a, --amount ", "swap amount") 72 | .requiredOption("-g, --roundNum ", "Round Number") 73 | .action(async (directory, cmd) => { 74 | const { env, keypair, rpc, amount, roundNum } = cmd.opts(); 75 | 76 | console.log("Solana Cluster:", env); 77 | console.log("Keypair Path:", keypair); 78 | console.log("RPC URL:", rpc); 79 | 80 | await setClusterConfig(env, keypair, rpc); 81 | 82 | await joinGame(roundNum, amount); 83 | }); 84 | 85 | 86 | function programCommand(name: string) { 87 | return program 88 | .command(name) 89 | .option( 90 | // mainnet-beta, testnet, devnet 91 | "-e, --env ", 92 | "Solana cluster env name", 93 | "devnet" 94 | ) 95 | .option( 96 | "-r, --rpc ", 97 | "Solana cluster RPC name", 98 | "https://devnet.helius-rpc.com/?api-key=7387c4ee-fe6a-43a6-96ea-05e6534aa500" 99 | ) 100 | .option( 101 | "-k, --keypair ", 102 | "Solana wallet Keypair Path", 103 | "../key/uu.json" 104 | ); 105 | } 106 | 107 | program.parse(process.argv); 108 | 109 | /* 110 | 111 | yarn script config 112 | yarn script create -t 60 -d 100000000 -j 100 113 | yarn script join -a 100000000 -g 2 114 | yarn script winner -g 2 115 | yarn script claim -g 2 116 | 117 | */ -------------------------------------------------------------------------------- /cli/utils.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Connection, 3 | PublicKey, 4 | TransactionInstruction, 5 | SystemProgram 6 | } from "@solana/web3.js"; 7 | 8 | import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, createAssociatedTokenAccountInstruction, getAssociatedTokenAddressSync } from "@solana/spl-token"; 9 | 10 | import { Program, Wallet, AnchorProvider } from "@coral-xyz/anchor"; 11 | 12 | import { 13 | IDL as VaultIDL, 14 | VaultIdl, 15 | PROGRAM_ID as VAULT_PROGRAM_ID, 16 | } from '@mercurial-finance/vault-sdk'; 17 | 18 | import { 19 | AmmIdl, 20 | Amm, 21 | PROGRAM_ID as AMM_PROGRAM_ID, 22 | } from '@mercurial-finance/dynamic-amm-sdk'; 23 | import { METAPLEX_PROGRAM, SEEDS } from "@mercurial-finance/dynamic-amm-sdk/dist/cjs/src/amm/constants"; 24 | 25 | export function getFirstKey(key1: PublicKey, key2: PublicKey) { 26 | const buf1 = key1.toBuffer(); 27 | const buf2 = key2.toBuffer(); 28 | // Buf1 > buf2 29 | if (Buffer.compare(buf1, buf2) === 1) { 30 | return buf1; 31 | } 32 | return buf2; 33 | } 34 | 35 | export function getSecondKey(key1: PublicKey, key2: PublicKey) { 36 | const buf1 = key1.toBuffer(); 37 | const buf2 = key2.toBuffer(); 38 | // Buf1 > buf2 39 | if (Buffer.compare(buf1, buf2) === 1) { 40 | return buf2; 41 | } 42 | return buf1; 43 | } 44 | 45 | // export const createProgram = (connection: Connection, programId?: PublicKey) => { 46 | // const provider = new AnchorProvider(connection, {} as any, AnchorProvider.defaultOptions()); 47 | // const ammProgram = new Program(AmmIdl, AMM_PROGRAM_ID, provider); 48 | // const vaultProgram = new Program(VaultIDL, VAULT_PROGRAM_ID, provider); 49 | 50 | // return { provider, ammProgram, vaultProgram }; 51 | // }; 52 | 53 | export function derivePoolAddressWithConfig( 54 | tokenA: PublicKey, 55 | tokenB: PublicKey, 56 | config: PublicKey, 57 | programId: PublicKey, 58 | ) { 59 | const [poolPubkey] = PublicKey.findProgramAddressSync( 60 | [getFirstKey(tokenA, tokenB), getSecondKey(tokenA, tokenB), config.toBuffer()], 61 | programId, 62 | ); 63 | 64 | return poolPubkey; 65 | } 66 | 67 | export const getAssociatedTokenAccount = (tokenMint: PublicKey, owner: PublicKey) => { 68 | return getAssociatedTokenAddressSync(tokenMint, owner, true, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID); 69 | }; 70 | 71 | export const getOrCreateATAInstruction = async ( 72 | tokenMint: PublicKey, 73 | owner: PublicKey, 74 | connection: Connection, 75 | payer?: PublicKey, 76 | ): Promise<[PublicKey, TransactionInstruction?]> => { 77 | let toAccount; 78 | try { 79 | toAccount = getAssociatedTokenAccount(tokenMint, owner); 80 | 81 | const account = await connection.getAccountInfo(toAccount); 82 | 83 | if (!account) { 84 | const ix = createAssociatedTokenAccountInstruction( 85 | payer || owner, 86 | toAccount, 87 | owner, 88 | tokenMint, 89 | TOKEN_PROGRAM_ID, 90 | ASSOCIATED_TOKEN_PROGRAM_ID, 91 | ); 92 | return [toAccount, ix]; 93 | } 94 | return [toAccount, undefined]; 95 | } catch (e) { 96 | /* handle error */ 97 | console.error('Error::getOrCreateATAInstruction', e); 98 | throw e; 99 | } 100 | }; 101 | 102 | export function deriveMintMetadata(lpMint: PublicKey) { 103 | return PublicKey.findProgramAddressSync( 104 | [Buffer.from('metadata'), METAPLEX_PROGRAM.toBuffer(), lpMint.toBuffer()], 105 | METAPLEX_PROGRAM, 106 | ); 107 | } 108 | 109 | export const deriveLockEscrowPda = (pool: PublicKey, owner: PublicKey, ammProgram: PublicKey) => { 110 | return PublicKey.findProgramAddressSync( 111 | [Buffer.from(SEEDS.LOCK_ESCROW), pool.toBuffer(), owner.toBuffer()], 112 | ammProgram, 113 | ); 114 | }; -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/admin/create_game.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | constants::{CONFIG, GAME_GROUND, GLOBAL}, 3 | errors::*, 4 | state::{config::*, gameground::*}, 5 | }; 6 | use anchor_lang::{prelude::*, system_program}; 7 | 8 | use orao_solana_vrf::cpi::accounts::RequestV2; 9 | use orao_solana_vrf::program::OraoVrf; 10 | use orao_solana_vrf::state::NetworkState; 11 | use orao_solana_vrf::CONFIG_ACCOUNT_SEED; 12 | use orao_solana_vrf::RANDOMNESS_ACCOUNT_SEED; 13 | 14 | #[derive(Accounts)] 15 | #[instruction(force: [u8; 32])] 16 | 17 | pub struct CreateGame<'info> { 18 | #[account( 19 | mut, 20 | seeds = [CONFIG.as_bytes()], 21 | bump, 22 | )] 23 | global_config: Box>, 24 | 25 | /// CHECK: global vault pda which stores SOL 26 | #[account( 27 | mut, 28 | seeds = [GLOBAL.as_bytes()], 29 | bump, 30 | )] 31 | pub global_vault: AccountInfo<'info>, 32 | 33 | #[account(mut)] 34 | creator: Signer<'info>, 35 | 36 | #[account(mut, 37 | constraint = global_config.payer_wallet == payer.key() @ ContractError::IncorrectPayerAuthority)] 38 | payer: Signer<'info>, 39 | 40 | #[account( 41 | init, 42 | payer = payer, 43 | space = 8 + GameGround::INIT_SPACE, 44 | seeds = [GAME_GROUND.as_bytes(), global_config.game_round.to_le_bytes().as_ref()], 45 | bump 46 | )] 47 | game_ground: Box>, 48 | 49 | /// CHECK: 50 | #[account( 51 | mut, 52 | seeds = [RANDOMNESS_ACCOUNT_SEED, &force], 53 | bump, 54 | seeds::program = orao_solana_vrf::ID 55 | )] 56 | pub random: AccountInfo<'info>, 57 | /// CHECK: 58 | #[account(mut)] 59 | pub treasury: AccountInfo<'info>, 60 | 61 | #[account( 62 | mut, 63 | seeds = [CONFIG_ACCOUNT_SEED], 64 | bump, 65 | seeds::program = orao_solana_vrf::ID 66 | )] 67 | pub config: Account<'info, NetworkState>, 68 | 69 | pub vrf: Program<'info, OraoVrf>, 70 | 71 | #[account(address = system_program::ID)] 72 | system_program: Program<'info, System>, 73 | } 74 | 75 | impl<'info> CreateGame<'info> { 76 | pub fn handler( 77 | &mut self, 78 | force: [u8; 32], 79 | round_time: i64, 80 | min_deposit_amount: u64, 81 | max_joiner_count: u64, 82 | ) -> Result<()> { 83 | let game_ground = &mut self.game_ground; 84 | let global_config = &mut self.global_config; 85 | let timestamp = Clock::get()?.unix_timestamp; 86 | 87 | require!(round_time > 0, ContractError::RoundTimeError); 88 | 89 | require!( 90 | min_deposit_amount >= global_config.min_deposit_amount, 91 | ContractError::MinDepositAmountError 92 | ); 93 | 94 | require!( 95 | max_joiner_count <= global_config.max_joiner_count, 96 | ContractError::MaxJoinerCountError 97 | ); 98 | 99 | // Request randomness. 100 | let cpi_program = self.vrf.to_account_info(); 101 | let cpi_accounts = RequestV2 { 102 | payer: self.payer.to_account_info(), 103 | network_state: self.config.to_account_info(), 104 | treasury: self.treasury.to_account_info(), 105 | request: self.random.to_account_info(), 106 | system_program: self.system_program.to_account_info(), 107 | }; 108 | let cpi_ctx = CpiContext::new(cpi_program, cpi_accounts); 109 | orao_solana_vrf::cpi::request_v2(cpi_ctx, force)?; 110 | 111 | global_config.game_round += 1; 112 | game_ground.creator = self.creator.key(); 113 | game_ground.game_round = global_config.game_round; 114 | game_ground.create_date = timestamp; 115 | game_ground.round_time = round_time; 116 | game_ground.total_deposit = 0; 117 | game_ground.user_count = 0; 118 | game_ground.min_deposit_amount = min_deposit_amount; 119 | game_ground.max_joiner_count = max_joiner_count; 120 | game_ground.is_completed = false; 121 | game_ground.is_claimed = false; 122 | game_ground.force = force; 123 | 124 | Ok(()) 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/instructions/user/join_game.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | constants::{CONFIG, GAME_GROUND, GLOBAL}, 3 | errors::*, 4 | state::{config::*, gameground::*}, 5 | utils::*, 6 | }; 7 | use anchor_lang::{prelude::*, system_program}; 8 | 9 | #[derive(Accounts)] 10 | #[instruction(round_num: u64)] 11 | pub struct JoinGame<'info> { 12 | #[account( 13 | mut, 14 | seeds = [CONFIG.as_bytes()], 15 | bump, 16 | )] 17 | global_config: Box>, 18 | 19 | /// CHECK: global vault pda which stores SOL 20 | #[account( 21 | mut, 22 | seeds = [GLOBAL.as_bytes()], 23 | bump, 24 | )] 25 | pub global_vault: AccountInfo<'info>, 26 | 27 | /// CHECK: should be same with the address in the global_config 28 | #[account( 29 | mut, 30 | constraint = global_config.team_wallet == team_wallet.key() @ContractError::IncorrectTeamWalletAuthority 31 | )] 32 | pub team_wallet: AccountInfo<'info>, 33 | 34 | #[account(mut)] 35 | joiner: Signer<'info>, 36 | 37 | #[account(mut, 38 | constraint = global_config.payer_wallet == payer.key() @ ContractError::IncorrectPayerAuthority)] 39 | payer: Signer<'info>, 40 | 41 | #[account( 42 | mut, 43 | seeds = [GAME_GROUND.as_bytes(), round_num.to_le_bytes().as_ref()], 44 | bump 45 | )] 46 | game_ground: Box>, 47 | 48 | #[account(address = system_program::ID)] 49 | system_program: Program<'info, System>, 50 | } 51 | 52 | impl<'info> JoinGame<'info> { 53 | pub fn handler(&mut self, round_num: u64, amount: u64) -> Result<()> { 54 | if amount <= 0 { 55 | return err!(ContractError::InvalidAmount); 56 | } 57 | 58 | require!( 59 | round_num < self.global_config.game_round, 60 | ContractError::RoundNumberError 61 | ); 62 | 63 | let game_ground = &mut self.game_ground; 64 | require!( 65 | amount >= game_ground.min_deposit_amount, 66 | ContractError::DepositAmountError 67 | ); 68 | 69 | let timestamp = Clock::get()?.unix_timestamp; 70 | 71 | if game_ground.user_count > 2 { 72 | require!( 73 | game_ground.end_date > timestamp, 74 | ContractError::GameAlreadyCompleted 75 | ); 76 | 77 | require!( 78 | game_ground.is_completed == false, 79 | ContractError::GameAlreadyCompleted 80 | ); 81 | } 82 | 83 | let global_config = &mut self.global_config; 84 | let team_wallet = &mut self.team_wallet; 85 | let source = &mut self.global_vault.to_account_info(); 86 | 87 | let depoist_amount_applied: u64; 88 | let platform_fee_lamports = bps_mul(global_config.platform_fee, amount, 10_000).unwrap(); 89 | 90 | depoist_amount_applied = amount 91 | .checked_sub(platform_fee_lamports) 92 | .ok_or(ContractError::InvalidAmount)?; 93 | 94 | // transfer sol to market 95 | sol_transfer_from_user( 96 | &self.joiner, 97 | source.clone(), 98 | &self.system_program, 99 | depoist_amount_applied, 100 | )?; 101 | 102 | if platform_fee_lamports > 0 { 103 | //Transfer SOL to team_wallet 104 | sol_transfer_from_user( 105 | &self.joiner, 106 | team_wallet.clone(), 107 | &self.system_program, 108 | platform_fee_lamports, 109 | )?; 110 | } 111 | 112 | resize_account( 113 | game_ground.to_account_info().clone(), 114 | GameGround::space(game_ground.deposit_list.len() as usize), 115 | self.payer.to_account_info().clone(), 116 | self.system_program.to_account_info().clone(), 117 | )?; 118 | 119 | game_ground.append(self.joiner.key(), depoist_amount_applied); 120 | 121 | if game_ground.user_count == 2 { 122 | game_ground.start_date = timestamp; 123 | game_ground.end_date = game_ground.start_date + game_ground.round_time; 124 | } 125 | 126 | require!( 127 | game_ground.max_joiner_count >= game_ground.user_count, 128 | ContractError::UserCountOverError 129 | ); 130 | 131 | Ok(()) 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /programs/jackpot_smart_contract/src/utils.rs: -------------------------------------------------------------------------------- 1 | use crate::*; 2 | use anchor_spl::token::{self, Token}; 3 | use solana_program::program::{invoke, invoke_signed}; 4 | use std::cmp::Ordering; 5 | use std::ops::{Div, Mul}; 6 | 7 | pub fn convert_to_float(value: u64, decimals: u8) -> f64 { 8 | (value as f64).div(f64::powf(10.0, decimals as f64)) 9 | } 10 | 11 | pub fn convert_from_float(value: f64, decimals: u8) -> u64 { 12 | value.mul(f64::powf(10.0, decimals as f64)) as u64 13 | } 14 | 15 | pub fn sol_transfer_from_user<'info>( 16 | signer: &Signer<'info>, 17 | destination: AccountInfo<'info>, 18 | system_program: &Program<'info, System>, 19 | amount: u64, 20 | ) -> Result<()> { 21 | let ix = solana_program::system_instruction::transfer(signer.key, destination.key, amount); 22 | invoke( 23 | &ix, 24 | &[ 25 | signer.to_account_info(), 26 | destination, 27 | system_program.to_account_info(), 28 | ], 29 | )?; 30 | Ok(()) 31 | } 32 | 33 | // transfer token from user 34 | pub fn token_transfer_user<'info>( 35 | from: AccountInfo<'info>, 36 | authority: &Signer<'info>, 37 | to: AccountInfo<'info>, 38 | token_program: &Program<'info, Token>, 39 | amount: u64, 40 | ) -> Result<()> { 41 | let cpi_ctx: CpiContext<_> = CpiContext::new( 42 | token_program.to_account_info(), 43 | token::Transfer { 44 | from, 45 | authority: authority.to_account_info(), 46 | to, 47 | }, 48 | ); 49 | token::transfer(cpi_ctx, amount)?; 50 | 51 | Ok(()) 52 | } 53 | 54 | // transfer token from PDA 55 | pub fn token_transfer_with_signer<'info>( 56 | from: AccountInfo<'info>, 57 | authority: AccountInfo<'info>, 58 | to: AccountInfo<'info>, 59 | token_program: &Program<'info, Token>, 60 | signer_seeds: &[&[&[u8]]], 61 | amount: u64, 62 | ) -> Result<()> { 63 | let cpi_ctx: CpiContext<_> = CpiContext::new_with_signer( 64 | token_program.to_account_info(), 65 | token::Transfer { 66 | from, 67 | to, 68 | authority, 69 | }, 70 | signer_seeds, 71 | ); 72 | token::transfer(cpi_ctx, amount)?; 73 | 74 | Ok(()) 75 | } 76 | 77 | // transfer sol from PDA 78 | pub fn sol_transfer_with_signer<'info>( 79 | source: AccountInfo<'info>, 80 | destination: AccountInfo<'info>, 81 | system_program: &Program<'info, System>, 82 | signers_seeds: &[&[&[u8]]], 83 | amount: u64, 84 | ) -> Result<()> { 85 | let ix = solana_program::system_instruction::transfer(source.key, destination.key, amount); 86 | invoke_signed( 87 | &ix, 88 | &[source, destination, system_program.to_account_info()], 89 | signers_seeds, 90 | )?; 91 | Ok(()) 92 | } 93 | 94 | pub fn bps_mul(bps: u64, value: u64, divisor: u64) -> Option { 95 | bps_mul_raw(bps, value, divisor).unwrap().try_into().ok() 96 | } 97 | 98 | pub fn bps_mul_raw(bps: u64, value: u64, divisor: u64) -> Option { 99 | (value as u128) 100 | .checked_mul(bps as u128)? 101 | .checked_div(divisor as u128) 102 | } 103 | 104 | pub fn resize_account<'info>( 105 | account_info: AccountInfo<'info>, 106 | new_space: usize, 107 | payer: AccountInfo<'info>, 108 | system_program: AccountInfo<'info>, 109 | ) -> Result<()> { 110 | let rent = Rent::get()?; 111 | let new_minimum_balance = rent.minimum_balance(new_space); 112 | let current_balance = account_info.lamports(); 113 | 114 | match new_minimum_balance.cmp(¤t_balance) { 115 | Ordering::Greater => { 116 | let lamports_diff = new_minimum_balance.saturating_sub(current_balance); 117 | invoke( 118 | &solana_program::system_instruction::transfer( 119 | &payer.key(), 120 | &account_info.key(), 121 | lamports_diff, 122 | ), 123 | &[payer.clone(), account_info.clone(), system_program.clone()], 124 | )?; 125 | } 126 | Ordering::Less => { 127 | let lamports_diff = current_balance.saturating_sub(new_minimum_balance); 128 | **account_info.try_borrow_mut_lamports()? = new_minimum_balance; 129 | **payer.try_borrow_mut_lamports()? = payer 130 | .lamports() 131 | .checked_add(lamports_diff) 132 | .expect("Add error"); 133 | } 134 | Ordering::Equal => {} 135 | } 136 | account_info.realloc(new_space, false)?; 137 | Ok(()) 138 | } 139 | -------------------------------------------------------------------------------- /lib/scripts.ts: -------------------------------------------------------------------------------- 1 | import { BN, Program } from "@coral-xyz/anchor"; 2 | import { 3 | ComputeBudgetProgram, 4 | Connection, 5 | Keypair, 6 | PublicKey, 7 | SystemProgram, 8 | SYSVAR_RENT_PUBKEY, 9 | Transaction, 10 | } from "@solana/web3.js"; 11 | 12 | import { JackpotSmartContract } from "../target/types/jackpot_smart_contract"; 13 | import { 14 | SEED_CONFIG, 15 | GAME_GROUND, 16 | } from "./constant"; 17 | 18 | 19 | import { randomnessAccountAddress, networkStateAccountAddress, PROGRAM_ID } from "@orao-network/solana-vrf"; 20 | 21 | 22 | export const createConfigTx = async ( 23 | admin: PublicKey, 24 | 25 | newConfig: any, 26 | 27 | connection: Connection, 28 | program: Program 29 | ) => { 30 | const [configPda, _] = PublicKey.findProgramAddressSync( 31 | [Buffer.from(SEED_CONFIG)], 32 | program.programId 33 | ); 34 | 35 | console.log("configPda: ", configPda.toBase58()); 36 | 37 | const tx = await program.methods 38 | .configure(newConfig) 39 | .accounts({ 40 | payer: admin, 41 | }) 42 | .transaction(); 43 | 44 | 45 | tx.feePayer = admin; 46 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 47 | 48 | return tx; 49 | }; 50 | 51 | export const createGameTx = async ( 52 | 53 | user: PublicKey, 54 | feePayer: Keypair, 55 | 56 | roundTime: number, 57 | minDepositAmount: number, 58 | maxJoinerCount: number, 59 | 60 | connection: Connection, 61 | program: Program 62 | ) => { 63 | const force = Keypair.generate().publicKey; 64 | console.log("force", force); 65 | 66 | let networkStateAddress = networkStateAccountAddress(PROGRAM_ID); 67 | console.log("networkStateAddress: ", networkStateAddress); 68 | 69 | const accountData = await program.account.networkState.fetch(networkStateAddress); 70 | console.log("accountData: ", accountData); 71 | 72 | // Send the transaction to launch a token 73 | const tx = await program.methods 74 | .createGame([...force.toBuffer()], new BN(roundTime), new BN(minDepositAmount), new BN(maxJoinerCount)) 75 | .accounts({ 76 | creator: user, 77 | treasury: accountData.config.treasury, 78 | payer: feePayer.publicKey, 79 | }) 80 | .transaction(); 81 | 82 | tx.feePayer = feePayer.publicKey; 83 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 84 | 85 | tx.sign(feePayer); 86 | 87 | return tx; 88 | }; 89 | 90 | export const setWinnerTx = async ( 91 | user: PublicKey, 92 | 93 | roundNum: number, 94 | 95 | 96 | connection: Connection, 97 | program: Program 98 | ) => { 99 | const [configPda, _] = PublicKey.findProgramAddressSync( 100 | [Buffer.from(SEED_CONFIG)], 101 | program.programId 102 | ); 103 | const configAccount = await program.account.config.fetch(configPda); 104 | 105 | console.log("configAccount: ", configAccount); 106 | 107 | const [gameGroundPda, bump] = PublicKey.findProgramAddressSync( 108 | [Buffer.from(GAME_GROUND), new BN(roundNum).toArrayLike(Buffer, "le", 8)], 109 | program.programId 110 | ); 111 | console.log("gameGroundPda: ", gameGroundPda); 112 | 113 | const gameGroundAccount = await program.account.gameGround.fetch(gameGroundPda); 114 | console.log("gameGroundAccount: ", gameGroundAccount); 115 | 116 | 117 | const forceSeed = new Uint8Array(gameGroundAccount.force); 118 | const random = randomnessAccountAddress(forceSeed); 119 | 120 | const tx = await program.methods 121 | .setWinner(new BN(roundNum)) 122 | .accounts({ 123 | creator: user, 124 | random 125 | }) 126 | .transaction(); 127 | 128 | tx.feePayer = user; 129 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 130 | 131 | return tx; 132 | }; 133 | 134 | export const claimRewardTx = async ( 135 | user: PublicKey, 136 | feePayer: Keypair, 137 | 138 | roundNum: number, 139 | 140 | connection: Connection, 141 | program: Program 142 | ) => { 143 | const [configPda, _] = PublicKey.findProgramAddressSync( 144 | [Buffer.from(SEED_CONFIG)], 145 | program.programId 146 | ); 147 | const configAccount = await program.account.config.fetch(configPda); 148 | 149 | 150 | 151 | const tx = await program.methods 152 | .claimReward(new BN(roundNum)) 153 | .accounts({ 154 | winner: user, 155 | payer: feePayer.publicKey, 156 | }) 157 | .transaction(); 158 | 159 | tx.feePayer = feePayer.publicKey; 160 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 161 | 162 | tx.sign(feePayer); 163 | 164 | return tx; 165 | }; 166 | 167 | export const joinGameTx = async ( 168 | user: PublicKey, 169 | feePayer: Keypair, 170 | teamWallet: PublicKey, 171 | 172 | roundNum: number, 173 | amount: number, 174 | 175 | connection: Connection, 176 | program: Program 177 | ) => { 178 | const [configPda, _] = PublicKey.findProgramAddressSync( 179 | [Buffer.from(SEED_CONFIG)], 180 | program.programId 181 | ); 182 | const configAccount = await program.account.config.fetch(configPda); 183 | 184 | const tx = await program.methods 185 | .joinGame(new BN(roundNum), new BN(amount)) 186 | .accounts({ 187 | joiner: user, 188 | payer: feePayer.publicKey, 189 | teamWallet: teamWallet, 190 | }) 191 | .transaction(); 192 | 193 | tx.feePayer = feePayer.publicKey; 194 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 195 | 196 | tx.sign(feePayer); 197 | 198 | return tx; 199 | }; -------------------------------------------------------------------------------- /cli/scripts.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { BN, Program, web3 } from "@coral-xyz/anchor"; 3 | import fs from "fs"; 4 | 5 | import { Keypair, Connection, PublicKey } from "@solana/web3.js"; 6 | 7 | import NodeWallet from "@coral-xyz/anchor/dist/cjs/nodewallet"; 8 | 9 | import { JackpotSmartContract } from "../target/types/jackpot_smart_contract"; 10 | import { 11 | createConfigTx, 12 | createGameTx, 13 | setWinnerTx, 14 | claimRewardTx, 15 | joinGameTx 16 | } from "../lib/scripts"; 17 | import { execTx } from "../lib/util"; 18 | import { 19 | SEED_CONFIG, 20 | TEST_INITIAL_MAX_JOINER_COUNT, 21 | TEST_INITIAL_PLATFORM_FEE, 22 | TEST_INITIAL_MIN_DEPOSIT_AMOUNT, 23 | GAME_GROUND, 24 | } from "../lib/constant"; 25 | 26 | 27 | let solConnection: Connection = null; 28 | let program: Program = null; 29 | let payer: NodeWallet = null; 30 | let provider: anchor.Provider = null; 31 | let feePayer: NodeWallet = null; 32 | let feePayerWalletKeypair: Keypair = null; 33 | let teamWallet: PublicKey = null; 34 | // Address of the deployed program. 35 | let programId; 36 | 37 | /** 38 | * Set cluster, provider, program 39 | * If rpc != null use rpc, otherwise use cluster param 40 | * @param cluster - cluster ex. mainnet-beta, devnet ... 41 | * @param keypair - wallet keypair 42 | * @param rpc - rpc 43 | */ 44 | export const setClusterConfig = async ( 45 | cluster: web3.Cluster, 46 | keypair: string, 47 | rpc?: string 48 | ) => { 49 | if (!rpc) { 50 | solConnection = new web3.Connection(web3.clusterApiUrl(cluster)); 51 | } else { 52 | solConnection = new web3.Connection(rpc); 53 | } 54 | 55 | const walletKeypair = Keypair.fromSecretKey( 56 | Uint8Array.from(JSON.parse(fs.readFileSync(keypair, "utf-8"))), 57 | { skipValidation: true } 58 | ); 59 | payer = new NodeWallet(walletKeypair); 60 | 61 | feePayerWalletKeypair = Keypair.fromSecretKey( 62 | Uint8Array.from(JSON.parse(fs.readFileSync("../key/uu.json", "utf-8"))), 63 | { skipValidation: true } 64 | ); 65 | feePayer = new NodeWallet(feePayerWalletKeypair); 66 | 67 | teamWallet = new PublicKey("EgBcC7KVQTh1QeU3qxCFsnwZKYMMQkv6TzgEDkKvSNLv"); 68 | 69 | console.log("Wallet Address: ", payer.publicKey.toBase58()); 70 | 71 | anchor.setProvider( 72 | new anchor.AnchorProvider(solConnection, payer, { 73 | skipPreflight: true, 74 | commitment: "confirmed", 75 | }) 76 | ); 77 | 78 | provider = anchor.getProvider(); 79 | 80 | // Generate the program client from IDL. 81 | program = anchor.workspace.JackpotSmartContract as Program; 82 | programId = program.programId.toBase58(); 83 | console.log("ProgramId: ", program.programId.toBase58()); 84 | }; 85 | 86 | export const configProject = async () => { 87 | console.log("configProject start"); 88 | const authority = new PublicKey("H7YMxhKgLw2NDM9WQnpcUefPvCaLJCCYYaq1ETLHXJuH"); 89 | const payerWallet = new PublicKey("H7YMxhKgLw2NDM9WQnpcUefPvCaLJCCYYaq1ETLHXJuH"); 90 | 91 | const [configPda, _] = PublicKey.findProgramAddressSync( 92 | [Buffer.from(SEED_CONFIG)], 93 | program.programId 94 | ); 95 | console.log("🚀 ~ configProject ~ configPda:", configPda) 96 | 97 | const configAccount = await program.account.config.fetch(configPda); 98 | console.log("configPda", configAccount); 99 | 100 | // Create a dummy config object to pass as argument. 101 | const newConfig = { 102 | authority: authority,//payer.publicKey, 103 | 104 | payerWallet: payerWallet, //payer.publicKey, 105 | teamWallet: teamWallet, //payer.publicKey, 106 | 107 | gameRound: configAccount.gameRound, 108 | platformFee: new BN(TEST_INITIAL_PLATFORM_FEE), // Example fee: 1% 109 | minDepositAmount: new BN(TEST_INITIAL_MIN_DEPOSIT_AMOUNT), //Example 0.1SOL 110 | maxJoinerCount: new BN(TEST_INITIAL_MAX_JOINER_COUNT), //Example 100 111 | 112 | initialized: false, 113 | }; 114 | 115 | const tx = await createConfigTx( 116 | payer.publicKey, 117 | newConfig, 118 | solConnection, 119 | program 120 | ); 121 | 122 | await execTx(tx, solConnection, payer); 123 | }; 124 | 125 | export const createGame = async ( 126 | roundTime: number, 127 | minDepositAmount: number, 128 | maxJoinerCount: number) => { 129 | const configPda = PublicKey.findProgramAddressSync( 130 | [Buffer.from(SEED_CONFIG)], 131 | program.programId 132 | )[0]; 133 | const configAccount = await program.account.config.fetch(configPda); 134 | 135 | const tx = await createGameTx( 136 | 137 | payer.publicKey, 138 | feePayerWalletKeypair, 139 | 140 | roundTime, 141 | minDepositAmount, 142 | maxJoinerCount, 143 | 144 | solConnection, 145 | program 146 | ); 147 | 148 | await execTx(tx, solConnection, payer); 149 | }; 150 | 151 | export const setWinner = async (roundNum: number) => { 152 | const tx = await setWinnerTx( 153 | payer.publicKey, 154 | 155 | roundNum, 156 | 157 | solConnection, 158 | program 159 | ); 160 | 161 | await execTx(tx, solConnection, payer); 162 | 163 | const [gameGroundPda, bump] = PublicKey.findProgramAddressSync( 164 | [Buffer.from(GAME_GROUND), new BN(roundNum).toArrayLike(Buffer, "le", 8)], 165 | program.programId 166 | ); 167 | console.log("gameGroundPda: ", gameGroundPda); 168 | 169 | const gameGroundAccount = await program.account.gameGround.fetch(gameGroundPda); 170 | console.log("winner: ", gameGroundAccount.winner); 171 | }; 172 | 173 | export const claimReward = async (roundNum: number) => { 174 | const tx = await claimRewardTx( 175 | payer.publicKey, 176 | feePayerWalletKeypair, 177 | 178 | roundNum, 179 | 180 | solConnection, 181 | program 182 | ); 183 | 184 | await execTx(tx, solConnection, payer); 185 | 186 | 187 | }; 188 | 189 | export const joinGame = async (roundNum: number, amount: number,) => { 190 | const tx = await joinGameTx( 191 | payer.publicKey, 192 | feePayerWalletKeypair, 193 | teamWallet, 194 | 195 | roundNum, 196 | amount, 197 | 198 | solConnection, 199 | program 200 | ); 201 | 202 | await execTx(tx, solConnection, payer); 203 | }; 204 | 205 | 206 | function sleep(ms: number): Promise { 207 | return new Promise(resolve => setTimeout(resolve, ms)); 208 | } -------------------------------------------------------------------------------- /idl/jackpot_smart_contract.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": "DZQyG4Xsgt8vGvaWEPHyTgzmHYz4V9qrw7eirpBidXU9", 3 | "metadata": { 4 | "name": "jackpot_smart_contract", 5 | "version": "0.1.0", 6 | "spec": "0.1.0", 7 | "description": "Created with Anchor" 8 | }, 9 | "instructions": [ 10 | { 11 | "name": "claim_reward", 12 | "discriminator": [ 13 | 149, 14 | 95, 15 | 181, 16 | 242, 17 | 94, 18 | 90, 19 | 158, 20 | 162 21 | ], 22 | "accounts": [ 23 | { 24 | "name": "global_config", 25 | "writable": true, 26 | "pda": { 27 | "seeds": [ 28 | { 29 | "kind": "const", 30 | "value": [ 31 | 99, 32 | 111, 33 | 110, 34 | 102, 35 | 105, 36 | 103 37 | ] 38 | } 39 | ] 40 | } 41 | }, 42 | { 43 | "name": "global_vault", 44 | "writable": true, 45 | "pda": { 46 | "seeds": [ 47 | { 48 | "kind": "const", 49 | "value": [ 50 | 103, 51 | 108, 52 | 111, 53 | 98, 54 | 97, 55 | 108 56 | ] 57 | } 58 | ] 59 | } 60 | }, 61 | { 62 | "name": "winner", 63 | "writable": true, 64 | "signer": true 65 | }, 66 | { 67 | "name": "payer", 68 | "writable": true, 69 | "signer": true 70 | }, 71 | { 72 | "name": "game_ground", 73 | "writable": true, 74 | "pda": { 75 | "seeds": [ 76 | { 77 | "kind": "const", 78 | "value": [ 79 | 66, 80 | 79, 81 | 78, 82 | 68, 83 | 73, 84 | 78, 85 | 71, 86 | 95, 87 | 67, 88 | 85, 89 | 82, 90 | 86, 91 | 69 92 | ] 93 | }, 94 | { 95 | "kind": "arg", 96 | "path": "round_num" 97 | } 98 | ] 99 | } 100 | }, 101 | { 102 | "name": "system_program", 103 | "address": "11111111111111111111111111111111" 104 | } 105 | ], 106 | "args": [ 107 | { 108 | "name": "round_num", 109 | "type": "u64" 110 | } 111 | ] 112 | }, 113 | { 114 | "name": "configure", 115 | "discriminator": [ 116 | 245, 117 | 7, 118 | 108, 119 | 117, 120 | 95, 121 | 196, 122 | 54, 123 | 217 124 | ], 125 | "accounts": [ 126 | { 127 | "name": "payer", 128 | "writable": true, 129 | "signer": true 130 | }, 131 | { 132 | "name": "config", 133 | "writable": true, 134 | "pda": { 135 | "seeds": [ 136 | { 137 | "kind": "const", 138 | "value": [ 139 | 99, 140 | 111, 141 | 110, 142 | 102, 143 | 105, 144 | 103 145 | ] 146 | } 147 | ] 148 | } 149 | }, 150 | { 151 | "name": "global_vault", 152 | "writable": true, 153 | "pda": { 154 | "seeds": [ 155 | { 156 | "kind": "const", 157 | "value": [ 158 | 103, 159 | 108, 160 | 111, 161 | 98, 162 | 97, 163 | 108 164 | ] 165 | } 166 | ] 167 | } 168 | }, 169 | { 170 | "name": "system_program", 171 | "address": "11111111111111111111111111111111" 172 | } 173 | ], 174 | "args": [ 175 | { 176 | "name": "new_config", 177 | "type": { 178 | "defined": { 179 | "name": "Config" 180 | } 181 | } 182 | } 183 | ] 184 | }, 185 | { 186 | "name": "create_game", 187 | "discriminator": [ 188 | 124, 189 | 69, 190 | 75, 191 | 66, 192 | 184, 193 | 220, 194 | 72, 195 | 206 196 | ], 197 | "accounts": [ 198 | { 199 | "name": "global_config", 200 | "writable": true, 201 | "pda": { 202 | "seeds": [ 203 | { 204 | "kind": "const", 205 | "value": [ 206 | 99, 207 | 111, 208 | 110, 209 | 102, 210 | 105, 211 | 103 212 | ] 213 | } 214 | ] 215 | } 216 | }, 217 | { 218 | "name": "global_vault", 219 | "writable": true, 220 | "pda": { 221 | "seeds": [ 222 | { 223 | "kind": "const", 224 | "value": [ 225 | 103, 226 | 108, 227 | 111, 228 | 98, 229 | 97, 230 | 108 231 | ] 232 | } 233 | ] 234 | } 235 | }, 236 | { 237 | "name": "creator", 238 | "writable": true, 239 | "signer": true 240 | }, 241 | { 242 | "name": "payer", 243 | "writable": true, 244 | "signer": true 245 | }, 246 | { 247 | "name": "game_ground", 248 | "writable": true, 249 | "pda": { 250 | "seeds": [ 251 | { 252 | "kind": "const", 253 | "value": [ 254 | 66, 255 | 79, 256 | 78, 257 | 68, 258 | 73, 259 | 78, 260 | 71, 261 | 95, 262 | 67, 263 | 85, 264 | 82, 265 | 86, 266 | 69 267 | ] 268 | }, 269 | { 270 | "kind": "account", 271 | "path": "global_config.game_round", 272 | "account": "Config" 273 | } 274 | ] 275 | } 276 | }, 277 | { 278 | "name": "random", 279 | "writable": true, 280 | "pda": { 281 | "seeds": [ 282 | { 283 | "kind": "const", 284 | "value": [ 285 | 111, 286 | 114, 287 | 97, 288 | 111, 289 | 45, 290 | 118, 291 | 114, 292 | 102, 293 | 45, 294 | 114, 295 | 97, 296 | 110, 297 | 100, 298 | 111, 299 | 109, 300 | 110, 301 | 101, 302 | 115, 303 | 115, 304 | 45, 305 | 114, 306 | 101, 307 | 113, 308 | 117, 309 | 101, 310 | 115, 311 | 116 312 | ] 313 | }, 314 | { 315 | "kind": "arg", 316 | "path": "force" 317 | } 318 | ], 319 | "program": { 320 | "kind": "const", 321 | "value": [ 322 | 7, 323 | 71, 324 | 177, 325 | 26, 326 | 250, 327 | 145, 328 | 180, 329 | 209, 330 | 249, 331 | 34, 332 | 242, 333 | 123, 334 | 14, 335 | 186, 336 | 193, 337 | 218, 338 | 178, 339 | 59, 340 | 33, 341 | 41, 342 | 164, 343 | 190, 344 | 243, 345 | 79, 346 | 50, 347 | 164, 348 | 123, 349 | 88, 350 | 245, 351 | 206, 352 | 252, 353 | 120 354 | ] 355 | } 356 | } 357 | }, 358 | { 359 | "name": "treasury", 360 | "writable": true 361 | }, 362 | { 363 | "name": "config", 364 | "writable": true, 365 | "pda": { 366 | "seeds": [ 367 | { 368 | "kind": "const", 369 | "value": [ 370 | 111, 371 | 114, 372 | 97, 373 | 111, 374 | 45, 375 | 118, 376 | 114, 377 | 102, 378 | 45, 379 | 110, 380 | 101, 381 | 116, 382 | 119, 383 | 111, 384 | 114, 385 | 107, 386 | 45, 387 | 99, 388 | 111, 389 | 110, 390 | 102, 391 | 105, 392 | 103, 393 | 117, 394 | 114, 395 | 97, 396 | 116, 397 | 105, 398 | 111, 399 | 110 400 | ] 401 | } 402 | ], 403 | "program": { 404 | "kind": "const", 405 | "value": [ 406 | 7, 407 | 71, 408 | 177, 409 | 26, 410 | 250, 411 | 145, 412 | 180, 413 | 209, 414 | 249, 415 | 34, 416 | 242, 417 | 123, 418 | 14, 419 | 186, 420 | 193, 421 | 218, 422 | 178, 423 | 59, 424 | 33, 425 | 41, 426 | 164, 427 | 190, 428 | 243, 429 | 79, 430 | 50, 431 | 164, 432 | 123, 433 | 88, 434 | 245, 435 | 206, 436 | 252, 437 | 120 438 | ] 439 | } 440 | } 441 | }, 442 | { 443 | "name": "vrf", 444 | "address": "VRFzZoJdhFWL8rkvu87LpKM3RbcVezpMEc6X5GVDr7y" 445 | }, 446 | { 447 | "name": "system_program", 448 | "address": "11111111111111111111111111111111" 449 | } 450 | ], 451 | "args": [ 452 | { 453 | "name": "force", 454 | "type": { 455 | "array": [ 456 | "u8", 457 | 32 458 | ] 459 | } 460 | }, 461 | { 462 | "name": "round_time", 463 | "type": "i64" 464 | }, 465 | { 466 | "name": "min_deposit_amount", 467 | "type": "u64" 468 | }, 469 | { 470 | "name": "max_joiner_count", 471 | "type": "u64" 472 | } 473 | ] 474 | }, 475 | { 476 | "name": "join_game", 477 | "discriminator": [ 478 | 107, 479 | 112, 480 | 18, 481 | 38, 482 | 56, 483 | 173, 484 | 60, 485 | 128 486 | ], 487 | "accounts": [ 488 | { 489 | "name": "global_config", 490 | "writable": true, 491 | "pda": { 492 | "seeds": [ 493 | { 494 | "kind": "const", 495 | "value": [ 496 | 99, 497 | 111, 498 | 110, 499 | 102, 500 | 105, 501 | 103 502 | ] 503 | } 504 | ] 505 | } 506 | }, 507 | { 508 | "name": "global_vault", 509 | "writable": true, 510 | "pda": { 511 | "seeds": [ 512 | { 513 | "kind": "const", 514 | "value": [ 515 | 103, 516 | 108, 517 | 111, 518 | 98, 519 | 97, 520 | 108 521 | ] 522 | } 523 | ] 524 | } 525 | }, 526 | { 527 | "name": "team_wallet", 528 | "writable": true 529 | }, 530 | { 531 | "name": "joiner", 532 | "writable": true, 533 | "signer": true 534 | }, 535 | { 536 | "name": "payer", 537 | "writable": true, 538 | "signer": true 539 | }, 540 | { 541 | "name": "game_ground", 542 | "writable": true, 543 | "pda": { 544 | "seeds": [ 545 | { 546 | "kind": "const", 547 | "value": [ 548 | 66, 549 | 79, 550 | 78, 551 | 68, 552 | 73, 553 | 78, 554 | 71, 555 | 95, 556 | 67, 557 | 85, 558 | 82, 559 | 86, 560 | 69 561 | ] 562 | }, 563 | { 564 | "kind": "arg", 565 | "path": "round_num" 566 | } 567 | ] 568 | } 569 | }, 570 | { 571 | "name": "system_program", 572 | "address": "11111111111111111111111111111111" 573 | } 574 | ], 575 | "args": [ 576 | { 577 | "name": "round_num", 578 | "type": "u64" 579 | }, 580 | { 581 | "name": "amount", 582 | "type": "u64" 583 | } 584 | ] 585 | }, 586 | { 587 | "name": "set_winner", 588 | "discriminator": [ 589 | 207, 590 | 149, 591 | 39, 592 | 13, 593 | 31, 594 | 233, 595 | 182, 596 | 109 597 | ], 598 | "accounts": [ 599 | { 600 | "name": "global_config", 601 | "writable": true, 602 | "pda": { 603 | "seeds": [ 604 | { 605 | "kind": "const", 606 | "value": [ 607 | 99, 608 | 111, 609 | 110, 610 | 102, 611 | 105, 612 | 103 613 | ] 614 | } 615 | ] 616 | } 617 | }, 618 | { 619 | "name": "global_vault", 620 | "writable": true, 621 | "pda": { 622 | "seeds": [ 623 | { 624 | "kind": "const", 625 | "value": [ 626 | 103, 627 | 108, 628 | 111, 629 | 98, 630 | 97, 631 | 108 632 | ] 633 | } 634 | ] 635 | } 636 | }, 637 | { 638 | "name": "creator", 639 | "writable": true, 640 | "signer": true 641 | }, 642 | { 643 | "name": "game_ground", 644 | "writable": true, 645 | "pda": { 646 | "seeds": [ 647 | { 648 | "kind": "const", 649 | "value": [ 650 | 66, 651 | 79, 652 | 78, 653 | 68, 654 | 73, 655 | 78, 656 | 71, 657 | 95, 658 | 67, 659 | 85, 660 | 82, 661 | 86, 662 | 69 663 | ] 664 | }, 665 | { 666 | "kind": "arg", 667 | "path": "round_num" 668 | } 669 | ] 670 | } 671 | }, 672 | { 673 | "name": "random", 674 | "writable": true 675 | }, 676 | { 677 | "name": "system_program", 678 | "address": "11111111111111111111111111111111" 679 | } 680 | ], 681 | "args": [ 682 | { 683 | "name": "round_num", 684 | "type": "u64" 685 | } 686 | ] 687 | } 688 | ], 689 | "accounts": [ 690 | { 691 | "name": "Config", 692 | "discriminator": [ 693 | 155, 694 | 12, 695 | 170, 696 | 224, 697 | 30, 698 | 250, 699 | 204, 700 | 130 701 | ] 702 | }, 703 | { 704 | "name": "GameGround", 705 | "discriminator": [ 706 | 83, 707 | 177, 708 | 70, 709 | 183, 710 | 113, 711 | 223, 712 | 206, 713 | 38 714 | ] 715 | }, 716 | { 717 | "name": "NetworkState", 718 | "discriminator": [ 719 | 212, 720 | 237, 721 | 148, 722 | 56, 723 | 97, 724 | 245, 725 | 51, 726 | 169 727 | ] 728 | } 729 | ], 730 | "errors": [ 731 | { 732 | "code": 6000, 733 | "name": "ValueTooSmall", 734 | "msg": "ValueTooSmall" 735 | }, 736 | { 737 | "code": 6001, 738 | "name": "ValueTooLarge", 739 | "msg": "ValueTooLarge" 740 | }, 741 | { 742 | "code": 6002, 743 | "name": "ValueInvalid", 744 | "msg": "ValueInvalid" 745 | }, 746 | { 747 | "code": 6003, 748 | "name": "IncorrectAuthority", 749 | "msg": "IncorrectAuthority" 750 | }, 751 | { 752 | "code": 6004, 753 | "name": "IncorrectTeamWalletAuthority", 754 | "msg": "IncorrectTeamWalletAuthority" 755 | }, 756 | { 757 | "code": 6005, 758 | "name": "IncorrectPayerAuthority", 759 | "msg": "IncorrectPayerAuthority" 760 | }, 761 | { 762 | "code": 6006, 763 | "name": "IncorrectConfigAccount", 764 | "msg": "IncorrectConfigAccount" 765 | }, 766 | { 767 | "code": 6007, 768 | "name": "OverflowOrUnderflowOccurred", 769 | "msg": "Overflow or underflow occured" 770 | }, 771 | { 772 | "code": 6008, 773 | "name": "InvalidAmount", 774 | "msg": "Amount is invalid" 775 | }, 776 | { 777 | "code": 6009, 778 | "name": "IncorrectTeamWallet", 779 | "msg": "Incorrect team wallet address" 780 | }, 781 | { 782 | "code": 6010, 783 | "name": "GameAlreadyCompleted", 784 | "msg": "Can not deposit after the game is completed" 785 | }, 786 | { 787 | "code": 6011, 788 | "name": "SetWinnerCompleted", 789 | "msg": "Already set winner" 790 | }, 791 | { 792 | "code": 6012, 793 | "name": "GameNotCompleted", 794 | "msg": "Game is not completed" 795 | }, 796 | { 797 | "code": 6013, 798 | "name": "WinnerClaimed", 799 | "msg": "Winner already claimed" 800 | }, 801 | { 802 | "code": 6014, 803 | "name": "ReturnAmountTooSmall", 804 | "msg": "Return amount is too small compared to the minimum received amount" 805 | }, 806 | { 807 | "code": 6015, 808 | "name": "NotInitialized", 809 | "msg": "Global Not Initialized" 810 | }, 811 | { 812 | "code": 6016, 813 | "name": "InvalidGlobalAuthority", 814 | "msg": "Invalid Global Authority" 815 | }, 816 | { 817 | "code": 6017, 818 | "name": "InsufficientSol", 819 | "msg": "Not enough SOL received to be valid." 820 | }, 821 | { 822 | "code": 6018, 823 | "name": "ArithmeticError", 824 | "msg": "Arithmetic Error" 825 | }, 826 | { 827 | "code": 6019, 828 | "name": "MathOverflow", 829 | "msg": "Math Overflow" 830 | }, 831 | { 832 | "code": 6020, 833 | "name": "EndTimeError", 834 | "msg": "End time is error" 835 | }, 836 | { 837 | "code": 6021, 838 | "name": "RoundTimeError", 839 | "msg": "Round time is error" 840 | }, 841 | { 842 | "code": 6022, 843 | "name": "MinDepositAmountError", 844 | "msg": "Minimum Deposit Amount is error" 845 | }, 846 | { 847 | "code": 6023, 848 | "name": "MaxJoinerCountError", 849 | "msg": "Maximum Joiner Count is error" 850 | }, 851 | { 852 | "code": 6024, 853 | "name": "UserCountOverError", 854 | "msg": "User count exceeds the maximum allowed limit" 855 | }, 856 | { 857 | "code": 6025, 858 | "name": "StillProcessing", 859 | "msg": "Randomness is still being fulfilled" 860 | }, 861 | { 862 | "code": 6026, 863 | "name": "DepositAmountError", 864 | "msg": "The deposit amount must be more than the minimum deposit amount." 865 | }, 866 | { 867 | "code": 6027, 868 | "name": "RoundNumberError", 869 | "msg": "This Round not exist" 870 | } 871 | ], 872 | "types": [ 873 | { 874 | "name": "Config", 875 | "type": { 876 | "kind": "struct", 877 | "fields": [ 878 | { 879 | "name": "authority", 880 | "type": "pubkey" 881 | }, 882 | { 883 | "name": "payer_wallet", 884 | "type": "pubkey" 885 | }, 886 | { 887 | "name": "team_wallet", 888 | "type": "pubkey" 889 | }, 890 | { 891 | "name": "game_round", 892 | "type": "u64" 893 | }, 894 | { 895 | "name": "platform_fee", 896 | "type": "u64" 897 | }, 898 | { 899 | "name": "min_deposit_amount", 900 | "type": "u64" 901 | }, 902 | { 903 | "name": "max_joiner_count", 904 | "type": "u64" 905 | }, 906 | { 907 | "name": "initialized", 908 | "type": "bool" 909 | } 910 | ] 911 | } 912 | }, 913 | { 914 | "name": "DepositInfo", 915 | "type": { 916 | "kind": "struct", 917 | "fields": [ 918 | { 919 | "name": "user", 920 | "type": "pubkey" 921 | }, 922 | { 923 | "name": "amount", 924 | "type": "u64" 925 | } 926 | ] 927 | } 928 | }, 929 | { 930 | "name": "GameGround", 931 | "type": { 932 | "kind": "struct", 933 | "fields": [ 934 | { 935 | "name": "creator", 936 | "type": "pubkey" 937 | }, 938 | { 939 | "name": "game_round", 940 | "type": "u64" 941 | }, 942 | { 943 | "name": "create_date", 944 | "type": "i64" 945 | }, 946 | { 947 | "name": "start_date", 948 | "type": "i64" 949 | }, 950 | { 951 | "name": "end_date", 952 | "type": "i64" 953 | }, 954 | { 955 | "name": "round_time", 956 | "type": "i64" 957 | }, 958 | { 959 | "name": "total_deposit", 960 | "type": "u64" 961 | }, 962 | { 963 | "name": "rand", 964 | "type": "u64" 965 | }, 966 | { 967 | "name": "winner", 968 | "type": "pubkey" 969 | }, 970 | { 971 | "name": "user_count", 972 | "type": "u64" 973 | }, 974 | { 975 | "name": "min_deposit_amount", 976 | "type": "u64" 977 | }, 978 | { 979 | "name": "max_joiner_count", 980 | "type": "u64" 981 | }, 982 | { 983 | "name": "force", 984 | "type": { 985 | "array": [ 986 | "u8", 987 | 32 988 | ] 989 | } 990 | }, 991 | { 992 | "name": "is_completed", 993 | "type": "bool" 994 | }, 995 | { 996 | "name": "is_claimed", 997 | "type": "bool" 998 | }, 999 | { 1000 | "name": "deposit_list", 1001 | "type": { 1002 | "vec": { 1003 | "defined": { 1004 | "name": "DepositInfo" 1005 | } 1006 | } 1007 | } 1008 | } 1009 | ] 1010 | } 1011 | }, 1012 | { 1013 | "name": "NetworkConfiguration", 1014 | "type": { 1015 | "kind": "struct", 1016 | "fields": [ 1017 | { 1018 | "name": "authority", 1019 | "type": "pubkey" 1020 | }, 1021 | { 1022 | "name": "treasury", 1023 | "type": "pubkey" 1024 | }, 1025 | { 1026 | "name": "request_fee", 1027 | "type": "u64" 1028 | }, 1029 | { 1030 | "name": "fulfillment_authorities", 1031 | "type": { 1032 | "vec": "pubkey" 1033 | } 1034 | }, 1035 | { 1036 | "name": "token_fee_config", 1037 | "type": { 1038 | "option": { 1039 | "defined": { 1040 | "name": "OraoTokenFeeConfig" 1041 | } 1042 | } 1043 | } 1044 | } 1045 | ] 1046 | } 1047 | }, 1048 | { 1049 | "name": "NetworkState", 1050 | "type": { 1051 | "kind": "struct", 1052 | "fields": [ 1053 | { 1054 | "name": "config", 1055 | "type": { 1056 | "defined": { 1057 | "name": "NetworkConfiguration" 1058 | } 1059 | } 1060 | }, 1061 | { 1062 | "name": "num_received", 1063 | "docs": [ 1064 | "Total number of received requests." 1065 | ], 1066 | "type": "u64" 1067 | } 1068 | ] 1069 | } 1070 | }, 1071 | { 1072 | "name": "OraoTokenFeeConfig", 1073 | "type": { 1074 | "kind": "struct", 1075 | "fields": [ 1076 | { 1077 | "name": "mint", 1078 | "docs": [ 1079 | "ORAO token mint address." 1080 | ], 1081 | "type": "pubkey" 1082 | }, 1083 | { 1084 | "name": "treasury", 1085 | "docs": [ 1086 | "ORAO token treasury account." 1087 | ], 1088 | "type": "pubkey" 1089 | }, 1090 | { 1091 | "name": "fee", 1092 | "docs": [ 1093 | "Fee in ORAO SPL token smallest units." 1094 | ], 1095 | "type": "u64" 1096 | } 1097 | ] 1098 | } 1099 | } 1100 | ] 1101 | } -------------------------------------------------------------------------------- /idl/jackpot_smart_contract.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Program IDL in camelCase format in order to be used in JS/TS. 3 | * 4 | * Note that this is only a type helper and is not the actual IDL. The original 5 | * IDL can be found at `target/idl/jackpot_smart_contract.json`. 6 | */ 7 | export type JackpotSmartContract = { 8 | "address": "DZQyG4Xsgt8vGvaWEPHyTgzmHYz4V9qrw7eirpBidXU9", 9 | "metadata": { 10 | "name": "jackpotSmartContract", 11 | "version": "0.1.0", 12 | "spec": "0.1.0", 13 | "description": "Created with Anchor" 14 | }, 15 | "instructions": [ 16 | { 17 | "name": "claimReward", 18 | "discriminator": [ 19 | 149, 20 | 95, 21 | 181, 22 | 242, 23 | 94, 24 | 90, 25 | 158, 26 | 162 27 | ], 28 | "accounts": [ 29 | { 30 | "name": "globalConfig", 31 | "writable": true, 32 | "pda": { 33 | "seeds": [ 34 | { 35 | "kind": "const", 36 | "value": [ 37 | 99, 38 | 111, 39 | 110, 40 | 102, 41 | 105, 42 | 103 43 | ] 44 | } 45 | ] 46 | } 47 | }, 48 | { 49 | "name": "globalVault", 50 | "writable": true, 51 | "pda": { 52 | "seeds": [ 53 | { 54 | "kind": "const", 55 | "value": [ 56 | 103, 57 | 108, 58 | 111, 59 | 98, 60 | 97, 61 | 108 62 | ] 63 | } 64 | ] 65 | } 66 | }, 67 | { 68 | "name": "winner", 69 | "writable": true, 70 | "signer": true 71 | }, 72 | { 73 | "name": "payer", 74 | "writable": true, 75 | "signer": true 76 | }, 77 | { 78 | "name": "gameGround", 79 | "writable": true, 80 | "pda": { 81 | "seeds": [ 82 | { 83 | "kind": "const", 84 | "value": [ 85 | 66, 86 | 79, 87 | 78, 88 | 68, 89 | 73, 90 | 78, 91 | 71, 92 | 95, 93 | 67, 94 | 85, 95 | 82, 96 | 86, 97 | 69 98 | ] 99 | }, 100 | { 101 | "kind": "arg", 102 | "path": "roundNum" 103 | } 104 | ] 105 | } 106 | }, 107 | { 108 | "name": "systemProgram", 109 | "address": "11111111111111111111111111111111" 110 | } 111 | ], 112 | "args": [ 113 | { 114 | "name": "roundNum", 115 | "type": "u64" 116 | } 117 | ] 118 | }, 119 | { 120 | "name": "configure", 121 | "discriminator": [ 122 | 245, 123 | 7, 124 | 108, 125 | 117, 126 | 95, 127 | 196, 128 | 54, 129 | 217 130 | ], 131 | "accounts": [ 132 | { 133 | "name": "payer", 134 | "writable": true, 135 | "signer": true 136 | }, 137 | { 138 | "name": "config", 139 | "writable": true, 140 | "pda": { 141 | "seeds": [ 142 | { 143 | "kind": "const", 144 | "value": [ 145 | 99, 146 | 111, 147 | 110, 148 | 102, 149 | 105, 150 | 103 151 | ] 152 | } 153 | ] 154 | } 155 | }, 156 | { 157 | "name": "globalVault", 158 | "writable": true, 159 | "pda": { 160 | "seeds": [ 161 | { 162 | "kind": "const", 163 | "value": [ 164 | 103, 165 | 108, 166 | 111, 167 | 98, 168 | 97, 169 | 108 170 | ] 171 | } 172 | ] 173 | } 174 | }, 175 | { 176 | "name": "systemProgram", 177 | "address": "11111111111111111111111111111111" 178 | } 179 | ], 180 | "args": [ 181 | { 182 | "name": "newConfig", 183 | "type": { 184 | "defined": { 185 | "name": "config" 186 | } 187 | } 188 | } 189 | ] 190 | }, 191 | { 192 | "name": "createGame", 193 | "discriminator": [ 194 | 124, 195 | 69, 196 | 75, 197 | 66, 198 | 184, 199 | 220, 200 | 72, 201 | 206 202 | ], 203 | "accounts": [ 204 | { 205 | "name": "globalConfig", 206 | "writable": true, 207 | "pda": { 208 | "seeds": [ 209 | { 210 | "kind": "const", 211 | "value": [ 212 | 99, 213 | 111, 214 | 110, 215 | 102, 216 | 105, 217 | 103 218 | ] 219 | } 220 | ] 221 | } 222 | }, 223 | { 224 | "name": "globalVault", 225 | "writable": true, 226 | "pda": { 227 | "seeds": [ 228 | { 229 | "kind": "const", 230 | "value": [ 231 | 103, 232 | 108, 233 | 111, 234 | 98, 235 | 97, 236 | 108 237 | ] 238 | } 239 | ] 240 | } 241 | }, 242 | { 243 | "name": "creator", 244 | "writable": true, 245 | "signer": true 246 | }, 247 | { 248 | "name": "payer", 249 | "writable": true, 250 | "signer": true 251 | }, 252 | { 253 | "name": "gameGround", 254 | "writable": true, 255 | "pda": { 256 | "seeds": [ 257 | { 258 | "kind": "const", 259 | "value": [ 260 | 66, 261 | 79, 262 | 78, 263 | 68, 264 | 73, 265 | 78, 266 | 71, 267 | 95, 268 | 67, 269 | 85, 270 | 82, 271 | 86, 272 | 69 273 | ] 274 | }, 275 | { 276 | "kind": "account", 277 | "path": "global_config.game_round", 278 | "account": "config" 279 | } 280 | ] 281 | } 282 | }, 283 | { 284 | "name": "random", 285 | "writable": true, 286 | "pda": { 287 | "seeds": [ 288 | { 289 | "kind": "const", 290 | "value": [ 291 | 111, 292 | 114, 293 | 97, 294 | 111, 295 | 45, 296 | 118, 297 | 114, 298 | 102, 299 | 45, 300 | 114, 301 | 97, 302 | 110, 303 | 100, 304 | 111, 305 | 109, 306 | 110, 307 | 101, 308 | 115, 309 | 115, 310 | 45, 311 | 114, 312 | 101, 313 | 113, 314 | 117, 315 | 101, 316 | 115, 317 | 116 318 | ] 319 | }, 320 | { 321 | "kind": "arg", 322 | "path": "force" 323 | } 324 | ], 325 | "program": { 326 | "kind": "const", 327 | "value": [ 328 | 7, 329 | 71, 330 | 177, 331 | 26, 332 | 250, 333 | 145, 334 | 180, 335 | 209, 336 | 249, 337 | 34, 338 | 242, 339 | 123, 340 | 14, 341 | 186, 342 | 193, 343 | 218, 344 | 178, 345 | 59, 346 | 33, 347 | 41, 348 | 164, 349 | 190, 350 | 243, 351 | 79, 352 | 50, 353 | 164, 354 | 123, 355 | 88, 356 | 245, 357 | 206, 358 | 252, 359 | 120 360 | ] 361 | } 362 | } 363 | }, 364 | { 365 | "name": "treasury", 366 | "writable": true 367 | }, 368 | { 369 | "name": "config", 370 | "writable": true, 371 | "pda": { 372 | "seeds": [ 373 | { 374 | "kind": "const", 375 | "value": [ 376 | 111, 377 | 114, 378 | 97, 379 | 111, 380 | 45, 381 | 118, 382 | 114, 383 | 102, 384 | 45, 385 | 110, 386 | 101, 387 | 116, 388 | 119, 389 | 111, 390 | 114, 391 | 107, 392 | 45, 393 | 99, 394 | 111, 395 | 110, 396 | 102, 397 | 105, 398 | 103, 399 | 117, 400 | 114, 401 | 97, 402 | 116, 403 | 105, 404 | 111, 405 | 110 406 | ] 407 | } 408 | ], 409 | "program": { 410 | "kind": "const", 411 | "value": [ 412 | 7, 413 | 71, 414 | 177, 415 | 26, 416 | 250, 417 | 145, 418 | 180, 419 | 209, 420 | 249, 421 | 34, 422 | 242, 423 | 123, 424 | 14, 425 | 186, 426 | 193, 427 | 218, 428 | 178, 429 | 59, 430 | 33, 431 | 41, 432 | 164, 433 | 190, 434 | 243, 435 | 79, 436 | 50, 437 | 164, 438 | 123, 439 | 88, 440 | 245, 441 | 206, 442 | 252, 443 | 120 444 | ] 445 | } 446 | } 447 | }, 448 | { 449 | "name": "vrf", 450 | "address": "VRFzZoJdhFWL8rkvu87LpKM3RbcVezpMEc6X5GVDr7y" 451 | }, 452 | { 453 | "name": "systemProgram", 454 | "address": "11111111111111111111111111111111" 455 | } 456 | ], 457 | "args": [ 458 | { 459 | "name": "force", 460 | "type": { 461 | "array": [ 462 | "u8", 463 | 32 464 | ] 465 | } 466 | }, 467 | { 468 | "name": "roundTime", 469 | "type": "i64" 470 | }, 471 | { 472 | "name": "minDepositAmount", 473 | "type": "u64" 474 | }, 475 | { 476 | "name": "maxJoinerCount", 477 | "type": "u64" 478 | } 479 | ] 480 | }, 481 | { 482 | "name": "joinGame", 483 | "discriminator": [ 484 | 107, 485 | 112, 486 | 18, 487 | 38, 488 | 56, 489 | 173, 490 | 60, 491 | 128 492 | ], 493 | "accounts": [ 494 | { 495 | "name": "globalConfig", 496 | "writable": true, 497 | "pda": { 498 | "seeds": [ 499 | { 500 | "kind": "const", 501 | "value": [ 502 | 99, 503 | 111, 504 | 110, 505 | 102, 506 | 105, 507 | 103 508 | ] 509 | } 510 | ] 511 | } 512 | }, 513 | { 514 | "name": "globalVault", 515 | "writable": true, 516 | "pda": { 517 | "seeds": [ 518 | { 519 | "kind": "const", 520 | "value": [ 521 | 103, 522 | 108, 523 | 111, 524 | 98, 525 | 97, 526 | 108 527 | ] 528 | } 529 | ] 530 | } 531 | }, 532 | { 533 | "name": "teamWallet", 534 | "writable": true 535 | }, 536 | { 537 | "name": "joiner", 538 | "writable": true, 539 | "signer": true 540 | }, 541 | { 542 | "name": "payer", 543 | "writable": true, 544 | "signer": true 545 | }, 546 | { 547 | "name": "gameGround", 548 | "writable": true, 549 | "pda": { 550 | "seeds": [ 551 | { 552 | "kind": "const", 553 | "value": [ 554 | 66, 555 | 79, 556 | 78, 557 | 68, 558 | 73, 559 | 78, 560 | 71, 561 | 95, 562 | 67, 563 | 85, 564 | 82, 565 | 86, 566 | 69 567 | ] 568 | }, 569 | { 570 | "kind": "arg", 571 | "path": "roundNum" 572 | } 573 | ] 574 | } 575 | }, 576 | { 577 | "name": "systemProgram", 578 | "address": "11111111111111111111111111111111" 579 | } 580 | ], 581 | "args": [ 582 | { 583 | "name": "roundNum", 584 | "type": "u64" 585 | }, 586 | { 587 | "name": "amount", 588 | "type": "u64" 589 | } 590 | ] 591 | }, 592 | { 593 | "name": "setWinner", 594 | "discriminator": [ 595 | 207, 596 | 149, 597 | 39, 598 | 13, 599 | 31, 600 | 233, 601 | 182, 602 | 109 603 | ], 604 | "accounts": [ 605 | { 606 | "name": "globalConfig", 607 | "writable": true, 608 | "pda": { 609 | "seeds": [ 610 | { 611 | "kind": "const", 612 | "value": [ 613 | 99, 614 | 111, 615 | 110, 616 | 102, 617 | 105, 618 | 103 619 | ] 620 | } 621 | ] 622 | } 623 | }, 624 | { 625 | "name": "globalVault", 626 | "writable": true, 627 | "pda": { 628 | "seeds": [ 629 | { 630 | "kind": "const", 631 | "value": [ 632 | 103, 633 | 108, 634 | 111, 635 | 98, 636 | 97, 637 | 108 638 | ] 639 | } 640 | ] 641 | } 642 | }, 643 | { 644 | "name": "creator", 645 | "writable": true, 646 | "signer": true 647 | }, 648 | { 649 | "name": "gameGround", 650 | "writable": true, 651 | "pda": { 652 | "seeds": [ 653 | { 654 | "kind": "const", 655 | "value": [ 656 | 66, 657 | 79, 658 | 78, 659 | 68, 660 | 73, 661 | 78, 662 | 71, 663 | 95, 664 | 67, 665 | 85, 666 | 82, 667 | 86, 668 | 69 669 | ] 670 | }, 671 | { 672 | "kind": "arg", 673 | "path": "roundNum" 674 | } 675 | ] 676 | } 677 | }, 678 | { 679 | "name": "random", 680 | "writable": true 681 | }, 682 | { 683 | "name": "systemProgram", 684 | "address": "11111111111111111111111111111111" 685 | } 686 | ], 687 | "args": [ 688 | { 689 | "name": "roundNum", 690 | "type": "u64" 691 | } 692 | ] 693 | } 694 | ], 695 | "accounts": [ 696 | { 697 | "name": "config", 698 | "discriminator": [ 699 | 155, 700 | 12, 701 | 170, 702 | 224, 703 | 30, 704 | 250, 705 | 204, 706 | 130 707 | ] 708 | }, 709 | { 710 | "name": "gameGround", 711 | "discriminator": [ 712 | 83, 713 | 177, 714 | 70, 715 | 183, 716 | 113, 717 | 223, 718 | 206, 719 | 38 720 | ] 721 | }, 722 | { 723 | "name": "networkState", 724 | "discriminator": [ 725 | 212, 726 | 237, 727 | 148, 728 | 56, 729 | 97, 730 | 245, 731 | 51, 732 | 169 733 | ] 734 | } 735 | ], 736 | "errors": [ 737 | { 738 | "code": 6000, 739 | "name": "valueTooSmall", 740 | "msg": "valueTooSmall" 741 | }, 742 | { 743 | "code": 6001, 744 | "name": "valueTooLarge", 745 | "msg": "valueTooLarge" 746 | }, 747 | { 748 | "code": 6002, 749 | "name": "valueInvalid", 750 | "msg": "valueInvalid" 751 | }, 752 | { 753 | "code": 6003, 754 | "name": "incorrectAuthority", 755 | "msg": "incorrectAuthority" 756 | }, 757 | { 758 | "code": 6004, 759 | "name": "incorrectTeamWalletAuthority", 760 | "msg": "incorrectTeamWalletAuthority" 761 | }, 762 | { 763 | "code": 6005, 764 | "name": "incorrectPayerAuthority", 765 | "msg": "incorrectPayerAuthority" 766 | }, 767 | { 768 | "code": 6006, 769 | "name": "incorrectConfigAccount", 770 | "msg": "incorrectConfigAccount" 771 | }, 772 | { 773 | "code": 6007, 774 | "name": "overflowOrUnderflowOccurred", 775 | "msg": "Overflow or underflow occured" 776 | }, 777 | { 778 | "code": 6008, 779 | "name": "invalidAmount", 780 | "msg": "Amount is invalid" 781 | }, 782 | { 783 | "code": 6009, 784 | "name": "incorrectTeamWallet", 785 | "msg": "Incorrect team wallet address" 786 | }, 787 | { 788 | "code": 6010, 789 | "name": "gameAlreadyCompleted", 790 | "msg": "Can not deposit after the game is completed" 791 | }, 792 | { 793 | "code": 6011, 794 | "name": "setWinnerCompleted", 795 | "msg": "Already set winner" 796 | }, 797 | { 798 | "code": 6012, 799 | "name": "gameNotCompleted", 800 | "msg": "Game is not completed" 801 | }, 802 | { 803 | "code": 6013, 804 | "name": "winnerClaimed", 805 | "msg": "Winner already claimed" 806 | }, 807 | { 808 | "code": 6014, 809 | "name": "returnAmountTooSmall", 810 | "msg": "Return amount is too small compared to the minimum received amount" 811 | }, 812 | { 813 | "code": 6015, 814 | "name": "notInitialized", 815 | "msg": "Global Not Initialized" 816 | }, 817 | { 818 | "code": 6016, 819 | "name": "invalidGlobalAuthority", 820 | "msg": "Invalid Global Authority" 821 | }, 822 | { 823 | "code": 6017, 824 | "name": "insufficientSol", 825 | "msg": "Not enough SOL received to be valid." 826 | }, 827 | { 828 | "code": 6018, 829 | "name": "arithmeticError", 830 | "msg": "Arithmetic Error" 831 | }, 832 | { 833 | "code": 6019, 834 | "name": "mathOverflow", 835 | "msg": "Math Overflow" 836 | }, 837 | { 838 | "code": 6020, 839 | "name": "endTimeError", 840 | "msg": "End time is error" 841 | }, 842 | { 843 | "code": 6021, 844 | "name": "roundTimeError", 845 | "msg": "Round time is error" 846 | }, 847 | { 848 | "code": 6022, 849 | "name": "minDepositAmountError", 850 | "msg": "Minimum Deposit Amount is error" 851 | }, 852 | { 853 | "code": 6023, 854 | "name": "maxJoinerCountError", 855 | "msg": "Maximum Joiner Count is error" 856 | }, 857 | { 858 | "code": 6024, 859 | "name": "userCountOverError", 860 | "msg": "User count exceeds the maximum allowed limit" 861 | }, 862 | { 863 | "code": 6025, 864 | "name": "stillProcessing", 865 | "msg": "Randomness is still being fulfilled" 866 | }, 867 | { 868 | "code": 6026, 869 | "name": "depositAmountError", 870 | "msg": "The deposit amount must be more than the minimum deposit amount." 871 | }, 872 | { 873 | "code": 6027, 874 | "name": "roundNumberError", 875 | "msg": "This Round not exist" 876 | } 877 | ], 878 | "types": [ 879 | { 880 | "name": "config", 881 | "type": { 882 | "kind": "struct", 883 | "fields": [ 884 | { 885 | "name": "authority", 886 | "type": "pubkey" 887 | }, 888 | { 889 | "name": "payerWallet", 890 | "type": "pubkey" 891 | }, 892 | { 893 | "name": "teamWallet", 894 | "type": "pubkey" 895 | }, 896 | { 897 | "name": "gameRound", 898 | "type": "u64" 899 | }, 900 | { 901 | "name": "platformFee", 902 | "type": "u64" 903 | }, 904 | { 905 | "name": "minDepositAmount", 906 | "type": "u64" 907 | }, 908 | { 909 | "name": "maxJoinerCount", 910 | "type": "u64" 911 | }, 912 | { 913 | "name": "initialized", 914 | "type": "bool" 915 | } 916 | ] 917 | } 918 | }, 919 | { 920 | "name": "depositInfo", 921 | "type": { 922 | "kind": "struct", 923 | "fields": [ 924 | { 925 | "name": "user", 926 | "type": "pubkey" 927 | }, 928 | { 929 | "name": "amount", 930 | "type": "u64" 931 | } 932 | ] 933 | } 934 | }, 935 | { 936 | "name": "gameGround", 937 | "type": { 938 | "kind": "struct", 939 | "fields": [ 940 | { 941 | "name": "creator", 942 | "type": "pubkey" 943 | }, 944 | { 945 | "name": "gameRound", 946 | "type": "u64" 947 | }, 948 | { 949 | "name": "createDate", 950 | "type": "i64" 951 | }, 952 | { 953 | "name": "startDate", 954 | "type": "i64" 955 | }, 956 | { 957 | "name": "endDate", 958 | "type": "i64" 959 | }, 960 | { 961 | "name": "roundTime", 962 | "type": "i64" 963 | }, 964 | { 965 | "name": "totalDeposit", 966 | "type": "u64" 967 | }, 968 | { 969 | "name": "rand", 970 | "type": "u64" 971 | }, 972 | { 973 | "name": "winner", 974 | "type": "pubkey" 975 | }, 976 | { 977 | "name": "userCount", 978 | "type": "u64" 979 | }, 980 | { 981 | "name": "minDepositAmount", 982 | "type": "u64" 983 | }, 984 | { 985 | "name": "maxJoinerCount", 986 | "type": "u64" 987 | }, 988 | { 989 | "name": "force", 990 | "type": { 991 | "array": [ 992 | "u8", 993 | 32 994 | ] 995 | } 996 | }, 997 | { 998 | "name": "isCompleted", 999 | "type": "bool" 1000 | }, 1001 | { 1002 | "name": "isClaimed", 1003 | "type": "bool" 1004 | }, 1005 | { 1006 | "name": "depositList", 1007 | "type": { 1008 | "vec": { 1009 | "defined": { 1010 | "name": "depositInfo" 1011 | } 1012 | } 1013 | } 1014 | } 1015 | ] 1016 | } 1017 | }, 1018 | { 1019 | "name": "networkConfiguration", 1020 | "type": { 1021 | "kind": "struct", 1022 | "fields": [ 1023 | { 1024 | "name": "authority", 1025 | "type": "pubkey" 1026 | }, 1027 | { 1028 | "name": "treasury", 1029 | "type": "pubkey" 1030 | }, 1031 | { 1032 | "name": "requestFee", 1033 | "type": "u64" 1034 | }, 1035 | { 1036 | "name": "fulfillmentAuthorities", 1037 | "type": { 1038 | "vec": "pubkey" 1039 | } 1040 | }, 1041 | { 1042 | "name": "tokenFeeConfig", 1043 | "type": { 1044 | "option": { 1045 | "defined": { 1046 | "name": "oraoTokenFeeConfig" 1047 | } 1048 | } 1049 | } 1050 | } 1051 | ] 1052 | } 1053 | }, 1054 | { 1055 | "name": "networkState", 1056 | "type": { 1057 | "kind": "struct", 1058 | "fields": [ 1059 | { 1060 | "name": "config", 1061 | "type": { 1062 | "defined": { 1063 | "name": "networkConfiguration" 1064 | } 1065 | } 1066 | }, 1067 | { 1068 | "name": "numReceived", 1069 | "docs": [ 1070 | "Total number of received requests." 1071 | ], 1072 | "type": "u64" 1073 | } 1074 | ] 1075 | } 1076 | }, 1077 | { 1078 | "name": "oraoTokenFeeConfig", 1079 | "type": { 1080 | "kind": "struct", 1081 | "fields": [ 1082 | { 1083 | "name": "mint", 1084 | "docs": [ 1085 | "ORAO token mint address." 1086 | ], 1087 | "type": "pubkey" 1088 | }, 1089 | { 1090 | "name": "treasury", 1091 | "docs": [ 1092 | "ORAO token treasury account." 1093 | ], 1094 | "type": "pubkey" 1095 | }, 1096 | { 1097 | "name": "fee", 1098 | "docs": [ 1099 | "Fee in ORAO SPL token smallest units." 1100 | ], 1101 | "type": "u64" 1102 | } 1103 | ] 1104 | } 1105 | } 1106 | ] 1107 | }; 1108 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.25.0": 6 | version "7.27.1" 7 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.1.tgz#9fce313d12c9a77507f264de74626e87fd0dc541" 8 | integrity sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog== 9 | 10 | "@coral-xyz/anchor-errors@^0.30.1": 11 | version "0.30.1" 12 | resolved "https://registry.yarnpkg.com/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz#bdfd3a353131345244546876eb4afc0e125bec30" 13 | integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ== 14 | 15 | "@coral-xyz/anchor@^0.29.0": 16 | version "0.29.0" 17 | resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.29.0.tgz#bd0be95bedfb30a381c3e676e5926124c310ff12" 18 | integrity sha512-eny6QNG0WOwqV0zQ7cs/b1tIuzZGmP7U7EcH+ogt4Gdbl8HDmIYVMh/9aTmYZPaFWjtUaI8qSn73uYEXWfATdA== 19 | dependencies: 20 | "@coral-xyz/borsh" "^0.29.0" 21 | "@noble/hashes" "^1.3.1" 22 | "@solana/web3.js" "^1.68.0" 23 | bn.js "^5.1.2" 24 | bs58 "^4.0.1" 25 | buffer-layout "^1.2.2" 26 | camelcase "^6.3.0" 27 | cross-fetch "^3.1.5" 28 | crypto-hash "^1.3.0" 29 | eventemitter3 "^4.0.7" 30 | pako "^2.0.3" 31 | snake-case "^3.0.4" 32 | superstruct "^0.15.4" 33 | toml "^3.0.0" 34 | 35 | "@coral-xyz/anchor@^0.30.1": 36 | version "0.30.1" 37 | resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.1.tgz#17f3e9134c28cd0ea83574c6bab4e410bcecec5d" 38 | integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ== 39 | dependencies: 40 | "@coral-xyz/anchor-errors" "^0.30.1" 41 | "@coral-xyz/borsh" "^0.30.1" 42 | "@noble/hashes" "^1.3.1" 43 | "@solana/web3.js" "^1.68.0" 44 | bn.js "^5.1.2" 45 | bs58 "^4.0.1" 46 | buffer-layout "^1.2.2" 47 | camelcase "^6.3.0" 48 | cross-fetch "^3.1.5" 49 | crypto-hash "^1.3.0" 50 | eventemitter3 "^4.0.7" 51 | pako "^2.0.3" 52 | snake-case "^3.0.4" 53 | superstruct "^0.15.4" 54 | toml "^3.0.0" 55 | 56 | "@coral-xyz/borsh@^0.29.0": 57 | version "0.29.0" 58 | resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.29.0.tgz#79f7045df2ef66da8006d47f5399c7190363e71f" 59 | integrity sha512-s7VFVa3a0oqpkuRloWVPdCK7hMbAMY270geZOGfCnaqexrP5dTIpbEHL33req6IYPPJ0hYa71cdvJ1h6V55/oQ== 60 | dependencies: 61 | bn.js "^5.1.2" 62 | buffer-layout "^1.2.0" 63 | 64 | "@coral-xyz/borsh@^0.30.1": 65 | version "0.30.1" 66 | resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.1.tgz#869d8833abe65685c72e9199b8688477a4f6b0e3" 67 | integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ== 68 | dependencies: 69 | bn.js "^5.1.2" 70 | buffer-layout "^1.2.0" 71 | 72 | "@noble/curves@^1.4.2": 73 | version "1.9.0" 74 | resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.9.0.tgz#13e0ca8be4a0ce66c113693a94514e5599f40cfc" 75 | integrity sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg== 76 | dependencies: 77 | "@noble/hashes" "1.8.0" 78 | 79 | "@noble/ed25519@^1.6.1": 80 | version "1.7.5" 81 | resolved "https://registry.yarnpkg.com/@noble/ed25519/-/ed25519-1.7.5.tgz#94df8bdb9fec9c4644a56007eecb57b0e9fbd0d7" 82 | integrity sha512-xuS0nwRMQBvSxDa7UxMb61xTiH3MxTgUfhyPUALVIe0FlOAz4sjELwyDRyUvqeEYfRSG9qNjFIycqLZppg4RSA== 83 | 84 | "@noble/hashes@1.8.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.4.0": 85 | version "1.8.0" 86 | resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.8.0.tgz#cee43d801fcef9644b11b8194857695acd5f815a" 87 | integrity sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A== 88 | 89 | "@orao-network/solana-vrf@^0.4.0": 90 | version "0.4.0" 91 | resolved "https://registry.yarnpkg.com/@orao-network/solana-vrf/-/solana-vrf-0.4.0.tgz#ad5a32349bc42c74725b93b83c107c5eef8f0314" 92 | integrity sha512-wSpy4q3ptM/u8S8Wow+2gbX4pLqQmaEfImvJlrpiCT26a6e6UzQjbLPfsI3IElOaIMQNBNXT/zz5d8lOFjBqjA== 93 | dependencies: 94 | "@coral-xyz/anchor" "^0.29.0" 95 | "@noble/ed25519" "^1.6.1" 96 | tweetnacl "^1.0.3" 97 | 98 | "@solana/buffer-layout@^4.0.1": 99 | version "4.0.1" 100 | resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" 101 | integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== 102 | dependencies: 103 | buffer "~6.0.3" 104 | 105 | "@solana/codecs-core@2.1.0": 106 | version "2.1.0" 107 | resolved "https://registry.yarnpkg.com/@solana/codecs-core/-/codecs-core-2.1.0.tgz#79ac28fbcde4a09d88f4360777ceeb30ec14e3f1" 108 | integrity sha512-SR7pKtmJBg2mhmkel2NeHA1pz06QeQXdMv8WJoIR9m8F/hw80K/612uaYbwTt2nkK0jg/Qn/rNSd7EcJ4SBGjw== 109 | dependencies: 110 | "@solana/errors" "2.1.0" 111 | 112 | "@solana/codecs-numbers@^2.1.0": 113 | version "2.1.0" 114 | resolved "https://registry.yarnpkg.com/@solana/codecs-numbers/-/codecs-numbers-2.1.0.tgz#f6a1a9009ace56238d8d9478dd5d375b09c6342a" 115 | integrity sha512-XMu4yw5iCgQnMKsxSWPPOrGgtaohmupN3eyAtYv3K3C/MJEc5V90h74k5B1GUCiHvcrdUDO9RclNjD9lgbjFag== 116 | dependencies: 117 | "@solana/codecs-core" "2.1.0" 118 | "@solana/errors" "2.1.0" 119 | 120 | "@solana/errors@2.1.0": 121 | version "2.1.0" 122 | resolved "https://registry.yarnpkg.com/@solana/errors/-/errors-2.1.0.tgz#1a139965fcb8bec610cc1c6194d53d169f4b5852" 123 | integrity sha512-l+GxAv0Ar4d3c3PlZdA9G++wFYZREEbbRyAFP8+n8HSg0vudCuzogh/13io6hYuUhG/9Ve8ARZNamhV7UScKNw== 124 | dependencies: 125 | chalk "^5.3.0" 126 | commander "^13.1.0" 127 | 128 | "@solana/web3.js@^1.68.0": 129 | version "1.98.2" 130 | resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.98.2.tgz#45167a5cfb64436944bf4dc1e8be8482bd6d4c14" 131 | integrity sha512-BqVwEG+TaG2yCkBMbD3C4hdpustR4FpuUFRPUmqRZYYlPI9Hg4XMWxHWOWRzHE9Lkc9NDjzXFX7lDXSgzC7R1A== 132 | dependencies: 133 | "@babel/runtime" "^7.25.0" 134 | "@noble/curves" "^1.4.2" 135 | "@noble/hashes" "^1.4.0" 136 | "@solana/buffer-layout" "^4.0.1" 137 | "@solana/codecs-numbers" "^2.1.0" 138 | agentkeepalive "^4.5.0" 139 | bn.js "^5.2.1" 140 | borsh "^0.7.0" 141 | bs58 "^4.0.1" 142 | buffer "6.0.3" 143 | fast-stable-stringify "^1.0.0" 144 | jayson "^4.1.1" 145 | node-fetch "^2.7.0" 146 | rpc-websockets "^9.0.2" 147 | superstruct "^2.0.2" 148 | 149 | "@swc/helpers@^0.5.11": 150 | version "0.5.17" 151 | resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.17.tgz#5a7be95ac0f0bf186e7e6e890e7a6f6cda6ce971" 152 | integrity sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A== 153 | dependencies: 154 | tslib "^2.8.0" 155 | 156 | "@types/bn.js@^5.1.0": 157 | version "5.1.6" 158 | resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.6.tgz#9ba818eec0c85e4d3c679518428afdf611d03203" 159 | integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== 160 | dependencies: 161 | "@types/node" "*" 162 | 163 | "@types/chai@^4.3.0": 164 | version "4.3.20" 165 | resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.20.tgz#cb291577ed342ca92600430841a00329ba05cecc" 166 | integrity sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ== 167 | 168 | "@types/connect@^3.4.33": 169 | version "3.4.38" 170 | resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" 171 | integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== 172 | dependencies: 173 | "@types/node" "*" 174 | 175 | "@types/json5@^0.0.29": 176 | version "0.0.29" 177 | resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" 178 | integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== 179 | 180 | "@types/mocha@^9.0.0": 181 | version "9.1.1" 182 | resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" 183 | integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== 184 | 185 | "@types/node@*": 186 | version "22.15.16" 187 | resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.16.tgz#685cf0338ad9f5b14860f50a6ac2c3ebd58582cd" 188 | integrity sha512-3pr+KjwpVujqWqOKT8mNR+rd09FqhBLwg+5L/4t0cNYBzm/yEiYGCxWttjaPBsLtAo+WFNoXzGJfolM1JuRXoA== 189 | dependencies: 190 | undici-types "~6.21.0" 191 | 192 | "@types/node@^12.12.54": 193 | version "12.20.55" 194 | resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" 195 | integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== 196 | 197 | "@types/uuid@^8.3.4": 198 | version "8.3.4" 199 | resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" 200 | integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== 201 | 202 | "@types/ws@^7.4.4": 203 | version "7.4.7" 204 | resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" 205 | integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== 206 | dependencies: 207 | "@types/node" "*" 208 | 209 | "@types/ws@^8.2.2": 210 | version "8.18.1" 211 | resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.1.tgz#48464e4bf2ddfd17db13d845467f6070ffea4aa9" 212 | integrity sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg== 213 | dependencies: 214 | "@types/node" "*" 215 | 216 | "@ungap/promise-all-settled@1.1.2": 217 | version "1.1.2" 218 | resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" 219 | integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== 220 | 221 | agentkeepalive@^4.5.0: 222 | version "4.6.0" 223 | resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a" 224 | integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== 225 | dependencies: 226 | humanize-ms "^1.2.1" 227 | 228 | ansi-colors@4.1.1: 229 | version "4.1.1" 230 | resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" 231 | integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== 232 | 233 | ansi-regex@^5.0.1: 234 | version "5.0.1" 235 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 236 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== 237 | 238 | ansi-styles@^4.0.0, ansi-styles@^4.1.0: 239 | version "4.3.0" 240 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 241 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 242 | dependencies: 243 | color-convert "^2.0.1" 244 | 245 | anymatch@~3.1.2: 246 | version "3.1.3" 247 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" 248 | integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== 249 | dependencies: 250 | normalize-path "^3.0.0" 251 | picomatch "^2.0.4" 252 | 253 | argparse@^2.0.1: 254 | version "2.0.1" 255 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" 256 | integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== 257 | 258 | arrify@^1.0.0: 259 | version "1.0.1" 260 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 261 | integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== 262 | 263 | assertion-error@^1.1.0: 264 | version "1.1.0" 265 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" 266 | integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== 267 | 268 | balanced-match@^1.0.0: 269 | version "1.0.2" 270 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 271 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 272 | 273 | base-x@^3.0.2: 274 | version "3.0.11" 275 | resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.11.tgz#40d80e2a1aeacba29792ccc6c5354806421287ff" 276 | integrity sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA== 277 | dependencies: 278 | safe-buffer "^5.0.1" 279 | 280 | base64-js@^1.3.1: 281 | version "1.5.1" 282 | resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" 283 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 284 | 285 | binary-extensions@^2.0.0: 286 | version "2.3.0" 287 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" 288 | integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== 289 | 290 | bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: 291 | version "5.2.2" 292 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.2.tgz#82c09f9ebbb17107cd72cb7fd39bd1f9d0aaa566" 293 | integrity sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw== 294 | 295 | borsh@^0.7.0: 296 | version "0.7.0" 297 | resolved "https://registry.yarnpkg.com/borsh/-/borsh-0.7.0.tgz#6e9560d719d86d90dc589bca60ffc8a6c51fec2a" 298 | integrity sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA== 299 | dependencies: 300 | bn.js "^5.2.0" 301 | bs58 "^4.0.0" 302 | text-encoding-utf-8 "^1.0.2" 303 | 304 | brace-expansion@^1.1.7: 305 | version "1.1.11" 306 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 307 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 308 | dependencies: 309 | balanced-match "^1.0.0" 310 | concat-map "0.0.1" 311 | 312 | braces@~3.0.2: 313 | version "3.0.3" 314 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" 315 | integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== 316 | dependencies: 317 | fill-range "^7.1.1" 318 | 319 | browser-stdout@1.3.1: 320 | version "1.3.1" 321 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" 322 | integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== 323 | 324 | bs58@^4.0.0, bs58@^4.0.1: 325 | version "4.0.1" 326 | resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" 327 | integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== 328 | dependencies: 329 | base-x "^3.0.2" 330 | 331 | buffer-from@^1.0.0, buffer-from@^1.1.0: 332 | version "1.1.2" 333 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" 334 | integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== 335 | 336 | buffer-layout@^1.2.0, buffer-layout@^1.2.2: 337 | version "1.2.2" 338 | resolved "https://registry.yarnpkg.com/buffer-layout/-/buffer-layout-1.2.2.tgz#b9814e7c7235783085f9ca4966a0cfff112259d5" 339 | integrity sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA== 340 | 341 | buffer@6.0.3, buffer@^6.0.3, buffer@~6.0.3: 342 | version "6.0.3" 343 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" 344 | integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== 345 | dependencies: 346 | base64-js "^1.3.1" 347 | ieee754 "^1.2.1" 348 | 349 | bufferutil@^4.0.1: 350 | version "4.0.9" 351 | resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a" 352 | integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== 353 | dependencies: 354 | node-gyp-build "^4.3.0" 355 | 356 | camelcase@^6.0.0, camelcase@^6.3.0: 357 | version "6.3.0" 358 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" 359 | integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== 360 | 361 | chai@^4.3.4: 362 | version "4.5.0" 363 | resolved "https://registry.yarnpkg.com/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" 364 | integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== 365 | dependencies: 366 | assertion-error "^1.1.0" 367 | check-error "^1.0.3" 368 | deep-eql "^4.1.3" 369 | get-func-name "^2.0.2" 370 | loupe "^2.3.6" 371 | pathval "^1.1.1" 372 | type-detect "^4.1.0" 373 | 374 | chalk@^4.1.0: 375 | version "4.1.2" 376 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 377 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 378 | dependencies: 379 | ansi-styles "^4.1.0" 380 | supports-color "^7.1.0" 381 | 382 | chalk@^5.3.0: 383 | version "5.4.1" 384 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.4.1.tgz#1b48bf0963ec158dce2aacf69c093ae2dd2092d8" 385 | integrity sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w== 386 | 387 | check-error@^1.0.3: 388 | version "1.0.3" 389 | resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" 390 | integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== 391 | dependencies: 392 | get-func-name "^2.0.2" 393 | 394 | chokidar@3.5.3: 395 | version "3.5.3" 396 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" 397 | integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== 398 | dependencies: 399 | anymatch "~3.1.2" 400 | braces "~3.0.2" 401 | glob-parent "~5.1.2" 402 | is-binary-path "~2.1.0" 403 | is-glob "~4.0.1" 404 | normalize-path "~3.0.0" 405 | readdirp "~3.6.0" 406 | optionalDependencies: 407 | fsevents "~2.3.2" 408 | 409 | cliui@^7.0.2: 410 | version "7.0.4" 411 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" 412 | integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== 413 | dependencies: 414 | string-width "^4.2.0" 415 | strip-ansi "^6.0.0" 416 | wrap-ansi "^7.0.0" 417 | 418 | color-convert@^2.0.1: 419 | version "2.0.1" 420 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 421 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 422 | dependencies: 423 | color-name "~1.1.4" 424 | 425 | color-name@~1.1.4: 426 | version "1.1.4" 427 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 428 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 429 | 430 | commander@^13.0.0, commander@^13.1.0: 431 | version "13.1.0" 432 | resolved "https://registry.yarnpkg.com/commander/-/commander-13.1.0.tgz#776167db68c78f38dcce1f9b8d7b8b9a488abf46" 433 | integrity sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw== 434 | 435 | commander@^2.20.3: 436 | version "2.20.3" 437 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" 438 | integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== 439 | 440 | concat-map@0.0.1: 441 | version "0.0.1" 442 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 443 | integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== 444 | 445 | cross-fetch@^3.1.5: 446 | version "3.2.0" 447 | resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.2.0.tgz#34e9192f53bc757d6614304d9e5e6fb4edb782e3" 448 | integrity sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q== 449 | dependencies: 450 | node-fetch "^2.7.0" 451 | 452 | crypto-hash@^1.3.0: 453 | version "1.3.0" 454 | resolved "https://registry.yarnpkg.com/crypto-hash/-/crypto-hash-1.3.0.tgz#b402cb08f4529e9f4f09346c3e275942f845e247" 455 | integrity sha512-lyAZ0EMyjDkVvz8WOeVnuCPvKVBXcMv1l5SVqO1yC7PzTwrD/pPje/BIRbWhMoPe436U+Y2nD7f5bFx0kt+Sbg== 456 | 457 | debug@4.3.3: 458 | version "4.3.3" 459 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" 460 | integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== 461 | dependencies: 462 | ms "2.1.2" 463 | 464 | decamelize@^4.0.0: 465 | version "4.0.0" 466 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" 467 | integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== 468 | 469 | deep-eql@^4.1.3: 470 | version "4.1.4" 471 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" 472 | integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== 473 | dependencies: 474 | type-detect "^4.0.0" 475 | 476 | delay@^5.0.0: 477 | version "5.0.0" 478 | resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" 479 | integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== 480 | 481 | diff@5.0.0: 482 | version "5.0.0" 483 | resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" 484 | integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== 485 | 486 | diff@^3.1.0: 487 | version "3.5.0" 488 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" 489 | integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== 490 | 491 | dot-case@^3.0.4: 492 | version "3.0.4" 493 | resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" 494 | integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== 495 | dependencies: 496 | no-case "^3.0.4" 497 | tslib "^2.0.3" 498 | 499 | emoji-regex@^8.0.0: 500 | version "8.0.0" 501 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 502 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 503 | 504 | es6-promise@^4.0.3: 505 | version "4.2.8" 506 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" 507 | integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== 508 | 509 | es6-promisify@^5.0.0: 510 | version "5.0.0" 511 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" 512 | integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== 513 | dependencies: 514 | es6-promise "^4.0.3" 515 | 516 | escalade@^3.1.1: 517 | version "3.2.0" 518 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" 519 | integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== 520 | 521 | escape-string-regexp@4.0.0: 522 | version "4.0.0" 523 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" 524 | integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== 525 | 526 | eventemitter3@^4.0.7: 527 | version "4.0.7" 528 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" 529 | integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== 530 | 531 | eventemitter3@^5.0.1: 532 | version "5.0.1" 533 | resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" 534 | integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== 535 | 536 | eyes@^0.1.8: 537 | version "0.1.8" 538 | resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" 539 | integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== 540 | 541 | fast-stable-stringify@^1.0.0: 542 | version "1.0.0" 543 | resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz#5c5543462b22aeeefd36d05b34e51c78cb86d313" 544 | integrity sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag== 545 | 546 | fill-range@^7.1.1: 547 | version "7.1.1" 548 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" 549 | integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== 550 | dependencies: 551 | to-regex-range "^5.0.1" 552 | 553 | find-up@5.0.0: 554 | version "5.0.0" 555 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" 556 | integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== 557 | dependencies: 558 | locate-path "^6.0.0" 559 | path-exists "^4.0.0" 560 | 561 | flat@^5.0.2: 562 | version "5.0.2" 563 | resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" 564 | integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== 565 | 566 | fs.realpath@^1.0.0: 567 | version "1.0.0" 568 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 569 | integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== 570 | 571 | fsevents@~2.3.2: 572 | version "2.3.3" 573 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" 574 | integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== 575 | 576 | get-caller-file@^2.0.5: 577 | version "2.0.5" 578 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 579 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 580 | 581 | get-func-name@^2.0.1, get-func-name@^2.0.2: 582 | version "2.0.2" 583 | resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" 584 | integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== 585 | 586 | glob-parent@~5.1.2: 587 | version "5.1.2" 588 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 589 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 590 | dependencies: 591 | is-glob "^4.0.1" 592 | 593 | glob@7.2.0: 594 | version "7.2.0" 595 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" 596 | integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== 597 | dependencies: 598 | fs.realpath "^1.0.0" 599 | inflight "^1.0.4" 600 | inherits "2" 601 | minimatch "^3.0.4" 602 | once "^1.3.0" 603 | path-is-absolute "^1.0.0" 604 | 605 | growl@1.10.5: 606 | version "1.10.5" 607 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" 608 | integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== 609 | 610 | has-flag@^4.0.0: 611 | version "4.0.0" 612 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 613 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 614 | 615 | he@1.2.0: 616 | version "1.2.0" 617 | resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" 618 | integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== 619 | 620 | humanize-ms@^1.2.1: 621 | version "1.2.1" 622 | resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" 623 | integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== 624 | dependencies: 625 | ms "^2.0.0" 626 | 627 | ieee754@^1.2.1: 628 | version "1.2.1" 629 | resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" 630 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 631 | 632 | inflight@^1.0.4: 633 | version "1.0.6" 634 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 635 | integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== 636 | dependencies: 637 | once "^1.3.0" 638 | wrappy "1" 639 | 640 | inherits@2: 641 | version "2.0.4" 642 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 643 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 644 | 645 | is-binary-path@~2.1.0: 646 | version "2.1.0" 647 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 648 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 649 | dependencies: 650 | binary-extensions "^2.0.0" 651 | 652 | is-extglob@^2.1.1: 653 | version "2.1.1" 654 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 655 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 656 | 657 | is-fullwidth-code-point@^3.0.0: 658 | version "3.0.0" 659 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 660 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 661 | 662 | is-glob@^4.0.1, is-glob@~4.0.1: 663 | version "4.0.3" 664 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 665 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 666 | dependencies: 667 | is-extglob "^2.1.1" 668 | 669 | is-number@^7.0.0: 670 | version "7.0.0" 671 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 672 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 673 | 674 | is-plain-obj@^2.1.0: 675 | version "2.1.0" 676 | resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" 677 | integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== 678 | 679 | is-unicode-supported@^0.1.0: 680 | version "0.1.0" 681 | resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" 682 | integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== 683 | 684 | isexe@^2.0.0: 685 | version "2.0.0" 686 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 687 | integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== 688 | 689 | isomorphic-ws@^4.0.1: 690 | version "4.0.1" 691 | resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" 692 | integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== 693 | 694 | jayson@^4.1.1: 695 | version "4.2.0" 696 | resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.2.0.tgz#b71762393fa40bc9637eaf734ca6f40d3b8c0c93" 697 | integrity sha512-VfJ9t1YLwacIubLhONk0KFeosUBwstRWQ0IRT1KDjEjnVnSOVHC3uwugyV7L0c7R9lpVyrUGT2XWiBA1UTtpyg== 698 | dependencies: 699 | "@types/connect" "^3.4.33" 700 | "@types/node" "^12.12.54" 701 | "@types/ws" "^7.4.4" 702 | commander "^2.20.3" 703 | delay "^5.0.0" 704 | es6-promisify "^5.0.0" 705 | eyes "^0.1.8" 706 | isomorphic-ws "^4.0.1" 707 | json-stringify-safe "^5.0.1" 708 | stream-json "^1.9.1" 709 | uuid "^8.3.2" 710 | ws "^7.5.10" 711 | 712 | js-yaml@4.1.0: 713 | version "4.1.0" 714 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" 715 | integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== 716 | dependencies: 717 | argparse "^2.0.1" 718 | 719 | json-stringify-safe@^5.0.1: 720 | version "5.0.1" 721 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 722 | integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== 723 | 724 | json5@^1.0.2: 725 | version "1.0.2" 726 | resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" 727 | integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== 728 | dependencies: 729 | minimist "^1.2.0" 730 | 731 | locate-path@^6.0.0: 732 | version "6.0.0" 733 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" 734 | integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== 735 | dependencies: 736 | p-locate "^5.0.0" 737 | 738 | log-symbols@4.1.0: 739 | version "4.1.0" 740 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" 741 | integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== 742 | dependencies: 743 | chalk "^4.1.0" 744 | is-unicode-supported "^0.1.0" 745 | 746 | loupe@^2.3.6: 747 | version "2.3.7" 748 | resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" 749 | integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== 750 | dependencies: 751 | get-func-name "^2.0.1" 752 | 753 | lower-case@^2.0.2: 754 | version "2.0.2" 755 | resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" 756 | integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== 757 | dependencies: 758 | tslib "^2.0.3" 759 | 760 | make-error@^1.1.1: 761 | version "1.3.6" 762 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" 763 | integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== 764 | 765 | minimatch@4.2.1: 766 | version "4.2.1" 767 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" 768 | integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== 769 | dependencies: 770 | brace-expansion "^1.1.7" 771 | 772 | minimatch@^3.0.4: 773 | version "3.1.2" 774 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" 775 | integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== 776 | dependencies: 777 | brace-expansion "^1.1.7" 778 | 779 | minimist@^1.2.0, minimist@^1.2.6: 780 | version "1.2.8" 781 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" 782 | integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== 783 | 784 | mkdirp@^0.5.1: 785 | version "0.5.6" 786 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" 787 | integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== 788 | dependencies: 789 | minimist "^1.2.6" 790 | 791 | mocha@^9.0.3: 792 | version "9.2.2" 793 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" 794 | integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== 795 | dependencies: 796 | "@ungap/promise-all-settled" "1.1.2" 797 | ansi-colors "4.1.1" 798 | browser-stdout "1.3.1" 799 | chokidar "3.5.3" 800 | debug "4.3.3" 801 | diff "5.0.0" 802 | escape-string-regexp "4.0.0" 803 | find-up "5.0.0" 804 | glob "7.2.0" 805 | growl "1.10.5" 806 | he "1.2.0" 807 | js-yaml "4.1.0" 808 | log-symbols "4.1.0" 809 | minimatch "4.2.1" 810 | ms "2.1.3" 811 | nanoid "3.3.1" 812 | serialize-javascript "6.0.0" 813 | strip-json-comments "3.1.1" 814 | supports-color "8.1.1" 815 | which "2.0.2" 816 | workerpool "6.2.0" 817 | yargs "16.2.0" 818 | yargs-parser "20.2.4" 819 | yargs-unparser "2.0.0" 820 | 821 | ms@2.1.2: 822 | version "2.1.2" 823 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 824 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 825 | 826 | ms@2.1.3, ms@^2.0.0: 827 | version "2.1.3" 828 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 829 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 830 | 831 | nanoid@3.3.1: 832 | version "3.3.1" 833 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" 834 | integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== 835 | 836 | no-case@^3.0.4: 837 | version "3.0.4" 838 | resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" 839 | integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== 840 | dependencies: 841 | lower-case "^2.0.2" 842 | tslib "^2.0.3" 843 | 844 | node-fetch@^2.7.0: 845 | version "2.7.0" 846 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" 847 | integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== 848 | dependencies: 849 | whatwg-url "^5.0.0" 850 | 851 | node-gyp-build@^4.3.0: 852 | version "4.8.4" 853 | resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8" 854 | integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ== 855 | 856 | normalize-path@^3.0.0, normalize-path@~3.0.0: 857 | version "3.0.0" 858 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 859 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 860 | 861 | once@^1.3.0: 862 | version "1.4.0" 863 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 864 | integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== 865 | dependencies: 866 | wrappy "1" 867 | 868 | p-limit@^3.0.2: 869 | version "3.1.0" 870 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" 871 | integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== 872 | dependencies: 873 | yocto-queue "^0.1.0" 874 | 875 | p-locate@^5.0.0: 876 | version "5.0.0" 877 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" 878 | integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== 879 | dependencies: 880 | p-limit "^3.0.2" 881 | 882 | pako@^2.0.3: 883 | version "2.1.0" 884 | resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" 885 | integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== 886 | 887 | path-exists@^4.0.0: 888 | version "4.0.0" 889 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 890 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== 891 | 892 | path-is-absolute@^1.0.0: 893 | version "1.0.1" 894 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 895 | integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== 896 | 897 | pathval@^1.1.1: 898 | version "1.1.1" 899 | resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" 900 | integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== 901 | 902 | picomatch@^2.0.4, picomatch@^2.2.1: 903 | version "2.3.1" 904 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 905 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 906 | 907 | prettier@^2.6.2: 908 | version "2.8.8" 909 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" 910 | integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== 911 | 912 | randombytes@^2.1.0: 913 | version "2.1.0" 914 | resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" 915 | integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== 916 | dependencies: 917 | safe-buffer "^5.1.0" 918 | 919 | readdirp@~3.6.0: 920 | version "3.6.0" 921 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" 922 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== 923 | dependencies: 924 | picomatch "^2.2.1" 925 | 926 | require-directory@^2.1.1: 927 | version "2.1.1" 928 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 929 | integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== 930 | 931 | rpc-websockets@^9.0.2: 932 | version "9.1.1" 933 | resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.1.1.tgz#5764336f3623ee1c5cc8653b7335183e3c0c78bd" 934 | integrity sha512-1IXGM/TfPT6nfYMIXkJdzn+L4JEsmb0FL1O2OBjaH03V3yuUDdKFulGLMFG6ErV+8pZ5HVC0limve01RyO+saA== 935 | dependencies: 936 | "@swc/helpers" "^0.5.11" 937 | "@types/uuid" "^8.3.4" 938 | "@types/ws" "^8.2.2" 939 | buffer "^6.0.3" 940 | eventemitter3 "^5.0.1" 941 | uuid "^8.3.2" 942 | ws "^8.5.0" 943 | optionalDependencies: 944 | bufferutil "^4.0.1" 945 | utf-8-validate "^5.0.2" 946 | 947 | safe-buffer@^5.0.1, safe-buffer@^5.1.0: 948 | version "5.2.1" 949 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 950 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 951 | 952 | serialize-javascript@6.0.0: 953 | version "6.0.0" 954 | resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" 955 | integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== 956 | dependencies: 957 | randombytes "^2.1.0" 958 | 959 | snake-case@^3.0.4: 960 | version "3.0.4" 961 | resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" 962 | integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== 963 | dependencies: 964 | dot-case "^3.0.4" 965 | tslib "^2.0.3" 966 | 967 | source-map-support@^0.5.6: 968 | version "0.5.21" 969 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" 970 | integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== 971 | dependencies: 972 | buffer-from "^1.0.0" 973 | source-map "^0.6.0" 974 | 975 | source-map@^0.6.0: 976 | version "0.6.1" 977 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 978 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 979 | 980 | stream-chain@^2.2.5: 981 | version "2.2.5" 982 | resolved "https://registry.yarnpkg.com/stream-chain/-/stream-chain-2.2.5.tgz#b30967e8f14ee033c5b9a19bbe8a2cba90ba0d09" 983 | integrity sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA== 984 | 985 | stream-json@^1.9.1: 986 | version "1.9.1" 987 | resolved "https://registry.yarnpkg.com/stream-json/-/stream-json-1.9.1.tgz#e3fec03e984a503718946c170db7d74556c2a187" 988 | integrity sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw== 989 | dependencies: 990 | stream-chain "^2.2.5" 991 | 992 | string-width@^4.1.0, string-width@^4.2.0: 993 | version "4.2.3" 994 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 995 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 996 | dependencies: 997 | emoji-regex "^8.0.0" 998 | is-fullwidth-code-point "^3.0.0" 999 | strip-ansi "^6.0.1" 1000 | 1001 | strip-ansi@^6.0.0, strip-ansi@^6.0.1: 1002 | version "6.0.1" 1003 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 1004 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 1005 | dependencies: 1006 | ansi-regex "^5.0.1" 1007 | 1008 | strip-bom@^3.0.0: 1009 | version "3.0.0" 1010 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1011 | integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== 1012 | 1013 | strip-json-comments@3.1.1: 1014 | version "3.1.1" 1015 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" 1016 | integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== 1017 | 1018 | superstruct@^0.15.4: 1019 | version "0.15.5" 1020 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" 1021 | integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== 1022 | 1023 | superstruct@^2.0.2: 1024 | version "2.0.2" 1025 | resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-2.0.2.tgz#3f6d32fbdc11c357deff127d591a39b996300c54" 1026 | integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== 1027 | 1028 | supports-color@8.1.1: 1029 | version "8.1.1" 1030 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" 1031 | integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== 1032 | dependencies: 1033 | has-flag "^4.0.0" 1034 | 1035 | supports-color@^7.1.0: 1036 | version "7.2.0" 1037 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 1038 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 1039 | dependencies: 1040 | has-flag "^4.0.0" 1041 | 1042 | text-encoding-utf-8@^1.0.2: 1043 | version "1.0.2" 1044 | resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" 1045 | integrity sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg== 1046 | 1047 | to-regex-range@^5.0.1: 1048 | version "5.0.1" 1049 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 1050 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 1051 | dependencies: 1052 | is-number "^7.0.0" 1053 | 1054 | toml@^3.0.0: 1055 | version "3.0.0" 1056 | resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" 1057 | integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== 1058 | 1059 | tr46@~0.0.3: 1060 | version "0.0.3" 1061 | resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" 1062 | integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== 1063 | 1064 | ts-mocha@^10.0.0: 1065 | version "10.1.0" 1066 | resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-10.1.0.tgz#17a1c055f5f7733fd82447c4420740db87221bc8" 1067 | integrity sha512-T0C0Xm3/WqCuF2tpa0GNGESTBoKZaiqdUP8guNv4ZY316AFXlyidnrzQ1LUrCT0Wb1i3J0zFTgOh/55Un44WdA== 1068 | dependencies: 1069 | ts-node "7.0.1" 1070 | optionalDependencies: 1071 | tsconfig-paths "^3.5.0" 1072 | 1073 | ts-node@7.0.1: 1074 | version "7.0.1" 1075 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" 1076 | integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== 1077 | dependencies: 1078 | arrify "^1.0.0" 1079 | buffer-from "^1.1.0" 1080 | diff "^3.1.0" 1081 | make-error "^1.1.1" 1082 | minimist "^1.2.0" 1083 | mkdirp "^0.5.1" 1084 | source-map-support "^0.5.6" 1085 | yn "^2.0.0" 1086 | 1087 | tsconfig-paths@^3.5.0: 1088 | version "3.15.0" 1089 | resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" 1090 | integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== 1091 | dependencies: 1092 | "@types/json5" "^0.0.29" 1093 | json5 "^1.0.2" 1094 | minimist "^1.2.6" 1095 | strip-bom "^3.0.0" 1096 | 1097 | tslib@^2.0.3, tslib@^2.8.0: 1098 | version "2.8.1" 1099 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" 1100 | integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== 1101 | 1102 | tweetnacl@^1.0.3: 1103 | version "1.0.3" 1104 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" 1105 | integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== 1106 | 1107 | type-detect@^4.0.0, type-detect@^4.1.0: 1108 | version "4.1.0" 1109 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" 1110 | integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== 1111 | 1112 | typescript@^4.3.5: 1113 | version "4.9.5" 1114 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" 1115 | integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== 1116 | 1117 | undici-types@~6.21.0: 1118 | version "6.21.0" 1119 | resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" 1120 | integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== 1121 | 1122 | utf-8-validate@^5.0.2: 1123 | version "5.0.10" 1124 | resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" 1125 | integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== 1126 | dependencies: 1127 | node-gyp-build "^4.3.0" 1128 | 1129 | uuid@^8.3.2: 1130 | version "8.3.2" 1131 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" 1132 | integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== 1133 | 1134 | webidl-conversions@^3.0.0: 1135 | version "3.0.1" 1136 | resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" 1137 | integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== 1138 | 1139 | whatwg-url@^5.0.0: 1140 | version "5.0.0" 1141 | resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" 1142 | integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== 1143 | dependencies: 1144 | tr46 "~0.0.3" 1145 | webidl-conversions "^3.0.0" 1146 | 1147 | which@2.0.2: 1148 | version "2.0.2" 1149 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 1150 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 1151 | dependencies: 1152 | isexe "^2.0.0" 1153 | 1154 | workerpool@6.2.0: 1155 | version "6.2.0" 1156 | resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" 1157 | integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== 1158 | 1159 | wrap-ansi@^7.0.0: 1160 | version "7.0.0" 1161 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 1162 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 1163 | dependencies: 1164 | ansi-styles "^4.0.0" 1165 | string-width "^4.1.0" 1166 | strip-ansi "^6.0.0" 1167 | 1168 | wrappy@1: 1169 | version "1.0.2" 1170 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1171 | integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== 1172 | 1173 | ws@^7.5.10: 1174 | version "7.5.10" 1175 | resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" 1176 | integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== 1177 | 1178 | ws@^8.5.0: 1179 | version "8.18.2" 1180 | resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.2.tgz#42738b2be57ced85f46154320aabb51ab003705a" 1181 | integrity sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ== 1182 | 1183 | y18n@^5.0.5: 1184 | version "5.0.8" 1185 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" 1186 | integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== 1187 | 1188 | yargs-parser@20.2.4: 1189 | version "20.2.4" 1190 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" 1191 | integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== 1192 | 1193 | yargs-parser@^20.2.2: 1194 | version "20.2.9" 1195 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" 1196 | integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== 1197 | 1198 | yargs-unparser@2.0.0: 1199 | version "2.0.0" 1200 | resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" 1201 | integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== 1202 | dependencies: 1203 | camelcase "^6.0.0" 1204 | decamelize "^4.0.0" 1205 | flat "^5.0.2" 1206 | is-plain-obj "^2.1.0" 1207 | 1208 | yargs@16.2.0: 1209 | version "16.2.0" 1210 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" 1211 | integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== 1212 | dependencies: 1213 | cliui "^7.0.2" 1214 | escalade "^3.1.1" 1215 | get-caller-file "^2.0.5" 1216 | require-directory "^2.1.1" 1217 | string-width "^4.2.0" 1218 | y18n "^5.0.5" 1219 | yargs-parser "^20.2.2" 1220 | 1221 | yn@^2.0.0: 1222 | version "2.0.0" 1223 | resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" 1224 | integrity sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ== 1225 | 1226 | yocto-queue@^0.1.0: 1227 | version "0.1.0" 1228 | resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" 1229 | integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== 1230 | --------------------------------------------------------------------------------