transferFrom(from, to, amount)
Move ctAssets from one address to another using an existing shares allowance granted via vault.approve.
Signature
await vault.transferFrom(from: string, to: string, amount: bigint): Promise<Tx>
Parameters
from(string): owner of the shares (the address that approved you).to(string): recipient of the shares.amount(bigint): amount of shares in vault base units. Usevault.toBigInt("5.0")to convert from a human value.
Returns
Tx: an Ethers v6TransactionResponse-like object. Callawait tx.wait()to confirm.
Example
const owner = "0xOwner...";
const to = "0xRecipient...";
const shareAmount = await vault.toBigInt("5.0"); // 5 ctAssets
// Requires: owner has called vault.approve(spender, amount)
await (await vault.transferFrom(owner, to, shareAmount)).wait();