> ## 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

> Learn how token delegations work in Portal and how to approve, revoke, and transfer tokens on behalf of delegated addresses.

## Overview

Portal's Delegations feature allows you to manage token approvals and delegated transfers across EVM and Solana chains. With delegations, you can:

* **Approve** other addresses to spend tokens on your behalf
* **Revoke** existing delegations
* **Check status** of active delegations
* **Transfer tokens** as a delegate from another address

## What are Token Delegations?

Token delegations enable one address (the owner) to authorize another address (the delegate) to transfer tokens on their behalf, up to a specified amount.

<Warning>
  **Delegations apply to ERC-20 tokens (EVM) and SPL Tokens (Solana) only. Native gas tokens such as ETH, MON, and SOL are not supported.**

  Native assets are moved via a transaction's `value` field and have no on-chain `approve` / `transferFrom` (or SPL delegate) semantics to hook into, so delegation is not a valid operation for them at the protocol level. If you need "delegated" spending of a native asset, wrap it first (e.g. ETH → WETH) and delegate the wrapped ERC-20, or use a purpose-built spend-limit module (e.g. an EIP-7702 delegated contract).
</Warning>

### EVM Chains (ERC-20)

On EVM chains, delegations work through the ERC-20 `approve` function:

1. **Owner approves** a delegate address for a specific token amount
2. **Delegate can transfer** tokens using `transferFrom` up to the approved amount
3. **Owner can revoke** by setting approval to zero

Calling any delegation endpoint with a native asset (e.g. `ETH` on Ethereum, `MON` on Monad, `SOL` on Solana) will return an error.

Common use cases:

* DEX trading (approve router to swap tokens)
* Lending protocols (approve to deposit collateral)
* NFT marketplaces (approve to list tokens)
* Gasless transactions (approve relayer to pay gas)

### Solana (SPL Token)

On Solana, delegations work through SPL Token delegate authorities:

1. **Owner delegates** authority to another address for specific token accounts
2. **Delegate can transfer** up to the delegated amount
3. **Owner can revoke** by removing the delegate authority

## Security Considerations

<Warning>
  Token delegations grant spending power over your tokens. Always:

  * Only approve trusted contracts and addresses
  * Set minimum required approval amounts
  * Revoke unused delegations
  * Regularly audit active delegations
  * Verify smart contract addresses before approval
</Warning>

### Best Practices

1. **Limit approval amounts**: Only approve the exact amount needed for a transaction
2. **Time-bound approvals**: Revoke delegations after use
3. **Monitor active delegations**: Use `getStatus()` to track approvals
4. **Validate addresses**: Always verify contract addresses from official sources
5. **Test on testnets**: Validate flows on testnet before mainnet deployment

## Supported Networks

Delegations are available on all Portal-supported EVM and Solana chains:

### EVM Networks

* Ethereum (`eip155:1`)
* Ethereum Sepolia (`eip155:11155111`)
* Polygon (`eip155:137`)
* Base (`eip155:8453`)
* Arbitrum (`eip155:42161`)
* Optimism (`eip155:10`)
* Monad (`eip155:143`)
* Monad Testnet (`eip155:10143`)
* And all other EVM chains supported by Portal

### Solana Networks

* Solana Mainnet (`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`)
* Solana Devnet (`solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1`)

For a complete list of supported chains, see [Blockchain Support](/resources/blockchain-support).

## Key Operations

### Approve Delegation

Grant permission for another address to spend tokens on your behalf.

**Parameters:**

* `chain`: CAIP-2 format chain ID (e.g., `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`)
* `token`: ERC-20 contract address (EVM) or SPL Token mint address (Solana). Native assets like ETH, MON, and SOL are not supported.
* `delegateAddress`: Address receiving approval
* `amount`: Approval amount in raw token units (as string)

**Returns:**

* Unsigned transaction(s) ready for signing
* Metadata about the approval operation

### Revoke Delegation

Remove spending permission from a previously approved address.

**Parameters:**

* `chain`: CAIP-2 format chain ID
* `token`: Token contract address or mint address
* `delegateAddress`: Address to revoke approval from

**Returns:**

* Unsigned transaction(s) to revoke the approval
* Metadata about the revocation

### Get Delegation Status

Check current approval status and balances for a token.

**Parameters:**

* `chain`: CAIP-2 format chain ID
* `token`: Token contract address or mint address
* `delegateAddress`: Address to check approval for

**Returns:**

* Current token balance
* List of active delegations with amounts
* Delegation details per address

### Transfer From

Transfer tokens as a delegate from another address to a destination.

**Parameters:**

* `chain`: CAIP-2 format chain ID
* `token`: Token identifier (symbol or address)
* `fromAddress`: Owner's address (where tokens are held)
* `toAddress`: Destination address
* `amount`: Amount to transfer (human-readable format)

**Returns:**

* Unsigned transaction(s) for the transfer
* Metadata about the transfer operation

## Transaction Flow

All delegation operations follow this flow:

1. **Call delegation method** (approve, revoke, transferFrom)
2. **Receive unsigned transaction(s)** with metadata
3. **Sign transaction** using Portal's signing methods
4. **Broadcast transaction** to the network
5. **Wait for confirmation** on-chain

<Note>
  Portal's delegation methods return **unsigned transactions** that you must sign and broadcast. They do not automatically submit transactions to the blockchain.
</Note>

## Chain-Specific Details

### EVM (Ethereum, Polygon, etc.)

* Uses standard ERC-20 `approve()` and `transferFrom()` methods
* Returns `transactions` array with unsigned transaction objects
* Each transaction includes: `from`, `to`, `data`, `value`
* Approval amounts are in wei/smallest token unit

### Solana

* Uses SPL Token delegate instructions
* Returns `encodedTransactions` array with base64-encoded transactions
* Delegations are per token account, not per mint
* Must specify exact token account addresses

## Next Steps

Ready to implement delegations in your app? Choose your platform:

* [Manage Delegations with the Enclave MPC API](/apis/enclave-mpc/guide/delegations)
* [Manage Delegations with iOS](/sdks/ios/guide/delegations)
* [Manage Delegations with Android](/sdks/android/guide/delegations)
* [Manage Delegations with React Native](/sdks/react-native/guide/delegations)
* [Manage Delegations with Web](/sdks/web/guide/delegations)

## Additional Resources

* [Portal API Methods](/sdks/react-native/guide/portal-api-methods) - Learn about Portal's API architecture
* [Chain ID Formatting](/resources/chain-id-formatting) - Understanding CAIP-2 format
* [Security Best Practices](/resources/security) - Secure your Portal integration
* [Error Codes](/resources/error-codes) - Complete error reference
* [Client Delegations API](../apis/client/reference#get-delegation-status-for-an-address) - Check delegation status for an address using the Client API
* [Custodian Delegations API](../apis/custodian/reference#get-clients-delegation-status-for-an-address) - Check delegation status for a client using the Custodian API
