Function Signature
Description
Signs and broadcasts a transaction to the network with full control over all transaction parameters.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | String | Yes | The chain ID in CAIP-2 format |
to | String | Yes | The recipient/contract address |
from | String | No | Sender address (defaults to wallet address) |
value | String | No | Value in wei (hex string) |
data | String | No | Transaction data (hex string) |
gas | String | No | Gas limit (hex string) |
gasPrice | String | No | Gas price for legacy transactions (hex) |
maxFeePerGas | String | No | Max fee per gas for EIP-1559 (hex) |
maxPriorityFeePerGas | String | No | Max priority fee for EIP-1559 (hex) |
nonce | String | No | Transaction nonce (hex string) |
Returns
String - The transaction hash.
Example
EIP-1559 Transaction
Contract Interaction
Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
TRANSACTION_FAILED | The transaction failed |
INSUFFICIENT_FUNDS | Not enough funds for gas or value |