cosmwasm / docs-deprecated Goto Github PK
View Code? Open in Web Editor NEWUpdated documentation repo
Home Page: https://docs.cosmwasm.com/
License: Other
Updated documentation repo
Home Page: https://docs.cosmwasm.com/
License: Other
At https://docs.cosmwasm.com/0.13/getting-started/compile-contract.html:
git clone https://github.com/CosmWasm/cosmwasm-examples
cd cosmwasm-examples/escrow
At https://github.com/CosmWasm/cosmwasm-examples @16eaa84 the directory cosmwasm-examples/escrow
does not exist.
Let's set this up:
We can do the same concept as you tried with travis, but with github actions: #9 (comment)
Depends on CosmWasm/testnets#20
Related to CosmWasm/testnets#51
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)
In docs you have commands which do not work anymore
https://docs.cosmwasm.com/getting-started/setting-env.html
For example coral command which is now corald and also as I was told config command does not work anymore.
Could you fix that?
Builds on #116
You are free to use other ideas, here is my basic idea:
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
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
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:
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).
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.
??? 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?
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
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:
Please note there is an (old) draft PR to start this, which can be used as well: CosmWasm/docs#37
Follow up from #3
Related to CosmWasm/cw-plus#75
We should list them all here.
First CodeWithUs Workshop: https://vimeo.com/436560781
Also, maybe my introduction for Unitize if you think this is a nice intro (or we can make a new video for the overview): https://vimeo.com/434654821
Make an extensible section in learn, so we can add the new one from the 26th workshop and future ones
The following link (https://docs.cosmwasm.com/0.13/getting-started/setting-env.html) has an obsolete command for setting up Node REPL. It hasn't been updated yet, wouldn't mind doing it. Just need to know what the updated command would look like.
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.
Builds on #11
Add another section focused on devs:
Later, extend this:
Although "Found an Issue" links to "https://github.com/CosmWasm/docs2/edit/master/docs/xxx" now, it should do to "https://github.com/CosmWasm/docs2/edit/master/xxx"
I will demonstrate the permission enhancement I did on cw1-subkeys.
I plan it to be 3 parts:
Reference CosmWasm/testnets#6
I will adapt getting started
but first
Related to #5 (comment)
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
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
In the text
Please check for wasm executable instructions for specific networks on CosmWasm/testnets
from http://docs.cosmwasm.com/testnets/build-requirements.html#installation is it not clear what the "wasm" executable is. In the repo there is no executable.
It was removed in the upstream cosmos-sdk
For example in:
https://github.com/CosmWasm/testnets/tree/master/devops/node#staking
Based on the videos, a written guide to how to start with cosmwasm-template and build your first contract from scratch.
Intro (defining task): https://vimeo.com/457486858
Setup (most is already in docs, you can add the cosmwasm-template part): https://vimeo.com/457712351
Writing contract code: https://vimeo.com/457702442
Writing tests (and json schema): https://vimeo.com/457705991
Add a new testnets section to the docs.
Add two pages there:
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:
wasmd tendermint show-node-id
): 26c9c79dc62b5ddc753bb9fcce022fcc98b5a8cf
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)
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):
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)
make build
).ldd build/wasmd
libgo_cosmwasm.so => /home/USERNAME/go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/libgo_cosmwasm.so
wasmd
to any location on the target system (that will run the node)libgo_cosmwasm.so
(path above) to the target system under `/usr/lib/libgo_cosmwasm.soValidators should set
minimum-gas-prices = "0.025ushell"
in .corald/config/app.toml
And people ready to pay this fee.
It is late and I am not sure where to put it.
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
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?
The amount in gentx
is not a flag anymore:
wasmd gentx my-key-name 1000000stake --home=/path/to/home/dir ...
In using the sdk section its mentioned to use cosmjs v0.21.2 for demonet, but only v0.21.1 minor tag exists on the cosmjs repo. I suppose we can the documentation to v0.21.1 for now? @ethanfrey
Take a look at some other docs pages for inspiration:
Requirements:
Hijack Escrow Contract
sectionReview and Verify Contract
section that uses Escrow example in Getting StartedWhat is the suffix unknown-unknown
? It looks scary when you first see it, can it be changed to something more friendly, if not what is the explanation @ethanfrey?
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)
I stripped Editing smart contract
part from Getting Started
for simplicity. I will move this part to Learn
section.
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.