MCPcopy Create free account
hub / github.com/cutupdev/Solana-Token-Staking-Smart-Contract / stake

Function stake

cli/scripts.ts:147–151  ·  view source on GitHub ↗
(amount: BN)

Source from the content-addressed store, hash-verified

145};
146
147export const stake = async (amount: BN) => {
148 const tx = await stakeTx(payer.publicKey, stakingMint, amount, new BN(TEST_POOL_ID), solConnection, program);
149
150 await execTx(tx, solConnection, payer);
151};
152
153export const harvest = async () => {
154 const tx = await harvestTx(payer.publicKey, stakingMint, new BN(TEST_POOL_ID), TEST_TOKEN_PRICE, TEST_SOL_PRICE, solConnection, program);

Callers 1

command.tsFile · 0.90

Calls 2

stakeTxFunction · 0.90
execTxFunction · 0.90

Tested by

no test coverage detected