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
| Parameter | Type | Required | Description |
|---|---|---|---|
userAddress | string | ✅ | User's EOA address (owner of the Safe) |
chainId | SupportedChainId | ✅ | Chain to deposit on |
amount | string | ✅ | Amount 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);