Cardano Example Dapp
Arithmetic Functions
This demo will test and explore basic arithmetic 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": "Arithmetic Functions",
"description": "This demo will test and explore basic arithmetic functions",
"type": "script",
"exportAs": "ArithmeticDemo",
"returnURLPattern": "http://localhost:3000/demo/api/dapp",
"run": {
"addBigNum": {
"type": "script",
"run": {
"1_arg": {
"type": "macro",
"run": "{addBigNum('1')}"
},
"2_arg": {
"type": "macro",
"run": "{addBigNum('1','10')}"
},
"n_arg": {
"type": "macro",
"run": "{addBigNum('1','10','100','1000','10000','100000','1000000')}"
},
"n_arg_types": {
"type": "macro",
"run": "{addBigNum('1',10,'100',1000,'10000',100000,'1000000')}"
}
}
},
"mulBigNum": {
"type": "script",
"run": {
"1_arg": {
"type": "macro",
"run": "{mulBigNum('2')}"
},
"2_arg": {
"type": "macro",
"run": "{mulBigNum('2','2')}"
},
"n_arg": {
"type": "macro",
"run": "{mulBigNum('2','2','2','2','2','2','2')}"
},
"n_arg_types": {
"type": "macro",
"run": "{mulBigNum('2',2,'2',2,'2',2,'2')}"
}
}
},
"subBigNum": {
"type": "script",
"run": {
"1_arg": {
"type": "macro",
"run": "{subBigNum('1111111')}"
},
"2_arg": {
"type": "macro",
"run": "{subBigNum('1111111','1111111')}"
},
"n_arg": {
"type": "macro",
"run": "{subBigNum('1111111','1000000','100000','10000','1000','100','10','1')}"
},
"n_arg_types": {
"type": "macro",
"run": "{subBigNum('1111111',1000000,'100000',10000,'1000',100,'10',1)}"
}
}
}
}
}
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
