Skip to main content

Cardano Example Dapp

Generate 3 Gift Wallets and fund them​

Generate 3 QR Encrypted Gift Wallets for onboarding users in an event and fund them with assets on a single transaction to save on fees. Files will be downloaded as PNG files for printing or showing on screens. Password can be customized but here is autogenerated

Try it online:​

Source code:​

Dapp code was autogenerated by Playground IDE in GameChanger Wallet

GCScript code (dapp connection):​

{
"type": "script",
"title": "Generate 3 Gift Wallets and fund them",
"description": "Generate 3 QR Encrypted Gift Wallets for onboarding users in an event and fund them with assets on a single transaction to save on fees. Files will be downloaded as PNG files for printing or showing on screens. Password can be customized but here is autogenerated",
"run": {
"wallets": {
"type": "walletGenerator",
"amount": 3,
"defaultNamePattern": "Attendee {index}",
"defaultDescriptionPattern": "Wallet for Attendee #{index}",
"defaultKeyPattern": "{index}",
"defaultHintPattern": "Your password is '{password}'",
"qr": true,
"download": true,
"legacy": false
},
"assets": {
"type": "data",
"value": [
{
"policyId": "ada",
"assetName": "ada",
"quantity": "1000000"
}
]
},
"buildAirdrop": {
"type": "buildTx",
"title": "💝 Event Airdrop",
"returnURLPattern": "https://preprod.cardanoscan.io/transaction/{txHash}",
"tx": {
"outputs": [
{
"address": "{get('cache.wallets.0.address')}",
"assets": "{get('cache.assets')}"
},
{
"address": "{get('cache.wallets.1.address')}",
"assets": "{get('cache.assets')}"
},
{
"address": "{get('cache.wallets.2.address')}",
"assets": "{get('cache.assets')}"
}
],
"auxiliaryData": {
"674": {
"msg": [
"Welcome to The Event!\n",
"Onboarding you into Cardano\n",
"By GameChanger Wallet\n"
]
}
}
}
},
"signAirdrop": {
"type": "signTxs",
"txs": [
"{get('cache.buildAirdrop.txHex')}"
],
"detailedPermissions": false
},
"submitAirdrop": {
"type": "submitTxs",
"txs": "{get('cache.signAirdrop')}"
},
"finally": {
"type": "script",
"exportAs": "onboarding",
"run": {
"wallets": {
"type": "macro",
"run": "{get('cache.wallets')}"
},
"txHash": {
"type": "macro",
"run": "{get('cache.buildAirdrop.txHash')}"
}
}
}
}
}

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