> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a transaction

> Send single-chain and cross-chain transactions from a Rhinestone smart account.

Sending a transaction is a three-step flow: `prepareTransaction` fetches a quote, `signTransaction` signs it, `submitTransaction` sends it to the orchestrator. Splitting the steps lets you show the user a quote before they approve, fetch on a backend and sign on a mobile frontend, or pick a non-default route.

## Send a single-chain transaction

Pass a `chain` and a list of `calls`. The example below transfers USDC on Base Sepolia:

```ts theme={null}
import { encodeFunctionData, erc20Abi } from 'viem'
import { baseSepolia } from 'viem/chains'

const receiver = '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
const usdc = '0x036CbD53842c5426634e7929541eC2318f3dCF7e' // USDC on Base Sepolia
const usdcAmount = 1n

const prepared = await rhinestoneAccount.prepareTransaction({
  chain: baseSepolia,
  calls: [
    {
      to: usdc,
      value: 0n,
      data: encodeFunctionData({
        abi: erc20Abi,
        functionName: 'transfer',
        args: [receiver, usdcAmount],
      }),
    },
  ],
})
const signed = await rhinestoneAccount.signTransaction(prepared)
const transaction = await rhinestoneAccount.submitTransaction(signed)

const result = await rhinestoneAccount.waitForExecution(transaction)
console.log('Result', result)
```

## Send a cross-chain transaction

Swap `chain` for `sourceChains` + `targetChain`. The SDK handles bridging and routing with no separate bridge interaction required:

```ts theme={null}
import { baseSepolia, arbitrumSepolia } from 'viem/chains'

const usdc = '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d' // USDC on Arbitrum Sepolia

const prepared = await rhinestoneAccount.prepareTransaction({
  sourceChains: [baseSepolia],
  targetChain: arbitrumSepolia,
  calls: [
    {
      to: usdc,
      value: 0n,
      data: encodeFunctionData({
        abi: erc20Abi,
        functionName: 'transfer',
        args: [receiver, usdcAmount],
      }),
    },
  ],
  tokenRequests: [
    {
      address: usdc,
      amount: usdcAmount,
    },
  ],
})
const signed = await rhinestoneAccount.signTransaction(prepared)
const transaction = await rhinestoneAccount.submitTransaction(signed)

const result = await rhinestoneAccount.waitForExecution(transaction)
```

<Note>To deploy the account on a specific chain before transacting, call `await rhinestoneAccount.deploy(chain)` first. Otherwise, any transaction triggers deployment as part of the intent — token transfers, contract calls, approvals, anything.</Note>

## Custom fill deadline

A transaction's on-chain fill deadline defaults to 2 minutes. For a **same-chain transaction that settles without bridging**, extend it with `customDeadline` — an absolute unix timestamp in seconds. Useful when a user needs longer to approve, or you prepare a quote now and submit it later.

```ts theme={null}
const prepared = await rhinestoneAccount.prepareTransaction({
  chain: baseSepolia,
  calls: [
    /* … */
  ],
  customDeadline: Math.floor(Date.now() / 1000) + 3600, // 1 hour from now
})
```

The value must be between `now + 120s` and `now + 86400s` (24 hours); outside that range the request is rejected.

<Note>
  `customDeadline` is honored only on same-chain transactions that settle without bridging. On cross-chain transactions it is ignored and the default 2-minute deadline applies.
</Note>

## Next steps

<CardGroup cols={3}>
  <Card title="Crosschain" icon="arrow-right-left" href="../chain-abstraction/multi-chain-intent">
    Send funds across chains with a single signature. No bridging required.
  </Card>

  <Card title="Unified balance" icon="wallet" href="../chain-abstraction/unified-balance">
    Aggregate user balances across chains to fund any intent.
  </Card>

  <Card title="Sponsor fees" icon="fuel" href="../tutorials/sponsor-fees">
    Cover gas, bridging, and swap fees for your users.
  </Card>
</CardGroup>
