Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Expand dApp tutorial #117

Open
ethanfrey opened this issue Oct 29, 2020 · 0 comments
Open

Expand dApp tutorial #117

ethanfrey opened this issue Oct 29, 2020 · 0 comments
Assignees

Comments

@ethanfrey
Copy link
Member

Builds on #116

You are free to use other ideas, here is my basic idea:

  1. provide a code id for a working cw20-base (v0.3.2) contract on whatever net you use in the demo. You (Abel, not tutorial user) can pre-upload that following these instructions: https://docs.cosmwasm.com/cw-plus/cw20/cw20.html

  2. Store some "state" variable for contract addr. If not set, show "make contract" button along with a symbol field. This will init a contract with current account key as minter, and base balance of 1_000_000_000 with 3 decimals, some "dApp tutorial" as name and the symbol/label from the input field

  3. If the contract_addr is set, display contract address along with the current balance of my account. Two buttons - mint and burn. Mint tries to add 20_000 tokens to my account (only if I am the minter) and burn burns 35_000 tokens from my account. (Don't worry about decimal places or normalizing)

This can be all you do in your tutorial, along with code sample. You can then suggest them the following for them to do at home:

  1. Query the number of decimal points from the cw20 token contract. Normalize the display value with that. (Maybe link to some existing code as a hint).

  2. Add a load contract button with a field for a valid address on the same page from (2). Then you can create a contract one time, save the address in your clipboard, reload the app, and view your balance again.

  3. ??? any other idea for simple follow ups people could try?


NB: when is the last time _template was updated? does it support the multi-mode login page?

@orkunkl orkunkl closed this as completed Nov 8, 2021
@orkunkl orkunkl reopened this Nov 8, 2021
@orkunkl orkunkl assigned findolor and unassigned abefernan Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants