Skip to main content

Cardano Example Dapp

Deploy Plutus Script​

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/

Try it online:​

Source code:​

Dapp code was autogenerated by Playground IDE in GameChanger Wallet

GCScript code (dapp connection):​

{
"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
}
}
}
}
}
}
}

Run standalone QR dapp connection:​

You can use Playground IDE in GameChanger Wallet in QR URL Transport mode to capture results

This GCScript/URL is too large! make it shorter uploading parts to GCFS. Unable to generate QR code

Resources​

License​

MIT