Cardano Example Dapp
Write registration to join Dandelion Network (GCFS)
Register your Dandelion Node Group on-chain with GCFS. Writes a json file with your Node Group definition on-chain for backend peer discovery on Dandelion, the decentralized API service for Cardano. Set the URL of your node in 'node-url'.
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):
{
"title": "Write registration to join Dandelion Network (GCFS)",
"description": "Register your Dandelion Node Group on-chain with GCFS. Writes a json file with your Node Group definition on-chain for backend peer discovery on Dandelion, the decentralized API service for Cardano. Set the URL of your node in 'node-url'.",
"type": "script",
"args": {
"name": "Test Group",
"description": "On-chain testing registration of my own Dandelion Lite node",
"ticker": "test",
"node-url": "https://ar03a.gamechanger.finance:2096/",
"asset-name": "dandelion",
"file-path": "//config/NodeGroup.json"
},
"exportAs": "data",
"return": {
"mode": "last"
},
"run": {
"identity": {
"type": "getMainIdentity"
},
"file": {
"type": "macro",
"run": [
{
"dltTag": "cardano",
"networkTag": "mainnet",
"name": "{get('args.name')}",
"description": "{get('args.description')}",
"ticker": "{get('args.ticker')}",
"group": "{get('cache.identity.scriptHashHex')}",
"disabled": false,
"nodes": [
{
"url": "{get('args.node-url')}",
"disabled": false
}
]
}
]
},
"buildTxs": {
"type": "buildFsTxs",
"name": "On-Chain Node Registration to join Dandelion Network",
"description": "Dandelion APIs Decentralized Community Service for Cardano",
"assetName": "{get('args.asset-name')}",
"mintScriptHex": "{get('cache.identity.scriptHex')}",
"replicas": "1",
"layers": [
{
"{get('args.file-path')}": {
"kind": "file",
"fileHex": "{strToHex(objToJson(get('cache.file')))}"
}
}
]
},
"signTxs": {
"detailedPermissions": false,
"type": "signTxs",
"namePattern": "GCFS_Signed_{key}",
"txs": "{get('cache.buildTxs.txList')}"
},
"submitTxs": {
"type": "submitTxs",
"mode": "parallel",
"namePattern": "GCFS_Submitted_{key}",
"txs": "{get('cache.signTxs')}"
},
"finally": {
"type": "macro",
"run": {
"name": "{get('args.name')}",
"ticker": "{get('args.ticker')}",
"asset-name": "{get('args.asset-name')}",
"node-group-ID": "{get('cache.identity.scriptHashHex')}",
"file-path": "{get('args.file-path')}"
}
}
}
}
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
.png)