Contract
A Contract Blockchain API allows you to interact with smart contracts on a Zetrix blockchain network programmatically. Smart contracts are agreements that execute automatically when certain conditions are met, and they are stored on the blockchain.
With a Contract Blockchain API, developers can automate the interaction with these smart contracts, allowing them to build decentralized applications (DApps) and more complex blockchain-based systems.
This API typically uses a set of methods to interact with smart contracts, including methods to write data to the blockchain, read data from the blockchain, and execute smart contract functions.
Query Contract
HTTP POST /ztx/contract/query-addressCURL Command
curl POST https://{endpoint}/ztx/contract/query-addressFunction
To query all the contract based contract key.
The body is in json format
Here body transfer is the transaction data. For specific json format and parameters, see Transaction Structure. Example:
{
"address": "",
"method": "",
"inputParameters": {
}
}Return Value
Invoke Contract – History Filter
Query Parameters
address
string
No
Contract address
status
string
No
Transaction status (INITIATED, SUBMITTED, etc.)
contractKey
string
No
Contract key
txInitiator
string
No
Transaction initiator address
txHash
string
No
Transaction hash
method
string
No
Contract method name
createdDateFrom
string
No
Start date (ISO format)
createdDateTo
string
No
End date (ISO format)
page
integer
No
Page number (default: 0)
pageSize
integer
No
Page size (default: 10)
sort
string
No
Field to sort by
isAsc
boolean
No
Sort ascending (true/false)
CURL Command
Function
Retrieve contract transaction history with optional filtering and pagination.
Return Value
Invoke Contract - Generate Blob
CURL Command
Function
Generate a blob.
The body is in json format
Here body transfer is the transaction data. For specific json format and parameters, see Transaction Structure. Example:
Return Value
Invoke Contract - Sign Blob
CURL Command
Function
To sign transaction blob.
The body is in json format
Here body transfer is the transaction data. For specific json format and parameters, see Transaction Structure. Example:
Return Value
Invoke Contract - Submit
CURL Command
Function
To invoke data to contract.
The body is in json format
Here body transfer is the transaction data. For specific json format and parameters, see Transaction Structure. Example:
Return Value
Last updated