Use executeStake to deposit tokens into a staking pool.
Usage
import { executeStake } from '@avnu/avnu-sdk';
import { parseUnits } from 'ethers';
const result = await executeStake({
provider: account, // Starknet Account
poolAddress: '0x0362dc7da60bfddc8e3146028dfd94941c6e22403c98b5947104e637543b475d', // avnu $STRK delegation pool
amount: parseUnits('100', 18), // Amount to stake (in wei)
});
console.log('Transaction Hash:', result.transactionHash);
Parameters
The Starknet account executing the transaction.
The address of the staking pool contract.
The amount of tokens to stake (in smallest unit, e.g., wei).
Optional paymaster configuration for gasless staking.