estimate_operation_cost
Calculate computational costs for Clarity smart contract operations using SIP-012 cost functions to optimize contract performance and resource planning.
Instructions
Estimate the computational cost of specific Clarity operations based on SIP-012 cost functions. Useful for planning contract optimization.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
dataSize | Yes | Size of data being processed (e.g., list length, string length) | |
iterations | No | Number of iterations for batch operations | |
operation | Yes | Type of operation to estimate |
Input Schema (JSON Schema)
{
"properties": {
"dataSize": {
"description": "Size of data being processed (e.g., list length, string length)",
"type": "number"
},
"iterations": {
"description": "Number of iterations for batch operations",
"type": "number"
},
"operation": {
"description": "Type of operation to estimate",
"enum": [
"map-read",
"map-write",
"list-append",
"list-filter",
"string-concat",
"arithmetic",
"contract-call",
"token-transfer",
"batch-operation"
],
"type": "string"
}
},
"required": [
"operation",
"dataSize"
],
"type": "object"
}