MCPcopy Create free account

hub / github.com/cutupdev/Solana-Token-Staking-Smart-Contract / functions

Functions51 in github.com/cutupdev/Solana-Token-Staking-Smart-Contract

↓ 9 callersFunctionprogramCommand
(name: string)
cli/command.ts:142
↓ 9 callersFunctionsetClusterConfig
( cluster: web3.Cluster, keypair: string, rpc?: string )
cli/scripts.ts:50
↓ 8 callersFunctionexecTx
( transaction: Transaction, connection: Connection, payer: NodeWallet, commitment: "confirmed"
lib/util.ts:32
↓ 8 callersMethodprocess
( &mut self, pool_id: u64, amount: u64 )
programs/staking/src/instructions/stake.rs:87
↓ 3 callersFunctionconvertToFloat
(value: number, decimals: number)
tests/utils.ts:30
↓ 2 callersFunctioncreateAssociatedTokenAccountInstruction
( associatedTokenAddress: PublicKey, payer: PublicKey, walletAddress: PublicKey, splTokenMintA
lib/util.ts:63
↓ 2 callersFunctiongetAssociatedTokenAccount
( ownerPubkey: PublicKey, mintPk: PublicKey )
lib/util.ts:16
↓ 1 callersFunctionconfigProject
()
cli/scripts.ts:83
↓ 1 callersFunctionconvertFromFloat
(value: number, decimals: number)
tests/utils.ts:34
↓ 1 callersFunctionconvert_from_float
(value: f64, decimals: u8)
programs/staking/src/utils.rs:10
↓ 1 callersFunctionconvert_to_float
(value: u64, decimals: u8)
programs/staking/src/utils.rs:6
↓ 1 callersFunctioncreateConfigTx
( admin: PublicKey, newConfig: any, connection: Connection, program: Program<Staking> )
lib/scripts.ts:28
↓ 1 callersFunctioncreatePool
()
cli/scripts.ts:101
↓ 1 callersFunctioncreatePoolTx
( duration: BN, lockPeriod: BN, boostTriggerAmount: BN, boostPurchaseAmount: BN, apy: number, boos
lib/scripts.ts:56
↓ 1 callersFunctionemergency
( )
cli/scripts.ts:122
↓ 1 callersFunctionemergencyTx
( user: PublicKey, connection: Connection, program: Program<Staking> )
lib/scripts.ts:108
↓ 1 callersFunctionharvest
()
cli/scripts.ts:153
↓ 1 callersFunctionharvestTx
( user: PublicKey, tokenMint: PublicKey, poolId: BN, tokenPrice: number, solPrice: number, conne
lib/scripts.ts:192
↓ 1 callersFunctionpurchaseBoost
(amount: BN)
cli/scripts.ts:165
↓ 1 callersFunctionpurchaseBoostTx
( payer: PublicKey, stakingToken: PublicKey, amount: BN, poolId: BN, connection: Connection, p
lib/scripts.ts:264
↓ 1 callersFunctionsetPause
()
cli/scripts.ts:134
↓ 1 callersFunctionsetPauseTx
( user: PublicKey, poolId: BN, connection: Connection, program: Program<Staking> )
lib/scripts.ts:133
↓ 1 callersFunctionstake
(amount: BN)
cli/scripts.ts:147
↓ 1 callersFunctionstakeTx
( payer: PublicKey, stakingToken: PublicKey, amount: BN, poolId: BN, connection: Connection, pro
lib/scripts.ts:159
↓ 1 callersFunctionwithdraw
()
cli/scripts.ts:159
↓ 1 callersFunctionwithdrawTx
( payer: PublicKey, stakingToken: PublicKey, tokenPrice: number, solPrice: number, poolId: BN, c
lib/scripts.ts:228
FunctioncalculateAmountOutBuy
( reserveLamport: number, adjustedAmount: number, tokenOneDecimals: number, reserveToken: number )
tests/utils.ts:38
Methodcalculate_rewards
( &mut self, staked_amount: u64, deposit_timestamps: u64, boost_timestamps: u6
programs/staking/src/state.rs:76
Methodcalculate_withdraw
( &mut self, staked_amount: u64, deposit_timestamps: u64, lock_period: u64,
programs/staking/src/state.rs:107
Functioncreate_pool
( ctx: Context<Create>, // pool setting duration: u64, lock_period: u64,
programs/staking/src/lib.rs:23
Functionemergency
( ctx: Context<Emergency> )
programs/staking/src/lib.rs:49
FunctiongetATokenAccountsNeedCreate
( connection: Connection, walletAddress: PublicKey, owner: PublicKey, nfts: PublicKey[], )
lib/util.ts:93
FunctiongetAssociatedTokenAccount
( ownerPubkey: PublicKey, mintPk: PublicKey )
tests/utils.ts:14
Functionharvest
( ctx: Context<Harvest>, pool_id: u64, sol_price: f64, token_price: f64,
programs/staking/src/lib.rs:98
Functioninitialize
(ctx: Context<Configure>, new_config: Config)
programs/staking/src/lib.rs:19
Methodprocess
( &mut self, pool_id: u64, amount: u64, )
programs/staking/src/instructions/purchase_boost.rs:75
Methodprocess
( &mut self, pool_id: u64, sol_price: f64, token_price: f64,
programs/staking/src/instructions/withdraw.rs:90
Methodprocess
(&mut self, global_vault_bump: u8)
programs/staking/src/instructions/emergency.rs:74
Methodprocess
( &mut self, duration: u64, lock_period: u64, boost_trigger_amount: u64,
programs/staking/src/instructions/create_pool.rs:82
Methodprocess
(&mut self, pool_id: u64)
programs/staking/src/instructions/set_pause.rs:32
Methodprocess
( &mut self, pool_id: u64, sol_price: f64, token_price: f64, global_va
programs/staking/src/instructions/harvest.rs:58
Methodprocess
(&mut self, new_config: Config, config_bump: u8)
programs/staking/src/instructions/configure.rs:62
Functionpurchase_boost
( ctx: Context<PurchaseBoost>, pool_id: u64, amount: u64 )
programs/staking/src/lib.rs:114
Functionset_pause
( ctx: Context<SetPause>, pool_id: u64 )
programs/staking/src/lib.rs:58
Functionsleep
(ms: number)
tests/utils.ts:8
Functionsol_transfer_from_user
transfer sol from user
programs/staking/src/utils.rs:15
Functionsol_transfer_with_signer
transfer sol from PDA
programs/staking/src/utils.rs:34
Functionstake
( ctx: Context<Stake>, pool_id: u64, amount: u64, )
programs/staking/src/lib.rs:68
Functiontoken_transfer_user
transfer token from user
programs/staking/src/utils.rs:51
Functiontoken_transfer_with_signer
transfer token from PDA
programs/staking/src/utils.rs:72
Functionwithdraw
( ctx: Context<Withdraw>, pool_id: u64, sol_price: f64, token_price: f64,
programs/staking/src/lib.rs:80