{
  "type": "object",
  "title": "SmartContractTransactionMetadata",
  "description": "Metadata associated with a contract-deploy type transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-1-instantiating-a-smart-contract",
  "required": ["tx_type", "smart_contract"],
  "additionalProperties": false,
  "properties": {
    "tx_type": {
      "type": "string",
      "enum": ["smart_contract"]
    },
    "smart_contract": {
      "type": "object",
      "additionalProperties": false,
      "required": ["contract_id", "source_code"],
      "properties": {
        "clarity_version": {
          "type": "number",
          "description": "The Clarity version of the contract, only specified for versioned contract transactions, otherwise null",
          "nullable": true
        },
        "contract_id": {
          "type": "string",
          "description": "Contract identifier formatted as `<principaladdress>.<contract_name>`"
        },
        "source_code": {
          "type": "string",
          "description": "Clarity code of the smart contract being deployed"
        }
      }
    }
  }
}
