WalletFactory that give you or your users direct, owner-controlled custody of tokens. Unlike a traditional externally owned account (EOA), a Smart Wallet is itself a smart contract that executes transactions on the owner’s behalf - no bundlers, no paymasters, no ERC-4337 infrastructure required.
Use Smart Wallets when you need transparent on-chain custody for a fintech user, want to self-custody tokens and withdraw them independently, or need a programmable execution layer for cNGN and other stablecoins on Base.
Overview
How Smart Wallets Work
Strails deploys Smart Wallets using the EIP-1167 minimal proxy (Clones) pattern via theWalletFactory contract. Every wallet is a lightweight proxy that forwards calls to a shared implementation contract, reducing deployment gas costs by roughly 90% compared to a full contract deployment.
- Deterministic addresses - wallet addresses are derived from a
bytes32salt so they are predictable before deployment. - Owner-controlled - your EOA calls
execute()directly on the wallet contract; no third-party bundler or EntryPoint is involved. - No external dependencies - Strails does not use UserOperations, paymasters, or the ERC-4337 singleton EntryPoint.
Smart Wallet vs ERC-4337
Key Contract Functions
Withdrawing Tokens
Because your EOA owns the Smart Wallet, you withdraw tokens by callingexecute() on the wallet contract. The wallet then calls the token’s transfer() function internally, so the tokens move from the wallet contract to any recipient address you specify.
- Block Explorer
- ethers.js
- viem
Use Basescan’s built-in write interface - no code required.
- Open your wallet contract on Basescan (or Etherscan for Ethereum).
- Go to Contract -> Write Contract.
- Click Connect to Web3 and connect the MetaMask wallet that is the owner EOA.
- Expand the
executefunction and fill in the three parameters:
To build the
data hex string, run the following snippet locally and paste the output into the data field:- Click Write and confirm the transaction in MetaMask.
Important Notes
- Gas fees - the owner EOA pays gas in the native token (ETH on Base and Ethereum). Keep a small ETH balance in the owner wallet for transaction fees.
- Token decimals - cNGN uses 6 decimal places. Always confirm the target token’s
decimals()value before encoding amounts to avoid over- or under-withdrawing. - Ownership - only the current owner EOA can call
execute()orchangeOwner(). Verify ownership on-chain before attempting a withdrawal, especially after any ownership transfer. - Liquidity locks - if the Smart Wallet has active FX orders on the Strails orderbook, a portion of the balance may be locked as collateral. Treat your available balance as total balance minus any locked amount.
Related
Wallet Management API
API endpoints for creating and managing Smart Wallets
Transactions API
Execute transfers, swaps, and onramp operations
MPC Wallet
Threshold-signing custody for the USDC/USDT FX leg
Multi-Chain Wallet
HSM-managed execution wallet for cross-chain operations