Farcaster: Transaction builder icon

Farcaster: Transaction builder

Generates Farcaster frame transaction object

Overview

This node, named "Farcaster: Transaction builder," constructs transaction objects formatted for the Farcaster protocol. It is designed to generate a structured transaction frame that can be used to interact with various blockchains by specifying transaction details such as recipient, method, value, and calldata.

Common scenarios where this node is beneficial include:

  • Preparing blockchain transactions programmatically before sending them through another node or service.
  • Building custom transaction payloads for smart contract interactions on supported blockchains.
  • Integrating with decentralized applications (dApps) that require precise transaction formatting.

For example, you might use this node to build an Ethereum transaction calling a specific smart contract method with encoded calldata and then pass the output to a node that signs and broadcasts the transaction.

Properties

Name Meaning
Blockchain The target blockchain identified by its CAIP-2 chain ID. Options include Ethereum, Polygon, Optimism, Gnosis, and several testnets.
Recipient The address of the transaction recipient (e.g., a smart contract or wallet address).
Method The method identifier string representing the type of transaction request (default: eth_sendTransaction).
Value The amount of ETH to send in the transaction, represented in WEI (smallest ETH unit).
Additional Fields A collection of optional fields:
- Data: The calldata for the transaction (hex-encoded).
- ABI: JSON array describing the contract ABI including function signatures and error types.
- Attribution: Boolean flag indicating whether to include a calldata attribution suffix.

Output

The node outputs an array of JSON objects, each containing a single property json with the following structure:

{
  "chainId": "string",         // Blockchain CAIP-2 chain ID
  "method": "string",          // Transaction method identifier
  "attribution": true|false,   // Whether calldata attribution suffix is included
  "params": {
    "abi": [],                 // JSON ABI array for the transaction
    "to": "string",            // Recipient address
    "data": "string",          // Calldata hex string
    "value": "string"          // ETH value in WEI as string
  }
}

This output represents a fully constructed Farcaster transaction frame ready for further processing, signing, or broadcasting.

Dependencies

  • Requires access to blockchain identifiers in CAIP-2 format.
  • No direct external API calls or services are made within this node; it only builds transaction objects.
  • To actually send or sign these transactions, additional nodes or credentials providing blockchain connectivity and authentication will be necessary.

Troubleshooting

  • Missing Required Fields: Ensure that required properties like Blockchain and Recipient are provided; otherwise, the transaction object will be incomplete.
  • Invalid ABI Format: The ABI field must be a valid JSON array describing the contract interface. Malformed JSON or incorrect ABI structures may cause downstream errors.
  • Incorrect Data Encoding: The Data field should be properly encoded calldata (usually hex string). Incorrect encoding can lead to failed transactions.
  • Value Field Format: The Value must be a string representing the amount in WEI. Non-numeric or improperly formatted values may cause issues.
  • Unsupported Chain IDs: Using unsupported or incorrect CAIP-2 chain IDs may result in invalid transaction frames.

Links and References

Discussion