APIs
The OLA JSON RPC API provides interfaces for interacting with the OLA Virtual Machine, enabling functionalities such as sending transactions, querying transaction details, and invoking contract functions. Below is the list of currently supported APIs along with their usage instructions.
API Overview
1. ola_sendRawTransaction
Description: Sends a signed and serialized transaction to the OLA network.
Parameters:
tx_bytes
: The signed and serialized transaction data in hexadecimal string format.
curl example :
Output:
2. ola_getTransactionDetails
Description: Queries the execution details of a specified transaction.
Parameters:
hash
: The hash of the transaction in hexadecimal string format.
curl example:
Output:
3. ola_callTransaction
Description: Queries data, typically used for invoking read-only functions of a smart contract.
Parameters:
call_request
: An object containing the call information, with fields as follows:from
: The address of the caller in hexadecimal string format.to
: The contract address in hexadecimal string format.data
: The call data in hexadecimal string format.
curl example:
Output:
General Information
Request Method: POST
Content-Type:
application/json
Protocol Version: JSON RPC 2.0
RPC Endpoint:
https://pre-alpha-api.olavm.com
is the RPC address to which API calls should be sent.
When utilizing these APIs, ensure that you have the necessary permissions and that the parameters are formatted correctly. For all requests, it is crucial to check the returned data to verify the results of the operation.
Last updated