Withdrawal Methods
Withdrawal methods of Papaya SDK for withdrawing tokens from the protocol
withdraw()
withdraw()async withdraw(amount: bigint | number): Promise<ethers.TransactionResponse>// Format the amount correctly (50 USDT with 18 decimals)
const amount = formatInput('50', 18);
// Withdraw
const tx = await papaya.withdraw(amount);
await tx.wait();
console.log('Withdrawal successful');withdrawBySig()
withdrawBySig()async withdrawBySig(amount: bigint | number, deadline: number): Promise<ethers.TransactionResponse>withdrawTo()
withdrawTo()Last updated