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

# delegations.transferAndSubmit

> Transfer tokens as a delegate, then sign and broadcast it in one call.

## Function Signature

```dart theme={null}
Future<List<String>> transferAndSubmit({
  required String chain,
  required String token,
  required String fromAddress,
  required String toAddress,
  required String amount,
  void Function(DelegationSubmitProgress)? onProgress,
})
```

## Description

Builds the delegated transfer transaction(s), then signs and broadcasts each one in order and returns the resulting hashes. The wallet's signer is wired up for you, and EVM and Solana chains are routed to `eth_sendTransaction` and `sol_signAndSendTransaction` respectively.

The calling wallet must already be an approved delegate of `fromAddress`, and `amount` must not exceed the approved allowance.

<Warning>
  This method returns as soon as each transaction is accepted by the network. It **does not wait for on-chain confirmation** — a returned hash means the transaction was submitted, not that it succeeded. A delegated transfer can still revert (for example if the allowance was spent or revoked in the meantime).
</Warning>

Use [`delegations.transferFrom`](./delegations-transferfrom) instead when you need to inspect, modify, or sign the transaction yourself.

## Parameters

| Parameter     | Type                                       | Required | Description                                                                                                     |
| ------------- | ------------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------- |
| `chain`       | `String`                                   | Yes      | CAIP-2 chain ID (e.g., `"eip155:11155111"` for Sepolia, `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"` for Solana) |
| `token`       | `String`                                   | Yes      | Token symbol or address (e.g., `"USDC"`)                                                                        |
| `fromAddress` | `String`                                   | Yes      | The owner's address (the wallet that approved the delegation)                                                   |
| `toAddress`   | `String`                                   | Yes      | The recipient's address                                                                                         |
| `amount`      | `String`                                   | Yes      | The amount to transfer (e.g., `"50.0"`)                                                                         |
| `onProgress`  | `void Function(DelegationSubmitProgress)?` | No       | Called as each transaction is signed and submitted                                                              |

See [`delegations.approveAndSubmit`](./delegations-approveandsubmit#delegationsubmitprogress) for the `DelegationSubmitProgress` fields.

## Returns

**`List<String>`** — One transaction hash per broadcast transaction, in submission order. Most delegation flows produce a single transaction, so the list usually has one element.

## Example

### EVM

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final hashes = await portal.delegations.transferAndSubmit(
  chain: 'eip155:11155111',
  token: 'USDC',
  fromAddress: '0xowner...',
  toAddress: '0xrecipient...',
  amount: '50.0',
  onProgress: (progress) {
    print('${progress.step.value} ${progress.index + 1}/${progress.total}');
  },
);

print('Tx hashes: $hashes');
```

### Solana

```dart theme={null}
final hashes = await portal.delegations.transferAndSubmit(
  chain: 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1',
  token: 'USDC',
  fromAddress: 'OWNER_SOLANA_ADDRESS',
  toAddress: 'RECIPIENT_SOLANA_ADDRESS',
  amount: '50.0',
);

print('Tx signatures: $hashes');
```

## Errors

All failures throw a `PortalException`.

| Code                                   | Description                                                                                                               |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `NOT_INITIALIZED`                      | Portal was not initialized                                                                                                |
| `DELEGATION_TRANSFER_AND_SUBMIT_ERROR` | Building, signing, or broadcasting failed. The `message` carries the reason — usually the API, or Native SDK's own error. |

## Related

* [Manage Token Delegations guide](../guide/delegations)
* [delegations.transferFrom](./delegations-transferfrom)
* [delegations.approveAndSubmit](./delegations-approveandsubmit)
* [delegations.revokeAndSubmit](./delegations-revokeandsubmit)
