
# Cardano Example Dapp

## **Query Beacon Tokens**

Fetch network queries to retrieve some Beacon Tokens UTXO information


## Try it online: 

-  Visit [HTML+JS Dapp](https://gamechangerfinance.github.io/gamechanger.wallet/examples/Query%20Beacon%20Tokens.html)
-  Visit [HTML+React Dapp](https://gamechangerfinance.github.io/gamechanger.wallet/examples/Query%20Beacon%20Tokens_react.html)
-  Visit [Native HTML dapp](https://gamechangerfinance.github.io/gamechanger.wallet/examples/Query%20Beacon%20Tokens_nolib.html)
-  Run [Standalone URL dapp connection](https://wallet.gamechanger.finance/api/2/run/1-H4sIAAAAAAAAA61STa_kJhD8K5bP7wDmO7fsIUouiSK9SLlFGBp77DHGgO2xV_Pfg9-8HCLt3pYTXVRVN6X-WudbvkP9U_3nCvGovoA2s6_e5xF8qt9qC8nEW8i32RfOL5BNX3nI-xzHaimKG6Qqz1WEXK4bVGme4P8m1V_vf_9R3byb46Q_fN7qfISr5cu61BGW9RYL9LX-NH_XXSGECCHOtn6-1fAIc8w_p4JanfUlWv0lKNU6vTpe5af1NdtRSB3kCx1v3hb0RfuYq7zplF6vYb7fzPHbxZCUEdsy4TBrrQLORFMAXXSCG9QggwUjRDuHrWl1o7SQThAq_7P7XU_wKzyKE8WUUksVBeYYpY62lFG4vqKtjZCun1y3fzKkjM9lCGc3HZEmRRqkF2JIRuu6Tg7sfb9THnIOdkfrvp8sKnocK2Ejl5ENDxCdnljvyAj9gGLIA8iNTHQfH8M6pW33YR3q5_NzxvTD0sIWAZGCYMQYGOwQ4Y4ZqxtEJHAQljLEAYwQjVJcACKYKuPwN9LiHPOWs3IIpd9LaTntqegkqD8PgWReVgW5EyMbh0VtIW39Y5xEk82k-7z0Xu9b9AKmFfnHuJkM0g0nahxJYowdEm6D0UtzTH5IhIWF2I-UXnv5w1JqLTbISRAUM8ytc4ohbFpKEYWyVLYVjFNkEZYMlFBccdIq1bJvpNSUHcKUlG2CYkZKVox9N60zCnlOZ0iSrgPtQglH2MYHuSgnpu7ec93Dvozj0p96oCKy5iE2ViT32IEcTddTpMPuhVYqZOLFCBn2Y1AoSXVay0paz-e_1sWJOUMEAAA)

## Source code:

- dapp connection code: [GCScript DSL](Query%20Beacon%20Tokens.gcscript)
- frontend (using @gamechanger-finance/gc): [HTML+JS dapp](Query%20Beacon%20Tokens.html)
- frontend (using @gamechanger-finance/gc): [HTML+React dapp](Query%20Beacon%20Tokens_react.html)
- frontend (without official library): [Native HTML dapp](Query%20Beacon%20Tokens_nolib.html)

Dapp code was autogenerated by [Playground IDE in GameChanger Wallet ](https://wallet.gamechanger.finance/playground)

## GCScript code (dapp connection):
```json
{
  "title": "Query Beacon Tokens",
  "description": "Fetch network queries to retrieve some Beacon Tokens UTXO information",
  "type": "script",
  "require": {
    "networkTag": "preprod"
  },
  "exportAs": "data",
  "run": {
    "datumBeacon": {
      "type": "query",
      "get": {
        "kind": "BeaconToken",
        "asset": {
          "policyId": "8453db57f15bd9e657253daeac76c020c17533aff1dcba29a78f7348",
          "assetNameHex": "41444d494e5f544f4b454e"
        },
        "address": "addr_test1zqjpzgmyr4s9320aq3c3t0uuumfedlwl46pttpdw0uwwz5r94yyu35k68r5jxe7gam5hf3kehj0rptje8v3m4wkxjumsvwnpuj"
      }
    },
    "assetsBeacon": {
      "type": "query",
      "get": {
        "kind": "BeaconToken",
        "asset": {
          "policyId": "1d0e38731055ec1f036f5cda2038e6e7d4506eec7729967e03149cf1",
          "assetNameHex": "46616b65555344"
        },
        "address": "addr_test1qzdz94m74nzy708tqu9etg7k5kjq9vpsvhxkm72tcmahtqhnawvrn7emu0nxkvcte8fjz02f3s7krg07fvekn8cymnjs35pq3d"
      }
    },
    "scriptBeacon": {
      "type": "query",
      "get": {
        "kind": "BeaconToken",
        "asset": {
          "policyId": "bd1c0f8e741516dff9501cb4404e6c0db75640d0185e9796963b99b5",
          "assetNameHex": "424541434f4e4153534554"
        },
        "address": "addr_test1zr78zmzps84uj4gphxk7d2np8q9f7mglh6ahewqkkqhzaj47r52x7v5zmzlrge8kcgh40apwn7a99pt3n7ketewyj90s89zdd5"
      }
    }
  }
}
```

## Run standalone QR dapp connection: 

You can use [Playground IDE in GameChanger Wallet ](https://wallet.gamechanger.finance/playground) 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](Query%20Beacon%20Tokens.png)](https://gamechangerfinance.github.io/gamechanger.wallet/examples/Query%20Beacon%20Tokens.png)

## Resources
- [How to connect?](https://www.npmjs.com/package/@gamechanger-finance/gc)
- [Docs and examples on Github](https://github.com/GameChangerFinance/gamechanger.wallet/)
- [GCScript documentation](https://wallet.gamechanger.finance/doc/api/v2)
- [Playground IDE in GameChanger Wallet ](https://wallet.gamechanger.finance/playground)
- [Tutorials on Youtube](https://www.youtube.com/@gamechanger.finance)
- [Support on Discord](https://discord.gg/vpbfyRaDKG)
- [News on Twitter](https://twitter.com/GameChangerOk)
- [Website](https://gamechanger.finance)

## License
MIT 
    
