MCPcopy Index your code
hub / github.com/Concordium/concordium-dapp-examples

github.com/Concordium/concordium-dapp-examples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,332 symbols 2,917 edges 361 files 146 documented · 11% updated today★ 744 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Example dApps for the Concordium blockchain

This repository contains a number of examples of dApp frontends / websites built on top of the Concordium blockchain. Each service is placed in its own subdirectory.

The service are not full production ready services. They are examples to demonstrate some specific use-cases. These are provided in the hope that they can be expanded or evolved into full-fledged services, or just to serve as a guide in what needs to be done.

The following examples are available.

  • dapp-template serves as a starting point for a dApp frontend with common styling and build setup.

  • signMessage demonstrates how to use the endpoint to sign an arbitrary message with the browser wallet or mobile wallet through wallet connect.

  • gallery demonstrates a gallery which requires the user to authorize using ID proofs from the browser wallet.

  • sponsoredTransactions demonstrates how a user (without holding CCD in the wallet) can sign a message with the browser wallet and submit the signature to a backend. The backend pays for the transaction fee and submits the sponsored transaction on behalf of the user to the chain.

  • sponsoredTransactionsAuction demonstrates how to use a sponsored-transaction-enabled token as a payment method in an auction contract so that the user does not have to hold CCD in their wallet. The user signs a bidding message with the browser wallet and submits the signature to a backend. The backend pays for the transaction fee and submits the sponsored transaction on behalf of the user to the chain.

  • simple age verification demonstrates in a simple use case of verifying the user's age with the browser wallet.

  • euroe-demo demonstrates an example frontend and wallet interactions of a store that sells restricted items, and supports payment in EUROe tokens (or generally any CIS2 token).

  • trackAndTrace demonstrates an example frontend, backend, smart contract and event indexer to track items along the supply chain. It also has a CIS-3 sponsored transactions service that is compatible with any CIS-3 contract.

  • compliant-reward-distribution demonstrates an airdrop example with an indexer, a frontend, and a backend with signature and ZK proof verification at the backend. The ZK proof is used to ensure Sybil-resistance/uniqueness as each identity on the chain can interact with the service with only one of its accounts.

  • testnet-faucet implements the Concordium testnet faucet which requires the user to post on X (former Twitter) and complete a CAPTCHA task to claim testnet CCDs. The faucet allows claiming once within a specified timeframe.

  • allowListManagerFaucet demonstrates a single or multi-token vending system (Faucet) for PLTs with ID Attribute verification. For PLTs with allow-lists, Users must prove something about themselves (e.g. EU residency) through Concordium ID, and upon successful verification, they are automatically added to a token's allow list and receive an airdrop. The example includes a React frontend, NestJS backend for blockchain operations, and depends on the web3id-verifier-ts service.

  • nft-minting demonstrates how to make a website that allows no-code minting with smart contracts on the Concordium blockchain.

  • piggybank demonstrates how of how to integrate with smart contracts on the Concordium blockchain. It both includes a page for a V0 and a V1 version of the piggy bank smart contract.

  • wCCD demonstrates how to integrate with smart contracts on the Concordium blockchain. This web app interacts with the wCCD protocol on testnet. The connected account can invoke the wrap/unwrap functions to observe the wCCD balance change of its account.

  • voting demonstrates how to integrate with smart contracts on the Concordium blockchain. You can create and customize your own voting smart contract via the front-end and deploy it to the Concordium chain. The front-end also provides pages to conduct the voting and display the voting results.

  • eSealing demonstrates an example of how to integrate with smart contracts on the Concordium blockchain. This web app supports the following two flows with the browser wallet (or wallet connect):

  • Compute the file hash of a selected file => register its file hash in the smart contract
  • Compute the file hash of a selected file => retrieve the time-stamp and witness (sender_account) that registered the file hash

Extension points exported contracts — how you extend this code

HasSigningData (Interface)
Trait definition of `HasSigningData`. This trait is implemented for all input parameter structs used by endpoints that r [4 …
compliant-reward-distribution/indexer-and-server/src/types.rs
Config (Interface)
* The configuration built into the application when served from the backend API
compliant-reward-distribution/frontend/global.d.ts
Config (Interface)
* The configuration built into the application when served from the backend API
trackAndTrace/frontend/global.d.ts
Window (Interface)
(no doc)
DevnetSponsoredTx/frontend/src/constants.ts
FormType (Interface)
(no doc)
rbac/frontend/src/components/App/App.tsx
TransactionDetails (Interface)
(no doc)
testnet-faucet/src/types.ts
MarketplaceAddProps (Interface)
(no doc)
low-code-nft-marketplace/market-ui/src/components/MarketplaceAdd.tsx
Metadata (Interface)
(no doc)
low-code-nft-marketplace/common-ui/src/models/Cis2Client.ts

Core symbols most depended-on inside this repo

catch
called by 100
allowListManagerFaucet/backend/src/common/filters/htttp-exception.filter.ts
get
called by 83
trackAndTrace/indexer/src/db.rs
create
called by 49
trackAndTrace/indexer/src/db.rs
requireValue
called by 18
locks/frontend/src/components/App/utils.ts
mk_reply
called by 17
sponsoredTransactions/backend/src/handlers.rs
mk_reply
called by 17
gallery/verifier/src/handlers.rs
connect
called by 16
compliant-reward-distribution/frontend/src/wallet-connection.tsx
as_ref
called by 14
compliant-reward-distribution/indexer-and-server/src/db.rs

Shape

Function 879
Class 170
Method 136
Interface 121
Enum 26

Languages

TypeScript79%
Rust21%

Modules by API surface

trackAndTrace/frontend/generated/module_track_and_trace.ts105 symbols
sponsoredTransactionsAuction/frontend/generated/cis2_multi_cis2_multi.ts104 symbols
trackAndTrace/smart-contract/src/lib.rs44 symbols
sponsoredTransactionsAuction/frontend/generated/sponsored_tx_enabled_auction_sponsored_tx_enabled_auction.ts40 symbols
compliant-reward-distribution/indexer-and-server/src/types.rs25 symbols
compliant-reward-distribution/indexer-and-server/src/db.rs22 symbols
compliant-reward-distribution/frontend/src/wallet-connection.tsx22 symbols
allowListManagerFaucet/backend/src/modules/token-distribution/token-distribution.service.ts19 symbols
rbac/frontend/src/components/App/App.tsx16 symbols
low-code-nft-marketplace/cis2-market/src/lib.rs16 symbols
compliant-reward-distribution/indexer-and-server/src/bin/crd_server.rs16 symbols
allowListManagerFaucet/frontend/src/components/AllowListDApp.tsx16 symbols

For agents

$ claude mcp add concordium-dapp-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact