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:
- Visit HTML+JS Dapp
- Visit HTML+React Dapp
- Visit Native HTML dapp
- Run Run in Wallet…Open in IDE…
Source code:
- dapp connection code: GCScript DSL
- frontend (using @gamechanger-finance/gc): HTML+JS dapp
- frontend (using @gamechanger-finance/gc): HTML+React dapp
- frontend (without official library): Native HTML dapp
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
Resources
- How to connect?
- Docs and examples on Github
- GCScript documentation
- Playground IDE in GameChanger Wallet
- Tutorials on Youtube
- Support on Discord
- News on Twitter
- Website
License
MIT
