{
  "preamble": {
    "title": "aiken/amm_dex_v2",
    "description": "Aiken contracts for project 'aiken/amm_dex_v2'",
    "version": "0.0.0",
    "plutusVersion": "v2",
    "compiler": {
      "name": "Aiken",
      "version": "v1.0.24-alpha+982eff4"
    },
    "license": "Apache-2.0"
  },
  "validators": [
    {
      "title": "always_success.spend",
      "datum": {
        "title": "_d",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "redeemer": {
        "title": "_r",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "compiledCode": "583c0100003232323232222533300432323253330073370e900118041baa00114a22c60120026012002600c6ea8004526136565734aae7555cf2ba157441",
      "hash": "b2501c9e7fd3545b47071b5eb5e657eb121e99c442537defcd503889"
    },
    {
      "title": "authen_minting_policy.validate_authen",
      "redeemer": {
        "title": "redeemer",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1AuthenRedeemer"
        }
      },
      "parameters": [
        {
          "title": "out_ref",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1OutputReference"
          }
        }
      ],
      "compiledCode": "[encoded data, 9302 characters]",
      "hash": "c91bb7e2a9d24359b49377d34cc06bcca5b522681b039e6e8805104f"
    },
    {
      "title": "authen_minting_policy.validate_spend_global_setting",
      "datum": {
        "title": "datum",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1GlobalSetting"
        }
      },
      "redeemer": {
        "title": "_redeemer",
        "schema": {
          "$ref": "#/definitions/RedeemerWrapper$Data"
        }
      },
      "parameters": [
        {
          "title": "out_ref",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1OutputReference"
          }
        }
      ],
      "compiledCode": "[encoded data, 9302 characters]",
      "hash": "c91bb7e2a9d24359b49377d34cc06bcca5b522681b039e6e8805104f"
    },
    {
      "title": "factory_validator.validate_factory",
      "datum": {
        "title": "datum",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1FactoryDatum"
        }
      },
      "redeemer": {
        "title": "redeemer",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1FactoryRedeemer"
        }
      },
      "parameters": [
        {
          "title": "authen_policy_id",
          "schema": {
            "$ref": "#/definitions/ByteArray"
          }
        },
        {
          "title": "pool_address",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1credential~1Address"
          }
        },
        {
          "title": "pool_batching_stake_credential",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
          }
        }
      ],
      "compiledCode": "[encoded data, 6468 characters]",
      "hash": "05097567549acb519229a85d2332cb50c20907096affc91d35e58b49"
    },
    {
      "title": "order_validator.validate_expired_order_cancel",
      "redeemer": {
        "title": "_redeemer",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "compiledCode": "[encoded data, 5708 characters]",
      "hash": "c8b0cc61374d409ff9c8512317003e7196a3e4d48553398c656cc124"
    },
    {
      "title": "order_validator.validate_order",
      "datum": {
        "title": "raw_datum",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "redeemer": {
        "title": "raw_redeemer",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "parameters": [
        {
          "title": "pool_batching_credential",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
          }
        },
        {
          "title": "expired_order_cancel_credential",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
          }
        }
      ],
      "compiledCode": "[encoded data, 5148 characters]",
      "hash": "9fc0facf1f5d8af87989089b6f105d8cdf301c359039a1288f44f428"
    },
    {
      "title": "pool_validator.validate_pool",
      "datum": {
        "title": "datum",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1PoolDatum"
        }
      },
      "redeemer": {
        "title": "redeemer",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1PoolRedeemer"
        }
      },
      "parameters": [
        {
          "title": "authen_policy_id",
          "schema": {
            "$ref": "#/definitions/ByteArray"
          }
        }
      ],
      "compiledCode": "[encoded data, 7862 characters]",
      "hash": "6df8eb9630eed869470a59289e22870998949b745642e52cb126f15d"
    },
    {
      "title": "pool_validator.validate_pool_batching",
      "redeemer": {
        "title": "redeemer",
        "schema": {
          "$ref": "#/definitions/amm_dex_v2~1types~1PoolBatchingRedeemer"
        }
      },
      "parameters": [
        {
          "title": "authen_policy_id",
          "schema": {
            "$ref": "#/definitions/ByteArray"
          }
        },
        {
          "title": "pool_payment_cred",
          "schema": {
            "$ref": "#/definitions/aiken~1transaction~1credential~1Credential"
          }
        }
      ],
      "compiledCode": "[encoded data, 31130 characters]",
      "hash": "5e2a216f484e1552583178570daccc6f0265410eed8ca5be99e1aa7e"
    },
    {
      "title": "sample_multi_sign.withdraw",
      "redeemer": {
        "title": "_redeemer",
        "schema": {
          "$ref": "#/definitions/Data"
        }
      },
      "compiledCode": "5903170100003232323232323232322253330053370e900018020008a999802991919191919191919191919191919299980a19b8748010c04c0304c8c94ccc058cdc3a4000602a00226464a66603066e1d200230170011323232533301b3370e9000180d0008991919191919191919299981219b8748010c08c0044c8c8c8c8c8cc004004008894ccc0b4004528899192999816191980080080d1129998188008a501323253330303371e00400c29444cc010010004c0d4008dd718198008998020020008a503031002375c605e0026eb0c0b0c094008c94ccc09ccdc3a400000226464a666058605e0042649319198008008011129998170008a4c2646600600660640046eb8c0c000458dd6181680098128010b1812800981500098110008b181400098140009813800980f00098120009812000980d8009810800980c8008b191980080080811299980f8008a6103d87a800013232533301e323232323232323253330263370e9001000899b8f375c6056604800401a2940c090004c0a4004c084004c09c004c07c004c094004c094004c0700084cdd2a40006604400497ae013300400400130230023021001375c603c002602c0022c603800260280022c603400260240182c6eb0c060004c060004c05c004c058004c054004c050004c04c004c048008dd618080009808000980380198068009806801180580098018008a4c26cac264464a6660106464646464646464646464646464a66602c66e1d2002301500b13232323300100100222533301d00114a226464a666038646600200201044a66604200229404c8c94ccc080cdc78010030a511330040040013025002375c60460022660080080022940c084008dd7180f8009bac301c00130140131637586034002603400260320026030002602e002602c002602a00260280026026002601400660200026020004601c002600c00429309b2b19299980419b87480000044c8c94ccc034c0400084c926323300100100222533300f00114984c8cc00c00cc04c008dd718088008b1bac300e0013006005163006004300a3003001230053754002460066ea80055cd2ab9d5573caae7d5d02ba157441",
      "hash": "128cacae8708a0f45d04b6b15e7b72b7ee76013704bbfaf4b91503c2"
    },
    {
      "title": "sample_multi_sign.spend",
      "datum": {
        "title": "datum",
        "schema": {
          "$ref": "#/definitions/sample_multi_sign~1MultiSignDatum"
        }
      },
      "redeemer": {
        "title": "_redeemer",
        "schema": {
          "$ref": "#/definitions/RedeemerWrapper$Data"
        }
      },
      "compiledCode": "5903170100003232323232323232322253330053370e900018020008a999802991919191919191919191919191919299980a19b8748010c04c0304c8c94ccc058cdc3a4000602a00226464a66603066e1d200230170011323232533301b3370e9000180d0008991919191919191919299981219b8748010c08c0044c8c8c8c8c8cc004004008894ccc0b4004528899192999816191980080080d1129998188008a501323253330303371e00400c29444cc010010004c0d4008dd718198008998020020008a503031002375c605e0026eb0c0b0c094008c94ccc09ccdc3a400000226464a666058605e0042649319198008008011129998170008a4c2646600600660640046eb8c0c000458dd6181680098128010b1812800981500098110008b181400098140009813800980f00098120009812000980d8009810800980c8008b191980080080811299980f8008a6103d87a800013232533301e323232323232323253330263370e9001000899b8f375c6056604800401a2940c090004c0a4004c084004c09c004c07c004c094004c094004c0700084cdd2a40006604400497ae013300400400130230023021001375c603c002602c0022c603800260280022c603400260240182c6eb0c060004c060004c05c004c058004c054004c050004c04c004c048008dd618080009808000980380198068009806801180580098018008a4c26cac264464a6660106464646464646464646464646464a66602c66e1d2002301500b13232323300100100222533301d00114a226464a666038646600200201044a66604200229404c8c94ccc080cdc78010030a511330040040013025002375c60460022660080080022940c084008dd7180f8009bac301c00130140131637586034002603400260320026030002602e002602c002602a00260280026026002601400660200026020004601c002600c00429309b2b19299980419b87480000044c8c94ccc034c0400084c926323300100100222533300f00114984c8cc00c00cc04c008dd718088008b1bac300e0013006005163006004300a3003001230053754002460066ea80055cd2ab9d5573caae7d5d02ba157441",
      "hash": "128cacae8708a0f45d04b6b15e7b72b7ee76013704bbfaf4b91503c2"
    }
  ],
  "definitions": {
    "Bool": {
      "title": "Bool",
      "anyOf": [
        {
          "title": "False",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "True",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        }
      ]
    },
    "ByteArray": {
      "dataType": "bytes"
    },
    "Data": {
      "title": "Data",
      "description": "Any Plutus data."
    },
    "Int": {
      "dataType": "integer"
    },
    "List$ByteArray": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/ByteArray"
      }
    },
    "List$Int": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/Int"
      }
    },
    "List$Option$Int": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/Option$Int"
      }
    },
    "List$amm_dex_v2/types/PoolAuthorizationMethod": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
      }
    },
    "Option$ByteArray": {
      "title": "Optional",
      "anyOf": [
        {
          "title": "Some",
          "description": "An optional value.",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/ByteArray"
            }
          ]
        },
        {
          "title": "None",
          "description": "Nothing.",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        }
      ]
    },
    "Option$Int": {
      "title": "Optional",
      "anyOf": [
        {
          "title": "Some",
          "description": "An optional value.",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/Int"
            }
          ]
        },
        {
          "title": "None",
          "description": "Nothing.",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        }
      ]
    },
    "Option$aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential": {
      "title": "Optional",
      "anyOf": [
        {
          "title": "Some",
          "description": "An optional value.",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
            }
          ]
        },
        {
          "title": "None",
          "description": "Nothing.",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        }
      ]
    },
    "RedeemerWrapper$Data": {
      "title": "Wrapped Redeemer",
      "description": "A redeemer wrapped in an extra constructor to make multi-validator detection possible on-chain.",
      "anyOf": [
        {
          "dataType": "constructor",
          "index": 1,
          "fields": [
            {
              "$ref": "#/definitions/Data"
            }
          ]
        }
      ]
    },
    "aiken/transaction/OutputReference": {
      "title": "OutputReference",
      "description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",
      "anyOf": [
        {
          "title": "OutputReference",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "transaction_id",
              "$ref": "#/definitions/aiken~1transaction~1TransactionId"
            },
            {
              "title": "output_index",
              "$ref": "#/definitions/Int"
            }
          ]
        }
      ]
    },
    "aiken/transaction/TransactionId": {
      "title": "TransactionId",
      "description": "A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.",
      "anyOf": [
        {
          "title": "TransactionId",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "hash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    },
    "aiken/transaction/credential/Address": {
      "title": "Address",
      "description": "A Cardano `Address` typically holding one or two credential references.\n\n Note that legacy bootstrap addresses (a.k.a. 'Byron addresses') are\n completely excluded from Plutus contexts. Thus, from an on-chain\n perspective only exists addresses of type 00, 01, ..., 07 as detailed\n in [CIP-0019 :: Shelley Addresses](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0019/#shelley-addresses).",
      "anyOf": [
        {
          "title": "Address",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "payment_credential",
              "$ref": "#/definitions/aiken~1transaction~1credential~1Credential"
            },
            {
              "title": "stake_credential",
              "$ref": "#/definitions/Option$aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
            }
          ]
        }
      ]
    },
    "aiken/transaction/credential/Credential": {
      "title": "Credential",
      "description": "A general structure for representing an on-chain `Credential`.\n\n Credentials are always one of two kinds: a direct public/private key\n pair, or a script (native or Plutus).",
      "anyOf": [
        {
          "title": "VerificationKeyCredential",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/ByteArray"
            }
          ]
        },
        {
          "title": "ScriptCredential",
          "dataType": "constructor",
          "index": 1,
          "fields": [
            {
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    },
    "aiken/transaction/credential/Referenced$aiken/transaction/credential/Credential": {
      "title": "Referenced",
      "description": "Represent a type of object that can be represented either inline (by hash)\n or via a reference (i.e. a pointer to an on-chain location).\n\n This is mainly use for capturing pointers to a stake credential\n registration certificate in the case of so-called pointer addresses.",
      "anyOf": [
        {
          "title": "Inline",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/aiken~1transaction~1credential~1Credential"
            }
          ]
        },
        {
          "title": "Pointer",
          "dataType": "constructor",
          "index": 1,
          "fields": [
            {
              "title": "slot_number",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "transaction_index",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "certificate_index",
              "$ref": "#/definitions/Int"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/Asset": {
      "title": "Asset",
      "anyOf": [
        {
          "title": "Asset",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "policy_id",
              "$ref": "#/definitions/ByteArray"
            },
            {
              "title": "asset_name",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/AuthenRedeemer": {
      "title": "AuthenRedeemer",
      "anyOf": [
        {
          "title": "DexInitialization",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "CreatePool",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        }
      ]
    },
    "amm_dex_v2/types/FactoryDatum": {
      "title": "FactoryDatum",
      "anyOf": [
        {
          "title": "FactoryDatum",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "head",
              "$ref": "#/definitions/ByteArray"
            },
            {
              "title": "tail",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/FactoryRedeemer": {
      "title": "FactoryRedeemer",
      "anyOf": [
        {
          "title": "FactoryRedeemer",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "asset_a",
              "$ref": "#/definitions/amm_dex_v2~1types~1Asset"
            },
            {
              "title": "asset_b",
              "$ref": "#/definitions/amm_dex_v2~1types~1Asset"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/GlobalSetting": {
      "title": "GlobalSetting",
      "anyOf": [
        {
          "title": "GlobalSetting",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "batchers",
              "$ref": "#/definitions/List$amm_dex_v2~1types~1PoolAuthorizationMethod"
            },
            {
              "title": "pool_fee_updater",
              "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
            },
            {
              "title": "fee_sharing_taker",
              "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
            },
            {
              "title": "pool_stake_key_updater",
              "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
            },
            {
              "title": "pool_dynamic_fee_updater",
              "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
            },
            {
              "title": "admin",
              "$ref": "#/definitions/amm_dex_v2~1types~1PoolAuthorizationMethod"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/PoolAuthorizationMethod": {
      "title": "PoolAuthorizationMethod",
      "anyOf": [
        {
          "title": "PAMSignature",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "pub_key_hash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        },
        {
          "title": "PAMSpendScript",
          "dataType": "constructor",
          "index": 1,
          "fields": [
            {
              "title": "script_hash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        },
        {
          "title": "PAMWithdrawScript",
          "dataType": "constructor",
          "index": 2,
          "fields": [
            {
              "title": "script_hash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/PoolBatchingRedeemer": {
      "title": "PoolBatchingRedeemer",
      "anyOf": [
        {
          "title": "PoolBatchingRedeemer",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "batcher_index",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "orders_fee",
              "$ref": "#/definitions/List$Int"
            },
            {
              "title": "input_indexes",
              "$ref": "#/definitions/ByteArray"
            },
            {
              "title": "pool_input_indexes_opt",
              "$ref": "#/definitions/Option$ByteArray"
            },
            {
              "title": "vol_fees",
              "$ref": "#/definitions/List$Option$Int"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/PoolDatum": {
      "title": "PoolDatum",
      "anyOf": [
        {
          "title": "PoolDatum",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "pool_batching_stake_credential",
              "$ref": "#/definitions/aiken~1transaction~1credential~1Referenced$aiken~1transaction~1credential~1Credential"
            },
            {
              "title": "asset_a",
              "$ref": "#/definitions/amm_dex_v2~1types~1Asset"
            },
            {
              "title": "asset_b",
              "$ref": "#/definitions/amm_dex_v2~1types~1Asset"
            },
            {
              "title": "total_liquidity",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "reserve_a",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "reserve_b",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "base_fee_a_numerator",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "base_fee_b_numerator",
              "$ref": "#/definitions/Int"
            },
            {
              "title": "fee_sharing_numerator_opt",
              "$ref": "#/definitions/Option$Int"
            },
            {
              "title": "allow_dynamic_fee",
              "$ref": "#/definitions/Bool"
            }
          ]
        }
      ]
    },
    "amm_dex_v2/types/PoolRedeemer": {
      "title": "PoolRedeemer",
      "anyOf": [
        {
          "title": "Batching",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "UpdatePoolParameters",
          "dataType": "constructor",
          "index": 1,
          "fields": [
            {
              "title": "action",
              "$ref": "#/definitions/amm_dex_v2~1types~1UpdatePoolParametersAction"
            }
          ]
        },
        {
          "title": "WithdrawFeeSharing",
          "dataType": "constructor",
          "index": 2,
          "fields": []
        }
      ]
    },
    "amm_dex_v2/types/UpdatePoolParametersAction": {
      "title": "UpdatePoolParametersAction",
      "anyOf": [
        {
          "title": "UpdatePoolFee",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "UpdateDynamicFee",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        },
        {
          "title": "UpdatePoolStakeCredential",
          "dataType": "constructor",
          "index": 2,
          "fields": []
        }
      ]
    },
    "sample_multi_sign/MultiSignDatum": {
      "title": "MultiSignDatum",
      "anyOf": [
        {
          "title": "MultiSignDatum",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "pub_key_hashes",
              "$ref": "#/definitions/List$ByteArray"
            }
          ]
        }
      ]
    }
  }
}