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.
Function Signature
Future<YieldXyzTrackTransactionResponse> track(
String transactionId,
String txHash,
)
Description
Submit a blockchain transaction hash to update the status of a yield action. Use this after broadcasting a transaction to link the on-chain hash with the yield action.
Parameters
| Parameter | Type | Required | Description |
|---|
transactionId | String | Yes | The yield transaction ID to update |
txHash | String | Yes | The blockchain transaction hash |
Returns
YieldXyzTrackTransactionResponse - An object containing:
| Property | Type | Description |
|---|
success | bool | Whether the tracking was successful |
transactionId | String | The tracked transaction ID |
status | YieldXyzActionTransactionStatus? | Updated transaction status (notFound, created, blocked, waitingForSignature, signed, broadcasted, pending, confirmed, failed, skipped) |
transaction | YieldXyzActionTransaction? | Full transaction details |
Example
import 'package:portal_flutter/portal_flutter.dart';
final portal = Portal();
final response = await portal.yieldIntegrations.yieldxyz.track(
'transaction-id-123',
'0xabcdef1234567890...',
);
print('Tracked: ${response.success}');
print('Status: ${response.status}');
Errors
| Code | Description |
|---|
NOT_INITIALIZED | Portal was not initialized |
YIELD_FAILED | Failed to track yield transaction |