Cardano Example Dapp
Array Manipulation Functions
This demo will test and explore basic array conversion and manipulation functions
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": "Array Manipulation Functions",
"description": "This demo will test and explore basic array conversion and manipulation functions",
"type": "script",
"exportAs": "ArraysDemo",
"returnURLPattern": "http://localhost:3000/demo/api/dapp",
"run": {
"useCases": {
"type": "macro",
"run": {
"getArray(0)": "{getArray(0)}",
"getArray('a')": "{getArray('a')}",
"getArray(00)": "{getArray(00)}",
"getArray('aa')": "{getArray('aa')}",
"getArray(,,,0,,,,)": "{getArray(,,,0,,,,)}",
"getArray(,,,'',,,,)": "{getArray(,,,'',,,,)}",
"getArray()": "{getArray()}",
"split(',', '')": "{split(',', '')}",
"split(',', ',')": "{split(',', ',')}",
"split(',', ',,')": "{split(',', ',,')}",
"join(',', getArray())": "{join(',', getArray())}",
"getArray(getArray(00))": "{getArray(getArray(00))}",
"getArray(getArray('aa'))": "{getArray(getArray('aa'))}",
"getArray(getArray(0),getArray(1,2),getArray(3,4,5),getArray(6,7,8))": "{getArray(getArray(0),getArray(1,2),getArray(3,4,5),getArray(6,7,8))}",
"getArray(getArray('a'),getArray('b','c'),getArray('d','e','f'),getArray('g','h','i'))": "{getArray(getArray('a'),getArray('b','c'),getArray('d','e','f'),getArray('g','h','i'))}",
"getArray(getArray('aa'),getArray('b','c'),getArray('d','e','f'),getArray('g','h','i'))": "{getArray(getArray('aa'),getArray('b','c'),getArray('d','e','f'),getArray('g','h','i'))}",
"split(',','a,b,c,d,e')": "{split(',','a,b,c,d,e')}",
"split(',',',,,a,b,c,d,e,,,')": "{split(',',',,,a,b,c,d,e,,,')}",
"join(',',getArray('','','','a','b','c','d','e','','',''))": "{join(',',getArray('','','','a','b','c','d','e','','',''))}",
"flatten()": "{flatten()}",
"flatten(0)": "{flatten(0)}",
"flatten(getArray())": "{flatten(getArray())}",
"flatten(getArray(0))": "{flatten(getArray(0))}",
"flatten([1,2],[3,[4,5]],6)": "{flatten(getArray(1,2),getArray(3,getArray(4,5)),6)}"
}
}
}
}
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
