Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iov-one/weave-starter-kit
A simple app to start building your custom weave based chain
https://github.com/iov-one/weave-starter-kit
Last synced: 10 days ago
JSON representation
A simple app to start building your custom weave based chain
- Host: GitHub
- URL: https://github.com/iov-one/weave-starter-kit
- Owner: iov-one
- License: other
- Created: 2019-05-27T15:10:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T09:14:02.000Z (almost 5 years ago)
- Last Synced: 2024-11-06T22:12:54.728Z (about 2 months ago)
- Language: Go
- Size: 285 KB
- Stars: 0
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Weave Starter Kit
This is a simple app to show how to build an application
using the weave framework. Feel free to copy this repo
to start your own application.Before starting with this code (or while you do so), you may well want to check
out the documentation at [iov-docs](https://docs.iov.one), which presents many
of the high-level concepts you need to understand in order to code.You will probably want to clone http://github.com/iov-one/weave and
keep this in another folder in your IDE for reference. Or, maybe you
find [godocs](http://godoc.org/github.com/iov-one/weave) more helpful.## Installing dependencies
### Requirements
- [golang 1.11.4+](https://golang.org/doc/install)
- [tendermint 0.31.5](https://github.com/tendermint/tendermint/tree/v0.31.5)
- [Installation](https://github.com/tendermint/tendermint/blob/master/docs/introduction/install.md)
- [weave](https://github.com/iov-one/weave)
- `go get github.com/iov-one/weave`
- [docker](https://docs.docker.com/install/)**Important**: At IOV we use [go modules](https://github.com/golang/go/wiki/Modules). You can append `export GO111MODULE=on` to `.rc` file of your favorite shell(`zsh, bash, fish, etc.`)
## Running the demo app
```sh
cd
make # install binary
make inittm # initilize tendermint config folder ~/.custom
customd init # initilize genesis
make runtm # run tendermint
customd start # run customd application
```## Interacting with demo app
After `make`, `customcli` will be built and placed in go bin. You can play with `customcli`. Be sure that `customd` is running.
```sh
customcli send-tokens \
-src "seq:test/custom/1" \
-dst "seq:test/custom/2" \
-amount "4 CSTM" \
-memo "customcli test" | customcli view
```## Using for your own app
You have two options: fork or copy-replace.
### Forking
I recommend forking the repo if you want to test something out. Also merging the latest changes from `weave` will be easier.
1. Fork the project
2. Append `replace github.com/iov-one/weave-starter-kit => github.com// v0.0.1` to `go.mod`. Example: [github.com/orkunkl/starter-kit-test](https://github.com/orkunkl/starter-kit-test/blob/master/go.mod#L15)### Copy then replace
You can download the project and make the required replacement. You will want to adjust it to proper project path and then
do a search and replace for `iov-one/weave-starter-kit` with your github project name.
In particular:- prototool.yaml (import path)
- all import paths
- all files in `cmd`## Building custom modules
`x` directory contains modules. `x/custom` directory is a basic module placeholder without any meaningful functionality. You can write your own module via copying examples from `custom` module. After you implement your module, write required code up to `cmd` folder to reflect the module on blockchain app.
## Protobuf tips
After you edit any `.proto` file, do not forget to run `make protoc` in projects root. Otherwise you will not see the changes in go code