---
name: cdp-accounts-send
description: Sends EVM and Solana transactions using the encode-sign-send pipeline. Handles native transfers, ERC-20 transfers, and contract calls.
---

# cdp-accounts-send

Send a transaction from a server wallet. Encode → sign → send pipeline.

## Preconditions

1. CLI configured → `/cdp-setup`
2. Account exists and funded → `/cdp-accounts-create`
3. Mainnet: confirm with user before sending.

## EVM — native transfer

1. Check balance:
   ```
   cdp evm token-balances get <network> <from>
   ```

2. Encode:
   ```
   cdp util tx-encode --network <network> --to <to> --value 0.00001ether --from <from>
   ```

3. Decode and verify:
   ```
   cdp util tx-decode <0x_hex>
   ```
   Assert: `to`, `value`, `chainId` match intent.

4. Sign:
   ```
   cdp evm accounts sign transaction <from> transaction=<tx>
   ```

5. Send:
   ```
   cdp evm accounts send transaction <from> network=<network> transaction=<signedTransaction>
   ```

6. Verify balance changed:
   ```
   cdp evm token-balances get <network> <from>
   ```

## EVM — ERC-20 transfer

Encode calldata with abi-encode:
```
DATA=$(cdp util abi-encode "transfer(address,uint256)" <recipient> <amount_atomic>)
```
Then send with `to=<token_contract>`, `data=$DATA`, `value=0`.

## EVM — contract call with approval

For Permit2 or other approvals:
```
APPROVE_DATA=$(cdp util abi-encode "approve(address,uint256)" <spender> 115792089237316195423570985008687907853269984665640564039457584007913129639935)
```
Send with `to=<token_contract>`, `data=$APPROVE_DATA`, `value=0`.

## Solana — SOL transfer

1. Encode:
   ```
   cdp util tx-encode --network solana-devnet --to <to> --value <lamports> --from <from>
   ```

2. Sign:
   ```
   cdp solana accounts sign transaction <from> transaction=<base64>
   ```

3. Send:
   ```
   cdp solana accounts send transaction network=solana-devnet transaction=<signedTransaction>
   ```

4. Verify:
   ```
   cdp solana token-balances get solana-devnet <from>
   ```

If `InsufficientFundsForRent` → reduce amount.

## Solana — SPL token transfer

```
cdp util tx-encode --network solana-devnet --to <recipient> --value <atomic_units> --from <sender> --token <mint_address>
```
Value is in atomic token units (e.g., 1000000 for 1 USDC with 6 decimals).

Then sign and send as above.

## Notes

- Use `0.00001ether` (not `0.0001ether`) for test sends — stays under default policy threshold of 50000000000000 wei.
- Smart accounts cannot use encode→sign→send. Use `cdp evm smart-accounts user-operations prepare-and-send` instead.
- Always verify balance after send to confirm the transaction landed.
