push_transaction
The push_transaction method is an EOSIO RPC call used to broadcast a signed and packed transaction to the EOS blockchain.
This method accepts a pre-signed transaction in a packed JSON format and attempts to apply it to the blockchain. It is commonly used for token transfers, contract calls, and any type of EOSIO action execution.
This method plays a crucial role in finalizing transactions after they have been created and signed—whether locally or via an external signing tool.
Example use cases:
Transaction Submission Developers and users might employ the push_transaction method to broadcast transactions to the EOS network, allowing for various interactions and operations on the blockchain.
Smart Contract Interaction Invoking actions on smart contracts deployed on the EOS blockchain is another crucial functionality of this method, granting users the ability to interface with decentralized applications.
Token Transfer For transferring EOS tokens or other tokens available on the EOS blockchain between accounts, the push_transaction method is used.
Parameters
The pushTransaction method requires the following parameters in the request body:
parameter | type | description |
|---|---|---|
signatures | string[] | An array of strings representing the signatures required to authorize the transaction. |
compression | boolean | Indicates whether compression is used for the transaction. This is typically set to `false`. |
packedContextFreeData | string | Hex-encoded representation of the context-free data associated with the transaction. |
packedTrx | string | Hex-encoded packed transaction object representing the signed and serialized EOSIO transaction. |
Returns
When successfully broadcasted, the RPC call responds with a 200 OK HTTP status.
The JSON-RPC body contains only the jsonrpc and id fields, indicating successful acceptance by the blockchain node.
field | description |
|---|---|
jsonrpc | JSON-RPC protocol version. |
id | Request identifier returned to match the original request. |
JSON-RPC Request Example
Response Example