forked from tendermint/farming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kogisin/108-improve-sim-tests
* master: (22 commits) fix: use farmingPoolAcc and terminationAcc for consistency docs: add missing comments fix: last add_request_proposals docs: update renamed variables and remove mvp_legacy.md feat: rename public plan proposal requests feat: rename NewPublicPlanProposal to NewPublicPlanProposalHandler docs: update README.md fix: workflow target branch and description for main branch doc: fix to be broken links by renaming branch name move codeowners from contributing file to the CODEOWNERS file create CODEOWNERS file feat: generate proto files edit farming.proto docs: add os checking for sed -i option (tendermint#184) docs: specify which module is used for module name feat: bump budget to v0.1.1 (tendermint#177) docs: improve documentation for audit release (tendermint#178) fix: withdraw rewards only when staked amount changes (tendermint#180) fix: emit rewards_withdrawn only when positive amount is withdrawn docs: add helpful docs for audit (tendermint#176) ... # Conflicts: # x/farming/simulation/proposals.go
- Loading branch information
Showing
54 changed files
with
1,199 additions
and
1,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
client/docs/swagger-ui/* linguist-vendored | ||
*.ts linguist-generated | ||
*.js linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
schedule: | ||
- cron: '* */24 * * *' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# CODEOWNERS: https://help.github.com/articles/about-codeowners/ | ||
|
||
# Docs | ||
*.md @barriebyron | ||
|
||
# Primary repo maintainers | ||
* @dongsam @kogisin @hallazzang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# Contributing | ||
|
||
TODO: add context | ||
We welcome contributions to our codebase and documentation. | ||
|
||
Before you create a PR on the farming module, make sure that you read and comply with this document. See the [open issues](https://github.com/tendermint/farming/issues) that we need help with. | ||
|
||
Feel free to inform us if you are willing to work on an issue. Note that the `main` branch contains the latest development version. | ||
|
||
We follow standard GitHub best practices: | ||
|
||
- Fork the repository | ||
- Make sure your `branch` is from the tip of `main` branch | ||
- Make your commits to resolve an issue | ||
- Submit a pull request to `main` | ||
|
||
General guidance: | ||
|
||
- Make sure you run tests by running `make test-all` locally to see there is any issue | ||
- Review all the checks on your PR and review the code coverage report | ||
|
||
Thank you for your contribution! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
[![codecov](https://codecov.io/gh/tendermint/farming/branch/master/graph/badge.svg)](https://codecov.io/gh/tendermint/farming?branch=master) | ||
[![codecov](https://codecov.io/gh/tendermint/farming/branch/main/graph/badge.svg)](https://codecov.io/gh/tendermint/farming?branch=main) | ||
[![PkgGoDev](https://pkg.go.dev/badge/github.com/tendermint/farming)](https://pkg.go.dev/github.com/tendermint/farming) | ||
|
||
# Farming Module | ||
|
||
A farming module is a Cosmos SDK module that implements farming functionality, which provides farming rewards to participants called farmers. One use case is to use this module to provide incentives for liquidity pool investors for their pool participation. | ||
The farming module is a Cosmos SDK module that implements farming functionality, which provides farming rewards to participants called farmers. A primary use case is to use this module to provide incentives for liquidity pool investors for their pool participation. | ||
|
||
⚠ **Farming module v1 is in active development - see "master" branch for the v1 mainnet version** ⚠ | ||
⚠ **Farming module v1 is in active development** ⚠ | ||
- see the [main](https://github.com/tendermint/farming/tree/main) branch for the latest | ||
- see [releases](https://github.com/tendermint/farming/releases) for the latest release | ||
|
||
## Installation | ||
### Requirements | ||
## Dependencies | ||
|
||
If you haven't already, install Golang by following the [official docs](https://golang.org/doc/install). Make sure that your `GOPATH` and `GOBIN` environment variables are properly set up. | ||
|
||
Requirement | Notes | ||
----------- | ----------------- | ||
Go version | Go1.15 or higher | ||
Cosmos SDK | v0.44.0 or higher | ||
Go version | Go1.16 or higher | ||
Cosmos SDK | v0.44.2 or higher | ||
|
||
### Get Farming Module source code | ||
## Installation | ||
|
||
```bash | ||
# Use git to clone farming module source code and install `farmingd` | ||
git clone https://github.com/tendermint/farming.git | ||
cd farming | ||
make install | ||
``` | ||
|
||
## Development | ||
## Getting Started | ||
|
||
### Test | ||
To get started to the project, visit the [TECHNICAL-SETUP.md](./TECHNICAL-SETUP.md) docs. | ||
|
||
```bash | ||
make test-all | ||
``` | ||
## Documentation | ||
|
||
### Setup local testnet using script | ||
The farming module documentation is available in [docs](./docs) folder and technical specification is available in [specs](https://github.com/tendermint/farming/blob/main/x/farming/spec/README.md) folder. | ||
|
||
```bash | ||
# This script bootstraps a single local testnet. | ||
# Note that config, data, and keys are created in the ./data/localnet folder and | ||
# RPC, GRPC, and REST ports are all open. | ||
$ make localnet | ||
``` | ||
These are some of the documents that help you to quickly get you on board with the farming module. | ||
|
||
- [How to bootstrap a local network with farming module](./docs/Tutorials/localnet) | ||
- [How to use Command Line Interfaces](./docs/How-To/cli) | ||
- [How to use gRPC-gateway REST Routes](./docs/How-To) | ||
- [Demo for how to budget and farming modules](./docs/Tutorials/demo/budget_with_farming.md) | ||
|
||
## Resources | ||
## Contributing | ||
|
||
- [Documentation about Command-line and REST API Interfaces](./docs/How-To) | ||
- [Demo](./docs/Tutorials/demo) | ||
We welcome contributions from everyone. The [main](https://github.com/tendermint/farming/tree/main) branch contains the development version of the code. You can branch of from main and create a pull request, or maintain your own fork and submit a cross-repository pull request. If you're not sure where to start check out [CONTRIBUTING.md](./CONTRIBUTING.md) for our guidelines & policies for how we develop farming module. Thank you to all those who have contributed to farming module! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,68 @@ | ||
# Technical Setup | ||
|
||
## Setup git hooks for Conventional Commit | ||
To ensure you have a successful experience working with our farming module, we recommend this technical setup. | ||
|
||
## Github Integration | ||
|
||
Click the GitHub icon in the sidebar for GitHub integration and follow the prompts. | ||
|
||
Clone the repos you work in | ||
|
||
- Fork or clone the https://github.com/tendermint/farming repository. | ||
|
||
Internal Tendermint users have different permissions, if you're not sure, fork the repo. | ||
|
||
## Software Requirement | ||
|
||
To build the project: | ||
|
||
- [Golang](https://golang.org/dl/) v1.16 or higher | ||
- [make](https://www.gnu.org/software/make/) to use `Makefile` targets | ||
|
||
## Development Environment Setup | ||
|
||
Setup git hooks for conventional commit. | ||
|
||
1. Install [`pre-commit`](https://pre-commit.com/) | ||
2. Run this command: | ||
|
||
``` | ||
$ pre-commit install --hook-type commit-msg | ||
``` | ||
|
||
2. Run the following command: | ||
```bash | ||
pre-commit install --hook-type commit-msg | ||
``` | ||
|
||
3. (Optional for macOS users) Install GNU `grep`: | ||
1. Run `brew install grep` | ||
2. Add this line to your shell profile: | ||
|
||
4. Run the following command | ||
```bash | ||
brew install grep | ||
``` | ||
|
||
5. Add the line to your shell profile: | ||
```bash | ||
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH" | ||
``` | ||
|
||
Now, whenever you make a commit, the `pre-commit` hook will be run to check if the commit message conforms [Conventional Commit](https://www.conventionalcommits.org/) rule. | ||
|
||
## Building | ||
|
||
To build the farming module node and command line client, run the `make build` command from the project's root folder. The output of the build will be generated in the `build` folder. | ||
For cross-builds use the standard `GOOS` and `GOARCH` env vars. i.e. to build for windows: | ||
```bash | ||
GOOS=windows GOARCH=amd64 make build | ||
``` | ||
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH" | ||
``` | ||
Now, whenever you make a commit, the `pre-commit` hook will be run to check if the commit message | ||
conforms [Conventional Commit](https://www.conventionalcommits.org/) rule. | ||
## Installation | ||
To install the node client on your machine, run `make install` command from the project's root folder. | ||
|
||
> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https://github.com/tendermint/farming/blob/main/Makefile#L90) for reference | ||
|
||
## Testing | ||
|
||
Run `make test-all` command to run tests. | ||
|
||
> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https://github.com/tendermint/farming/blob/main/Makefile#L145) for reference | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.