query_smart_contract
Query a Qubic smart contract read-only using contract index and input type, receiving base64-encoded response data.
Instructions
Query a Qubic smart contract (read-only). Returns the contract's response data as base64-encoded bytes.
Known contracts: 1: QX (Decentralized Exchange) 2: Quottery (Betting & Oracles) 3: Random (Random Number Generation) 4: QUTIL (Utility Functions) 5: MLM (My Last Match - Gaming)
This is a low-level query tool. Use inputType to specify which contract function to call, and inputHex for the function parameters (hex-encoded bytes). If unsure about parameters, start with inputType=0 and empty input to get contract info.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contractIndex": "<contractIndex>",
"inputType": "<inputType>"
},
"name": "query_smart_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputSize | No | Size of input data in bytes (default: 0) | |
| inputType | Yes | Function input type ID (contract-specific) | |
| requestData | No | Base64-encoded input data for the contract function (default: empty) | |
| contractIndex | Yes | Smart contract index (1=QX, 2=Quottery, 3=Random, 4=QUTIL, 5=MLM) |