---
source: crates/aiken-project/src/blueprint/validator.rs
description: "Code:\n\n/// On-chain state\ntype State {\n    /// The contestation period as a number of seconds\n    contestationPeriod: ContestationPeriod,\n    /// List of public key hashes of all participants\n    parties: List<Party>,\n    utxoHash: Hash<Blake2b_256>,\n}\n\n/// A Hash digest for a given algorithm.\ntype Hash<alg> = ByteArray\n\ntype Blake2b_256 { Blake2b_256 }\n\n/// Whatever\ntype ContestationPeriod {\n  /// A positive, non-zero number of seconds.\n  ContestationPeriod(Int)\n}\n\ntype Party =\n  ByteArray\n\ntype Input {\n    CollectCom\n    Close\n    /// Abort a transaction\n    Abort\n}\n\nvalidator {\n  fn simplified_hydra(datum: State, redeemer: Input, ctx: Data) {\n    True\n  }\n}\n"
---
{
  "title": "test_module.simplified_hydra",
  "datum": {
    "title": "datum",
    "schema": {
      "$ref": "#/definitions/test_module~1State"
    }
  },
  "redeemer": {
    "title": "redeemer",
    "schema": {
      "$ref": "#/definitions/test_module~1Input"
    }
  },
  "compiledCode": "59020c010000323232323232323223232232253330074a22930a998042491856616c696461746f722072657475726e65642066616c736500136563232533300730050011533300b300a37540062930a998040010b0a99980399b874800800454ccc02cc028dd50018a4c2a660100042c2a66600e66e1d20040011533300b300a37540062930a998040010b0a998040010b18041baa0024910f72656465656d65723a20496e70757400325333004300230063754006264a6660120022a6600c0042c26464a6660160022a660100082c26464a66601a0022a6601400c2c264a66601c6020004264649319198008008029129998088008a4c26466006006602800464a66666602a0022a6601e0162c2a6601e0162c2a6601e0162c2a6601e0162c26eb8004c0480054ccc028c020c030dd500289929998078008a998060040b099299980818090010a4c2a6601a0122c64a6666660260022a6601a0122c2a6601a0122c2a6601a0122c26eb400454cc03402458c040004c034dd50028a998058038b0a998058038b1929999998088008a998058038b0a998058038b0a998058038b0a998058038b09bae001300e001300e00232533333300f001153300900516153300900516137580022a6601200a2c2a6601200a2c601800260180046014002600e6ea800c54cc014004592410c646174756d3a20537461746500370e90002b9a5738aae7555cf2ab9f5742ae895d21",
  "hash": "00afb22f455f153ff88ff64931ede03ed70a5d96b15c25ad2c691160",
  "definitions": {
    "ByteArray": {
      "dataType": "bytes"
    },
    "Int": {
      "dataType": "integer"
    },
    "List$ByteArray": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/ByteArray"
      }
    },
    "test_module/ContestationPeriod": {
      "title": "ContestationPeriod",
      "description": "Whatever",
      "anyOf": [
        {
          "title": "ContestationPeriod",
          "description": "A positive, non-zero number of seconds.",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/Int"
            }
          ]
        }
      ]
    },
    "test_module/Input": {
      "title": "Input",
      "anyOf": [
        {
          "title": "CollectCom",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "Close",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        },
        {
          "title": "Abort",
          "description": "Abort a transaction",
          "dataType": "constructor",
          "index": 2,
          "fields": []
        }
      ]
    },
    "test_module/State": {
      "title": "State",
      "description": "On-chain state",
      "anyOf": [
        {
          "title": "State",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "contestationPeriod",
              "description": "The contestation period as a number of seconds",
              "$ref": "#/definitions/test_module~1ContestationPeriod"
            },
            {
              "title": "parties",
              "description": "List of public key hashes of all participants",
              "$ref": "#/definitions/List$ByteArray"
            },
            {
              "title": "utxoHash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    }
  }
}
