{
  "type": "script",
  "title": "Deploy Plutus Script",
  "description": "Demo that sends a transaction that includes an inlined Plutus Script and also a datum on outputs. Future transactions can reference this outputs without having to include on-chain the entire data again. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/",
  "exportAs": "PlutusDeploymentDemo",
  "return": {
    "mode": "last"
  },
  "run": {
    "stage_define_script": {
      "type": "plutusScript",
      "script": {
        "scriptHex": "4746010000222499",
        "lang": "plutus_v2"
      }
    },
    "stage_build_transaction": {
      "type": "buildTx",
      "title": "Deploy Plutus Script",
      "description": "Demo that sends a transaction that includes an inlined Plutus Script and also a datum on outputs. Future transactions can reference this outputs without having to include on-chain the entire data again. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/",
      "name": "Unsigned Smart Contract Deployment",
      "tx": {
        "outputs": [
          {
            "address": "addr1qxmuaem37em6w7uf2y4u38tppsmqyq6vz4f5syudpnzfduntav86sqsfxyanfcq62yarewag2jtj6uewltfnqmpnxcjs49k43d",
            "script": {
              "scriptRefHex": "{get('cache.stage_define_script.scriptRefHex')}"
            }
          },
          {
            "address": "addr1qxmuaem37em6w7uf2y4u38tppsmqyq6vz4f5syudpnzfduntav86sqsfxyanfcq62yarewag2jtj6uewltfnqmpnxcjs49k43d",
            "datum": {
              "datumHex": "1a0027ac40"
            }
          }
        ],
        "options": {
          "changeOptimizer": "NO"
        }
      }
    },
    "stage_sign_transaction": {
      "type": "signTxs",
      "namePattern": "Signed Smart Contract Deployment",
      "detailedPermissions": false,
      "txs": [
        "{get('cache.stage_build_transaction.txHex')}"
      ]
    },
    "stage_submit_transaction": {
      "type": "submitTxs",
      "namePattern": "Submitted Smart Contract Deployment",
      "txs": "{get('cache.stage_sign_transaction')}"
    },
    "stage_export_results": {
      "type": "script",
      "run": {
        "scriptInfo": {
          "type": "macro",
          "run": "{get('cache.stage_define_script')}"
        },
        "txOutput": {
          "type": "script",
          "run": {
            "txHash": {
              "type": "macro",
              "run": "{get('cache.stage_build_transaction.txHash')}"
            },
            "index": {
              "type": "data",
              "value": 0
            }
          }
        }
      }
    }
  }
}