Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix to be broken links by renaming branch name #196

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
- develop
schedule:
- cron: '* */24 * * *'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint
# Lint runs golangci-lint over the entire cosmos-sdk repository
# This workflow is run on every pull request and push to master
# This workflow is run on every pull request and push to main
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed.
on:
pull_request:
push:
branches:
- master
- main
jobs:
golangci:
name: golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- master
- main
- develop

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Tests / Code Coverage
# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report
# This workflow is run on pushes to master & every Pull Requests where a .go, .mod, .sum have been changed
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
push:
branches:
- master
- main
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop'"

build:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Contributing

We welcome contributions from anyone who is willing to create a new PR on farming module, make sure that you read and comply with this document. See the [open issues](https:/tendermint/farming/issues) that we need help with. Feel free to inform us if you are willing to work on any issue. Note that the `master` branch contains the latest development version.
We welcome contributions from anyone who is willing to create a new PR on farming module, make sure that you read and comply with this document. See the [open issues](https:/tendermint/farming/issues) that we need help with. Feel free to inform us if you are willing to work on any 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 `master` branch
- Make sure your `branch` is from the tip of `main` branch
- Make some commits to resolve an issue
- Submit a pull request to `master`
- Submit a pull request to `main`

Rule of thumb:

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![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. 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 the [master](https:/tendermint/farming/tree/master) branch for the latest
- see the [main](https:/tendermint/farming/tree/main) branch for the latest
- see [releases](https:/tendermint/farming/releases) for the latest release

## Dependencies
Expand All @@ -33,7 +33,7 @@ To get started to the project, visit the [TECHNICAL-SETUP.md](./TECHNICAL-SETUP.

## Documentation

The farming module documentation is available in [docs](./docs) folder and technical specification is available in [specs](https:/tendermint/farming/blob/master/x/farming/spec/README.md) folder.
The farming module documentation is available in [docs](./docs) folder and technical specification is available in [specs](https:/tendermint/farming/blob/main/x/farming/spec/README.md) folder.

These are some of the documents that help you to quickly get you on board with the farming module.

Expand All @@ -44,4 +44,4 @@ These are some of the documents that help you to quickly get you on board with t

## Contributing

We welcome contributions from everyone. The [master](https:/tendermint/farming/tree/master) branch contains the development version of the code. You can branch of from master 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!
We welcome contributions from everyone. The [main](https:/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!
4 changes: 2 additions & 2 deletions TECHNICAL-SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ GOOS=windows GOARCH=amd64 make build

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:/tendermint/farming/blob/master/Makefile#L90) for reference
> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https:/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:/tendermint/farming/blob/master/Makefile#L145) for reference
> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https:/tendermint/farming/blob/main/Makefile#L145) for reference

9 changes: 5 additions & 4 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ paths:
externalDocs:
description: Find out more about the query and error codes
url: >-
https:/tendermint/farming/tree/master/docs/How-To/cli#currentepochdays
https:/tendermint/farming/tree/main/docs/How-To/cli#currentepochdays
/cosmos/farming/v1beta1/params:
get:
summary: Params returns parameters of the farming module.
Expand Down Expand Up @@ -480,7 +480,7 @@ paths:
externalDocs:
description: Find out more about the params
url: >-
https:/tendermint/farming/blob/master/x/farming/spec/07_params.md
https:/tendermint/farming/blob/main/x/farming/spec/07_params.md
/cosmos/farming/v1beta1/plans:
get:
summary: Plans returns all plans.
Expand Down Expand Up @@ -980,8 +980,7 @@ paths:
- Query
externalDocs:
description: Find out more about the query and error codes
url: >-
https:/tendermint/farming/tree/master/docs/How-To/cli#Plans
url: 'https:/tendermint/farming/tree/main/docs/How-To/cli#Plans'
'/cosmos/farming/v1beta1/plans/{plan_id}':
get:
summary: Plan returns a specific plan.
Expand Down Expand Up @@ -1390,7 +1389,7 @@ paths:
- Query
externalDocs:
description: Find out more about the query and error codes
url: 'https:/tendermint/farming/tree/master/docs/How-To/cli#plan'
url: 'https:/tendermint/farming/tree/main/docs/How-To/cli#plan'
'/cosmos/farming/v1beta1/rewards/{farmer}':
get:
description: Returns all rewards coins that corresponds to the farmer
Expand Down Expand Up @@ -1629,7 +1628,7 @@ paths:
externalDocs:
description: Find out more about the query and error codes
url: >-
https:/tendermint/farming/tree/master/docs/How-To/cli#rewards
https:/tendermint/farming/tree/main/docs/How-To/cli#rewards
'/cosmos/farming/v1beta1/stakings/{farmer}':
get:
description: >-
Expand Down Expand Up @@ -1887,7 +1886,7 @@ paths:
externalDocs:
description: Find out more about the query and error codes
url: >-
https:/tendermint/farming/tree/master/docs/How-To/cli#stakings
https:/tendermint/farming/tree/main/docs/How-To/cli#stakings
'/cosmos/farming/v1beta1/total_stakings/{staking_coin_denom}':
get:
description: Returns total stakings that corresponds to the staking_coin_denom
Expand Down Expand Up @@ -2107,7 +2106,7 @@ paths:
externalDocs:
description: Find out more about the query and error codes
url: >-
https:/tendermint/farming/tree/master/docs/How-To/cli#totalstakings
https:/tendermint/farming/tree/main/docs/How-To/cli#totalstakings
definitions:
cosmos.base.query.v1beta1.PageRequest:
type: object
Expand Down
2 changes: 1 addition & 1 deletion docs/Explanation/ADR/PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ADR creation is an **iterative** process. Instead of trying to solve all decisio

2. After the motivation is validated, create a new document that is on the `adr-template.md`.

3. An ADR solution doesn't have to arrive to the `master` branch with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge PRs iteratively and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests.
3. An ADR solution doesn't have to arrive to the `main` branch with an _accepted_ status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge PRs iteratively and keep a _proposed_ status. It's preferable to have an iterative approach rather than long, not merged Pull Requests.

4. If a _proposed_ ADR is merged, then the outstanding changes must be clearly documented in outstanding issues in ADR document notes or in a GitHub Issue.

Expand Down
4 changes: 2 additions & 2 deletions docs/How-To/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In order to test out the following command-line interfaces, you need to set up a

## Transaction

+++ https:/tendermint/farming/blob/master/proto/tendermint/farming/v1beta1/tx.proto#L13-L29
+++ https:/tendermint/farming/blob/main/proto/tendermint/farming/v1beta1/tx.proto#L13-L29

### MsgCreateFixedAmountPlan

Expand Down Expand Up @@ -437,7 +437,7 @@ farmingd tx farming harvest \

## Query

https:/tendermint/farming/blob/master/proto/tendermint/farming/v1beta1/query.proto#L15-L40
https:/tendermint/farming/blob/main/proto/tendermint/farming/v1beta1/query.proto#L15-L40

### Params

Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/proposals/01_proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ We need two kinds of governance processes to activate Gravity DEX liquidity ince

Detail description of the spec can be found below:

- Budget Module: https:/tendermint/budget/tree/master/x/budget/spec
- Budget Module: https:/tendermint/budget/tree/main/x/budget/spec

- Farming Module: https:/tendermint/farming/tree/master/x/farming/spec
- Farming Module: https:/tendermint/farming/tree/main/x/farming/spec
10 changes: 5 additions & 5 deletions docs/Tutorials/demo/budget_with_farming.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ One use case is to use the module to provide incentives for liquidity pool inves
**Budget module**

- [Github Repo](https:/tendermint/budget)
- [Spec Docs](https:/tendermint/budget/blob/master/x/budget/spec/01_concepts.md)
- [Spec Docs](https:/tendermint/budget/blob/main/x/budget/spec/01_concepts.md)
- This demo version [v0.1.2](https:/tendermint/budget/releases)
- Other useful resources are available in [docs](https:/tendermint/budget/blob/master/docs) folder
- Other useful resources are available in [docs](https:/tendermint/budget/blob/main/docs) folder
- Swagger Docs [v0.1.0](https://app.swaggerhub.com/apis-docs/gravity-devs/budget/0.1.0)

**Farming module**

- [Github Repo](https:/tendermint/farming)
- [Spec Docs](https:/tendermint/farming/blob/master/x/farming/spec/01_concepts.md)
- [Spec Docs](https:/tendermint/farming/blob/main/x/farming/spec/01_concepts.md)
- Today's demo version [v0.1.2](https:/tendermint/farming/releases)
- Other useful resources are available in [docs](https:/tendermint/farming/blob/master/docs) folder
- Other useful resources are available in [docs](https:/tendermint/farming/blob/main/docs) folder
- Swagger Docs [v0.1.3](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/0.1.3)

## Demo
Expand Down Expand Up @@ -305,7 +305,7 @@ farmingd q farming stakings cosmos185fflsvwrz0cx46w6qada7mdy92m6kx4gqx0ny \

To simulate reward distribution for this demo, we have this custom transaction message `AdvanceEpoch` that can be enabled when you build the binary `farmingd` with `make install-testing` command. When you send `AdvanceEpoch` message to the network, it increases epoch by day 1.

In this step, you might wonder why we need to increase 2 epochs by sending two transactions to the network. The reaon for that is because it is for the fairness of distribution. There is a global parameter called `next_epoch_days` that can be updated through a param change governance proposal. If the value of `next_epoch_days` is changed, it can lead to an edge case. Let's say `next_epoch_days` is 7 and it is changed to 1 although it hasn't proceeded up to 7 days before it is changed. Therefore, we use an internal state called `current_epoch_days` that is used to process staking and reward distribution in an end blocker. This is technical decision that is made by the Gravity DEX team. To understand more about this, feel free to jump right into [the code](https:/tendermint/farming/blob/master/x/farming/abci.go#L13).
In this step, you might wonder why we need to increase 2 epochs by sending two transactions to the network. The reaon for that is because it is for the fairness of distribution. There is a global parameter called `next_epoch_days` that can be updated through a param change governance proposal. If the value of `next_epoch_days` is changed, it can lead to an edge case. Let's say `next_epoch_days` is 7 and it is changed to 1 although it hasn't proceeded up to 7 days before it is changed. Therefore, we use an internal state called `current_epoch_days` that is used to process staking and reward distribution in an end blocker. This is technical decision that is made by the Gravity DEX team. To understand more about this, feel free to jump right into [the code](https:/tendermint/farming/blob/main/x/farming/abci.go#L13).

```bash
# Increase epoch by 1
Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/demo/mvp_legacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Farming module is in active development by the Gravity DEX team in Tendermint. T
## Resources

- [Github Repo](https:/tendermint/farming)
- [Spec Docs](https:/tendermint/farming/blob/master/x/farming/spec/01_concepts.md)
- [Spec Docs](https:/tendermint/farming/blob/main/x/farming/spec/01_concepts.md)
- MVP branch uses [local-testing](https:/tendermint/farming/tree/local-testing)
- Other useful resources are available in [docs](https:/tendermint/farming/blob/master/docs) folder
- Other useful resources are available in [docs](https:/tendermint/farming/blob/main/docs) folder
- [Swagger Docs v0.1.0](https://app.swaggerhub.com/apis-docs/gravity-devs/farming/0.1.0)

## Build
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/demo/plans.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Farming Plans

There are two different types of farming plans in the farming module. Whereas a public farming plan can only be created through governance proposal, a private farming plan can be created with any account or an entity. Read [spec](https:/tendermint/farming/blob/master/x/farming/spec/01_concepts.md) documentation for more information about the plan types.
There are two different types of farming plans in the farming module. Whereas a public farming plan can only be created through governance proposal, a private farming plan can be created with any account or an entity. Read [spec](https:/tendermint/farming/blob/main/x/farming/spec/01_concepts.md) documentation for more information about the plan types.

In this documentation, some sample data in JSON are provided. They will be used to test out farming plan functionality.

Expand Down
14 changes: 7 additions & 7 deletions proto/tendermint/farming/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ service Query {
description: "Returns all parameters of the farming module.";
external_docs: {
url:
"https:/tendermint/farming/blob/master/x/farming/spec/07_params.md";
"https:/tendermint/farming/blob/main/x/farming/spec/07_params.md";
description:
"Find out more about the params";
}
Expand All @@ -36,7 +36,7 @@ rpc Plans(QueryPlansRequest) returns (QueryPlansResponse) {
description: "Returns a list of all farming plans with pagination result.";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#Plans";
"https:/tendermint/farming/tree/main/docs/How-To/cli#Plans";
description:
"Find out more about the query and error codes";
}
Expand Down Expand Up @@ -82,7 +82,7 @@ rpc Plan(QueryPlanRequest) returns (QueryPlanResponse) {
description: "Returns the farming plan that corresponds to the plan_id.";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#plan";
"https:/tendermint/farming/tree/main/docs/How-To/cli#plan";
description:
"Find out more about the query and error codes";
}
Expand Down Expand Up @@ -127,7 +127,7 @@ rpc Stakings(QueryStakingsRequest) returns (QueryStakingsResponse) {
description: "Returns all stakings (staked and queued coins) that corresponds to the farmer";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#stakings";
"https:/tendermint/farming/tree/main/docs/How-To/cli#stakings";
description:
"Find out more about the query and error codes";
}
Expand All @@ -151,7 +151,7 @@ rpc TotalStakings(QueryTotalStakingsRequest) returns (QueryTotalStakingsResponse
description: "Returns total stakings that corresponds to the staking_coin_denom";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#totalstakings";
"https:/tendermint/farming/tree/main/docs/How-To/cli#totalstakings";
description:
"Find out more about the query and error codes";
}
Expand All @@ -175,7 +175,7 @@ rpc Rewards(QueryRewardsRequest) returns (QueryRewardsResponse) {
description: "Returns all rewards coins that corresponds to the farmer";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#rewards";
"https:/tendermint/farming/tree/main/docs/How-To/cli#rewards";
description:
"Find out more about the query and error codes";
}
Expand All @@ -200,7 +200,7 @@ rpc CurrentEpochDays(QueryCurrentEpochDaysRequest) returns (QueryCurrentEpochDay
description: "Returns the current epoch days";
external_docs: {
url:
"https:/tendermint/farming/tree/master/docs/How-To/cli#currentepochdays";
"https:/tendermint/farming/tree/main/docs/How-To/cli#currentepochdays";
description:
"Find out more about the query and error codes";
}
Expand Down
2 changes: 1 addition & 1 deletion x/farming/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func GetCmdSubmitPublicPlanProposal() *cobra.Command {
Long: strings.TrimSpace(
fmt.Sprintf(`Submit a a public farming plan along with an initial deposit. You can submit this governance proposal
to add, update, and delete farming plan. The proposal details must be supplied via a JSON file. A JSON file to add plan request proposal is
provided below. For more examples, please refer to https:/tendermint/farming/blob/master/docs/Tutorials/demo/plans.md
provided below. For more examples, please refer to https:/tendermint/farming/blob/main/docs/Tutorials/demo/plans.md

Example:
$ %s tx gov submit-proposal public-farming-plan <path/to/proposal.json> --from=<key_or_address> --deposit=<deposit_amount>
Expand Down
Loading