Skip to main content

depositFunds

Transfer tokens from user's EOA to their Smart Wallet. Waits for transaction confirmation.

The token is automatically selected based on the chain:

  • Base (8453) and Arbitrum (42161): USDC
  • Plasma (9745): USDT

Signature

depositFunds(userAddress: string, chainId: SupportedChainId, amount: string): Promise<DepositResponse>

Parameters

ParameterTypeRequiredDescription
userAddressstringUser's EOA address (owner of the Safe)
chainIdSupportedChainIdChain to deposit on
amountstringAmount in least decimal units (e.g., 100000000 for 100 USDC)

Returns

Deposit response with transaction hash and confirmation

Return Type

interface DepositResponse {
success: boolean;
txHash: string;
smartWallet: string;
amount: string;
}

Example

// Deposit 100 USDC (6 decimals) to Safe on Base
// Token address is automatically selected (USDC for Base)
const result = await sdk.depositFunds(
"0xUser...",
8453,
"100000000" // 100 USDC = 100 * 10^6
);
console.log("Deposit confirmed:", result.txHash);
console.log("Smart Wallet:", result.smartWallet);