Code Monkey home page Code Monkey logo

docs-deprecated's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs-deprecated's Issues

Add versioning to docs

The current docs work well for 0.11 version of wasmd/cosmwasm (last stable launchpad version... running on heldernet). Actually, some of the commands are only for 0.10, like coralnet.

However, they are not working for the current master (0.13, soon 0.14) running on stargate that introduced a lot of changes to wasmd. The only solution I see to support both current testnets is to add some doc versioning, a drop-down where people can select to view the older launchpad version, or the current master (and we can maintain a few older checkpoints for heavily used older versions).

Unfortunately, this is not currently supported by vuepress :( vuejs/vuepress#1018

However, there is a plugin that does attempt to handle this, by copying the docs to a folder (we can put all current docs in 0.11/launchpad for example, then open a new one for 0.14/stargate): https://titanium-docs-devkit.netlify.app/guide/versioning.html

This is an example of a repo doing a similar strategy "by hand": https://github.com/nuwave/lighthouse/tree/master/docs

It would be great to set this up before resolving the numerous issues to update the docs to stargate. As many people are still using the launchpad version (as this has much more mature tooling for the sdk and client)

Expand dApp tutorial

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?

change musselnet-2 to musselnet-4

not sure if there's a way to keep this automatically up to date, or at least indicate along with the command musselnet-X with a link to the latest

Add nameservice tutorial

We can create a new tutorial explaining how to build the nameservice contract. Starting with an empty cosmwasm-template.

This can parallel the official SDK tutorial as a guide of how to structure. Please note we can make this much simpler likely, and we can also deploy contracts on the most recent testnet.

Blockers:

  • Wait until 0.10 testnet is deployed to publish and update all links to that
  • Ethan: record video coding this from scratch (at least some of the code - the structure) and use that as a reference when writing

Please note there is an (old) draft PR to start this, which can be used as well: CosmWasm/docs#37

Add a FAQ sections / platform

It would be good to collect common questions from users (from telegram / discord / etc) and set up a place to get answers. Even better would be an interactive way to answer questions in a public way and provide collective support, something like stackoverflow.com.

  • Research good solutions - tag on stackoverflow, static page, something else?
  • Set it up
  • Link from the docs page and promote it

Deprecate docs repo

  • Deprecate docs repo(archive?)
  • Rename doc2 repo to docs
  • Change docs2 references in docs2 to docs

Add Dev Docs for Testnets

Builds on #11

Add another section focused on devs:

  • Describe to how to deploy contracts with cli and cosmjs (info for example contract is here and here - let's pull out some general helpers from that)
  • Show how to use the faucet (both with curl and with cosmjs)
  • Link to code explorer (eg. https://demonet.wasm.glass)

Later, extend this:

  • Link to block explorer (to be connected - leave placeholder)
  • Link to wallet (to be connected - leave placeholder)
  • Link to instructions how to write dApp (to be done #14 )

Prepare workshop content and plan

I will demonstrate the permission enhancement I did on cw1-subkeys.
I plan it to be 3 parts:

  1. Show the basic layout of a smart contract(msgs, state, contract, handlers): 20mins
  2. Contract development flow with adding permissions to subkey contract: 20mins
  3. Contract interaction using CosmJS and smart contract helpers: 20mins
  4. Q&A. Pull people to stage and have questions and chat with the community: 5-10mins

Investigate integration with starport

See https://github.com/tendermint/starport

This is a framework for generating scaffolding for an sdk app, but more interesting for us, auto-generating a vue.js frontend for it.

Please try it out and see if this seems promising to auto-generate frontends for cosmwasm contracts. If so, we can work with the tendermint team to add needed support, and then add some starport-dapps to the tutorials

Put using smart contracts to a category of its own

Using cw20 contract documentation is done. Sub keys documentation is left to close the issue. Altough the current structure is not fit for putting 2 tutorials under 1 section(Using Smart Contracs). Instead we should create a category(like Learn) and put smart contracts related docs under it. @ethanfrey

Start Testnet section

Add a new testnets section to the docs.

Add two pages there:

  • Demo Net
  • Build Requirements

Demo Net page

Demo Net should contain info to point to how to deploy to the current demo net, as well as the binaries / client libs involved:

  • wasmd v0.9.1
  • cosmjs v0.21.1

Client endpoints (from @cosmjs/cli):

Show how to connect from local node:

  • P2P endpoint: p2p.demo-09.cosmwasm.com:26656
  • Node ID: (from wasmd tendermint show-node-id): 26c9c79dc62b5ddc753bb9fcce022fcc98b5a8cf
  • Genesis: curl https://rpc.demo-09.cosmwasm.com/genesis | jq .result.genesis

Explain how to run with the official docker file (also use this locally and connect to the p2p node to show we can connect and sync)

Build Requirements

System requirements: We use a Digital Ocean 2CPU,4GB instance - consider that as good basis (see demo-net setup)

Building code may require larger instances, especially if you want to build a static instance (recompile rust code).

Simplest:

Use docker image, or build locally: https://github.com/CosmWasm/wasmd/#dockerized

Bare Metal:

Option 1 (prefered - static binary - Linux only):

  • Download Dockerfile / build locally
  • Copy the static binary out of it. (Try a command to do so)
  • Use that static binary on any bare metal linux box

Constructing this is a tricky process and involves using alpine linux and recompiling the rust dependencies as static libs. I suggest you use the Dockerfile for that

Option 2: (dev-style: dynamic binary - works on Linux and OSX)

  • Compile dev build (make build).
  • ldd build/wasmd
    • notice the line like: libgo_cosmwasm.so => /home/USERNAME/go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/libgo_cosmwasm.so
    • that file must be in the library path along with wasmd
  • copy wasmd to any location on the target system (that will run the node)
  • copy libgo_cosmwasm.so (path above) to the target system under `/usr/lib/libgo_cosmwasm.so

missing contract.wasm file

RES=$(wasmd tx wasm store contract.wasm --from fred $TXFLAG -y)

there is no "contract.wasm" file in the escrow directory or any subfolders.

> find . | grep "\.wasm$"

gives me the following:

./artifacts/cw_escrow.wasm
./target/wasm32-unknown-unknown/release/cw_escrow.wasm
./target/wasm32-unknown-unknown/release/deps/cw_escrow.wasm

query wasm contract ID jq error

I am having this error:

 CONTRACT=$(wasmcli query wasm list-contract-by-code $CODE_ID | jq -r .[0].address)

zsh: no matches found: .[0].address

what could be the reason?

Update for `gentx` command

The amount in gentx is not a flag anymore:

wasmd gentx my-key-name 1000000stake --home=/path/to/home/dir ...

Re-organize docs

Requirements:

  • move architecture and design details from Getting Started to Architecture to provide a basic introduction.
  • add Hijack Escrow Contract section
  • add Review and Verify Contract section that uses Escrow example in Getting Started

Update Roadmap

It dates from May 2020 (at least only 3 months later), but at least the first section "deliver cosmos hub contract" is done now.

And we can add our testnets to the roadmap (and maybe some references to CosmJS)

Create Hijack Escrow tutorial

I stripped Editing smart contract part from Getting Started for simplicity. I will move this part to Learn section.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.