estimate_deploy_cost
Estimates gas cost of deploying a DVM-BASIC smart contract, returns gascompute, gasstorage, and a plain-text breakdown explaining each value.
Instructions
Composite: send a DVM-BASIC contract source to the daemon's gas estimator, then return the raw estimate alongside a plain-text breakdown (what each gas number means), the parsed contract surface, and curated DVM deploy docs as citations.
When to call: BEFORE asking a wallet to broadcast a deploy transaction, OR when explaining the cost of a contract to a user. PREFER this over chaining dero_get_gas_estimate yourself: this composite already explains gascompute vs gasstorage in plain language, parses the SC source to show what functions the user is about to deploy (reusing extractScSurface from explain_smart_contract), and protects against fabricating a breakdown when the daemon reports 0/0 with a non-OK status.
Input Requirements:
scis REQUIRED. The full DVM-BASIC contract source — must contain at least oneFunction ... End Functionblock. A function body alone will fail with INVALID_INPUT.signeris OPTIONAL. A dero1.../deto1... address that will sign the eventual deploy tx. The daemon uses it for fee context; omitting it still returns a meaningful estimate.include_breakdownis OPTIONAL (default true). Set false when you only need the raw numbers (e.g. piping into a fee table).
Output: { estimate: { gascompute, gasstorage, status }, breakdown: { compute_note, storage_note, total_units } | null, signer_used, include_breakdown, sc_surface: { functions, stringkeys, uint64keys, raw_code_length, function_count }, related_docs }. breakdown is null when include_breakdown=false OR when the daemon returned 0/0 with a non-OK status (never fabricated). On DVM compile failure the composite returns a structured _meta.error with code INVALID_INPUT and the daemon's exact compile message in _meta.error.raw.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sc | Yes | DVM-BASIC contract source to deploy. MUST be the full contract (Function ... End Function blocks), not a function body alone. | |
| signer | No | Optional dero1.../deto1... signer for the eventual deploy tx. | |
| include_breakdown | No | Default true. Set false to return raw estimate numbers only. |