gamechanger.wallet

Cardano Example Dapps

94 built-in examples on IDE:

1: 🚀 Pay me 1 ADA

This is a payment request of 1 ADA

2: Minimal Coin Sending Demo

Instead of using key-value maps for list of block code, here we use arrays and number indexes, making code less self explanatory but much smaller. The ‘outputs’ property of the ‘buildTx’ API function allows you to define multi-asset transaction outputs. In Cardano assets are defined by a policyId and an assetName, for ADA we use ‘ada’ in both cases. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

3: NFT Minting Demo

Demo that creates a native script and use it as policy to mint an NFT. Image has been previously uploaded and pinned on IPFS. NFTs contains references to the actual images. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

4: Deploy Plutus Script

Demo that sends a transaction that includes an inlined Plutus Script and also a datum on outputs. Future transactions can reference this outputs without having to include on-chain the entire data again. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

5: Run Deployed Plutus Script

Demo that locks and redeem some coin from a previously deployed smart contract. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

6: Run Plutus V2 Script

Demo that locks and redeem some coin from an Always-Succeed Plutus V2 smart contract. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

7: Run Plutus V3 Script

Demo that locks and redeem some coin from an Always-Succeed Plutus V3 smart contract. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

8: Forty Two (typed)

This contract will lock up some tokens that can only be unlocked providing 42 as typed redeemer and datum.. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

9: Forty Two (untyped)

This contract will lock up some tokens that can only be unlocked providing 42 as untyped redeemer and datum.. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

10: UTXO Generator

Generates required amount of UTXOs in your wallet to improve multi-transaction concurrency capabilities, for dapps and GCFS filesystem write events. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/

11: Helios Timelock

Builds an Helios Smart Contract on the fly. First transaction will lock coins setting main staking key as owner, second one will be able to unlock it only after some time and using main spending key. Burner/Gift wallets not recommended. Timelock not exactly tested.

12: Helios One-Shot Mint

Parameterizes and compiles an Helios Smart Contract on the fly on user wallet, a One-Shot Mint validator pattern. The UTXO required for the one-shot mint is produced on a first transaction, but a previously-generated one can be provided to avoid this first step.

13: Plutus Script Parametrization

Parameterizes a Plutus Script with same original parameters and verifies the hashes remains equal. Modify parameters to trigger a hash mismatch error. Remove ‘strictScriptHashHex’ to allow for the new parametrization

14: Query Beacon Tokens

Fetch network queries to retrieve some Beacon Tokens UTXO information

15: Convert Bech32 address into Plutus Data

Convert your current address from Bech32 representation into Plutus Data object (back and forth). Also exports address information, hexadecimal representation and hash

16: Generate 10 Gift Wallets

Generate 10 QR Encrypted Gift Wallets for onboarding students in a class. Files will be downloaded as PNG files for printing or showing on screens

17: 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

18: Await conditions

This demo will wait for a timer to reach it’s timeout and then for the current wallet to receive at least 5.25 coins

19: Using console

Let’s use dapp connector internal console to log or debug some events. Run and go to Advanced - Console to read them.

20: Keep Calm NFT

Keep Calm NFT Demo, dinamically generates the image

21: GC Transaction Features

Script that will try out special GC transaction features

22: Import transactions (CBOR)

Import a list of transactions (CBOR hex) into localstorage for debugging and handling them manually with wallet user interface later

23: Official Workspaces Config Generator

Generates wallet configuration layers to re-create official workspaces

24: Encrypter Demo

Encrypts data and exports a ready to use decrypter script

25: Arithmetic Functions

This demo will test and explore basic arithmetic functions

26: Cryptographic Functions

This demo will test and explore cryptographic functions

27: String Manipulation Functions

This demo will test and explore basic string convertion and manipulation functions

28: Array Manipulation Functions

This demo will test and explore basic array convertion and manipulation functions

29: GCFS Multisig Transaction Discovery Demo

Demo that replicates the GCFS search query to retrieve all broadcasted transactions to be signed. The hash (rayId) used is calculated upon sorted transaction hashes (txHash)

30: GCFS Multisig Witness Discovery Demo

Demo that replicates the GCFS search query to retrieve all shared signatures of a particular transaction. The hash (txHash) used is calculated upon transaction cbor hex

31: Internal Multi Signing Demo

Demo that tries to sign 3 transactions with internal spending and staking private keys with any desired multisig provider. Partially sign them over and over again combining providers to try it out.

32: Kobayashi Maru Multi Signing Demo

Demo that tries to sign 3 transactions with unobtainable foreign keys and internal spending and staking private keys

33: Transaction Time to Live Demo

Script that will try the different time validity interval parameters of transaction builder

34: Password Provider Demo

Script that will use password providers to encrypt and decrypt data using by default password a CIP8 signature with current wallet address

35: Subroutines Demo

Script that will test and explore subroutines, similar to functions in structured programming.

36: Script Return Modes Demo

Script that will test and explore the different types of script return modes, allowing batch only operations, data formatting and even data privacy by choosing only what to return from block code context

37: Dynamic Code Attempt Demo

Illegal Script that will execute dynamic code using inline macros

38: Scopes Demo

Script that will test and explore code scopes and inline macro scripting access reach

39: Load Wallet Config Demo

Script that will build and load wallet artifacts: derive child keys, build child addresses and even setup address books on more than one wallet workspace. Workspaces are virtual groups of artifacts that allow users to have a specialized wallet experience like multi-delegation, import a Yoroi or Daedalus wallet, work with enhanced anonymity, or whatever config a dapp requires.

40: Save Wallet Config Demo

Script that will save wallet artifacts on default wallet settings GCFS DiskNFT. Settings can be derived child keys, built child addresses and even setup address books, all these inside different wallet workspaces. Workspaces are virtual groups of artifacts that allow users to have a specialized wallet experience like multi-delegation, import a Yoroi or Daedalus wallet, work with enhanced anonymity, or whatever config a dapp requires.

41: Import Wallet Config Demo

Script that will import and run your saved wallet configuration script. Run SAVE_WALLET_CONFIG_DEMO first and update policyId on GCFS URI

42: CIP-8 Data Signing and Encrypting Demo

Demo that signs data with main and current addresses and their associated reward ones, verifies the signatures and encrypt and decrypt the data using the signatures. Run ‘Wallet Setup Demo’ or create some Workspaces first and switch current addresses to test it out

43: Simple Wallet derivation script

Will derive key pairs and build custom addresses

44: Metadatum Label Edge Cases

Script that will allow checking the full circuit, from building a tx with edge metadatum label cases, to query it then with the APIs on UI to check if there are any encoding issues, overflows or manipulations

45: Search Demo

Script that will search for files across all onchain GCFS file systems

46: Import Demo

Script that will import data and scripts from different kind of allowed sources. (example data is from preproduction testnet)

47: GCFS Disk

Script that will create a GCFS Disk in more than one transaction using API ‘buildFsTxs’ endpoint. Also the script will generate some of the files to be written on chain, one of them is an encrypted GC script

48: Delegate Current Address to PEACE (MAINNET)

Script that delegates current address to [PEACE] pool (mainnet only)

49: Child Keys Multisign

Script that requires signatures from derived child keys in a single simple transaction

50: Multi Stake Delegation

Script that sets up a wallet workspace to generate 3 addresses, to later fund them and delegate their stake to different staking pools on a single transaction. The optional registration transaction is meant to fail when keys are already registered, don’t panic, script is built to succeed anyways

51: Multi Stake Withdrawal

Script that requests 3 child wallet’s reward addresses from an specific workspace, to later withdraw some staking rewards from each of them on a single transaction. You need to have staking rewards on each child wallet and run ‘Multi Stake Delegation’ demo first or load it’s wallet configuration on this device

52: Stake Delegation

Script that registers and delegates stake from custom child derivation in a transaction

53: Stake Withdrawal

Script that withdraw stake rewards from custom child derivation in a transaction

54: Lock and Redeem Smart Contract

Coin locking transaction ( 5 eUTXOs) and later an unlocking one of previously locked coin, in 2 secuential transactions. Using deployed smart contract.

55: Native asset minter and burner

Native asset minter and later burner of previously minted assets, in 2 secuential transactions

56: Build Certificates

Script that builds or imports different kind of certificates

57: Wallet derivation script

Will derive key pairs and build custom addresses

58: Complex Native Scripts

Nested, tagged, complex native script building

59: Transaction Pipeline

Transaction pipeline without UTXO consumption conflicts using deterministic coin selection and UTXO locking

60: Advanced DAPP connection

Connection that requires some wallet data and then signs it with private keys

61: Simple Script No Export

Simple script that has no exported data

62: Simple Script No Export No Return URL

Simple script that has no exported data and no return URL

63: Simple Export

Simple script that exports data

64: Enable Terminal Mode

Script that will adapt the application to work on public terminal devices. WARNING: this cannot be undone!, to revert this you will have to clear browser data

65: DAO Demo

This script will create a workspace to import addresses, scripts, manage funds and signatures from a DAO where you are a powerful member, you have full control when you use 2 of your keys.

66: Macro Edge Cases

This demo will test some edge cases around macro solver and syntax

67: Code Validation Tests

Script that will fail to test local and imported code validation

68: Address Identity Tester

This demo will test addresses default native scripts or ‘Identities’, and explore differencies between ways to obtain them

69: Key derivation formats

Explore the different ways to derive/obtain keys and obtain all results under the same format

70: List addresses in workspace

List and sort all addresses in current workspace

71: List keys in workspace

List and sort all keys in current workspace

72: 2FA

Create a workspace with a Shared Treasury address based on 2 addresses. A second address on the workspace is your main address as Signer

73: Share your public key information

This dapp connection will ask your spending and staking public key hashes

74: Shared Treasury - 3 of 4 signers

Creates a workspace named ‘DAO’ with a ‘Shared Treasury’ address where at least 3 of 4 signer wallets are required for spending and staking operations. A second address on the workspace is caller main address as ‘Signer’. To manage the treasury set ‘Shared Treasury’ address as current. To sign as a member, set ‘Signer’ address instead. Please customize this code with real public key hashes, you can use ‘Share your public key information’ example on each member to obtain them. Please use ‘saveConfig’ function to save this setup on GCFS to avoid losing funds and data

75: Shared Treasury - 3 of 4 signers - using addresses

Creates a workspace named ‘DAO’ with a ‘Shared Treasury’ address where at least 3 of 4 signer wallets are required for spending and staking operations. A second address on the workspace is caller main address as ‘Signer’. To manage the treasury set ‘Shared Treasury’ address as current. To sign as a member, set ‘Signer’ address instead. Please customize this code with real addresses. Please use ‘saveConfig’ function to save this setup on GCFS to avoid losing funds and data

76: Shared Treasury - 3 of 4 signers - funded - Gift Wallets

Creates a workspace named ‘DAO’ with a ‘Shared Treasury’ address where at least 3 of 4 signer Gift wallets are required for spending and staking operations. A second address on the workspace is caller main address as ‘Signer’. To manage the treasury set ‘Shared Treasury’ address as current. To sign as a member, set ‘Signer’ address instead. Customize Gift Wallet generation with proper password settings and distribute them to the signers. This example is not secure as wallet creator has total control over the generated wallets. Please use ‘saveConfig’ function to save this setup on GCFS to avoid losing funds and data

77: Multisig using Unimatrix and Roundtable

Builds 3 multisig transactions and tries to sign them only with local private keys and with remote signers using Unimatrix Sync and Roundtable. Customize required keys to real ones or experience a Kobayashi Maru scenario

78: Simple Kobayashi Maru Multi Signing Demo

Builds and signs 2 transactions with unobtainable foreign keys. Triggers the default multisig strategy to obtain remote signatures through Roundtable and Unimatrix

79: Smart Handles - Swap ADA to MIN on Minswap

Interact with a Smart Handles instance for swapping ADA to MIN, with a routing fee of 1 ADA (preprod). Uses the Minswap V2 instance of Anastasia Labs Smart Handles. https://github.com/Anastasia-Labs/smart-handles

80: Arguments and ISL

Script that will test and explore subroutines, argument passing and ISL execution

81: Spirois-Montiel-SudoScientist Token Minting Test

Testing the fix for the ‘Spirois bug’ using Montiel’s and SudoScientist’s test case assetNames, added some others as well. Use an address of yours for exampleDrop01. Thanks for testing guys!

82: Address Impersonator

Create a workspace to impersonate a wallet without having their private keys. Wallet operations will trigger multisig transactions. Use to remotely control a wallet or be able to build transactions in behalf of the owner

83: Governance - Key Derivation Paths

Explore Conway Era key derivation

84: Governance - Workspace

A workspace dedicated for Governance, made of 3 DRep keys, 3 CCCold keys and 3 CCHot keys. Welcome to the Conway Era.

85: Governance - Vote Delegation - Abstain

About to sign a transaction with a vote to Always Abstain. If current stake key is already registered, ‘autoClean’ will remove ‘myRegistration’ certificate automatically. Works with personal and multisig wallets the same

86: Governance - Vote Delegation - No Confidence

About to sign a transaction with a vote of Always No Confidence. If current stake key is already registered, ‘autoClean’ will remove ‘myRegistration’ certificate automatically. Works with personal and multisig wallets the same

87: Governance - Vote Delegation - DRep

About to sign a transaction with a vote delegation to a DRep. If current stake key is already registered, ‘autoClean’ will remove ‘myRegistration’ certificate automatically. Works with personal and multisig wallets the same

88: Script Requirements

Using script requirement checks to only allow a certain user wallet context to run this script. Usefull for ‘sticky sessions’ on dapps or for wallet type or network specific scripts

89: Get Wallet Type

Getting extra information about your current wallet type, such as brand, default staking, and more.

90: DRep parsing and certificate building

Parses different DRep IDs following legacy and CIP129 formats and builds the corresponding vote delegation certificates in bulk

91: Write registration to join Dandelion Network (GCFS)

Register your Dandelion Node Group on-chain with GCFS. Writes a json file with your Node Group definition on-chain for backend peer discovery on Dandelion, the decentralized API service for Cardano. Set the URL of your node in ‘node-url’.

92: Read your registration on Dandelion Network (GCFS)

Reads a json file with your Node Group definition from an on-chain GCFS resource, used for backend peer discovery on Dandelion, the decentralized API service for Cardano

93: List all registrations on Dandelion Network (GCFS)

Search for all matching json files with Node Group definitions on all GCFS resources on-chain. These files are used for backend peer discovery on Dandelion, the decentralized API service for Cardano

94: Multi-Network support

Example that shows how to make multi-network protocols, meaning scripts that are prepared to run in multiple networks (and DLTs)

Dapps code was auto-generated by Playground IDE in GameChanger Wallet

Resources

License

MIT