Cardano Example Dapp
Subroutines Demo
Script that will test and explore subroutines, similar to functions in structured programming.
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": "Subroutines Demo",
"description": "Script that will test and explore subroutines, similar to functions in structured programming.",
"type": "script",
"returnURLPattern": "http://localhost:3000/demo/api/dapp",
"exportAs": "subroutineDemo",
"run": {
"runSeveralTimes": {
"type": "importAsScript",
"argsByKey": {
"0": {
"msg": "Message of 0"
},
"1": {
"msg": "Message of 1"
},
"2": {
"msg": "Message of 2"
}
},
"from": [
"0x7b227469746c65223a22537562726f7574696e65222c226465736372697074696f6e223a22537562726f7574696e6520746861742077696c6c2070726f647563652061204a534f4e207061796c6f616420616e642077696c6c2072657475726e2069742061732068657861646563696d616c222c2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226c617374227d2c2272756e223a7b2261646472657373223a7b2274797065223a2267657443757272656e7441646472657373227d2c227369676e6564223a7b2274797065223a227369676e446174615769746841646472657373222c2261646472657373223a227b676574282763616368652e6164647265737327297d222c2264617461486578223a227b737472546f486578286765742827617267732e6d73672729297d227d2c226d6163726f73223a7b2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226d6163726f222c2265786563223a227b2072657475726e28737472546f486578286f626a546f4a736f6e28676574282763616368652e6d6163726f732729292929207d227d2c2272756e223a7b226964223a7b2274797065223a226d6163726f222c2272756e223a227b7575696428297d227d2c227369676e6564223a7b2274797065223a226d6163726f222c2272756e223a227b676574282763616368652e7369676e656427297d227d2c226d7367223a7b2274797065223a226d6163726f222c2272756e223a227b6765742827617267732e6d736727297d227d2c2268617368223a7b2274797065223a226d6163726f222c2272756e223a227b736861353132286765742827617267732e6d73672729297d227d7d7d7d7d",
"0x7b227469746c65223a22537562726f7574696e65222c226465736372697074696f6e223a22537562726f7574696e6520746861742077696c6c2070726f647563652061204a534f4e207061796c6f616420616e642077696c6c2072657475726e2069742061732068657861646563696d616c222c2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226c617374227d2c2272756e223a7b2261646472657373223a7b2274797065223a2267657443757272656e7441646472657373227d2c227369676e6564223a7b2274797065223a227369676e446174615769746841646472657373222c2261646472657373223a227b676574282763616368652e6164647265737327297d222c2264617461486578223a227b737472546f486578286765742827617267732e6d73672729297d227d2c226d6163726f73223a7b2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226d6163726f222c2265786563223a227b2072657475726e28737472546f486578286f626a546f4a736f6e28676574282763616368652e6d6163726f732729292929207d227d2c2272756e223a7b226964223a7b2274797065223a226d6163726f222c2272756e223a227b7575696428297d227d2c227369676e6564223a7b2274797065223a226d6163726f222c2272756e223a227b676574282763616368652e7369676e656427297d227d2c226d7367223a7b2274797065223a226d6163726f222c2272756e223a227b6765742827617267732e6d736727297d227d2c2268617368223a7b2274797065223a226d6163726f222c2272756e223a227b736861353132286765742827617267732e6d73672729297d227d7d7d7d7d",
"0x7b227469746c65223a22537562726f7574696e65222c226465736372697074696f6e223a22537562726f7574696e6520746861742077696c6c2070726f647563652061204a534f4e207061796c6f616420616e642077696c6c2072657475726e2069742061732068657861646563696d616c222c2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226c617374227d2c2272756e223a7b2261646472657373223a7b2274797065223a2267657443757272656e7441646472657373227d2c227369676e6564223a7b2274797065223a227369676e446174615769746841646472657373222c2261646472657373223a227b676574282763616368652e6164647265737327297d222c2264617461486578223a227b737472546f486578286765742827617267732e6d73672729297d227d2c226d6163726f73223a7b2274797065223a22736372697074222c2261726773223a227b67657428276172677327297d222c2272657475726e223a7b226d6f6465223a226d6163726f222c2265786563223a227b2072657475726e28737472546f486578286f626a546f4a736f6e28676574282763616368652e6d6163726f732729292929207d227d2c2272756e223a7b226964223a7b2274797065223a226d6163726f222c2272756e223a227b7575696428297d227d2c227369676e6564223a7b2274797065223a226d6163726f222c2272756e223a227b676574282763616368652e7369676e656427297d227d2c226d7367223a7b2274797065223a226d6163726f222c2272756e223a227b6765742827617267732e6d736727297d227d2c2268617368223a7b2274797065223a226d6163726f222c2272756e223a227b736861353132286765742827617267732e6d73672729297d227d7d7d7d7d"
]
}
}
}
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
