Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cutupdev/Solana-Token-Presale-Smart-Contract
/ functions
Functions
49 in github.com/cutupdev/Solana-Token-Presale-Smart-Contract
⨍
Functions
49
◇
Types & classes
14
↓ 8 callers
Function
getAssociatedTokenAccount
( ownerPubkey: PublicKey, mintPk: PublicKey )
lib/util.ts:21
↓ 5 callers
Function
execTx
( transaction: Transaction | VersionedTransaction, connection: Connection, payer: NodeWallet )
lib/util.ts:148
↓ 5 callers
Function
programCommand
(name: string)
cli/command.ts:110
↓ 5 callers
Function
setClusterConfig
( cluster: web3.Cluster, keypair: string, rpc?: string )
cli/scripts.ts:29
↓ 4 callers
Function
getAssociatedTokenAccount
( ownerPubkey: PublicKey, mintPk: PublicKey )
tests/utils.ts:9
↓ 2 callers
Function
airdropToken
(mintKp: Keypair, authority: Keypair, payer: Signer, user: PublicKey, amount: number)
tests/airdrop-tokens.ts:10
↓ 2 callers
Function
createAssociatedTokenAccountInstruction
( associatedTokenAddress: PublicKey, payer: PublicKey, walletAddress: PublicKey, splTokenMintA
lib/util.ts:78
↓ 2 callers
Function
createMintAcct
(mintKp: Keypair, payer: Signer, authorityToAssign: PublicKey)
tests/create-mints.ts:43
↓ 1 callers
Function
build_bundle
( search: SearcherClient, bundleTransactionLimit: number, txs: VersionedTransaction[], keypair
lib/executor.ts:121
↓ 1 callers
Function
bull_dozer
( txs: VersionedTransaction[], keypair: Keypair, connection: Connection )
lib/executor.ts:55
↓ 1 callers
Function
createDepositPresaleToken
( admin: PublicKey, token: PublicKey, amount: number, program: Program<Presale> )
lib/scripts.ts:86
↓ 1 callers
Function
createInitializeTx
( admin: PublicKey, token: PublicKey, program: Program<Presale> )
lib/scripts.ts:14
↓ 1 callers
Function
createMints
(payer: Keypair)
tests/create-mints.ts:10
↓ 1 callers
Function
createSetStageTx
( admin: PublicKey, stageNum: number, program: Program<Presale> )
lib/scripts.ts:159
↓ 1 callers
Function
createSetVaultAddressTx
( admin: PublicKey, vault: PublicKey, program: Program<Presale> )
lib/scripts.ts:48
↓ 1 callers
Function
createStartPresaleTx
( admin: PublicKey, token: PublicKey, program: Program<Presale> )
lib/scripts.ts:125
↓ 1 callers
Function
depositPresaleToken
( token: PublicKey, amount: number )
cli/scripts.ts:87
↓ 1 callers
Function
initProject
( token: PublicKey )
cli/scripts.ts:67
↓ 1 callers
Function
process_change_admin
(ctx: Context<ChangeAdmin>, new_admin: Pubkey)
programs/presale/src/instructions/change_admin.rs:21
↓ 1 callers
Function
setStage
( stageNum: number )
cli/scripts.ts:108
↓ 1 callers
Function
setVaultAddress
( vault: PublicKey )
cli/scripts.ts:77
↓ 1 callers
Function
sol_transfer_user
transfer sol from user
programs/presale/src/util.rs:19
↓ 1 callers
Function
startPresale
( token: PublicKey )
cli/scripts.ts:98
↓ 1 callers
Function
token_transfer_user
transfer token from user
programs/presale/src/util.rs:32
↓ 1 callers
Method
update_remain_tokens
Function to update remain_tokens from STAGES
programs/presale/src/state.rs:36
Function
bundle
( txs: VersionedTransaction[], keypair: Keypair, connection: Connection )
lib/executor.ts:24
Function
buy
Buy with SOL
programs/presale/src/lib.rs:72
Function
buy_with_stable_coin
Buy with USDC/USDT
programs/presale/src/lib.rs:80
Function
change_admin
Admin can hand over admin role
programs/presale/src/lib.rs:29
Function
getATokenAccountsNeedCreate
( connection: Connection, walletAddress: PublicKey, owner: PublicKey, nfts: PublicKey[], )
lib/util.ts:108
Function
getAdressLookupTableAccounts
( keys: string[], connection: Connection )
lib/util.ts:37
Function
init_user
Initialize user state
programs/presale/src/lib.rs:65
Function
initialize
called by contract deployer only 1 time to initialize global values send SOL to global_account and initialize the global states
programs/presale/src/lib.rs:22
Function
instructionDataToTransactionInstruction
( instructionPayload: any )
lib/util.ts:60
Function
onBundleResult
( c: SearcherClient, txSig: string, targetBundleId: string, connection: Connection)
lib/executor.ts:164
Method
process_instruction
(ctx: Context<Self>, mut sol_amount: u64)
programs/presale/src/instructions/buy.rs:45
Method
process_instruction
(ctx: Context<Self>)
programs/presale/src/instructions/set_vault_address.rs:72
Method
process_instruction
(ctx: Context<Self>)
programs/presale/src/instructions/init_user.rs:23
Method
process_instruction
(ctx: Context<Self>)
programs/presale/src/instructions/start_presale.rs:21
Method
process_instruction
(ctx: Context<Self>, live: bool)
programs/presale/src/instructions/set_live.rs:21
Method
process_instruction
(ctx: Context<Self>)
programs/presale/src/instructions/initialize.rs:23
Method
process_instruction
(ctx: Context<Self>, stage: u8)
programs/presale/src/instructions/set_stage.rs:21
Method
process_instruction
(ctx: Context<Self>, mut stable_coin_amount: u64)
programs/presale/src/instructions/buy_with_stable_coin.rs:61
Function
set_live
Admin can start the pause/resume presale @param - live: pause presale if true, resume presale
programs/presale/src/lib.rs:49
Function
set_stage
Admin can set the stage number
programs/presale/src/lib.rs:57
Function
set_vault_address
Admin can set the vault address
programs/presale/src/lib.rs:34
Function
sol_transfer_with_signer
transfer sol from PDA
programs/presale/src/util.rs:6
Function
start_presale
Admin can start the presale
programs/presale/src/lib.rs:41
Function
token_transfer_with_signer
transfer token from PDA
programs/presale/src/util.rs:53