Skip to main content

Function Signature

Description

Builds an unsigned EIP-155 transaction via the Portal backend. The returned payload is ready to be signed and submitted using portal.request(method: 'eth_sendTransaction', ...).

Parameters

Returns

PortalBuildEip155TransactionResponse — the unsigned transaction plus metadata.

PortalEip155Transaction

PortalBuildTransactionMetadata

Examples

Native ETH transfer

ERC-20 token transfer

Build, then sign and submit

buildEip155Transaction only constructs the transaction — pass the result to request to actually sign and broadcast it:

Errors

Throws a PortalException on failure:
Always also check response.error — the backend may signal a soft failure (e.g. a non-fatal warning about insufficient balance) without throwing.

Implementation Notes

  • amount is the human-readable value. The Portal backend handles decimal conversion based on the token. Pass "0.001" for 0.001 ETH, not "1000000000000000".
  • For native transfers, use the symbol "ETH" (or the chain’s native symbol). For tokens, use the contract address.
  • chainId must start with eip155:. Use buildSolanaTransaction for Solana.