{
  "title": "Multi-Network script",
  "description": "Example that shows how to make multi-network protocols, meaning scripts that are prepared to run in multiple networks (and DLTs)",
  "type": "script",
  "return": {
    "mode": "last"
  },
  "exportAs": "data",
  "args": {
    "cardano-mainnet": {
      "treasury": "addr1q98f06pcrsn8x03uw0vlejw684fcu02waffvfscdsz0djgqd6j6v0fc04n5ehg292yxvs292vesrqqmxqfnp7yuwn7yq2vsyn7",
      "drep": {
        "scriptHashHex": "199ad2959c8c4e4d50a04a0f3d873b692ff86fbc6a195dd44d17b746"
      },
      "smartContract": {
        "scriptHashHex": "52c6af0c9b744b4eecce838538a52ceb155038b3de68e2bb2fa8fc37",
        "input": {
          "txHash": "672e8af629fbd480be2baf14ff9046df4a9c689ad48bc84da88531da48721f03",
          "index": 0
        },
        "lang": "plutus_v2"
      }
    },
    "cardano-preprod": {
      "treasury": "addr_test1qzfd9plgasmmt0fns8lt2m0ckrx6cpuj6tm8f6332gjjjhh8vcafzqj5tsw0n93pla5kcmyx9q73avpspxht2n6fldus2xqcsq",
      "drep": {
        "pubKeyHashHex": "f33e5bab10d98574f6277e296bdc85770a68e9d488709c1c8ff8e7f9"
      },
      "smartContract": {
        "scriptHashHex": "62bdc3d04d04376d516d31664944b25ce3affa76d17f8b5e1279b49d",
        "input": {
          "txHash": "354241b9df29ed7d7c9d6d38f789dfb31ab89db66de14e5c31bd0a89a6a10794",
          "index": 0
        },
        "lang": "plutus_v1"
      }
    }
  },
  "run": {
    "networkInfo": {
      "type": "getNetworkInfo"
    },
    "networkKey": {
      "type": "macro",
      "run": "{ join('-',get('cache.networkInfo.dltTag'),get('cache.networkInfo.networkTag')) }"
    },
    "useParameters": {
      "type": "macro",
      "run": {
        "dltTag": "{get('cache.networkInfo.dltTag')}",
        "networkTag": "{get('cache.networkInfo.networkTag')}",
        "parameters": "{ get(join('.','args',get('cache.networkKey'))) }"
      }
    }
  }
}