concordium / concordium-dapp-examples Goto Github PK
View Code? Open in Web Editor NEWPlace to put small dApp examples
License: Mozilla Public License 2.0
Place to put small dApp examples
License: Mozilla Public License 2.0
Description
Currently the wCCD metadata is used for token metadata. Maybe reuse EUROe metadata or create new one.
In any case, change the number of decimals to be 0 so that it simplifies bidding in a way that we can bid only using int.
Steps to Reproduce
1.Mint 100 tokens.
Expected Result
100 tokens appear in the BW.
Actual Result
0.00100 tokens appear in the wallet.
Versions
Description
Currently both sponsored transactions and signMessage both hardcode the cost of the call to 30000 which is bad user experience.
We should use invokeInstance to estimate the cost.
Task description
The task is to develop an example implementation of an event indexer written in Rust.
The events from the track-and-trace
smart contract will be indexed to serve the historical item statuses to the front end. The indexer starts processing old events and then listens for new events that are coming in as the blockchain progresses. The indexer should be configurable to start indexing at a specific time (usually the time around when the smart contract was deployed). The indexer should store checkpoints
(block_height
, transaction_hash
, and event_index
) of the current event being processed to aid in debugging and to aid in re-starting the index from the persistent database in case the indexer crashed unintentionally.
The indexer runs a PostgreSQL database at the backend.
There are three tables in the database:
setting
for global settings and the checkpoints.item_created_events
for all the item-created events logged by the contract.item_status_changed_events
for all the item-status-changed events logged by the contract.Smart contracts:
Concordium/concordium-rust-smart-contracts#387 (comment)
https://github.com/Concordium/concordium-dapp-examples/tree/main/trackAndTrace
Sub-tasks
GetItemStatusChangedEvents
by item_id
returns a list of all status-changed events for specified item_id
or an empty list if the item does not exist.GetItemCreatedEvent
by item_id
returns the event when the item was created or None
if the item does not exist.Add label for component and priority.
Task description
Summary of improvements for the track-and-trace
dapp:
Sub-tasks
Tasks
ccd-js-gen
integration with the browser wallet once Concordium/concordium-node-sdk-js#324 is merged and a new release of the ccd-js-gen
tool is available. Remove hardcoded schemas from the front end.ContractClient
from the Rust SDK to simplify the interactions with the contract at the backend #32 (comment)signerAccount
has to be inputted in the input field anymore. The signerAccount
can be stored in a useState
hook at the point the signature is generated. This will minimize user error.Description
Inf the field that should have a number is selected and user scrolls, number in fields increases.
I suggest we disable this functionality because it could result with confusing token IDs. I could also notice that the number field for Item Index
doesn't have that functionality.
Steps to Reproduce
Expected Result
Cis2 token id should still be 1.
Actual Result
Cis2 token id should still be 2.
Versions
Since this repository is meant to contain examples it should be exemplary.
It should have tests to make sure it builds, that formatting is as dictated, and that tests pass.
The following example frontends are missing ESLint:
signMessage
simpleAgeVerification
low-code-nft-marketplace
need a ESLint config file.These example frontends are missing a Prettier setup:
gallery
low-code-nft-marketplace
signMessage
simpleAgeVerification
sponsoredTransactions
When/If these things are added the CI pipeline should be updated.
Task description
Sub-tasks
Add label for component and priority.
Bug Description
In case user tries to connect with Mainnet instead of Testnet the error message could be better.
Steps to Reproduce
Attempt to Connect to Testnet frontend with Mainnet wallet.
Expected Result
Error message is there but could be shown better.
Versions
Task description
The standard defines the two events to enable tracking of items by external tools (e.g. block explorers).
pub struct ItemCreatedEvent {
/// The item's id.
pub item_id: String,
/// The item's metadata_url.
pub metadata_url: Option<MetadataUrl>,
/// Status when item was created.
pub initial_status: Status,
}
pub struct ItemStatusChangedEvent<A: Serial> {
/// The item's id.
pub item_id: String,
/// The item's new status.
pub new_status: Status,
/// Any additional data encoded as generic bytes. Usecase-specific data can
/// be included here such as temperature, longitude, latitude, ... .
pub additional_data: A,
}
In preparation for the standard, the following changes were discussed:
itemId
from a number to a String
so that Universally Unique Identifier (UUID)
can be used as well.initial_status
to the CreateEvent
and display it at the front end.supports
(CIS0) function.Task description
Each example should have a Dockerfile
and a Github actions release job that pushes it to Dockerhub.
Task description
Collections of improvements and minor tasks to do related to the sponsored transaction dApp example.
Sub-tasks
package.json
file). Update frontend/backend Read.me
with the new index and related comments. Also update DockerFile. Remove the hardcoded STAGENET configuration in constants.ts
file.Bug Description
Gallery dApp is deployed on mainnet. It has a CCDScan link that still points to testnet (for the connected account). Update CCDScan link. This might require to introduce environmental variables network
similar to wCCD
dApp example.
Description
Maybe we could add a bit more text to some of the steps. I don't know if we should just write the text in the boxes somewhere around input fields or we could add like a tooltip.
Proposing a change to the UI on step 1:
I think it is a bit confusing to ask to add Token ID in decimal, I believe some users might not understand that. I would rather put something as Insert a number that will represent your Cis2 Token Id. Tokens with that Id will be minted and added to your address.
Proposing changes to the UI on step 2:
Insert a number that will represent your Cis2 Token Id. Tokens with that Id can be used to bid for your item.
Proposing changes to the UI on step 3:
Insert a number that represents index of your auctioned item. Item index is generated after completing step 2.
Proposing changes to the UI on step 4:
First input field:
Insert the amount of Cis2 tokens (payment token) to bid for the item.
Third input field:
Insert the nonce, it can be found on the top of the page.
Add format to the comment to explain the format on the frontend part where ending election time is hardcoded.
export const AUCTION_END = '2050-01-01T12:00:00Z'; // Hardcoded value for simplicity for this demo dApp (format YYYY-MM-DD).
Versions
Task description
Currently, if someone accidentally wrongly tags this repo e.g. euroe-demo/0.0.0
, the docker hub release pipeline is triggered. The release pipeline would look up the correct version and publish it to docker hub. Nonetheless, to not rely on the reviewer/approver of the release pipeline to check for a version mismatch, it would be nice if the release action could check (when it was triggered via a tag) that the versions match. Research a nice solution for it.
Task description
The track and trace front end should connect the different components.
Sub-tasks
Task description
Use the concordium-dapp-libraries to enable connecting to mobile wallets through WalletConnect in the EuroE demo.
Task description
walletConnect
button again:Remaining TODOs after libraries are released:
Task description
Once the web wallet is updated to support signCis3message the examples in this repository should be updated to use it.
Bug Description
While generating the proof app allows to pick any account tied to identity 1, but if there are multiple identities and accounts you cant see them.
Steps to Reproduce
Actual Result
Versions
Task description
The change_item_status
entrypoint in the track-and-trace contract should be able to be invoked via the sponsored transaction mechanism.
https://github.com/Concordium/concordium-dapp-examples/blob/main/trackAndTrace/smart-contract/src/lib.rs#L525
Similar smart contracts with sponsored transaction design can be used as a reference e.g.:
https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/examples/cis2-multi/src
https://github.com/Concordium/concordium-rust-smart-contracts/tree/main/examples/cis3-nft-sponsored-txs
Sub-tasks
permit
entrypoint (https://proposals.concordium.software/CIS/cis-3.html)supportsPermit
entrypoint (https://proposals.concordium.software/CIS/cis-3.html)Task description
The dapps need to be updated when SDKs are updated for protocol 7. In particular any dapp that has a Rust backend must be updated since it will otherwise most likely stop working on migration to protocol 7 due to changes in the node API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.