Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bf2a1b689 | |||
|
|
908df9d4e2 | ||
|
|
c4a14fa7b6 | ||
|
|
c1ece303dd | ||
|
|
e265bb9b42 | ||
|
|
d55608cf99 | ||
|
|
1834f4ccd9 | ||
|
|
c92ff3ab78 | ||
|
|
20c63a9d01 | ||
|
|
abbb0acf5a | ||
|
|
e4f193fc51 | ||
|
|
c6710e1980 | ||
|
|
07eebe392e | ||
|
|
fa2c766025 | ||
|
|
1228f82ce1 | ||
|
|
dcec726d24 | ||
|
|
b26edff563 | ||
|
|
9631e0c9e6 | ||
|
|
ef7c838027 | ||
|
|
4f4d71a873 | ||
|
|
85694fef2d | ||
|
|
2e961d3d7f | ||
|
|
fda79d0bf4 | ||
|
|
dcda5d8567 | ||
|
|
f49154bece | ||
|
|
d5bf57dd6a | ||
|
|
15cdcc2d14 | ||
|
|
9bbfee1e6a | ||
|
|
fa31def690 | ||
|
|
ad9b52e8a7 | ||
|
|
b13daa652a | ||
|
|
8bca440de0 | ||
|
|
2394c83b88 | ||
|
|
abb47566ac | ||
|
|
c33d4aee04 | ||
|
|
75c1629f14 | ||
|
|
105186a9fb | ||
|
|
be730091aa | ||
|
|
440eff1806 | ||
|
|
ba118bf136 | ||
|
|
61edea8f94 | ||
|
|
59019212f0 | ||
|
|
bcaf7378ad | ||
|
|
81b5b751ce | ||
|
|
c1d1e6893b | ||
|
|
25a12b9f23 |
15
.github/CODEOWNERS
vendored
Normal file
15
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# CODEOWNERS: https://help.github.com/articles/about-codeowners/
|
||||
|
||||
# NOTE: Order is important; the last matching pattern takes the most precedence
|
||||
|
||||
# Cosmos SDK Codeowners
|
||||
|
||||
# Core team as default owners
|
||||
|
||||
* @cosmos/sdk-core-dev
|
||||
|
||||
# Components
|
||||
|
||||
# docs configuration
|
||||
|
||||
/docs/ @cosmos/sdk-core-dev
|
||||
30
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
30
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us squash bugs!
|
||||
title: "[Bug]: "
|
||||
labels: "T:Bug"
|
||||
---
|
||||
|
||||
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
|
||||
v ✰ Thanks for opening an issue! ✰
|
||||
v Before smashing the submit button please review the template.
|
||||
v Please also ensure that this is not a duplicate issue :)
|
||||
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
|
||||
|
||||
<!--
|
||||
IMPORTANT: Prior to opening a bug report, check if it affects one of the core modules
|
||||
and if its elegible for a bug bounty on `SECURITY.md`. Bugs that are not submitted
|
||||
through the appropriate channels won't receive any bounty.
|
||||
-->
|
||||
|
||||
## Summary of Bug
|
||||
|
||||
<!-- Concisely describe the issue -->
|
||||
|
||||
## Version
|
||||
|
||||
<!-- git commit hash or release version -->
|
||||
|
||||
## Steps to Reproduce
|
||||
|
||||
<!-- What commands in order should someone run to reproduce your problem? -->
|
||||
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: 🐛 Bug report
|
||||
description: Create a report to help us squash bugs!
|
||||
title: "[Bug]: "
|
||||
labels: ["T:Bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
Before smashing the submit button please review the template.
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search existing issues to avoid creating duplicates.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
IMPORTANT: Prior to opening a bug report, check if it affects one of the core modules
|
||||
and if its eligible for a bug bounty on `SECURITY.md`. Bugs that are not submitted
|
||||
through the appropriate channels won't receive any bounty.
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen?
|
||||
placeholder: Tell us what you see!
|
||||
value: "A bug happened!"
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Cosmos SDK Version
|
||||
description: If applicable, specify the version you're using
|
||||
placeholder: 0.46, 0.47, main, etc.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: How to reproduce?
|
||||
description: If applicable could you describe how we could reproduce the bug
|
||||
placeholder: Tell us what how to reproduce the bug!
|
||||
validations:
|
||||
required: false
|
||||
18
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
18
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
name: Documentation Request
|
||||
description: Create an issue for missing or incorrect documentation
|
||||
title: "[Documentation]: "
|
||||
labels: ["T:Docs"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
✰ Thanks for opening an issue! ✰
|
||||
Tell us where what you would like to see get added to the documentation or if there is an error in the documentation?
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Summary
|
||||
placeholder: Description of what you would like to see
|
||||
validations:
|
||||
required: true
|
||||
31
.github/ISSUE_TEMPLATE/epics.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/epics.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Epic
|
||||
about: Create an epic/user
|
||||
title: "[Epic]: "
|
||||
labels: T:Epic
|
||||
---
|
||||
|
||||
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
|
||||
v ✰ Thanks for opening an issue! ✰
|
||||
v Before smashing the submit button please review the template.
|
||||
v Word of caution: poorly thought-out proposals may be rejected
|
||||
v without deliberation
|
||||
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- Short, concise description of the proposed feature/changes to the repository
|
||||
What are the user needs?
|
||||
How could this solution fix the user facing problem? -->
|
||||
|
||||
## Problem Definition
|
||||
|
||||
<!-- Why do we need this feature?
|
||||
What problems may be addressed by introducing this feature?
|
||||
What benefits does the SDK stand to gain by including this feature?
|
||||
Are there any disadvantages of including this feature? -->
|
||||
|
||||
## Work Breakdown
|
||||
|
||||
<!-- Break the work into many bullet points that will later be turned into issues that can be assigned to developers to work on
|
||||
This work may been to be broken up into phases of work in order to better organize when and how things get done. -->
|
||||
43
.github/ISSUE_TEMPLATE/epics.yml
vendored
Normal file
43
.github/ISSUE_TEMPLATE/epics.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
name: Epic
|
||||
description: Create an epic/user
|
||||
title: "[Epic]: "
|
||||
labels: ["T:Epic"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for opening this issue, this template is meant for long lived work scopes, if this is what you're looking for please continue
|
||||
|
||||
- type: textarea
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: |
|
||||
What are the user needs?
|
||||
How could this solution fix the user facing problem?
|
||||
placeholder: Short, concise description of the proposed feature/changes to the repository
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem Definition
|
||||
description: |
|
||||
Why do we need this feature?
|
||||
What problems may be addressed by introducing this feature?
|
||||
What benefits does the SDK stand to gain by including this feature?
|
||||
Are there any disadvantages of including this feature?
|
||||
placeholder: Description of the issue being faced
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: work
|
||||
attributes:
|
||||
label: Work Breakdown
|
||||
description: |
|
||||
Break the work into many bullet points that will later be turned into issues that can be assigned to developers to work on
|
||||
This work may been to be broken up into phases of work in order to better organize when and how things get done.
|
||||
placeholder: Description of the steps needed to deliver this feature
|
||||
validations:
|
||||
required: true
|
||||
28
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Create a proposal to request a feature
|
||||
title: "[Feature]: "
|
||||
labels: T:feature-request
|
||||
---
|
||||
|
||||
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
|
||||
v ✰ Thanks for opening an issue! ✰
|
||||
v Before smashing the submit button please review the template.
|
||||
v Word of caution: poorly thought-out proposals may be rejected
|
||||
v without deliberation
|
||||
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- Short, concise description of the proposed feature -->
|
||||
|
||||
## Problem Definition
|
||||
|
||||
<!-- Why do we need this feature?
|
||||
What problems may be addressed by introducing this feature?
|
||||
What benefits does the SDK stand to gain by including this feature?
|
||||
Are there any disadvantages of including this feature? -->
|
||||
|
||||
## Proposal
|
||||
|
||||
<!-- Detailed description of requirements of implementation -->
|
||||
41
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
41
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: Feature Request
|
||||
description: Create a proposal to request a feature
|
||||
title: "[Feature]: "
|
||||
labels: ["T:feature-request"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
✰ Thanks for opening an issue! ✰
|
||||
- type: textarea
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: |
|
||||
What are the user needs?
|
||||
How could this solution fix the user facing problem?
|
||||
placeholder: Short, concise description of the proposed feature/changes to the repository
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem Definition
|
||||
description: |
|
||||
If applicable please answer the below questions
|
||||
Why do we need this feature?
|
||||
What problems may be addressed by introducing this feature?
|
||||
What benefits does the SDK stand to gain by including this feature?
|
||||
Are there any disadvantages of including this feature?
|
||||
placeholder: Description of the issue being faced
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed Feature
|
||||
description: |
|
||||
Description of the proposed features or changes to an existing feature to meet your needs
|
||||
placeholder: Description of the proposed feature(s)
|
||||
validations:
|
||||
required: true
|
||||
40
.github/ISSUE_TEMPLATE/module-readiness-checklist.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE/module-readiness-checklist.md
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Module Readiness Checklist
|
||||
about: Pre-flight checklist that modules must pass in order to be included in a release of the Cosmos SDK
|
||||
labels: 'module-readiness-checklist'
|
||||
---
|
||||
|
||||
## x/{MODULE_NAME} Module Readiness Checklist
|
||||
|
||||
This checklist is to be used for tracking the final internal audit of new Cosmos SDK modules prior to inclusion in a published release.
|
||||
|
||||
### Release Candidate Checklist
|
||||
|
||||
The following checklist should be gone through once the module has been fully implemented. This audit should be performed directly on `main`, or preferably on a `alpha` or `beta` release tag that includes the module.
|
||||
|
||||
The module **should not** be included in any Release Candidate tag until it has passed this checklist.
|
||||
|
||||
- [ ] API audit (at least 1 person) (@assignee)
|
||||
- [ ] Are Msg and Query methods and types well-named and organized?
|
||||
- [ ] Is everything well documented (inline godoc as well as the spec [README.md](https://github.com/cosmos/cosmos-sdk/blob/main/docs/spec/README.md) in module directory)
|
||||
- [ ] State machine audit (at least 2 people) (@assignee1, @assignee2)
|
||||
- [ ] Read through MsgServer code and verify correctness upon visual inspection
|
||||
- [ ] Ensure all state machine code which could be confusing is properly commented
|
||||
- [ ] Make sure state machine logic matches Msg method documentation
|
||||
- [ ] Ensure that all state machine edge cases are covered with tests and that test coverage is sufficient (at least 90% coverage on module code)
|
||||
- [ ] Assess potential threats for each method including spam attacks and ensure that threats have been addressed sufficiently. This should be done by writing up threat assessment for each method
|
||||
- [ ] Assess potential risks of any new third party dependencies and decide whether a dependency audit is needed
|
||||
- [ ] Completeness audit, fully implemented with tests (at least 1 person) (@assignee)
|
||||
- [ ] Genesis import and export of all state
|
||||
- [ ] Query services
|
||||
- [ ] CLI methods
|
||||
- [ ] All necessary migration scripts are present (if this is an upgrade of existing module)
|
||||
|
||||
### Published Release Checklist
|
||||
|
||||
After the above checks have been audited and the module is included in a tagged Release Candidate, the following additional checklist should be undertaken for live testing, and potentially a 3rd party audit (if deemed necessary):
|
||||
|
||||
- [ ] Testnet / devnet testing (2-3 people) (@assignee1, @assignee2, @assignee3)
|
||||
- [ ] All Msg methods have been tested especially in light of any potential threats identified
|
||||
- [ ] Genesis import and export has been tested
|
||||
- [ ] Nice to have (and needed in some cases if threats could be high): Official 3rd party audit
|
||||
87
.github/ISSUE_TEMPLATE/qa.md
vendored
Normal file
87
.github/ISSUE_TEMPLATE/qa.md
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
|
||||
v ✰ Thanks for opening an issue! ✰
|
||||
v Before smashing the submit button please review the template.
|
||||
v Word of caution: poorly thought-out proposals may be rejected
|
||||
v without deliberation
|
||||
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
|
||||
|
||||
## Summary
|
||||
|
||||
<!-- In a few short sentences summarize the release -->
|
||||
|
||||
## Major Changes
|
||||
|
||||
<!-- Describe the major changes associated to this release -->
|
||||
|
||||
## Gotchas
|
||||
|
||||
<!-- Gotchas is an area which changes could of been made that the auditors should be aware of -->
|
||||
|
||||
## QA Breakdown
|
||||
|
||||
* Audit
|
||||
* [ ] Audit BaseApp
|
||||
* [ ] Audit Types
|
||||
* [ ] Audit x/auth
|
||||
* [ ] Audit x/authz
|
||||
* [ ] Audit x/bank
|
||||
* [ ] Audit x/circuit
|
||||
* [ ] Audit x/consensus
|
||||
* [ ] Audit x/distribution
|
||||
* [ ] Audit x/evidence
|
||||
* [ ] Audit x/epochs
|
||||
* [ ] Audit x/feegrant
|
||||
* [ ] Audit x/genutil
|
||||
* [ ] Audit x/gov
|
||||
* [ ] Audit x/group
|
||||
* [ ] Audit x/mint
|
||||
* [ ] Audit x/nft
|
||||
* [ ] Audit x/protocolpool
|
||||
* [ ] Audit x/slashing
|
||||
* [ ] Audit x/staking
|
||||
* [ ] Audit x/tx
|
||||
* [ ] Audit x/upgrade
|
||||
* [ ] Audit client
|
||||
* [ ] Audit server
|
||||
* [ ] Audit store
|
||||
* [ ] Audit runtime
|
||||
* [ ] Audit simapp
|
||||
* [ ] Release alpha
|
||||
* [ ] Cosmos-SDK testnet
|
||||
* [ ] Public testnet (IBC, WASM, SDK)
|
||||
* [ ] Upgrade a chain with data from vX
|
||||
* Release documentation
|
||||
* [ ] Audit UPGRADING.md
|
||||
* [ ] Update all codeblock to the appropriate version number
|
||||
|
||||
|
||||
### Audit checklist
|
||||
|
||||
* please copy to a markdown to follow while you walk through the code
|
||||
* 2 people should be assigned to each section
|
||||
|
||||
* [ ] API audit
|
||||
* spec audit: check if the spec is complete.
|
||||
* Are Msg and Query methods and types well-named and organized?
|
||||
* Is everything well documented (inline godoc as well as package [`README.md`](https://docs.cosmos.network/main/spec/SPEC_MODULE#common-layout) in module directory)
|
||||
* check the proto definition - make sure everything is in accordance to ADR-30 (at least 1 person, TODO assignee)
|
||||
* Check new fields and endpoints have the `Since: cosmos-sdk X` comment
|
||||
* [ ] Completeness audit, fully implemented with tests
|
||||
* [ ] Genesis import and export of all state
|
||||
* [ ] Query services
|
||||
* [ ] CLI methods
|
||||
* [ ] All necessary migration scripts are present (if this is an upgrade of existing module)
|
||||
* [ ] State machine audit
|
||||
* [ ] Read through MsgServer code and verify correctness upon visual inspection
|
||||
* [ ] Ensure all state machine code which could be confusing is properly commented
|
||||
* [ ] Make sure state machine logic matches Msg method documentation
|
||||
* [ ] Ensure that all state machine edge cases are covered with tests and that test coverage is sufficient (at least 90% coverage on module code)
|
||||
* [ ] Assess potential threats for each method including spam attacks and ensure that threats have been addressed sufficiently. This should be done by writing up threat assessment for each method. Specifically we should be paying attention to:
|
||||
* [ ] algorithmic complexity and places this could be exploited (ex. nested `for` loops)
|
||||
* [ ] charging gas complex computation (ex. `for` loops)
|
||||
* [ ] storage is safe (we don't pollute the state).
|
||||
* [ ] Assess potential risks of any new third party dependencies and decide whether a dependency audit is needed
|
||||
* [ ] Check correctness of simulation implementation if any
|
||||
* [ ] Audit Changelog against commit log, ensuring all breaking changes, bug fixes, and improvements are properly documented.
|
||||
|
||||
If any changes are needed, please make them against main and backport them to release/vX.X.x
|
||||
32
.github/PULL_REQUEST_TEMPLATE.md
vendored
32
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -4,3 +4,35 @@ Closes: #XXXX
|
||||
|
||||
<!-- Add a description of the changes that this PR introduces and the files that
|
||||
are the most critical to review. -->
|
||||
|
||||
---
|
||||
|
||||
## Author Checklist
|
||||
|
||||
*All items are required. Please add a note to the item if the item is not applicable and
|
||||
please add links to any relevant follow up issues. Your PR will not be merged unless you satisfy
|
||||
all of these items.*
|
||||
|
||||
I have...
|
||||
|
||||
* [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title, you can find examples of the prefixes below:
|
||||
<!-- * `feat`: A new feature
|
||||
* `fix`: A bug fix
|
||||
* `docs`: Documentation only changes
|
||||
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
* `refactor`: A code change that neither fixes a bug nor adds a feature
|
||||
* `perf`: A code change that improves performance
|
||||
* `test`: Adding missing tests or correcting existing tests
|
||||
* `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
||||
* `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
||||
* `chore`: Other changes that don't modify src or test files
|
||||
* `revert`: Reverts a previous commit -->
|
||||
* [ ] confirmed `!` in the type prefix if API or client breaking change
|
||||
* [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
|
||||
* [ ] provided a link to the relevant issue or specification
|
||||
* [ ] reviewed "Files changed" and left comments if necessary
|
||||
* [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
|
||||
* [ ] added a changelog entry to `CHANGELOG.md`
|
||||
* [ ] updated the relevant documentation or specification, including comments for [documenting Go code](https://blog.golang.org/godoc)
|
||||
* [ ] confirmed all CI checks have passed
|
||||
|
||||
|
||||
19
.github/dependabot.yml
vendored
19
.github/dependabot.yml
vendored
@ -133,6 +133,24 @@ updates:
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/x/nft"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "02:25"
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/x/circuit"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: tuesday
|
||||
time: "02:30"
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "x/feegrant"
|
||||
schedule:
|
||||
@ -142,6 +160,7 @@ updates:
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/x/evidence"
|
||||
schedule:
|
||||
|
||||
6
.github/pr_labeler.yml
vendored
6
.github/pr_labeler.yml
vendored
@ -25,6 +25,8 @@
|
||||
- x/authz/**/*
|
||||
"C:x/bank":
|
||||
- x/bank/**/*
|
||||
"C:x/circuit":
|
||||
- x/circuit/**/*
|
||||
"C:x/consensus":
|
||||
- x/consensus/**/*
|
||||
"C:x/distribution":
|
||||
@ -37,8 +39,12 @@
|
||||
- x/genutil/**/*
|
||||
"C:x/gov":
|
||||
- x/gov/**/*
|
||||
"C:x/group":
|
||||
- x/group/**/*
|
||||
"C:x/mint":
|
||||
- x/mint/**/*
|
||||
"C:x/nft":
|
||||
- x/nft/**/*
|
||||
"C:x/protocolpool":
|
||||
- x/protocolpool/**/*
|
||||
"C:x/slashing":
|
||||
|
||||
6
.github/workflows/build-docs.yml
vendored
6
.github/workflows/build-docs.yml
vendored
@ -21,15 +21,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js 🔧
|
||||
uses: actions/setup-node@v6
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24.x"
|
||||
node-version: "16.x"
|
||||
|
||||
# npm install npm should be removed when https://github.com/npm/cli/issues/4942 is fixed
|
||||
- name: Build docs 🔧
|
||||
|
||||
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -20,10 +20,10 @@ jobs:
|
||||
matrix:
|
||||
go-arch: ["amd64", "arm64"] # drop 32 bit support for now (and maybe forever)
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: install aarch64-gcc
|
||||
if: matrix.go-arch == 'arm64'
|
||||
@ -36,9 +36,9 @@ jobs:
|
||||
- name: Build with legacy app.go
|
||||
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="legacy" make build
|
||||
# TODO re-add with comet v1
|
||||
- name: Build with BLS12381
|
||||
if: matrix.go-arch == 'amd64'
|
||||
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="bls12381" make build
|
||||
#- name: Build with BLS12381
|
||||
# if: matrix.go-arch == 'amd64'
|
||||
# run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="bls12381" make build
|
||||
- name: Build with Secp_cgo
|
||||
if: matrix.go-arch == 'amd64'
|
||||
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="secp" make build
|
||||
|
||||
4
.github/workflows/changelog-reminder.yml
vendored
4
.github/workflows/changelog-reminder.yml
vendored
@ -11,9 +11,9 @@ jobs:
|
||||
name: Changelog Reminder
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
# Skip draft PRs and PRs starting with: revert, test, chore, ci, docs, style, build, refactor
|
||||
if: ${{ !github.event.pull_request.draft && !contains(github.event.pull_request.title, 'revert') && !contains(github.event.pull_request.title, 'test') && !contains(github.event.pull_request.title, 'chore') && !contains(github.event.pull_request.title, 'ci') && !contains(github.event.pull_request.title, 'docs') && !contains(github.event.pull_request.title, 'style') && !contains(github.event.pull_request.title, 'build') && !contains(github.event.pull_request.title, 'refactor') }}
|
||||
if: "!github.event.pull_request.draft && !contains(github.event.pull_request.title, 'revert') && !contains(github.event.pull_request.title, 'test') && !contains(github.event.pull_request.title, 'chore') && !contains(github.event.pull_request.title, 'ci') && !contains(github.event.pull_request.title, 'docs') && !contains(github.event.pull_request.title, 'style') && !contains(github.event.pull_request.title, 'build') && !contains(github.event.pull_request.title, 'refactor')"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mskelton/changelog-reminder-action@v3
|
||||
with:
|
||||
message: "@${{ github.actor }} your pull request is missing a changelog!"
|
||||
|
||||
12
.github/workflows/codeql-analysis.yml
vendored
12
.github/workflows/codeql-analysis.yml
vendored
@ -26,14 +26,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: "go"
|
||||
config-file: ./.github/codeql/config.yml
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@ -55,4 +55,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
19
.github/workflows/consensuswarn.yml
vendored
Normal file
19
.github/workflows/consensuswarn.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: "Warn about consensus code changes"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
main:
|
||||
permissions:
|
||||
pull-requests: write # For reading the PR and posting comment
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: orijtech/consensuswarn@main
|
||||
with:
|
||||
roots: "github.com/cosmos/cosmos-sdk/baseapp.BaseApp.PrepareProposal,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.ProcessProposal,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.FinalizeBlock,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.Commit,github.com/cosmos/cosmos-sdk/baseapp.BaseApp.VerifyVoteExtension"
|
||||
8
.github/workflows/dependabot-update-all.yml
vendored
8
.github/workflows/dependabot-update-all.yml
vendored
@ -14,19 +14,19 @@ jobs:
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Generate Token
|
||||
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v1
|
||||
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: "${{ secrets.APP_ID }}"
|
||||
private-key: "${{ secrets.APP_PRIVATE_KEY }}"
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
token: "${{ steps.app-token.outputs.token }}"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Extract updated dependency
|
||||
id: deps
|
||||
|
||||
6
.github/workflows/dependencies-review.yml
vendored
6
.github/workflows/dependencies-review.yml
vendored
@ -11,11 +11,11 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
- name: "Setup Go"
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.24"
|
||||
check-latest: true
|
||||
- name: "Dependency Review"
|
||||
uses: actions/dependency-review-action@v4
|
||||
|
||||
6
.github/workflows/docker.yml
vendored
6
.github/workflows/docker.yml
vendored
@ -22,7 +22,7 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
sid-token: write
|
||||
|
||||
env:
|
||||
# Use docker.io for Docker Hub if empty
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
build:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@ -71,3 +71,5 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
72
.github/workflows/enforce_signed.yml
vendored
72
.github/workflows/enforce_signed.yml
vendored
@ -1,72 +0,0 @@
|
||||
name: Enforce Signed Commits on PRs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
permissions:
|
||||
contents: read # needed to read commits
|
||||
pull-requests: write # needed to close the PR
|
||||
issues: write # needed to post a comment
|
||||
|
||||
jobs:
|
||||
check-signed-commits:
|
||||
# Skip drafts to avoid noise while a PR is still being prepared
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Verify all PR commits are signed
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const { owner, repo } = context.repo;
|
||||
const prNumber = context.payload.pull_request.number;
|
||||
|
||||
// Get all commits in the PR (handles pagination)
|
||||
const commits = await github.paginate(
|
||||
github.rest.pulls.listCommits,
|
||||
{ owner, repo, pull_number: prNumber, per_page: 100 }
|
||||
);
|
||||
|
||||
// Any commit without a verified signature?
|
||||
const unsigned = commits.filter(c => !(c.commit?.verification?.verified));
|
||||
|
||||
if (unsigned.length === 0) {
|
||||
core.info("All commits are verified-signed. ✅");
|
||||
return;
|
||||
}
|
||||
|
||||
// Build a helpful message & list the offending commits
|
||||
const list = unsigned
|
||||
.map(c => `- ${c.sha.substring(0,7)} — ${c.commit.message.split('\n')[0]}`)
|
||||
.join('\n');
|
||||
|
||||
const msg = [
|
||||
"🔒 **PR closed: unsigned commits detected**",
|
||||
"",
|
||||
`This pull request contains **${unsigned.length}** commit(s) without a *verified* signature.`,
|
||||
"",
|
||||
"**How to fix:**",
|
||||
"1. Set up commit signing (GPG or SSH).",
|
||||
"2. Amend/rebase so **every** commit in this PR is verified-signed.",
|
||||
"3. Push the updated branch and open a new PR, or ask a maintainer to reopen once fixed.",
|
||||
"",
|
||||
"Docs: https://docs.github.com/authentication/managing-commit-signature-verification",
|
||||
"",
|
||||
"**Unsigned commits:**",
|
||||
list
|
||||
].join("\n");
|
||||
|
||||
// Post the explanation as a PR comment (PRs are Issues in the API)
|
||||
await github.rest.issues.createComment({
|
||||
owner, repo, issue_number: prNumber, body: msg
|
||||
});
|
||||
|
||||
// Close the PR
|
||||
await github.rest.pulls.update({
|
||||
owner, repo, pull_number: prNumber, state: "closed"
|
||||
});
|
||||
|
||||
// Mark the job as failed so it’s obvious in checks
|
||||
core.setFailed(`Closed PR: found ${unsigned.length} unsigned commit(s).`);
|
||||
36
.github/workflows/gosec.yml
vendored
Normal file
36
.github/workflows/gosec.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Run Gosec
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "**/*.go"
|
||||
- "go.mod"
|
||||
- "go.sum"
|
||||
|
||||
jobs:
|
||||
Gosec:
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GO111MODULE: on
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Gosec Security Scanner
|
||||
uses: securego/gosec@master
|
||||
with:
|
||||
args: "-exclude=G101,G107 -exclude-generated -no-fail -fmt sarif -out results.sarif ./..."
|
||||
|
||||
- name: Upload SARIF file
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
2
.github/workflows/lint-pr.yml
vendored
2
.github/workflows/lint-pr.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v6.1.1
|
||||
- uses: amannn/action-semantic-pull-request@v5.5.3
|
||||
id: lint_pr_title
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
@ -14,10 +14,10 @@ jobs:
|
||||
name: golangci-lint
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
|
||||
2
.github/workflows/md-link-checker.yml
vendored
2
.github/workflows/md-link-checker.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
markdown-link-check:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- run: cd docs && sh ./pre.sh
|
||||
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.17
|
||||
with:
|
||||
|
||||
12
.github/workflows/pr-go-mod-tidy-mocks.yml
vendored
12
.github/workflows/pr-go-mod-tidy-mocks.yml
vendored
@ -16,11 +16,11 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Run go mod tidy
|
||||
run: ./scripts/go-mod-tidy-all.sh
|
||||
@ -36,11 +36,11 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Generate mocks
|
||||
run: make mocks
|
||||
|
||||
2
.github/workflows/proto-docker.yml
vendored
2
.github/workflows/proto-docker.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
# set VERSION to new version when making changes, when merged to main the image will automatically be pushed
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
2
.github/workflows/proto-registry.yml
vendored
2
.github/workflows/proto-registry.yml
vendored
@ -16,7 +16,7 @@
|
||||
# runs-on: depot-ubuntu-22.04-4
|
||||
# name: "Push to buf.build/cosmos/cosmos-sdk"
|
||||
# steps:
|
||||
# - uses: actions/checkout@v5
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: bufbuild/buf-setup-action@v1.50.0
|
||||
# - run: buf push proto --tag ${{ github.ref_type == 'tag' && github.ref_name || github.sha }} # https://github.com/bufbuild/buf-push-action/issues/20
|
||||
|
||||
|
||||
4
.github/workflows/proto.yml
vendored
4
.github/workflows/proto.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bufbuild/buf-setup-action@v1.50.0
|
||||
- uses: bufbuild/buf-lint-action@v1
|
||||
with:
|
||||
@ -23,7 +23,7 @@ jobs:
|
||||
break-check:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bufbuild/buf-setup-action@v1.50.0
|
||||
- uses: bufbuild/buf-breaking-action@v1
|
||||
with:
|
||||
|
||||
6
.github/workflows/release-confix.yml
vendored
6
.github/workflows/release-confix.yml
vendored
@ -13,10 +13,10 @@ jobs:
|
||||
contents: write # for goreleaser/goreleaser-action to create a GitHub release
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
# get 'v*.*.*' part from 'confix/v*.*.*' and save to $GITHUB_ENV
|
||||
- name: Set env
|
||||
|
||||
6
.github/workflows/release-cosmovisor.yml
vendored
6
.github/workflows/release-cosmovisor.yml
vendored
@ -13,10 +13,10 @@ jobs:
|
||||
contents: write # for goreleaser/goreleaser-action to create a GitHub release
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
# get 'v*.*.*' part from 'cosmovisor/v*.*.*' and save to $GITHUB_ENV
|
||||
- name: Set env
|
||||
|
||||
6
.github/workflows/release-simd.yml
vendored
6
.github/workflows/release-simd.yml
vendored
@ -13,10 +13,10 @@ jobs:
|
||||
contents: write # for goreleaser/goreleaser-action to create a GitHub release
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
# get 'v*.*.*' part from 'simd/v*.*.*' and save to $GITHUB_ENV
|
||||
- name: Set env
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -16,11 +16,11 @@ jobs:
|
||||
contents: write # for goreleaser/goreleaser-action to create a GitHub release
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v6
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
53
.github/workflows/sims-047.yml
vendored
53
.github/workflows/sims-047.yml
vendored
@ -16,12 +16,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip-sims')"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.47.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make build
|
||||
|
||||
@ -31,9 +31,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Install runsim
|
||||
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
|
||||
@ -47,12 +47,12 @@ jobs:
|
||||
needs: [build, install-runsim]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.47.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -66,12 +66,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.47.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -85,12 +85,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.47.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -100,6 +100,31 @@ jobs:
|
||||
run: |
|
||||
make test-sim-multi-seed-short
|
||||
|
||||
sims-notify-success:
|
||||
needs:
|
||||
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ success() }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get previous workflow status
|
||||
uses: ./.github/actions/last-workflow-status
|
||||
id: last_status
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Notify Slack on success
|
||||
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
|
||||
uses: rtCamp/action-slack-notify@v2.3.3
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: sdk-sims
|
||||
SLACK_USERNAME: Sim Tests release/0.47.x
|
||||
SLACK_ICON_EMOJI: ":white_check_mark:"
|
||||
SLACK_COLOR: good
|
||||
SLACK_MESSAGE: 0.47.x Sims are passing
|
||||
SLACK_FOOTER: ""
|
||||
|
||||
sims-notify-failure:
|
||||
permissions:
|
||||
contents: none
|
||||
|
||||
55
.github/workflows/sims-050.yml
vendored
55
.github/workflows/sims-050.yml
vendored
@ -2,6 +2,8 @@ name: Sims release/0.50.x
|
||||
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
|
||||
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
|
||||
|
||||
# TODO - update to 53 once we have cut release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0,12 * * *"
|
||||
@ -17,12 +19,12 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
if: "!contains(github.event.head_commit.message, 'skip-sims')"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.50.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make build
|
||||
|
||||
@ -32,9 +34,9 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Install runsim
|
||||
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
|
||||
@ -48,12 +50,12 @@ jobs:
|
||||
needs: [build, install-runsim]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.50.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -67,12 +69,12 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.50.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -86,12 +88,12 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "release/v0.50.x"
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@ -101,6 +103,31 @@ jobs:
|
||||
run: |
|
||||
make test-sim-multi-seed-short
|
||||
|
||||
sims-notify-success:
|
||||
needs:
|
||||
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
if: ${{ success() }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get previous workflow status
|
||||
uses: ./.github/actions/last-workflow-status
|
||||
id: last_status
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Notify Slack on success
|
||||
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
|
||||
uses: rtCamp/action-slack-notify@v2.3.3
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: sdk-sims
|
||||
SLACK_USERNAME: Sim Tests release/0.50.x
|
||||
SLACK_ICON_EMOJI: ":white_check_mark:"
|
||||
SLACK_COLOR: good
|
||||
SLACK_MESSAGE: 0.50.x Sims are passing
|
||||
SLACK_FOOTER: ""
|
||||
|
||||
sims-notify-failure:
|
||||
permissions:
|
||||
contents: none
|
||||
|
||||
121
.github/workflows/sims-053.yml
vendored
121
.github/workflows/sims-053.yml
vendored
@ -1,121 +0,0 @@
|
||||
name: Sims release/0.53.x
|
||||
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
|
||||
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0,12 * * *"
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-sims-050
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
if: "!contains(github.event.head_commit.message, 'skip-sims')"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: "release/v0.53.x"
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
- run: make build
|
||||
|
||||
install-runsim:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
- name: Install runsim
|
||||
run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
|
||||
test-sim-import-export:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [build, install-runsim]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: "release/v0.53.x"
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
- name: test-sim-import-export
|
||||
run: |
|
||||
make test-sim-import-export
|
||||
|
||||
test-sim-after-import:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: "release/v0.53.x"
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
- name: test-sim-after-import
|
||||
run: |
|
||||
make test-sim-after-import
|
||||
|
||||
test-sim-multi-seed-short:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [build, install-runsim]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: "release/v0.53.x"
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/bin
|
||||
key: ${{ runner.os }}-go-runsim-binary
|
||||
- name: test-sim-multi-seed-short
|
||||
run: |
|
||||
make test-sim-multi-seed-short
|
||||
|
||||
sims-notify-failure:
|
||||
permissions:
|
||||
contents: none
|
||||
needs:
|
||||
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
if: ${{ failure() }}
|
||||
steps:
|
||||
- name: Notify Slack on failure
|
||||
uses: rtCamp/action-slack-notify@v2.3.3
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: sdk-sims
|
||||
SLACK_USERNAME: Sim Tests release/0.50.x
|
||||
SLACK_ICON_EMOJI: ":skull:"
|
||||
SLACK_COLOR: danger
|
||||
SLACK_MESSAGE: 0.50.x Sims are failing
|
||||
SLACK_FOOTER: ""
|
||||
37
.github/workflows/sims-nightly.yml
vendored
37
.github/workflows/sims-nightly.yml
vendored
@ -18,10 +18,10 @@ jobs:
|
||||
test-sim-multi-seed-long:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-multi-seed-long
|
||||
env:
|
||||
@ -33,10 +33,10 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-import-export
|
||||
env:
|
||||
@ -44,6 +44,31 @@ jobs:
|
||||
run: |
|
||||
make test-sim-import-export
|
||||
|
||||
sims-notify-success:
|
||||
needs: [test-sim-multi-seed-long, test-sim-import-export]
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
if: ${{ success() }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Get previous workflow status
|
||||
uses: ./.github/actions/last-workflow-status
|
||||
id: last_status
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Notify Slack on success
|
||||
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
|
||||
uses: rtCamp/action-slack-notify@v2.3.3
|
||||
env:
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
SLACK_CHANNEL: sdk-sims
|
||||
SLACK_USERNAME: Sim Tests
|
||||
SLACK_ICON_EMOJI: ":white_check_mark:"
|
||||
SLACK_COLOR: good
|
||||
SLACK_MESSAGE: Sims Nightly (Long) are passing
|
||||
SLACK_FOOTER: ""
|
||||
|
||||
sims-notify-failure:
|
||||
permissions:
|
||||
contents: none
|
||||
|
||||
30
.github/workflows/sims.yml
vendored
30
.github/workflows/sims.yml
vendored
@ -18,10 +18,10 @@ jobs:
|
||||
runs-on: depot-ubuntu-22.04-16
|
||||
if: "!contains(github.event.head_commit.message, 'skip-sims')"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- run: make build
|
||||
|
||||
@ -30,10 +30,10 @@ jobs:
|
||||
needs: [build]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-import-export
|
||||
run: |
|
||||
@ -44,10 +44,10 @@ jobs:
|
||||
needs: [build]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-after-import
|
||||
run: |
|
||||
@ -58,10 +58,10 @@ jobs:
|
||||
needs: [build]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-nondeterminism-streaming
|
||||
run: |
|
||||
@ -72,10 +72,10 @@ jobs:
|
||||
needs: [build]
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: test-sim-multi-seed-short
|
||||
run: |
|
||||
|
||||
21
.github/workflows/stale.yml
vendored
21
.github/workflows/stale.yml
vendored
@ -1,21 +0,0 @@
|
||||
name: "Close stale issues & pull requests"
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
pull-requests: write # For reading the PR and adding the label
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs."
|
||||
stale-issue-message: "This issue is stale because it has been open 45 days with no activity. Remove `Status: Stale` label or comment or this will be closed in 7 days."
|
||||
days-before-stale: 45
|
||||
days-before-close: 7
|
||||
stale-pr-label: "Status: Stale"
|
||||
stale-issue-label: "Status: Stale"
|
||||
35
.github/workflows/systemtests.yml
vendored
35
.github/workflows/systemtests.yml
vendored
@ -1,5 +1,4 @@
|
||||
name: System Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
merge_group:
|
||||
@ -21,22 +20,16 @@ jobs:
|
||||
outputs:
|
||||
git_diff: ${{ steps.git_diff.outputs.diff }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-tags: true
|
||||
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: |
|
||||
./go.sum
|
||||
**/go.mod
|
||||
**/go.sum
|
||||
**/Makefile
|
||||
Makefile
|
||||
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
@ -54,35 +47,17 @@ jobs:
|
||||
if: needs.setup.outputs.git_diff
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run system tests
|
||||
run: |
|
||||
mkdir -p ./tests/systemtests/testnet
|
||||
make test-system
|
||||
|
||||
- name: Upload system test logs if failed
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: system-test-logs
|
||||
path: ./tests/systemtests/testnet/*.out
|
||||
|
||||
test-system-legacy:
|
||||
needs: setup
|
||||
if: needs.setup.outputs.git_diff
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run legacy system tests
|
||||
run: |
|
||||
mkdir -p ./tests/systemtests/testnet
|
||||
COSMOS_BUILD_OPTIONS=legacy make test-system
|
||||
|
||||
- name: Upload legacy system test logs if failed
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: legacy-system-test-logs
|
||||
path: ./tests/systemtests/testnet/*.out
|
||||
|
||||
393
.github/workflows/test.yml
vendored
393
.github/workflows/test.yml
vendored
@ -18,10 +18,10 @@ jobs:
|
||||
split-test-files:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
- name: Create a file with all core Cosmos SDK pkgs
|
||||
run: go list ./... > pkgs.txt
|
||||
@ -52,10 +52,10 @@ jobs:
|
||||
matrix:
|
||||
part: ["00", "01", "02", "03"]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: go.sum
|
||||
@ -86,10 +86,10 @@ jobs:
|
||||
test-integration:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: go.sum
|
||||
@ -117,10 +117,10 @@ jobs:
|
||||
test-e2e:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.21"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: go.sum
|
||||
@ -147,9 +147,9 @@ jobs:
|
||||
|
||||
repo-analysis:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
needs: [tests, test-integration, test-e2e, test-clientv2, test-core, test-depinject, test-errors, test-math, test-schema, test-collections, test-cosmovisor, test-confix, test-store, test-log, test-x-tx, test-tools-benchmark]
|
||||
needs: [tests, test-integration, test-e2e]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
@ -184,92 +184,14 @@ jobs:
|
||||
with:
|
||||
name: "${{ github.sha }}-e2e-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-clientv2-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-core-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-depinject-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-errors-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-math-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-schema-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-collections-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-cosmovisor-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-confix-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-store-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-blockstm-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-log-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-x-tx-coverage"
|
||||
continue-on-error: true
|
||||
- uses: actions/download-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-tools-benchmark-coverage"
|
||||
continue-on-error: true
|
||||
- name: Upload coverage to Codecov
|
||||
if: env.GIT_DIFF
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
files: ./00profile.out,./01profile.out,./02profile.out,./03profile.out,./integration-profile.out,./e2e-profile.out,./client/v2/coverage.out,./core/coverage.out,./depinject/coverage.out,./errors/coverage.out,./math/coverage.out,./schema/coverage.out,./collections/coverage.out,./tools/cosmovisor/coverage.out,./tools/confix/coverage.out,./store/coverage.out,./log/coverage.out,./x/tx/coverage.out,./tools/benchmark/coverage.out,./blockstm/coverage.out
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
test-sim-nondeterminism:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: go.sum
|
||||
@ -299,10 +221,10 @@ jobs:
|
||||
test-clientv2:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: client/v2/go.sum
|
||||
@ -318,19 +240,14 @@ jobs:
|
||||
run: |
|
||||
cd client/v2
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-clientv2-coverage"
|
||||
path: ./client/v2/coverage.out
|
||||
|
||||
test-core:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: core/go.sum
|
||||
@ -346,19 +263,14 @@ jobs:
|
||||
run: |
|
||||
cd core
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-core-coverage"
|
||||
path: ./core/coverage.out
|
||||
|
||||
test-depinject:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.22"
|
||||
check-latest: false
|
||||
cache: true
|
||||
cache-dependency-path: depinject/go.sum
|
||||
@ -374,19 +286,14 @@ jobs:
|
||||
run: |
|
||||
cd depinject
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-depinject-coverage"
|
||||
path: ./depinject/coverage.out
|
||||
|
||||
test-errors:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.22"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: errors/go.sum
|
||||
@ -402,19 +309,14 @@ jobs:
|
||||
run: |
|
||||
cd errors
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-errors-coverage"
|
||||
path: ./errors/coverage.out
|
||||
|
||||
test-math:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.22"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: math/go.sum
|
||||
@ -430,17 +332,12 @@ jobs:
|
||||
run: |
|
||||
cd math
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-math-coverage"
|
||||
path: ./math/coverage.out
|
||||
|
||||
test-schema:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.12"
|
||||
cache: true
|
||||
@ -457,19 +354,14 @@ jobs:
|
||||
run: |
|
||||
cd schema
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-schema-coverage"
|
||||
path: ./schema/coverage.out
|
||||
|
||||
test-collections:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: collections/go.sum
|
||||
@ -485,19 +377,14 @@ jobs:
|
||||
run: |
|
||||
cd collections
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-collections-coverage"
|
||||
path: ./collections/coverage.out
|
||||
|
||||
test-cosmovisor:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: tools/cosmovisor/go.sum
|
||||
@ -513,19 +400,14 @@ jobs:
|
||||
run: |
|
||||
cd tools/cosmovisor
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-cosmovisor-coverage"
|
||||
path: ./tools/cosmovisor/coverage.out
|
||||
|
||||
test-confix:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: tools/confix/go.sum
|
||||
@ -541,19 +423,14 @@ jobs:
|
||||
run: |
|
||||
cd tools/confix
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-confix-coverage"
|
||||
path: ./tools/confix/coverage.out
|
||||
|
||||
test-store:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: store/go.sum
|
||||
@ -570,46 +447,14 @@ jobs:
|
||||
cd store
|
||||
(cd streaming/abci/examples/file && go build .)
|
||||
go test -ldflags "-r /usr/local/lib" -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-store-coverage"
|
||||
path: ./store/coverage.out
|
||||
test-blockstm:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: store/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
blockstm/**/*.go
|
||||
blockstm/go.mod
|
||||
blockstm/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd blockstm
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -coverpkg=./,./tree -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-blockstm-coverage"
|
||||
path: ./blockstm/coverage.out
|
||||
|
||||
test-log:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.21"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: log/go.sum
|
||||
@ -625,11 +470,6 @@ jobs:
|
||||
run: |
|
||||
cd log
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-log-coverage"
|
||||
path: ./log/coverage.out
|
||||
|
||||
#############################
|
||||
### Cosmos SDK x/{module} ###
|
||||
@ -641,10 +481,10 @@ jobs:
|
||||
test-x-tx:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/tx/go.sum
|
||||
@ -660,19 +500,129 @@ jobs:
|
||||
run: |
|
||||
cd x/tx
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
|
||||
test-x-nft:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
name: "${{ github.sha }}-x-tx-coverage"
|
||||
path: ./x/tx/coverage.out
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/nft/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
x/nft/**/*.go
|
||||
x/nft/go.mod
|
||||
x/nft/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd x/nft
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
|
||||
test-x-circuit:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/circuit/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
x/circuit/**/*.go
|
||||
x/circuit/go.mod
|
||||
x/circuit/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd x/circuit
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
|
||||
test-x-feegrant:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/feegrant/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
x/feegrant/**/*.go
|
||||
x/feegrant/go.mod
|
||||
x/feegrant/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd x/feegrant
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
|
||||
test-x-evidence:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/evidence/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
x/evidence/**/*.go
|
||||
x/evidence/go.mod
|
||||
x/evidence/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd x/evidence
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
|
||||
test-x-upgrade:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.23"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: x/upgrade/go.sum
|
||||
- uses: technote-space/get-diff-action@v6.1.2
|
||||
id: git_diff
|
||||
with:
|
||||
PATTERNS: |
|
||||
x/upgrade/**/*.go
|
||||
x/upgrade/go.mod
|
||||
x/upgrade/go.sum
|
||||
- name: tests
|
||||
if: env.GIT_DIFF
|
||||
run: |
|
||||
cd x/upgrade
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
|
||||
|
||||
test-tools-benchmark:
|
||||
runs-on: depot-ubuntu-22.04-4
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.5"
|
||||
go-version: "1.23.2"
|
||||
check-latest: true
|
||||
cache: true
|
||||
cache-dependency-path: tools/benchmark/go.sum
|
||||
@ -688,8 +638,3 @@ jobs:
|
||||
run: |
|
||||
cd tools/benchmark
|
||||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace' ./...
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: env.GIT_DIFF
|
||||
with:
|
||||
name: "${{ github.sha }}-tools-benchmark-coverage"
|
||||
path: ./tools/benchmark/coverage.out
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -65,5 +65,3 @@ debug_container.log
|
||||
*.synctex.gz
|
||||
/x/genutil/config/priv_validator_key.json
|
||||
/x/genutil/data/priv_validator_state.json
|
||||
/.envrc
|
||||
/.env
|
||||
|
||||
1
.gitpod.yml
Normal file
1
.gitpod.yml
Normal file
@ -0,0 +1 @@
|
||||
image: ghcr.io/notional-labs/cosmos
|
||||
@ -51,9 +51,6 @@ linters:
|
||||
rules:
|
||||
- name: redefines-builtin-id
|
||||
disabled: true
|
||||
- name: exported
|
||||
severity: error
|
||||
disabled: false
|
||||
staticcheck:
|
||||
checks:
|
||||
- all
|
||||
@ -62,16 +59,11 @@ linters:
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
rules:
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: 'ST1000:'
|
||||
- linters:
|
||||
- revive
|
||||
text: 'or be unexported' # don't report types that have no comments at all. there are way too many of these.
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: 'ST1003:'
|
||||
@ -135,7 +127,6 @@ formatters:
|
||||
gofumpt:
|
||||
extra-rules: true
|
||||
exclusions:
|
||||
|
||||
generated: lax
|
||||
paths:
|
||||
- server/grpc/gogoreflection/fix_registration.go
|
||||
|
||||
85
CHANGELOG.md
85
CHANGELOG.md
@ -36,68 +36,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
# Changelog
|
||||
|
||||
## UNRELEASED
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* [#25090](https://github.com/cosmos/cosmos-sdk/pull/25090) Moved deprecated modules to `./contrib`. These modules are still available but will no longer be actively maintained or supported in the Cosmos SDK Bug Bounty program.
|
||||
* `x/group`
|
||||
* `x/nft`
|
||||
* `x/circuit`
|
||||
* `x/crisis`
|
||||
* (crypto) [#24414](https://github.com/cosmos/cosmos-sdk/pull/24414) Remove sr25519 support, since it was removed in CometBFT v1.x (see: CometBFT [#3646](https://github.com/cometbft/cometbft/pull/3646)).
|
||||
* (x/gov) [#25615](https://github.com/cosmos/cosmos-sdk/pull/25615) Decouple `x/gov` from `x/staking` by making `CalculateVoteResultsAndVotingPowerFn` a required parameter to `keeper.NewKeeper` instead of `StakingKeeper`.
|
||||
`BondedTokens` has been renamed to `ValidatorPower` and `TotalBondedTokens` has been renamed to `TotalValidatorPower` to allow for multiple validator power representations.
|
||||
* (x/gov) [#25617](https://github.com/cosmos/cosmos-sdk/pull/25617) `AfterProposalSubmission` hook now includes proposer address as a parameter.
|
||||
* (x/gov) [#25616](https://github.com/cosmos/cosmos-sdk/pull/25616) `DistrKeeper` `x/distribution` is now optional. Genesis validation ensures `distrKeeper` is set if distribution module is used as proposal cancel destination.
|
||||
|
||||
### Features
|
||||
|
||||
* [#25471](https://github.com/cosmos/cosmos-sdk/pull/25471) Full BLS 12-381 support enabled.
|
||||
* [#24872](https://github.com/cosmos/cosmos-sdk/pull/24872) Support BLS 12-381 for cli `init`, `gentx`, `collect-gentx`
|
||||
* (crypto) [#24919](https://github.com/cosmos/cosmos-sdk/pull/24919) add `NewPubKeyFromBytes` function to the `secp256r1` package to create `PubKey` from bytes
|
||||
* (server) [#24720](https://github.com/cosmos/cosmos-sdk/pull/24720) add `verbose_log_level` flag for configuring the log level when switching to verbose logging mode during sensitive operations (such as chain upgrades).
|
||||
* (crypto) [#24861](https://github.com/cosmos/cosmos-sdk/pull/24861) add `PubKeyFromCometTypeAndBytes` helper function to convert from `comet/v2` PubKeys to the `cryptotypes.Pubkey` interface.
|
||||
* (abci_utils) [#25008](https://github.com/cosmos/cosmos-sdk/pull/25008) add the ability to assign a custom signer extraction adapter in `DefaultProposalHandler`.
|
||||
* (crypto/ledger) [#25435](https://github.com/cosmos/cosmos-sdk/pull/25435) Add SetDERConversion to reset skipDERConversion and App name for ledger.
|
||||
* (gRPC) [#25565](https://github.com/cosmos/cosmos-sdk/pull/25565) Support for multi gRPC query clients serve with historical binaries to serve proper historical state.
|
||||
* (blockstm) [#25600](https://github.com/cosmos/cosmos-sdk/pull/25600) Allow dynamic retrieval of the coin denomination from multi store at runtime.
|
||||
* [#25516](https://github.com/cosmos/cosmos-sdk/pull/25516) Support automatic configuration of OpenTelemetry via [OpenTelemetry declarative configuration](https://pkg.go.dev/go.opentelemetry.io/contrib/otelconf) and add OpenTelemetry instrumentation of `BaseApp`.
|
||||
|
||||
### Improvements
|
||||
|
||||
* (types) [#25342](https://github.com/cosmos/cosmos-sdk/pull/25342) Undeprecated `EmitEvent` and `EmitEvents` on the `EventManager`. These functions will continue to be maintained.
|
||||
* (types) [#24668](https://github.com/cosmos/cosmos-sdk/pull/24668) Scope the global config to a particular binary so that multiple SDK binaries can be properly run on the same machine.
|
||||
* (baseapp) [#24655](https://github.com/cosmos/cosmos-sdk/pull/24655) Add mutex locks for `state` and make `lastCommitInfo` atomic to prevent race conditions between `Commit` and `CreateQueryContext`.
|
||||
* (proto) [#24161](https://github.com/cosmos/cosmos-sdk/pull/24161) Remove unnecessary annotations from `x/staking` authz proto.
|
||||
* (x/bank) [#24660](https://github.com/cosmos/cosmos-sdk/pull/24660) Improve performance of the `GetAllBalances` and `GetAccountsBalances` keeper methods.
|
||||
* (collections) [#25464](https://github.com/cosmos/cosmos-sdk/pull/25464) Add `IterateRaw` method to `Multi` index type to satisfty query `Collection` interface.
|
||||
* (x/mint) [#25562](https://github.com/cosmos/cosmos-sdk/pull/25562) Improve and test `x/mint` params validation.
|
||||
* (api) [#25613](https://github.com/cosmos/cosmos-sdk/pull/25613) Separated deprecated modules into the contrib directory, distinct from api, to enable and unblock new proto changes without affecting legacy code.
|
||||
* (server) [#25632](https://github.com/cosmos/cosmos-sdk/pull/25632) Add missing call to close the app on shutdown.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* (x/staking) [#25649](https://github.com/cosmos/cosmos-sdk/pull/25649) Add missing `defer iterator.Close()` calls in `IterateDelegatorRedelegations` and `GetRedelegations` to prevent resource leaks.
|
||||
* (mempool) [#25563](https://github.com/cosmos/cosmos-sdk/pull/25563) Cleanup sender indices in case of tx replacement.
|
||||
* (x/epochs) [#25425](https://github.com/cosmos/cosmos-sdk/pull/25425) Fix `InvokeSetHooks` being called with a nil keeper and `AppModule` containing a copy instead of a pointer (hooks set post creating the `AppModule` like with depinject didn't apply because it's a different instance).
|
||||
* (client, client/rpc, x/auth/tx) [#24551](https://github.com/cosmos/cosmos-sdk/pull/24551) Handle cancellation properly when supplying context to client methods.
|
||||
* (x/authz) [#24638](https://github.com/cosmos/cosmos-sdk/pull/24638) Fixed a minor bug where the grant key was cast as a string and dumped directly into the error message leading to an error string possibly containing invalid UTF-8.
|
||||
* (client, client/rpc, x/auth/tx) [#24551](https://github.com/cosmos/cosmos-sdk/pull/24551) Handle cancellation properly when supplying context to client methods.
|
||||
* (x/epochs) [#24770](https://github.com/cosmos/cosmos-sdk/pull/24770) Fix register of epoch hooks in `InvokeSetHooks`.
|
||||
* (x/epochs) [#25087](https://github.com/cosmos/cosmos-sdk/pull/25087) Remove redundant error check in BeginBlocker.
|
||||
* [GHSA-p22h-3m2v-cmgh](https://github.com/cosmos/cosmos-sdk/security/advisories/GHSA-p22h-3m2v-cmgh) Fix x/distribution can halt when historical rewards overflow.
|
||||
* (x/staking) [#25258](https://github.com/cosmos/cosmos-sdk/pull/25258) Add delegator address to redelegate event.
|
||||
* (cli) [#25485](https://github.com/cosmos/cosmos-sdk/pull/25485) Avoid failed to convert address field in `withdraw-validator-commission` cmd.
|
||||
* (baseapp) [#25642](https://github.com/cosmos/cosmos-sdk/pull/25642) Mark pre-block events for indexing based on local configuration.
|
||||
|
||||
### Deprecated
|
||||
|
||||
* (x/nft) [#24575](https://github.com/cosmos/cosmos-sdk/pull/24575) Deprecate the `x/nft` module in the Cosmos SDK repository. This module will not be maintained to the extent that our core modules will and will be kept in a [legacy repo](https://github.com/cosmos/cosmos-legacy).
|
||||
* (x/group) [#24571](https://github.com/cosmos/cosmos-sdk/pull/24571) Deprecate the `x/group` module in the Cosmos SDK repository. This module will not be maintained to the extent that our core modules will and will be kept in a [legacy repo](https://github.com/cosmos/cosmos-legacy).
|
||||
* (types) [#24664](https://github.com/cosmos/cosmos-sdk/pull/24664) Deprecate the `Invariant` type in the Cosmos SDK.
|
||||
* [#25516](https://github.com/cosmos/cosmos-sdk/pull/25516) Deprecate all existing methods and types in the `telemetry` package, usage of `github.com/hashicorp/go-metrics` and the `telemetry` configuration section. New instrumentation should use the official [OpenTelemetry go API](https://pkg.go.dev/go.opentelemetry.io/otel) and Cosmos SDK appllications can automatically expose OpenTelemetry metrics, traces and logs via [OpenTelemetry declarative configuration](https://pkg.go.dev/go.opentelemetry.io/contrib/otelconf).
|
||||
|
||||
## [v0.53.4](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.53.3) - 2025-07-25
|
||||
|
||||
This patch update also includes minor dependency bumps.
|
||||
@ -146,19 +84,16 @@ This patch update also includes minor dependency bumps.
|
||||
* (client) [#18101](https://github.com/cosmos/cosmos-sdk/pull/18101) Add a `keyring-default-keyname` in `client.toml` for specifying a default key name, and skip the need to use the `--from` flag when signing transactions.
|
||||
* (x/gov) [#24355](https://github.com/cosmos/cosmos-sdk/pull/24355) Allow users to set a custom CalculateVoteResultsAndVotingPower function to be used in govkeeper.Tally.
|
||||
* (x/mint) [#24436](https://github.com/cosmos/cosmos-sdk/pull/24436) Allow users to set a custom minting function used in the `x/mint` begin blocker.
|
||||
* The `InflationCalculationFn` argument to `mint.NewAppModule()` is now ignored and must be nil. To set a custom `InflationCalculationFn` on the default minter, use `mintkeeper.WithMintFn(mintkeeper.DefaultMintFn(customInflationFn))`.
|
||||
* The `InflationCalculationFn` argument to `mint.NewAppModule()` is now ignored and must be nil. To set a custom `InflationCalculationFn` on the default minter, use `mintkeeper.WithMintFn(mintkeeper.DefaultMintFn(customInflationFn))`.
|
||||
* (api) [#24428](https://github.com/cosmos/cosmos-sdk/pull/24428) Add block height to response headers
|
||||
* (baseapp) [#25470](https://github.com/cosmos/cosmos-sdk/pull/25470) Support mount object store in baseapp, add `ObjectStore` api in context.
|
||||
* (baseapp) [#25334](https://github.com/cosmos/cosmos-sdk/pull/25334) Add `Executor` to support custom execution logic and incarnation cache for performance optimisation
|
||||
|
||||
### Improvements
|
||||
|
||||
* (x/feegrant) [24461](https://github.com/cosmos/cosmos-sdk/pull/24461) Use collections for `FeeAllowance`, `FeeAllowanceQueue`.
|
||||
* (client) [#24561](https://github.com/cosmos/cosmos-sdk/pull/24561) TimeoutTimestamp flag has been changed to TimeoutDuration, which now sets the timeout timestamp of unordered transactions to the current time + duration passed.
|
||||
* (telemetry) [#24541](https://github.com/cosmos/cosmos-sdk/pull/24541) Telemetry now includes a pre_blocker metric key. x/upgrade should migrate to this key in v0.54.0.
|
||||
* (x/auth) [#24541](https://github.com/cosmos/cosmos-sdk/pull/24541) x/auth's PreBlocker now emits telemetry under the pre_blocker metric key.
|
||||
* (x/bank) [#24431](https://github.com/cosmos/cosmos-sdk/pull/24431) Reduce the number of `ValidateDenom` calls in `bank.SendCoins` and `Coin`.
|
||||
* The `AmountOf()` method on`sdk.Coins` no longer will `panic` if given an invalid denom and will instead return a zero value.
|
||||
* The `AmountOf()` method on`sdk.Coins` no longer will `panic` if given an invalid denom and will instead return a zero value.
|
||||
* (x/staking) [#24391](https://github.com/cosmos/cosmos-sdk/pull/24391) Replace panics with error results; more verbose error messages
|
||||
* (x/staking) [#24354](https://github.com/cosmos/cosmos-sdk/pull/24354) Optimize validator endblock by reducing bech32 conversions, resulting in significant performance improvement
|
||||
* (client/keys) [#18950](https://github.com/cosmos/cosmos-sdk/pull/18950) Improve `<appd> keys add`, `<appd> keys import` and `<appd> keys rename` by checking name validation.
|
||||
@ -174,7 +109,6 @@ This patch update also includes minor dependency bumps.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* (server)[#24583](https://github.com/cosmos/cosmos-sdk/pull/24583) Fix height calculation in pruning manager and better restart handling.
|
||||
* (x/gov)[#24460](https://github.com/cosmos/cosmos-sdk/pull/24460) Do not call Remove during Walk in defaultCalculateVoteResultsAndVotingPower.
|
||||
* (baseapp) [24261](https://github.com/cosmos/cosmos-sdk/pull/24261) Fix post handler error always results in code 1
|
||||
* (server) [#24068](https://github.com/cosmos/cosmos-sdk/pull/24068) Allow align block header with skip check header in grpc server.
|
||||
@ -275,6 +209,11 @@ This patch update also includes minor dependency bumps.
|
||||
* [#20631](https://github.com/cosmos/cosmos-sdk/pull/20631) Fix json parsing in the wait-tx command.
|
||||
* (x/auth) [#20438](https://github.com/cosmos/cosmos-sdk/pull/20438) Add `--skip-signature-verification` flag to multisign command to allow nested multisigs.
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* (simulation) [#17911](https://github.com/cosmos/cosmos-sdk/pull/17911) Fix all problems with executing command `make test-sim-custom-genesis-fast` for simulation test.
|
||||
* (simulation) [#18196](https://github.com/cosmos/cosmos-sdk/pull/18196) Fix the problem of `validator set is empty after InitGenesis` in simulation test.
|
||||
|
||||
## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04
|
||||
|
||||
### Improvements
|
||||
@ -286,8 +225,6 @@ This patch update also includes minor dependency bumps.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* (simulation) [#17911](https://github.com/cosmos/cosmos-sdk/pull/17911) Fix all problems with executing command `make test-sim-custom-genesis-fast` for simulation test.
|
||||
* (simulation) [#18196](https://github.com/cosmos/cosmos-sdk/pull/18196) Fix the problem of `validator set is empty after InitGenesis` in simulation test.
|
||||
* (baseapp) [#20346](https://github.com/cosmos/cosmos-sdk/pull/20346) Correctly assign `execModeSimulate` to context for `simulateTx`.
|
||||
* (baseapp) [#20144](https://github.com/cosmos/cosmos-sdk/pull/20144) Remove txs from mempool when AnteHandler fails in recheck.
|
||||
* (baseapp) [#20107](https://github.com/cosmos/cosmos-sdk/pull/20107) Avoid header height overwrite block height.
|
||||
@ -431,7 +368,7 @@ This patch update also includes minor dependency bumps.
|
||||
* (baseapp) [#16239](https://github.com/cosmos/cosmos-sdk/pull/16239) Add Gas Limits to allow node operators to resource bound queries.
|
||||
* (cli) [#16209](https://github.com/cosmos/cosmos-sdk/pull/16209) Make `StartCmd` more customizable.
|
||||
* (types/simulation) [#16074](https://github.com/cosmos/cosmos-sdk/pull/16074) Add generic SimulationStoreDecoder for modules using collections.
|
||||
* (genutil) [#16046](https://github.com/cosmos/cosmos-sdk/pull/16046) Add "module-name" flag to genutil `add-genesis-account` to enable initializing module accounts at genesis.* [#15970](https://github.com/cosmos/cosmos-sdk/pull/15970) Enable SIGN_MODE_TEXTUAL.
|
||||
* (genutil) [#16046](https://github.com/cosmos/cosmos-sdk/pull/16046) Add "module-name" flag to genutil `add-genesis-account` to enable intializing module accounts at genesis.* [#15970](https://github.com/cosmos/cosmos-sdk/pull/15970) Enable SIGN_MODE_TEXTUAL.
|
||||
* (types) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Add `module.NewBasicManagerFromManager` for creating a basic module manager from a module manager.
|
||||
* (types/module) [#15829](https://github.com/cosmos/cosmos-sdk/pull/15829) Add new endblocker interface to handle valset updates.
|
||||
* (runtime) [#15818](https://github.com/cosmos/cosmos-sdk/pull/15818) Provide logger through `depinject` instead of appBuilder.
|
||||
@ -482,7 +419,7 @@ This patch update also includes minor dependency bumps.
|
||||
* (cli) [#16206](https://github.com/cosmos/cosmos-sdk/pull/16206) Make ABCI handshake profileable.
|
||||
* (types) [#16076](https://github.com/cosmos/cosmos-sdk/pull/16076) Optimize `ChainAnteDecorators`/`ChainPostDecorators` to instantiate the functions once instead of on every invocation of the returned `AnteHandler`/`PostHandler`.
|
||||
* (server) [#16071](https://github.com/cosmos/cosmos-sdk/pull/16071) When `mempool.max-txs` is set to a negative value, use a no-op mempool (effectively disable the app mempool).
|
||||
* (types/query) [#16041](https://github.com/cosmos/cosmos-sdk/pull/16041) Change pagination max limit to a variable in order to be modified by application devs.
|
||||
* (types/query) [#16041](https://github.com/cosmos/cosmos-sdk/pull/16041) Change pagination max limit to a variable in order to be modifed by application devs.
|
||||
* (simapp) [#15958](https://github.com/cosmos/cosmos-sdk/pull/15958) Refactor SimApp for removing the global basic manager.
|
||||
* (all modules) [#15901](https://github.com/cosmos/cosmos-sdk/issues/15901) All core Cosmos SDK modules query commands have migrated to [AutoCLI](https://docs.cosmos.network/main/core/autocli), ensuring parity between gRPC and CLI queries.
|
||||
* (x/auth) [#15867](https://github.com/cosmos/cosmos-sdk/pull/15867) Support better logging for signature verification failure.
|
||||
@ -559,7 +496,7 @@ This patch update also includes minor dependency bumps.
|
||||
* (x/auth) [#16650](https://github.com/cosmos/cosmos-sdk/pull/16650) The *cli testutil* `QueryAccountExec` has been removed. Use the gRPC or REST query instead.
|
||||
* (x/auth) [#16621](https://github.com/cosmos/cosmos-sdk/pull/16621) Pass address codec to auth new keeper constructor.
|
||||
* (x/auth) [#16423](https://github.com/cosmos/cosmos-sdk/pull/16423) `helpers.AddGenesisAccount` has been moved to `x/genutil` to remove the cyclic dependency between `x/auth` and `x/genutil`.
|
||||
* (baseapp) [#16342](https://github.com/cosmos/cosmos-sdk/pull/16342) NewContext was renamed to NewContextLegacy. The replacement (NewContext) now does not take a header, instead you should set the header via `WithHeaderInfo` or `WithBlockHeight`. Note that `WithBlockHeight` will soon be deprecated and its recommended to use `WithHeaderInfo`.
|
||||
* (baseapp) [#16342](https://github.com/cosmos/cosmos-sdk/pull/16342) NewContext was renamed to NewContextLegacy. The replacement (NewContext) now does not take a header, instead you should set the header via `WithHeaderInfo` or `WithBlockHeight`. Note that `WithBlockHeight` will soon be depreacted and its recommneded to use `WithHeaderInfo`.
|
||||
* (x/mint) [#16329](https://github.com/cosmos/cosmos-sdk/pull/16329) Use collections for state management:
|
||||
* Removed: keeper `GetParams`, `SetParams`, `GetMinter`, `SetMinter`.
|
||||
* (x/crisis) [#16328](https://github.com/cosmos/cosmos-sdk/pull/16328) Use collections for state management:
|
||||
@ -592,7 +529,7 @@ This patch update also includes minor dependency bumps.
|
||||
* (x/gov) [#16127](https://github.com/cosmos/cosmos-sdk/pull/16127) Use collections for deposit state management:
|
||||
* The following methods are removed from the gov keeper: `GetDeposit`, `GetAllDeposits`, `IterateAllDeposits`.
|
||||
* The following functions are removed from the gov types: `DepositKey`, `DepositsKey`.
|
||||
* (x/gov) [#16118](https://github.com/cosmos/cosmos-sdk/pull/16118/) Use collections for constitution and params state management.
|
||||
* (x/gov) [#16118](https://github.com/cosmos/cosmos-sdk/pull/16118/) Use collections for constituion and params state management.
|
||||
* (x/gov) [#16106](https://github.com/cosmos/cosmos-sdk/pull/16106) Remove gRPC query methods from gov keeper.
|
||||
* (x/*all*) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetSignBytes` implementations on messages and global legacy amino codec definitions have been removed from all modules.
|
||||
* (sims) [#16052](https://github.com/cosmos/cosmos-sdk/pull/16062) `GetOrGenerate` no longer requires a codec argument is now 4-arity instead of 5-arity.
|
||||
|
||||
46
CODE_OF_CONDUCT.md
Normal file
46
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at community@interchain.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
152
CODING_GUIDELINES.md
Normal file
152
CODING_GUIDELINES.md
Normal file
@ -0,0 +1,152 @@
|
||||
# Coding Guidelines
|
||||
|
||||
This document is an extension to [CONTRIBUTING](./CONTRIBUTING.md) and provides more details about the coding guidelines and requirements.
|
||||
|
||||
## API & Design
|
||||
|
||||
* Code must be well structured:
|
||||
* packages must have a limited responsibility (different concerns can go to different packages),
|
||||
* types must be easy to compose,
|
||||
* think about maintainbility and testability.
|
||||
* "Depend upon abstractions, [not] concretions".
|
||||
* Try to limit the number of methods you are exposing. It's easier to expose something later than to hide it.
|
||||
* Take advantage of `internal` package concept.
|
||||
* Follow agreed-upon design patterns and naming conventions.
|
||||
* publicly-exposed functions are named logically, have forward-thinking arguments and return types.
|
||||
* Avoid global variables and global configurators.
|
||||
* Favor composable and extensible designs.
|
||||
* Minimize code duplication.
|
||||
* Limit third-party dependencies.
|
||||
|
||||
Performance:
|
||||
|
||||
* Avoid unnecessary operations or memory allocations.
|
||||
|
||||
Security:
|
||||
|
||||
* Pay proper attention to exploits involving:
|
||||
* gas usage
|
||||
* transaction verification and signatures
|
||||
* malleability
|
||||
* code must be always deterministic
|
||||
* Thread safety. If some functionality is not thread-safe, or uses something that is not thread-safe, then clearly indicate the risk on each level.
|
||||
|
||||
## Acceptance tests
|
||||
|
||||
Start the design by defining Acceptance Tests. The purpose of Acceptance Testing is to
|
||||
validate that the product being developed corresponds to the needs of the real users
|
||||
and is ready for launch. Hence we often talk about **User Acceptance Test** (UAT).
|
||||
It also gives a better understanding of the product and helps designing a right interface
|
||||
and API.
|
||||
|
||||
UAT should be revisited at each stage of the product development:
|
||||
|
||||

|
||||
|
||||
### Why Acceptance Testing
|
||||
|
||||
* Automated acceptance tests catch serious problems that unit or component test suites could never catch.
|
||||
* Automated acceptance tests deliver business value the users are expecting as they test user scenarios.
|
||||
* Automated acceptance tests executed and passed on every build help improve the software delivery process.
|
||||
* Testers, developers, and customers need to work closely to create suitable automated acceptance test suites.
|
||||
|
||||
### How to define Acceptance Test
|
||||
|
||||
The best way to define AT is by starting from the user stories and think about all positive and negative scenarios a user can perform.
|
||||
|
||||
Product Developers should collaborate with stakeholders to define AT. Functional experts and business users are both needed for defining AT.
|
||||
|
||||
A good pattern for defining AT is listing scenarios with [GIVEN-WHEN-THEN](https://martinfowler.com/bliki/GivenWhenThen.html) format where:
|
||||
|
||||
* **GIVEN**: A set of initial circumstances (e.g. bank balance)
|
||||
* **WHEN**: Some event happens (e.g. customer attempts a transfer)
|
||||
* **THEN**: The expected result as per the defined behavior of the system
|
||||
|
||||
In other words: we define a use case input, current state and the expected outcome. Example:
|
||||
|
||||
> Feature: User trades stocks.
|
||||
> Scenario: User requests a sell before close of trading
|
||||
>
|
||||
> Given I have 100 shares of MSFT stock
|
||||
> And I have 150 shares of APPL stock
|
||||
> And the time is before close of trading
|
||||
>
|
||||
> When I ask to sell 20 shares of MSFT stock
|
||||
>
|
||||
> Then I should have 80 shares of MSFT stock
|
||||
> And I should have 150 shares of APPL stock
|
||||
> And a sell order for 20 shares of MSFT stock should have been executed
|
||||
|
||||
*Reference: [writing acceptance tests](https://openclassrooms.com/en/courses/4544611-write-agile-documentation-user-stories-acceptance-tests/4810081-writing-acceptance-tests)*.
|
||||
|
||||
### How and where to add acceptance tests
|
||||
|
||||
Acceptance tests are written in the Markdown format, using the scenario template described above, and be part of the specification (`xx_test.md` file in *spec* directory). Example: [`eco-credits/spec/06.test.md`](https://github.com/regen-network/regen-ledger/blob/7297783577e6cd102c5093365b573163680f36a1/x/ecocredit/spec/06_tests.md).
|
||||
|
||||
Acceptance tests should be defined during the design phase or at an early stage of development. Moreover, they should be defined before writing a module architecture - it will clarify the purpose and usage of the software.
|
||||
Automated tests should cover all acceptance tests scenarios.
|
||||
|
||||
## Automated Tests
|
||||
|
||||
Make sure your code is well tested:
|
||||
|
||||
* Provide unit tests for every unit of your code if possible. Unit tests are expected to comprise 70%-80% of your tests.
|
||||
* Describe the test scenarios you are implementing for integration tests.
|
||||
* Create integration tests for queries and msgs.
|
||||
* Use both test cases and property / fuzzy testing. We use the [rapid](pgregory.net/rapid) Go library for property-based and fuzzy testing.
|
||||
* Do not decrease code test coverage. Explain in a PR if test coverage is decreased.
|
||||
|
||||
We expect tests to use `require` or `assert` rather than `t.Skip` or `t.Fail`,
|
||||
unless there is a reason to do otherwise.
|
||||
When testing a function under a variety of different inputs, we prefer to use
|
||||
[table driven tests](https://github.com/golang/go/wiki/TableDrivenTests).
|
||||
Table driven test error messages should follow the following format
|
||||
`<desc>, tc #<index>, i #<index>`.
|
||||
`<desc>` is an optional short description of whats failing, `tc` is the
|
||||
index within the test case table that is failing, and `i` is when there
|
||||
is a loop, exactly which iteration of the loop failed.
|
||||
The idea is you should be able to see the
|
||||
error message and figure out exactly what failed.
|
||||
Here is an example check:
|
||||
|
||||
```go
|
||||
<some table>
|
||||
for tcIndex, tc := range cases {
|
||||
<some code>
|
||||
resp, err := doSomething()
|
||||
require.NoError(err)
|
||||
require.Equal(t, tc.expected, resp, "should correctly perform X")
|
||||
```
|
||||
|
||||
## Quality Assurance
|
||||
|
||||
We are forming a QA team that will support the core Cosmos SDK team and collaborators by:
|
||||
|
||||
* Improving the Cosmos SDK QA Processes
|
||||
* Improving automation in QA and testing
|
||||
* Defining high-quality metrics
|
||||
* Maintaining and improving testing frameworks (unit tests, integration tests, and functional tests)
|
||||
* Defining test scenarios.
|
||||
* Verifying user experience and defining a high quality.
|
||||
* We want to have **acceptance tests**! Document and list acceptance lists that are implemented and identify acceptance tests that are still missing.
|
||||
* Acceptance tests should be specified in `acceptance-tests` directory as Markdown files.
|
||||
* Supporting other teams with testing frameworks, automation, and User Experience testing.
|
||||
* Testing chain upgrades for every new breaking change.
|
||||
* Defining automated tests that assure data integrity after an update.
|
||||
|
||||
Desired outcomes:
|
||||
|
||||
* QA team works with Development Team.
|
||||
* QA is happening in parallel with Core Cosmos SDK development.
|
||||
* Releases are more predictable.
|
||||
* QA reports. Goal is to guide with new tasks and be one of the QA measures.
|
||||
|
||||
As a developer, you must help the QA team by providing instructions for User Experience (UX) and functional testing.
|
||||
|
||||
### QA Team to cross check Acceptance Tests
|
||||
|
||||
Once the AT are defined, the QA team will have an overview of the behavior a user can expect and:
|
||||
|
||||
* validate the user experience will be good
|
||||
* validate the implementation conforms the acceptance tests
|
||||
* by having a broader overview of the use cases, QA team should be able to define **test suites** and test data to efficiently automate Acceptance Tests and reuse the work.
|
||||
355
CONTRIBUTING.md
Normal file
355
CONTRIBUTING.md
Normal file
@ -0,0 +1,355 @@
|
||||
# Contributing
|
||||
|
||||
* [Teams Dev Calls](#teams-dev-calls)
|
||||
* [Architecture Decision Records (ADR)](#architecture-decision-records-adr)
|
||||
* [Development Procedure](#development-procedure)
|
||||
* [Testing](#testing)
|
||||
* [Pull Requests](#pull-requests)
|
||||
* [Pull Request Templates](#pull-request-templates)
|
||||
* [Requesting Reviews](#requesting-reviews)
|
||||
* [Updating Documentation](#updating-documentation)
|
||||
* [RFC & ADR](#RFC & ADR)
|
||||
* [Dependencies](#dependencies)
|
||||
* [`go.work`](#gowork)
|
||||
* [`go.mod`](#gomod)
|
||||
* [Protobuf](#protobuf)
|
||||
* [Branching Model and Release](#branching-model-and-release)
|
||||
* [PR Targeting](#pr-targeting)
|
||||
* [Code Owner Membership](#code-owner-membership)
|
||||
* [Concept & Feature Approval Process](#concept--feature-approval-process)
|
||||
* [Strategy Discovery](#strategy-discovery)
|
||||
* [Concept Approval](#concept-approval)
|
||||
* [Time Bound Period](#time-bound-period)
|
||||
* [Approval Committee & Decision Making](#approval-committee--decision-making)
|
||||
* [Committee Members](#committee-members)
|
||||
* [Committee Criteria](#committee-criteria)
|
||||
* [Implementation & Release Approval](#implementation--release-approval)
|
||||
|
||||
Thank you for considering making contributions to the Cosmos SDK and related repositories!
|
||||
|
||||
Contributing to this repo can mean many things, such as participating in
|
||||
discussion or proposing code changes. To ensure a smooth workflow for all
|
||||
contributors, the general procedure for contributing has been established:
|
||||
|
||||
1. Start by browsing [new issues](https://github.com/cosmos/cosmos-sdk/issues) and [discussions](https://github.com/cosmos/cosmos-sdk/discussions). If you are looking for something interesting or if you have something in your mind, there is a chance it had been discussed.
|
||||
* Looking for a good place to start contributing? How about checking out some [good first issues](https://github.com/cosmos/cosmos-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) or [bugs](https://github.com/cosmos/cosmos-sdk/issues?q=is%3Aopen+is%3Aissue+label%3A%22T%3A+Bug%22)?
|
||||
2. Determine whether a GitHub issue or discussion is more appropriate for your needs:
|
||||
1. If want to propose something new that requires specification or an additional design, or you would like to change a process, start with a [new discussion](https://github.com/cosmos/cosmos-sdk/discussions/new). With discussions, we can better handle the design process using discussion threads. A discussion usually leads to one or more issues.
|
||||
2. If the issue you want addressed is a specific proposal or a bug, then open a [new issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose).
|
||||
3. Review existing [issues](https://github.com/cosmos/cosmos-sdk/issues) to find an issue you'd like to help with.
|
||||
3. Participate in thoughtful discussion on that issue.
|
||||
4. If you would like to contribute:
|
||||
1. Ensure that the proposal has been accepted.
|
||||
2. Ensure that nobody else has already begun working on this issue. If they have,
|
||||
make sure to contact them to collaborate.
|
||||
3. If nobody has been assigned for the issue and you would like to work on it,
|
||||
make a comment on the issue to inform the community of your intentions
|
||||
to begin work.
|
||||
5. To submit your work as a contribution to the repository follow standard GitHub best practices. See [pull request guideline](#pull-requests) below.
|
||||
|
||||
**Note:** For very small or blatantly obvious problems such as typos, you are
|
||||
not required to an open issue to submit a PR, but be aware that for more complex
|
||||
problems/features, if a PR is opened before an adequate design discussion has
|
||||
taken place in a GitHub issue, that PR runs a high likelihood of being rejected.
|
||||
|
||||
## Teams Dev Calls
|
||||
|
||||
The Cosmos SDK has many stakeholders contributing and shaping the project. The Core SDK team is composed of Interchain GmbH and Regen Network Development developers. Any long-term contributors and additional maintainers from other projects are welcome. We use self-organizing principles to coordinate and collaborate across organizations in structured "EPIC" that focus on specific problem domains or architectural components of the Cosmos SDK.
|
||||
|
||||
The developers work in sprints, which are available in a [GitHub Project](https://github.com/orgs/cosmos/projects/26/views/22). The current EPICs are pinned at the top of the [issues list](https://github.com/cosmos/cosmos-sdk/issues).
|
||||
|
||||
The important development announcements are shared on [Discord](https://discord.com/invite/cosmosnetwork) in the `#dev-announcements` channel.
|
||||
|
||||
To synchronize we have few major meetings:
|
||||
|
||||
* Cosmos SDK Sprint Review on Monday and Thursday at 14:00 UTC (limited participation to core devs).
|
||||
* Cosmos SDK Community Call on Thursday at 16:00 UTC.
|
||||
|
||||
If you would like to join one of the community call, then please contact us on [Discord](https://discord.com/invite/cosmosnetwork) or reach out directly to Marko (@tac0turtle).
|
||||
|
||||
## Architecture Decision Records (ADR)
|
||||
|
||||
When proposing an architecture decision for the Cosmos SDK, please start by opening an [issue](https://github.com/cosmos/cosmos-sdk/issues/new/choose) or a [discussion](https://github.com/cosmos/cosmos-sdk/discussions/new) with a summary of the proposal. Once the proposal has been discussed and there is rough alignment on a high-level approach to the design, the [ADR creation process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md) can begin. We are following this process to ensure all involved parties are in agreement before any party begins coding the proposed implementation. If you would like to see examples of how these are written, please refer to the current [ADRs](https://github.com/cosmos/cosmos-sdk/tree/main/docs/architecture).
|
||||
|
||||
## Development Procedure
|
||||
|
||||
* The latest state of development is on `main`.
|
||||
* `main` must never fail `make lint test test-race`.
|
||||
* No `--force` onto `main` (except when reverting a broken commit, which should seldom happen).
|
||||
* Create a branch to start work:
|
||||
* Fork the repo (core developers must create a branch directly in the Cosmos SDK repo),
|
||||
branch from the HEAD of `main`, make some commits, and submit a PR to `main`.
|
||||
* For core developers working within the `cosmos-sdk` repo, follow branch name conventions to ensure a clear
|
||||
ownership of branches: `{moniker}/{issue#}-branch-name`.
|
||||
* See [Branching Model](#branching-model-and-release) for more details.
|
||||
* Be sure to run `make format` before every commit. The easiest way
|
||||
to do this is have your editor run it for you upon saving a file (most of the editors
|
||||
will do it anyway using a pre-configured setup of the programming language mode).
|
||||
Additionally, be sure that your code is lint compliant by running `make lint-fix`.
|
||||
A convenience git `pre-commit` hook that runs the formatters automatically
|
||||
before each commit is available in the `contrib/githooks/` directory.
|
||||
* Follow the [CODING GUIDELINES](CODING_GUIDELINES.md), which defines criteria for designing and coding a software.
|
||||
|
||||
Code is merged into main through pull request procedure.
|
||||
|
||||
### Testing
|
||||
|
||||
Tests can be executed by running `make test` at the top level of the Cosmos SDK repository.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Before submitting a pull request:
|
||||
|
||||
* merge the latest main `git merge origin/main`,
|
||||
* run `make lint test` to ensure that all checks and tests pass.
|
||||
|
||||
Then:
|
||||
|
||||
1. If you have something to show, **start with a `Draft` PR**. It's good to have early validation of your work and we highly recommend this practice. A Draft PR also indicates to the community that the work is in progress.
|
||||
Draft PRs also helps the core team provide early feedback and ensure the work is in the right direction.
|
||||
2. When the code is complete, change your PR from `Draft` to `Ready for Review`.
|
||||
3. Go through the actions for each checkbox present in the PR template description. The PR actions are automatically provided for each new PR.
|
||||
4. Be sure to include a relevant changelog entry in the `Unreleased` section of `CHANGELOG.md` (see file for log format). The entry should be on top of all others changes in the section.
|
||||
|
||||
PRs must have a category prefix that is based on the type of changes being made (for example, `fix`, `feat`,
|
||||
`refactor`, `docs`, and so on). The *type* must be included in the PR title as a prefix (for example,
|
||||
`fix: <description>`). This convention ensures that all changes that are committed to the base branch follow the
|
||||
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
||||
Additionally, each PR should only address a single issue.
|
||||
|
||||
Pull requests are merged automatically using [`A:automerge` action](https://docs.mergify.com/workflow/automerge/).
|
||||
|
||||
NOTE: when merging, GitHub will squash commits and rebase on top of the main.
|
||||
|
||||
### Pull Request Templates
|
||||
|
||||
There are three PR templates. The [default template](./.github/PULL_REQUEST_TEMPLATE.md) is for types `fix`, `feat`, and `refactor`. We also have a [docs template](./.github/PULL_REQUEST_TEMPLATE/docs.md) for documentation changes and an [other template](./.github/PULL_REQUEST_TEMPLATE/other.md) for changes that do not affect production code. When previewing a PR before it has been opened, you can change the template by adding one of the following parameters to the url:
|
||||
|
||||
* `template=docs.md`
|
||||
* `template=other.md`
|
||||
|
||||
### Requesting Reviews
|
||||
|
||||
In order to accommodate the review process, the author of the PR must complete the author checklist
|
||||
(from the pull request template)
|
||||
to the best of their abilities before marking the PR as "Ready for Review". If you would like to
|
||||
receive early feedback on the PR, open the PR as a "Draft" and leave a comment in the PR indicating
|
||||
that you would like early feedback and tagging whoever you would like to receive feedback from.
|
||||
|
||||
Codeowners are marked automatically as the reviewers.
|
||||
|
||||
All PRs require at least two review approvals before they can be merged (one review might be acceptable in
|
||||
the case of minor changes to [docs](./.github/PULL_REQUEST_TEMPLATE/docs.md) or [other](./.github/PULL_REQUEST_TEMPLATE/other.md) changes that do not affect production code). Each PR template has a reviewers checklist that must be completed before the PR can be merged. Each reviewer is responsible
|
||||
for all checked items unless they have indicated otherwise by leaving their handle next to specific
|
||||
items. In addition, use the following review explanations:
|
||||
|
||||
* `LGTM` without an explicit approval means that the changes look good, but you haven't thoroughly reviewed the reviewer checklist items.
|
||||
* `Approval` means that you have completed some or all of the reviewer checklist items. If you only reviewed selected items, you must add your handle next to the items that you have reviewed. In addition, follow these guidelines:
|
||||
* You must also think through anything which ought to be included but is not
|
||||
* You must think through whether any added code could be partially combined (DRYed) with existing code
|
||||
* You must think through any potential security issues or incentive-compatibility flaws introduced by the changes
|
||||
* Naming must be consistent with conventions and the rest of the codebase
|
||||
* Code must live in a reasonable location, considering dependency structures (for example, not importing testing modules in production code, or including example code modules in production code).
|
||||
* If you approve the PR, you are responsible for any issues mentioned here and any issues that should have been addressed after thoroughly reviewing the reviewer checklist items in the pull request template.
|
||||
* If you sat down with the PR submitter and did a pairing review, add this information in the `Approval` or your PR comments.
|
||||
* If you are only making "surface level" reviews, submit notes as a `comment` review.
|
||||
|
||||
### Updating Documentation
|
||||
|
||||
If you open a PR on the Cosmos SDK, it is mandatory to update the relevant documentation in `/docs`.
|
||||
|
||||
* If your change relates to the core SDK (baseapp, store, ...), be sure to update the content in `docs/basics/`, `docs/core/` and/or `docs/building-modules/` folders.
|
||||
* If your changes relate to the core of the CLI (not specifically to module's CLI/Rest), then modify the content in the `docs/run-node/` folder.
|
||||
* If your changes relate to a module, then be sure to update the module's spec in `x/{moduleName}/README.md`.
|
||||
|
||||
When writing documentation, follow the [Documentation Writing Guidelines](./docs/DOC_WRITING_GUIDELINES.md).
|
||||
|
||||
### RFC & ADR
|
||||
|
||||
Within the Cosmos SDK we have two forms of documenting decisions, Request For Comment (RFC) & Architecture Design Record (ADR). They perform two different functions. The process for assessing if something needs an RFC is located in the respective folders:
|
||||
|
||||
* [RFC Process](./docs/rfc/process.md)
|
||||
* [ADR Process](./docs/adr/process.md)
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
We use [Go Modules](https://github.com/golang/go/wiki/Modules) to manage
|
||||
dependency versions.
|
||||
|
||||
The main branch of every Cosmos repository should just build with `go get`,
|
||||
which means they should be kept up-to-date with their dependencies, so we can
|
||||
get away with telling people they can just `go get` our software.
|
||||
|
||||
Since some dependencies are not under our control, a third party may break our
|
||||
build, in which case we can fall back on `go mod tidy -v`.
|
||||
|
||||
### `go.mod`
|
||||
|
||||
When extracting a package to its own go modules, some extra steps are required, for keeping our CI checks and Dev UX:
|
||||
|
||||
* Add a CHANGELOG.md / README.md under the new package folder
|
||||
* Add the package in [`labeler.yml`](./.github/labeler.yml)
|
||||
* Add weekly dependabot checks (see [dependabot.yml](./.github/dependabot.yml))
|
||||
* Add tests to github workflow [test.yml](.github/workflows/test.yml) (under submodules)
|
||||
* (optional) Configure a `cosmossdk.io` vanity url by submitting a PR to [cosmos/vanity](https://github.com/cosmos/vanity).
|
||||
|
||||
## Protobuf
|
||||
|
||||
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/cosmos/gogoproto) to generate code for use in Cosmos SDK.
|
||||
|
||||
For deterministic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it.
|
||||
|
||||
For formatting code in `.proto` files, you can run `make proto-format` command.
|
||||
|
||||
For linting and checking breaking changes, we use [buf](https://buf.build/). You can use the commands `make proto-lint` and `make proto-check-breaking` to respectively lint your proto files and check for breaking changes.
|
||||
|
||||
To generate the protobuf stubs, you can run `make proto-gen`.
|
||||
|
||||
We also added the `make proto-all` command to run all the above commands sequentially.
|
||||
|
||||
In order for imports to properly compile in your IDE, you may need to manually set your protobuf path in your IDE's workspace settings/config.
|
||||
|
||||
For example, in vscode your `.vscode/settings.json` should look like:
|
||||
|
||||
```json
|
||||
{
|
||||
"protoc": {
|
||||
"options": [
|
||||
"--proto_path=${workspaceRoot}/proto",
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Branching Model and Release
|
||||
|
||||
User-facing repos should adhere to the trunk based development branching model: https://trunkbaseddevelopment.com. User branches should start with a user name, example: `{moniker}/{issue#}-branch-name`.
|
||||
|
||||
The Cosmos SDK repository is a [multi Go module](https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository) repository. It means that we have more than one Go module in a single repository.
|
||||
|
||||
The Cosmos SDK utilizes [semantic versioning](https://semver.org/).
|
||||
|
||||
### PR Targeting
|
||||
|
||||
Ensure that you base and target your PR on the `main` branch.
|
||||
|
||||
All feature additions and all bug fixes must be targeted against `main`. Exception is for bug fixes which are only related to a released version. In that case, the related bug fix PRs must target against the release branch.
|
||||
|
||||
If needed, we backport a commit from `main` to a release branch (excluding consensus breaking feature, API breaking and similar).
|
||||
|
||||
## Code Owner Membership
|
||||
|
||||
In the ethos of open-source projects, and out of necessity to keep the code
|
||||
alive, the core contributor team will strive to permit special repo privileges
|
||||
to developers who show an aptitude towards developing with this code base.
|
||||
|
||||
Several different kinds of privileges may be granted however most common
|
||||
privileges to be granted are merge rights to either part of, or the entirety of the
|
||||
code base (through the GitHub `CODEOWNERS` file). The on-boarding process for
|
||||
new code owners is as follows: On a bi-monthly basis (or more frequently if
|
||||
agreeable) all the existing code owners will privately convene to discuss
|
||||
potential new candidates as well as the potential for existing code-owners to
|
||||
exit or "pass on the torch". This private meeting is to be a held as a
|
||||
phone/video meeting.
|
||||
|
||||
Subsequently after the meeting, and pending final approval from the ICF,
|
||||
one of the existing code owners should open a PR modifying the `CODEOWNERS` file.
|
||||
The other code owners should then all approve this PR to publicly display their support.
|
||||
|
||||
Only if unanimous consensus is reached among all the existing code-owners will
|
||||
an invitation be extended to a new potential-member. Likewise, when an existing
|
||||
member is suggested to be removed/or have their privileges reduced, the member
|
||||
in question must agree to the decision for their removal or else no action
|
||||
should be taken. If however, a code-owner is demonstrably shown to intentionally
|
||||
have had acted maliciously or grossly negligent, code-owner privileges may be
|
||||
stripped with no prior warning or consent from the member in question.
|
||||
|
||||
Other potential removal criteria:
|
||||
|
||||
* Missing 3 scheduled meetings results in ICF evaluating whether the member should be
|
||||
removed / replaced
|
||||
* Violation of Code of Conduct
|
||||
|
||||
Earning this privilege should be considered to be no small feat and is by no
|
||||
means guaranteed by any quantifiable metric. Serving as a code owner is a symbol of great trust from
|
||||
the community of this project.
|
||||
|
||||
## Concept & Feature Approval Process
|
||||
|
||||
The process for how Cosmos SDK maintainers take features and ADRs from concept to release
|
||||
is broken up into three distinct stages: **Strategy Discovery**, **Concept Approval**, and
|
||||
**Implementation & Release Approval**
|
||||
|
||||
### Strategy Discovery
|
||||
|
||||
* Develop long term priorities, strategy and roadmap for the Cosmos SDK
|
||||
* Release committee not yet defined as there is already a roadmap that can be used for the time being
|
||||
|
||||
### Concept Approval
|
||||
|
||||
* Architecture Decision Records (ADRs) may be proposed by any contributors or maintainers of the Cosmos SDK,
|
||||
and should follow the guidelines outlined in the
|
||||
[ADR Creation Process](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/PROCESS.md)
|
||||
* After proposal, a time bound period for Request for Comment (RFC) on ADRs commences
|
||||
* ADRs are intended to be iterative, and may be merged into `main` while still in a `Proposed` status
|
||||
|
||||
#### Time Bound Period
|
||||
|
||||
* Once a PR for an ADR is opened, reviewers are expected to perform a first review within 1 week of pull request being open
|
||||
* Time bound period for individual ADR Pull Requests to be merged should not exceed 2 weeks
|
||||
* Total time bound period for an ADR to reach a decision (`ABANDONED | ACCEPTED | REJECTED`) should not exceed 4 weeks
|
||||
|
||||
If an individual Pull Request for an ADR needs more time than 2 weeks to reach resolution, it should be merged
|
||||
in current state (`Draft` or `Proposed`), with its contents updated to summarize
|
||||
the current state of its discussion.
|
||||
|
||||
If an ADR is taking longer than 4 weeks to reach a final conclusion, the **Concept Approval Committee**
|
||||
should convene to rectify the situation by either:
|
||||
|
||||
* unanimously setting a new time bound period for this ADR
|
||||
* making changes to the Concept Approval Process (as outlined here)
|
||||
* making changes to the members of the Concept Approval Committee
|
||||
|
||||
#### Approval Committee & Decision Making
|
||||
|
||||
In absence of general consensus, decision making requires 1/2 vote from the two members
|
||||
of the **Concept Approval Committee**.
|
||||
|
||||
#### Committee Members
|
||||
|
||||
* Core Members: **Aaron** (Regen), **Bez** (IG)
|
||||
|
||||
#### Committee Criteria
|
||||
|
||||
Members must:
|
||||
|
||||
* Participate in all or almost all ADR discussions, both on GitHub as well as in bi-weekly Architecture Review
|
||||
meetings
|
||||
* Be active contributors to the Cosmos SDK, and furthermore should be continuously making substantial contributions
|
||||
to the project's codebase, review process, documentation and ADRs
|
||||
* Have stake in the Cosmos SDK project, represented by:
|
||||
* Being a client / user of the Comsos SDK
|
||||
* "[giving back](https://www.debian.org/social_contract)" to the software
|
||||
* Delegate representation in case of vacation or absence
|
||||
|
||||
Code owners need to maintain participation in the process, ideally as members of **Concept Approval Committee**
|
||||
members, but at the very least as active participants in ADR discussions
|
||||
|
||||
Removal criteria:
|
||||
|
||||
* Missing 3 meetings results in ICF evaluating whether the member should be removed / replaced
|
||||
* Violation of Code of Conduct
|
||||
|
||||
### Implementation & Release Approval
|
||||
|
||||
The following process should be adhered to both for implementation PRs corresponding to ADRs, as
|
||||
well as for PRs made as part of a release process:
|
||||
|
||||
* Code reviewers should ensure the PR does exactly what the ADR said it should
|
||||
* Code reviewers should have more senior engineering capability
|
||||
* 1/2 approval is required from the **primary repo maintainers** in `CODEOWNERS`
|
||||
|
||||
**Note**: For any major release series denoted as a "Stable Release" (e.g. v0.42 "Stargate"), a separate release
|
||||
committee is often established. Stable Releases, and their corresponding release committees are documented
|
||||
separately in [Stable Release Policy](./RELEASE_PROCESS.md#stable-release-policy)*
|
||||
@ -12,7 +12,7 @@
|
||||
#
|
||||
# This image is pushed to the GHCR as https://ghcr.io/cosmos/simapp
|
||||
|
||||
FROM golang:1.25-alpine AS build-env
|
||||
FROM golang:1.23-alpine AS build-env
|
||||
|
||||
# Install minimum necessary dependencies
|
||||
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev
|
||||
|
||||
40
Makefile
40
Makefile
@ -134,11 +134,15 @@ cosmovisor:
|
||||
confix:
|
||||
$(MAKE) -C tools/confix confix
|
||||
|
||||
hubl:
|
||||
$(MAKE) -C tools/hubl hubl
|
||||
|
||||
.PHONY: build build-linux-amd64 build-linux-arm64 cosmovisor confix
|
||||
|
||||
|
||||
#? mocks: Generate mock file
|
||||
mocks: $(MOCKS_DIR)
|
||||
@go install go.uber.org/mock/mockgen@v0.6.0
|
||||
@go install go.uber.org/mock/mockgen@v0.5.0
|
||||
sh ./scripts/mockgen.sh
|
||||
.PHONY: mocks
|
||||
|
||||
@ -379,7 +383,7 @@ benchmark:
|
||||
### Linting ###
|
||||
###############################################################################
|
||||
|
||||
golangci_version=v2.6.2
|
||||
golangci_version=v2.1.6
|
||||
|
||||
lint-install:
|
||||
@echo "--> Installing golangci-lint $(golangci_version)"
|
||||
@ -387,12 +391,12 @@ lint-install:
|
||||
|
||||
lint:
|
||||
@echo "--> Running linter on all files"
|
||||
@$(MAKE) lint-install
|
||||
$(MAKE) lint-install
|
||||
@./scripts/go-lint-all.bash --timeout=15m
|
||||
|
||||
lint-fix:
|
||||
@echo "--> Running linter"
|
||||
@$(MAKE) lint-install
|
||||
$(MAKE) lint-install
|
||||
@./scripts/go-lint-all.bash --fix
|
||||
|
||||
.PHONY: lint lint-fix
|
||||
@ -401,7 +405,7 @@ lint-fix:
|
||||
### Protobuf ###
|
||||
###############################################################################
|
||||
|
||||
protoVer=0.17.1
|
||||
protoVer=0.16.0
|
||||
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
|
||||
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)
|
||||
|
||||
@ -409,9 +413,7 @@ proto-all: proto-format proto-lint proto-gen
|
||||
|
||||
proto-gen:
|
||||
@echo "Generating Protobuf files"
|
||||
@$(protoImage) sh ./scripts/protocgen.sh 2>&1 | tee protocgen.log | \
|
||||
awk '{print $$0} /contains the reserved field name/ && /tendermint/ {next} 1'
|
||||
|
||||
@$(protoImage) sh ./scripts/protocgen.sh
|
||||
|
||||
proto-swagger-gen:
|
||||
@echo "Generating Protobuf Swagger"
|
||||
@ -492,22 +494,22 @@ localnet-debug: localnet-stop localnet-build-dlv localnet-build-nodes
|
||||
|
||||
.PHONY: localnet-start localnet-stop localnet-debug localnet-build-env localnet-build-dlv localnet-build-nodes
|
||||
|
||||
test-system: build-v53 build
|
||||
test-system: build-v50 build
|
||||
mkdir -p ./tests/systemtests/binaries/
|
||||
cp $(BUILDDIR)/simd ./tests/systemtests/binaries/
|
||||
mkdir -p ./tests/systemtests/binaries/v0.53
|
||||
mv $(BUILDDIR)/simdv53 ./tests/systemtests/binaries/v0.53/simd
|
||||
mkdir -p ./tests/systemtests/binaries/v0.50
|
||||
mv $(BUILDDIR)/simdv50 ./tests/systemtests/binaries/v0.50/simd
|
||||
$(MAKE) -C tests/systemtests test
|
||||
.PHONY: test-system
|
||||
|
||||
# build-v53 checks out the v0.53.x branch, builds the binary, and renames it to simdv53.
|
||||
build-v53:
|
||||
@echo "Starting v53 build process..."
|
||||
# build-v50 checks out the v0.50.x branch, builds the binary, and renames it to simdv50.
|
||||
build-v50:
|
||||
@echo "Starting v50 build process..."
|
||||
git_status=$$(git status --porcelain) && \
|
||||
has_changes=false && \
|
||||
if [ -n "$$git_status" ]; then \
|
||||
echo "Stashing uncommitted changes..." && \
|
||||
git stash push -m "Temporary stash for v53 build" && \
|
||||
git stash push -m "Temporary stash for v50 build" && \
|
||||
has_changes=true; \
|
||||
else \
|
||||
echo "No changes to stash"; \
|
||||
@ -515,10 +517,10 @@ build-v53:
|
||||
echo "Saving current reference..." && \
|
||||
CURRENT_REF=$$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse HEAD) && \
|
||||
echo "Checking out release branch..." && \
|
||||
git checkout release/v0.53.x && \
|
||||
echo "Building v53 binary..." && \
|
||||
git checkout release/v0.50.x && \
|
||||
echo "Building v50 binary..." && \
|
||||
make build && \
|
||||
mv build/simd build/simdv53 && \
|
||||
mv build/simd build/simdv50 && \
|
||||
echo "Returning to original branch..." && \
|
||||
if [ "$$CURRENT_REF" = "HEAD" ]; then \
|
||||
git checkout $$(git rev-parse HEAD); \
|
||||
@ -531,4 +533,4 @@ build-v53:
|
||||
else \
|
||||
echo "No changes to reapply"; \
|
||||
fi
|
||||
.PHONY: build-v53
|
||||
.PHONY: build-v50
|
||||
13
NOTICE
13
NOTICE
@ -1,13 +0,0 @@
|
||||
NOTICE
|
||||
|
||||
About Cosmos Labs
|
||||
|
||||
Cosmos Labs is the development and growth organization behind the Cosmos stack of technologies and ecosystem, the world leading blockchain platform powering more than 200 production chains in finance, payments, and real-world assets. Cosmos Labs leads the development of the Cosmos technology stack, including the Cosmos SDK, CometBFT, and IBC protocols that enable sovereign, interoperable blockchains, in tandem with the Interchain Foundation. Cosmos Labs offers blockchain solutions for enterprises and finance, learn more by visiting: https://cosmos.network/, https://cosmoslabs.io/
|
||||
|
||||
Licence
|
||||
|
||||
This product This product includes software developed by Cosmos Labs and is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
Attribution
|
||||
|
||||
If you distribute this software or derivative works, you must include a copy of this NOTICE file (or equivalent attribution) in your distribution, as required by Section 4(d) of the Apache License, Version 2.0.
|
||||
49
README.md
49
README.md
@ -1,8 +1,8 @@
|
||||
<div align="left">
|
||||
<div align="center">
|
||||
<h1> Cosmos SDK </h1>
|
||||
</div>
|
||||
|
||||

|
||||

|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/cosmos/cosmos-sdk/blob/main/LICENSE">
|
||||
@ -16,63 +16,52 @@
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<a href="https://discord.com/invite/interchain">
|
||||
<a href="https://discord.gg/AzefAFd">
|
||||
<img alt="Discord" src="https://img.shields.io/discord/669268347736686612.svg" />
|
||||
</a>
|
||||
<a href="https://sourcegraph.com/github.com/cosmos/cosmos-sdk?badge">
|
||||
<img alt="Imported by" src="https://sourcegraph.com/github.com/cosmos/cosmos-sdk/-/badge.svg" />
|
||||
</a>
|
||||
<img alt="Sims" src="https://github.com/cosmos/cosmos-sdk/workflows/Sims/badge.svg" />
|
||||
<img alt="Lint Satus" src="https://github.com/cosmos/cosmos-sdk/workflows/Lint/badge.svg" />
|
||||
</div>
|
||||
|
||||
The Cosmos SDK is a modular, open-source blockchain SDK for building secure, high-performance Layer 1 chains with full customizability used by 200+ chains in production. Developers can use the Cosmos SDK to easily and quickly spin up custom blockchains that can natively interoperate.
|
||||
|
||||
The Cosmos SDK is tailored for building secure, sovereign application-specific blockchains. Developers building with the Cosmos SDK can use predefined modules that cover standard blockchain functionality or create custom modules for their specific use case. This composable architecture enables robust customization. The SDK provides abstractions for permissioning, governance, state management, account abstraction, tokenization processes, application logic, and more.
|
||||
|
||||
Cosmos SDK blockchains get interoperability out-of-the-box via a native integration with the [Inter-Blockchain Communication Protocol (IBC)](https://github.com/cosmos/ibc-go). ibc-go is implemented as a Go module in the Cosmos SDK.
|
||||
|
||||
While the Cosmos SDK is plug-and-play with any consensus engine, we recommend using [CometBFT](https://github.com/cometbft/cometbft) for a fast, battle-tested, high-throughput, configurable BFT state machine. CometBFT is developed as part of the Cosmos Stack and its releases are updated alongside the SDK.
|
||||
The Cosmos SDK is a framework for building blockchain applications. [CometBFT (BFT Consensus)](https://github.com/cometbft/cometbft) and the Cosmos SDK are written in the Go programming language. Cosmos SDK is used to build [Gaia](https://github.com/cosmos/gaia), the implementation of the Cosmos Hub.
|
||||
|
||||
**WARNING**: The Cosmos SDK has mostly stabilized, but we are still making some breaking changes.
|
||||
|
||||
**Note**: We advise to always use the latest maintained [Go](https://go.dev/dl) version for building Cosmos SDK applications.
|
||||
|
||||
## Quick Start
|
||||
|
||||
To learn how the Cosmos SDK works from a high-level perspective, see the Cosmos SDK [High-Level Intro](https://docs.cosmos.network/main/intro/overview).
|
||||
|
||||
If you want to get started quickly and learn how to build on top of Cosmos SDK, visit [Cosmos SDK Tutorials](https://tutorials.cosmos.network). You can also fork the tutorial's repository to get started building your own Cosmos SDK application.
|
||||
|
||||
Note: We advise to always use the latest maintained [Go version](https://go.dev/dl/) for building Cosmos SDK applications.
|
||||
For more information, see the [Cosmos SDK Documentation](https://docs.cosmos.network).
|
||||
|
||||
## Modules
|
||||
|
||||
The Cosmos SDK maintains a set of modules that can be included in your blockchain application. For more information
|
||||
on modules, see our [introduction doc](./x/README.md).
|
||||
|
||||
## Maintainers
|
||||
[Cosmos Labs](https://cosmoslabs.io/) maintains the core components of the stack: Cosmos SDK, CometBFT, IBC, Cosmos EVM, and various developer tools and frameworks. The detailed maintenance policy can be found [here](https://github.com/cosmos/security/blob/main/POLICY.md). In addition to developing and maintaining the Cosmos Stack, Cosmos Labs provides advisory and engineering services for blockchain solutions. [Get in touch with Cosmos Labs](https://www.cosmoslabs.io/contact).
|
||||
## Contributing
|
||||
|
||||
Cosmos Labs is a wholly-owned subsidiary of the [Interchain Foundation](https://interchain.io/), the Swiss nonprofit responsible for treasury management, funding public goods, and supporting governance for Cosmos.
|
||||
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to contribute and participate in our [dev calls](./CONTRIBUTING.md#teams-dev-calls).
|
||||
If you want to follow the updates or learn more about the latest design then join our [Discord](https://discord.com/invite/cosmosnetwork).
|
||||
|
||||
The Cosmos Stack is supported by a robust community of open-source contributors.
|
||||
## Tools and Frameworks
|
||||
|
||||
## History
|
||||
The Cosmos SDK was first released in 2019, and the first blockchain to use the SDK in production was the [Cosmos Hub](https://hub.cosmos.network/main). Today, the Cosmos SDK is a popular, battle-tested, open-source framework used by hundreds of chains.
|
||||
The Cosmos ecosystem is vast.
|
||||
[Awesome Cosmos](https://github.com/cosmos/awesome-cosmos) is a community-curated list of notable frameworks, modules and tools.
|
||||
|
||||
The Cosmos Hub still receives the most up-to-date Cosmos SDK versions. The Cosmos Hub application, `gaia`, has its own [cosmos/gaia repository](https://github.com/cosmos/gaia).
|
||||
### Cosmos Hub Mainnet
|
||||
|
||||
## Developer Community and Support
|
||||
The Cosmos Hub application, `gaia`, has its own [cosmos/gaia repository](https://github.com/cosmos/gaia). Go there to join the Cosmos Hub mainnet and more.
|
||||
|
||||
The issue list of this repo is exclusively for bug reports and feature requests. We have active, helpful communities on Discord, Telegram, and Slack.
|
||||
### Inter-Blockchain Communication (IBC)
|
||||
|
||||
**| Need Help? | Support & Community: [Discord](https://discord.com/invite/interchain) - [Telegram](https://t.me/CosmosOG) - [Talk to an Expert](https://cosmos.network/interest-form) - [Join the #Cosmos-tech Slack Channel](https://forms.gle/A8jawLgB8zuL1FN36) |**
|
||||
|
||||
## Documentation and Resources
|
||||
**View the Cosmos SDK documentation: https://docs.cosmos.network/**
|
||||
|
||||
### Cosmos Stack Libraries
|
||||
|
||||
- [CometBFT](https://github.com/cometbft/cometbft) - High-performance, 10k+ TPS configurable BFT consensus engine.
|
||||
- [The Inter-Blockchain Communication Protocol (IBC)](https://github.com/cosmos/ibc-go/) - A blockchain interoperability protocol that allows blockchains to transfer any type of data encoded in bytes.
|
||||
- [Cosmos EVM](https://github.com/cosmos/evm) - Native EVM layer for Cosmos SDK chains.
|
||||
The IBC module for the Cosmos SDK has its own [cosmos/ibc-go repository](https://github.com/cosmos/ibc-go). Go there to build and integrate with the IBC module.
|
||||
|
||||
## Disambiguation
|
||||
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
# Cosmos SDK v0.53.0 Release Notes
|
||||
|
||||
💬 [**Release Discussion**](https://github.com/cosmos/cosmos-sdk/discussions/58)
|
||||
# Cosmos SDK v0.53.4 Release Notes
|
||||
|
||||
## 🚀 Highlights
|
||||
|
||||
Announcing Cosmos SDK v0.53
|
||||
This patch release includes minor dependency and non-breaking functionality additions.
|
||||
|
||||
We are pleased to announce the release of Cosmos SDK v0.53! We’re excited to be delivering a new version of the Cosmos SDK that provides key features and updates while minimizing breaking changes so you can focus on what matters most: building.
|
||||
|
||||
Upgrading to this version of the Cosmos SDK from any `v0.50.x` release will **require a coordinated chain upgrade**.
|
||||
|
||||
For more upgrade information, check out our [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/UPGRADING.md)
|
||||
This is fully API and state-compatible with all v0.53.x releases.
|
||||
|
||||
## 📝 Changelog
|
||||
|
||||
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/CHANGELOG.md) for an exhaustive list of changes, or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.50.12...v0.53.0) from the last release.
|
||||
Check out the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.53.4/CHANGELOG.md) for an exhaustive list of changes or [compare changes](https://github.com/cosmos/cosmos-sdk/compare/v0.53.3...v0.53.4) from the last release.
|
||||
248
RELEASE_PROCESS.md
Normal file
248
RELEASE_PROCESS.md
Normal file
@ -0,0 +1,248 @@
|
||||
# Release Process
|
||||
|
||||
This document outlines the process for releasing a new version of Cosmos SDK, which involves major release and patch releases as well as maintenance for the major release.
|
||||
|
||||
> **Note, the Cosmos SDK went directly from v0.47 to v0.50 and skipped the v0.48 and v0.49 versions.**
|
||||
|
||||
## Major Release Procedure
|
||||
|
||||
A _major release_ is an increment of the first number (eg: `v1.2` → `v2.0.0`) or the _point number_ (eg: `v1.1.0 → v1.2.0`, also called _point release_). Each major release opens a _stable release series_ and receives updates outlined in the [Major Release Maintenance](#major-release-maintenance)_section.
|
||||
|
||||
Before making a new _major_ release we do beta and release candidate releases. For example, for release 1.0.0:
|
||||
|
||||
```text
|
||||
v1.0.0-beta1 → v1.0.0-beta2 → ... → v1.0.0-rc1 → v1.0.0-rc2 → ... → v1.0.0
|
||||
```
|
||||
|
||||
* Release a first beta version on the `main` branch and freeze `main` from receiving any new features. After beta is released, we focus on releasing the release candidate:
|
||||
* finish audits and reviews
|
||||
* kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks)
|
||||
* perform functional tests
|
||||
* add more tests
|
||||
* release new beta version as the bugs are discovered and fixed.
|
||||
* After the team feels that the `main` works fine we create a `release/vY` branch (going forward known a release branch), where `Y` is the version number, with the patch part substituted to `x` (eg: 0.42.x, 1.0.x). Ensure the release branch is protected so that pushes against the release branch are permitted only by the release manager or release coordinator.
|
||||
* **PRs targeting this branch can be merged _only_ when exceptional circumstances arise**
|
||||
* update the GitHub mergify integration by adding instructions for automatically backporting commits from `main` to the `release/vY` using the `backport/Y` label.
|
||||
* In the release branch prepare a new version section in the `CHANGELOG.md`
|
||||
* All links must point to their respective pull request.
|
||||
* The `CHANGELOG.md` must contain only the changes of that specific released version. All other changelog entries must be deleted and linked to the `main` branch changelog ([example](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md#previous-versions)).
|
||||
* Create release notes, in `RELEASE_NOTES.md`, highlighting the new features and changes in the version. This is needed so the bot knows which entries to add to the release page on GitHub.
|
||||
* Additionally verify that the `UPGRADING.md` file is up to date and contains all the necessary information for upgrading to the new version.
|
||||
* Remove GitHub workflows that should not be in the release branch
|
||||
* `deploy-docs.yml`: must be removed to avoid duplicate documentation deployment.
|
||||
* `test.yml`: All standalone go module tests should be removed (expect `./simapp`, and `./tests` and SDK tests).
|
||||
* These packages are tracked and tested directly on main.
|
||||
* `build.yml`: Only the SDK and SimApp needs to be built on release branches.
|
||||
* Tooling is tracked and tested directly on main.
|
||||
* Create a new annotated git tag for a release candidate (eg: `git tag -a v1.1.0-rc1`) in the release branch.
|
||||
* from this point we unfreeze main.
|
||||
* the SDK teams collaborate and do their best to run testnets in order to validate the release.
|
||||
* when bugs are found, create a PR for `main`, and backport fixes to the release branch.
|
||||
* create new release candidate tags after bugs are fixed.
|
||||
* After the team feels the release branch is stable and everything works, create a full release:
|
||||
* update `CHANGELOG.md`.
|
||||
* run `gofumpt -w -l .` to format the code.
|
||||
* create a new annotated git tag (eg `git -a v1.1.0`) in the release branch.
|
||||
* Create a GitHub release.
|
||||
|
||||
Following _semver_ philosophy, point releases after `v1.0`:
|
||||
|
||||
* must not break API
|
||||
* can break consensus
|
||||
|
||||
Before `v1.0`, point release can break both point API and consensus.
|
||||
|
||||
## Patch Release Procedure
|
||||
|
||||
A _patch release_ is an increment of the patch number (eg: `v1.2.0` → `v1.2.1`).
|
||||
|
||||
**Patch release must not break API nor consensus.**
|
||||
|
||||
Updates to the release branch should come from `main` by backporting PRs (usually done by automatic cherry pick followed by a PRs to the release branch). The backports must be marked using `backport/Y` label in PR for main.
|
||||
It is the PR author's responsibility to fix merge conflicts, update changelog entries, and
|
||||
ensure CI passes. If a PR originates from an external contributor, a core team member assumes
|
||||
responsibility to perform this process instead of the original author.
|
||||
Lastly, it is core team's responsibility to ensure that the PR meets all the SRU criteria.
|
||||
|
||||
Point Release must follow the [Stable Release Policy](#stable-release-policy).
|
||||
|
||||
After the release branch has all commits required for the next patch release:
|
||||
|
||||
* Update `CHANGELOG.md` and `RELEASE_NOTES.md` (if applicable).
|
||||
* Create a new annotated git tag (eg `git -a v1.1.0`) in the release branch.
|
||||
* If the release is a submodule update, first go the submodule folder and name the tag prepending the path to the version:
|
||||
`cd core && git -a core/v1.1.0` or `cd tools/cosmovisor && git -a tools/cosmovisor/v1.4.0`
|
||||
* Create a GitHub release (if applicable).
|
||||
|
||||
## Major Release Maintenance
|
||||
|
||||
Major Release series continue to receive bug fixes (released as a Patch Release) until they reach **End Of Life**.
|
||||
Major Release series is maintained in compliance with the **Stable Release Policy** as described in this document.
|
||||
|
||||
Only the following major release series have a stable release status:
|
||||
|
||||
* **0.46** is the previous major release and is supported until the release of **0.50.0**. A fairly strict **bugfix-only** rule applies to pull requests that are requested to be included into a not latest stable point-release.
|
||||
* **0.47** is the last major release and is supported until the release of **0.51.0**.
|
||||
|
||||
The SDK team maintains the last two major releases, any other major release is considered to have reached end of life.
|
||||
The SDK team will not backport any bug fixes to releases that are not supported.
|
||||
Widely-used (decided at SDK team's discretion) unsupported releases are considered to be in a security maintenance mode. The SDK team will backport security fixes to these releases.
|
||||
|
||||
## Stable Release Policy
|
||||
|
||||
### Patch Releases
|
||||
|
||||
Once a Cosmos-SDK release has been completed and published, updates for it are released under certain circumstances
|
||||
and must follow the [Patch Release Procedure](CONTRIBUTING.md#branching-model-and-release).
|
||||
|
||||
### Rationale
|
||||
|
||||
Unlike in-development `main` branch snapshots, **Cosmos SDK** releases are subject to much wider adoption,
|
||||
and by a significantly different demographic of users. During development, changes in the `main` branch
|
||||
affect SDK users, application developers, early adopters, and other advanced users that elect to use
|
||||
unstable experimental software at their own risk.
|
||||
|
||||
Conversely, users of a stable release expect a high degree of stability. They build their applications on it, and the
|
||||
problems they experience with it could be potentially highly disruptive to their projects.
|
||||
|
||||
Stable release updates are recommended to the vast majority of developers, and so it is crucial to treat them
|
||||
with great caution. Hence, when updates are proposed, they must be accompanied by a strong rationale and present
|
||||
a low risk of regressions, i.e. even one-line changes could cause unexpected regressions due to side effects or
|
||||
poorly tested code. We never assume that any change, no matter how little or non-intrusive, is completely exempt
|
||||
of regression risks.
|
||||
|
||||
Therefore, the requirements for stable changes are different than those that are candidates to be merged in
|
||||
the `main` branch. When preparing future major releases, our aim is to design the most elegant, user-friendly and
|
||||
maintainable SDK possible which often entails fundamental changes to the SDK's architecture design, rearranging and/or
|
||||
renaming packages as well as reducing code duplication so that we maintain common functions and data structures in one
|
||||
place rather than leaving them scattered all over the code base. However, once a release is published, the
|
||||
priority is to minimize the risk caused by changes that are not strictly required to fix qualifying bugs; this tends to
|
||||
be correlated with minimizing the size of such changes. As such, the same bug may need to be fixed in different
|
||||
ways in stable releases and `main` branch.
|
||||
|
||||
### Migrations
|
||||
|
||||
See the SDK's policy on migrations [here](https://docs.cosmos.network/main/migrations/intro).
|
||||
|
||||
### What qualifies as a Stable Release Update (SRU)
|
||||
|
||||
* **High-impact bugs**
|
||||
* Bugs that may directly cause a security vulnerability.
|
||||
* _Severe regressions_ from a Cosmos-SDK's previous release. This includes all sort of issues
|
||||
that may cause the core packages or the `x/` modules unusable.
|
||||
* Bugs that may cause **loss of user's data**.
|
||||
* Other safe cases:
|
||||
* Bugs which don't fit in the aforementioned categories for which an obvious safe patch is known.
|
||||
* Relatively small yet strictly non-breaking features with strong support from the community.
|
||||
* Relatively small yet strictly non-breaking changes that introduce forward-compatible client
|
||||
features to smoothen the migration to successive releases.
|
||||
* Relatively small yet strictly non-breaking CLI improvements.
|
||||
|
||||
### What does not qualify as SRU
|
||||
|
||||
* State machine changes.
|
||||
* Breaking changes in Protobuf definitions, as specified in [ADR-044](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-044-protobuf-updates-guidelines.md).
|
||||
* Changes that introduces API breakages (e.g. public functions and interfaces removal/renaming).
|
||||
* Client-breaking changes in gRPC and HTTP request and response types.
|
||||
* CLI-breaking changes.
|
||||
* Cosmetic fixes, such as formatting or linter warning fixes.
|
||||
|
||||
### What pull requests will be included in stable point-releases
|
||||
|
||||
Pull requests that fix bugs and add features that fall in the following categories do not require a **Stable Release Exception** to be granted to be included in a stable point-release:
|
||||
|
||||
* **Severe regressions**.
|
||||
* Bugs that may cause **client applications** to be **largely unusable**.
|
||||
* Bugs that may cause **state corruption or data loss**.
|
||||
* Bugs that may directly or indirectly cause a **security vulnerability**.
|
||||
* Non-breaking features that are strongly requested by the community.
|
||||
* Non-breaking CLI improvements that are strongly requested by the community.
|
||||
|
||||
### What pull requests will NOT be automatically included in stable point-releases
|
||||
|
||||
As rule of thumb, the following changes will **NOT** be automatically accepted into stable point-releases:
|
||||
|
||||
* **State machine changes**.
|
||||
* **Protobug-breaking changes**, as specified in [ADR-044](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-044-protobuf-updates- guidelines.md).
|
||||
* **Client-breaking changes**, i.e. changes that prevent gRPC, HTTP and RPC clients to continue interacting with the node without any change.
|
||||
* **API-breaking changes**, i.e. changes that prevent client applications to _build without modifications_ to the client application's source code.
|
||||
* **CLI-breaking changes**, i.e. changes that require usage changes for CLI users.
|
||||
|
||||
In some circumstances, PRs that don't meet the aforementioned criteria might be raised and asked to be granted a _Stable Release Exception_.
|
||||
|
||||
### Stable Release Exception - Procedure
|
||||
|
||||
1. Check that the bug is either fixed or not reproducible in `main`. It is, in general, not appropriate to release bug fixes for stable releases without first testing them in `main`. Please apply the label [v0.43](https://github.com/cosmos/cosmos-sdk/milestone/26) to the issue.
|
||||
2. Add a comment to the issue and ensure it contains the following information (see the bug template below):
|
||||
|
||||
* **[Impact]** An explanation of the bug on users and justification for backporting the fix to the stable release.
|
||||
* A **[Test Case]** section containing detailed instructions on how to reproduce the bug.
|
||||
* A **[Regression Potential]** section with a clear assessment on how regressions are most likely to manifest as a result of the pull request that aims to fix the bug in the target stable release.
|
||||
|
||||
3. **Stable Release Managers** will review and discuss the PR. Once _consensus_ surrounding the rationale has been reached and the technical review has successfully concluded, the pull request will be merged in the respective point-release target branch (e.g. `release/v0.43.x`) and the PR included in the point-release's respective milestone (e.g. `v0.43.5`).
|
||||
|
||||
#### Stable Release Exception - Bug template
|
||||
|
||||
```md
|
||||
#### Impact
|
||||
|
||||
Brief xplanation of the effects of the bug on users and a justification for backporting the fix to the stable release.
|
||||
|
||||
#### Test Case
|
||||
|
||||
Detailed instructions on how to reproduce the bug on Stargate's most recently published point-release.
|
||||
|
||||
#### Regression Potential
|
||||
|
||||
Explanation on how regressions might manifest - even if it's unlikely.
|
||||
It is assumed that stable release fixes are well-tested and they come with a low risk of regressions.
|
||||
It's crucial to make the effort of thinking about what could happen in case a regression emerges.
|
||||
```
|
||||
|
||||
### Stable Release Managers
|
||||
|
||||
The **Stable Release Managers** evaluate and approve or reject updates and backports to Cosmos SDK Stable Release series,
|
||||
according to the [stable release policy](#stable-release-policy) and [release procedure](#major-release-procedure).
|
||||
Decisions are made by consensus.
|
||||
|
||||
Their responsibilites include:
|
||||
|
||||
* Driving the Stable Release Exception process.
|
||||
* Approving/rejecting proposed changes to a stable release series.
|
||||
* Executing the release process of stable point-releases in compliance with the [Point Release Procedure](CONTRIBUTING.md).
|
||||
|
||||
Currently residing Stable Release Managers:
|
||||
|
||||
* @tac0turtle - Marko Baricevic
|
||||
* @julienrbrt - Julien Robert
|
||||
|
||||
## Cosmos SDK Modules
|
||||
|
||||
The Cosmos SDK repository is a mono-repo where its Go modules have a different release process and cadence than the Cosmos SDK itself.
|
||||
There are two types of modules:
|
||||
|
||||
1. Modules that import the Cosmos SDK and depend on a specific version of it.
|
||||
* Modules to be imported in an app (e.g `x/` modules).
|
||||
* Modules that are not imported into an app and are a standalone module (e.g. `cosmovisor`).
|
||||
2. Modules that do not depend on the Cosmos SDK.
|
||||
|
||||
The same changelog procedure applies to all modules in the Cosmos SDK repository, and must be up-to-date with the latest changes before tagging a module version.
|
||||
Note: The Cosmos SDK team is in an active process of limiting Go modules that depend on the Cosmos SDK.
|
||||
|
||||
### Modules that depend on the Cosmos SDK
|
||||
|
||||
The Cosmos SDK team should strive to release modules that depend on the Cosmos SDK at the same time or soon after a major version Cosmos SDK itself.
|
||||
Those modules can be considered as part of the Cosmos SDK, but features and improvements are released at a different cadence.
|
||||
|
||||
* When a module is supposed to be used in an app (e.g `x/` modules), due to the dependency on the SDK, tagging a new version of a module must be done from a Cosmos SDK release branch. A compability matrix must be provided in the `README.md` of that module with the corresponding versions.
|
||||
* Modules that import the SDK but do not need to be imported in an app (`e.g. cosmovisor`) must be released from the `main` branch and follow the process defined below.
|
||||
|
||||
### Modules that do not depend on the Cosmos SDK
|
||||
|
||||
Modules that do not depend on the Cosmos SDK can be released at any time from the `main` branch of the Cosmos SDK repository.
|
||||
|
||||
#### Branches For Go Modules
|
||||
|
||||
Branches that go modules are released from:
|
||||
|
||||
* Store v1 is released from `release/v0.50.x` branch.
|
||||
270
ROADMAP.md
Normal file
270
ROADMAP.md
Normal file
@ -0,0 +1,270 @@
|
||||
# Roadmap 2023
|
||||
|
||||
Welcome to the Cosmos SDK's team roadmap.
|
||||
|
||||
> This document is meant to help the team get feedback on the proposed work and for others to follow where we stand in our process. This will be a living document updated on a regular basis. If you'd like to participate in any workscope or would like to suggest another feature please reach out to [Marko](marko@binary.builders) or [Sam](sam@binary.builders) and we will schedule a call to discuss the feature request.
|
||||
|
||||
|
||||
## Q1
|
||||
|
||||
### Storage
|
||||
|
||||
* [x] [Produce a spec for the new store design](https://github.com/cosmos/cosmos-sdk/issues/12986)
|
||||
* Research a new design for store. This could entail writing some POC's in order to identify design patterns
|
||||
* [x] Store as its own go module
|
||||
* Store module should be its own go.mod without a dependency on the Cosmos SDK
|
||||
* [ ] [Begin implementation of store v2](https://github.com/cosmos/cosmos-sdk/pull/15028)
|
||||
* Identify the migration path from store v1 -> store v2
|
||||
* [ ] Parallel execution of state
|
||||
* RFC/ADR is merged into the main on the sdk
|
||||
* [ ] Optimistic execution
|
||||
* RFC/ADR is merged into main on the sdk
|
||||
|
||||
|
||||
### Client UX
|
||||
|
||||
* [x] Release v1 of query support (auto-cli)
|
||||
* A version of query support has been merged, documentation is missing
|
||||
* [ ] Dynamic metadata support
|
||||
* Dynamic support allows the Cosmos SDK to release a cmd line tool that could work with any chain.
|
||||
* Add metadata support to latest version of Cosmos SDK and, if possible, backport to older versions
|
||||
* [x] Multi-chain command **(Done)**
|
||||
* Release a cmd line tool that can be pointed a grpc endpoint which then can produce cmd lines to interact with the chain
|
||||
* [x] Auto-cli tx support
|
||||
* Tx support for auto-cli/hubl
|
||||
* This would fully remove the need for application developers to write cli commands for their modules
|
||||
* [ ] [Consensus Key Rotation](https://github.com/cosmos/cosmos-sdk/issues/5231)
|
||||
|
||||
|
||||
### Dev UX
|
||||
|
||||
* [x] [Release collections v0.1](https://github.com/cosmos/cosmos-sdk/issues/14300)
|
||||
* Collections is a new abstraction layer similar to the ORM. In the ADR phase it received support from many in the ecosystem.
|
||||
* V1 release should allow modules to be migrated to collections.
|
||||
* Migrate 3 modules to use collections api
|
||||
* Migrating 3 modules to use collections would help in show users how to migrate users
|
||||
* [ ] [Release ORM v1](https://github.com/cosmos/cosmos-sdk/issues/11088)
|
||||
* [x] [Sign mode textual](https://github.com/cosmos/cosmos-sdk/issues/11970)
|
||||
* Sign mode textual has been under construction for 2 quarters now, this quarter the goal is to move towards v1 and potentially line up a audit before final release.
|
||||
* [x] Core API
|
||||
* [Merge ADR for Core API](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-063-core-module-api.md)
|
||||
* Migrate three modules to use core api
|
||||
* [x] Module Dependency
|
||||
* Give three modules their own go.mods
|
||||
* [ ] [Metamask signing directly into the sdk](https://github.com/cosmos/cosmos-sdk/discussions/13892)
|
||||
* [ ] [ADR-033 (internal message routing)](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-033-protobuf-inter-module-comm.md)
|
||||
* Merge internal message router
|
||||
* Add docs on how to use the router
|
||||
* [x] [ADR-54 (dependency management)](https://github.com/cosmos/cosmos-sdk/pull/11802)
|
||||
* Come to consensus on module dependency graph for the future
|
||||
* Begin socializing conventions
|
||||
* [ ] [Remove global bech32](https://github.com/cosmos/cosmos-sdk/issues/13140)
|
||||
* [x] [Auth module](https://github.com/cosmos/cosmos-sdk/issues/14900)
|
||||
* Produce a spec/ADR on a proposed new auth module.
|
||||
* [x] [Implement Amino Json encoder](https://github.com/cosmos/cosmos-sdk/issues/10993)
|
||||
|
||||
### Testing
|
||||
|
||||
* [x] [integration testing framework](https://github.com/cosmos/cosmos-sdk/issues/14145)
|
||||
* design and merge a integration testing framework.
|
||||
* The goals of the framework would that a module only needs to depend on modules that it depends on outside of testing, not all modules in the sdk like today.
|
||||
|
||||
|
||||
### ABCI 2.0
|
||||
|
||||
Issue: https://github.com/cosmos/cosmos-sdk/issues/12272
|
||||
|
||||
* [x] [ADR ABCI 2.0](https://github.com/cosmos/cosmos-sdk/issues/14674)
|
||||
* Write ADR for integration of vote extensions & finalize block
|
||||
|
||||
**Blocked**:
|
||||
|
||||
> once cometBFT has a release candidate of ABCI 2.0 (cmt 0.38)
|
||||
|
||||
* Integrate ABCI 2.0
|
||||
|
||||
### Security
|
||||
|
||||
* [ ] [Circuit breaker](https://github.com/cosmos/cosmos-sdk/issues/14226)
|
||||
* Implement the circuit breaker module and prepare releases for Cosmos SDK versions 0.45, 0.46 and 0.47
|
||||
|
||||
|
||||
### IAVL
|
||||
|
||||
* [x] [ADR 001](https://github.com/cosmos/iavl/pull/608)
|
||||
* Implementation has been completed, waiting on reviewers
|
||||
* [x] [Prepare the migration path](https://github.com/cosmos/iavl/issues/675)
|
||||
* Migration path has not been finalized
|
||||
* [ ] Test on mainnets
|
||||
* If possible we would like to test the new IAVL design on mainnets to observer behavior changes.
|
||||
|
||||
Issue: https://github.com/cosmos/iavl/issues/548
|
||||
|
||||
## Q2
|
||||
|
||||
### Storage
|
||||
|
||||
* [ ] [Storage v2](https://github.com/cosmos/cosmos-sdk/issues/12986)
|
||||
* Objective:
|
||||
* Goal is to get 60% of the way through the rewrite of storage
|
||||
* Begin testing the rewrite on mainnets if possible
|
||||
* External Audit
|
||||
* Progress:
|
||||
* On pause till ABCI 2.0 ships
|
||||
* [ ] [Optimistic Execution](https://github.com/cosmos/cosmos-sdk/issues/15365)
|
||||
* Objective:
|
||||
* Users should be able to pick between delayed execution and optimistic
|
||||
* RFC/ADR is merged
|
||||
* Implementation started.
|
||||
* Progess:
|
||||
* On pause till ABCI 2.0 is merged
|
||||
|
||||
### Client UX
|
||||
|
||||
* [ ] Hubl/AutoCLI
|
||||
* Objective:
|
||||
* Allow users to sign and submit transactions using hubl
|
||||
* Add module support for autocli
|
||||
* Deprecate/remove legacy cli (optional)
|
||||
* Progress:
|
||||
* Signing support is being refactored and is near completion
|
||||
* Adapting modules to use autocli instead of manually written cli
|
||||
* [ ] [Consensus Key Rotation](https://github.com/cosmos/cosmos-sdk/issues/5231)
|
||||
* Objective:
|
||||
* Allow users to rotate consensus keys for their validators
|
||||
* Progress
|
||||
* Merge pull request and updated ADR into main
|
||||
* [ ] [Operator key rotation](https://github.com/cosmos/cosmos-sdk/issues/3863)
|
||||
* Objective:
|
||||
* Allow users to rotate operator keys for their validators
|
||||
* Progress:
|
||||
* secondary val index was added to support operator key rotation
|
||||
* Pr is open and is being worked on
|
||||
|
||||
### Dev UX
|
||||
|
||||
* Toolkit/SDK ADR.
|
||||
* Objective:
|
||||
* Produce a RFC/ADR on how to make core composable
|
||||
* Merge RFC/ADR into main
|
||||
* Progress:
|
||||
* on pause until abci 2.0 integration is completed
|
||||
* Adopt core api fully in modules
|
||||
* Objective:
|
||||
* Remove the Cosmos SDK and Comet as a dependency from all modules
|
||||
* Release v1 of modules that have their dependency graph cleaned up
|
||||
* Spin out 4 more modules into their own go.mods
|
||||
* Progress:
|
||||
* Core api has been integrated into all modules
|
||||
* KvStoreService is being added to all modules
|
||||
* [ ] [Remove global bech32](https://github.com/cosmos/cosmos-sdk/issues/13140)
|
||||
* Objective:
|
||||
* Depreacte global bech32 setting
|
||||
* Progress:
|
||||
* All modules except bank use the `address.Codec`
|
||||
* [ ] Make sdk.Msg only be `proto.message`
|
||||
* Objectives:
|
||||
* Reduce sdk.Msg to only be proto.message
|
||||
* Reduce boilerplate in `msgs.go`
|
||||
* Progess:
|
||||
* [x] [Make ValidateBasic Optional](https://github.com/cosmos/cosmos-sdk/issues/15648)
|
||||
* [ ] [Make GetSigners be optional](https://github.com/cosmos/cosmos-sdk/issues/15677)
|
||||
* [ ] Remove GetsignBytes for legacy amino encoding
|
||||
* [ ] [Collections](https://github.com/cosmos/cosmos-sdk/issues/14300)
|
||||
* Objectives
|
||||
* Migrate all modules
|
||||
* Add query support
|
||||
* Add schema support
|
||||
* Progress:
|
||||
* We have migrated three modules
|
||||
|
||||
### ABCI 2.0
|
||||
|
||||
* [ ] [ABCI 2.0](https://github.com/cosmos/cosmos-sdk/issues/12272)
|
||||
* Objectives:
|
||||
* Integrate comet 0.38
|
||||
* QA
|
||||
* Progress:
|
||||
* Integration has started
|
||||
|
||||
|
||||
### Testing
|
||||
|
||||
* [ ] [Integration framework](https://github.com/cosmos/cosmos-sdk/issues/14145)
|
||||
* Objectives:
|
||||
* Migrate all modules
|
||||
* Progress:
|
||||
* We have migrated 2-4 modules currently
|
||||
|
||||
### Modules
|
||||
|
||||
* [ ] [Invariant Checking](https://github.com/cosmos/cosmos-sdk/issues/15706)
|
||||
* Objective:
|
||||
* Design a new system for checking invairants
|
||||
* Implement changes
|
||||
* Audit current invariants
|
||||
* Progress:
|
||||
* NA
|
||||
* [ ] [Accounts](https://github.com/cosmos/cosmos-sdk/issues/14900)
|
||||
* Objective:
|
||||
* Allow users to use account abstractions
|
||||
* Implementation is completed
|
||||
* External Audit is scheduled (if needed)
|
||||
* Progress:
|
||||
* RFC/ADR is in review
|
||||
|
||||
### Research
|
||||
|
||||
* [ ] Commitment Structure
|
||||
* Objective:
|
||||
* Identify different commitment structures that could be used in the sdk and how they would be plugged (highlevel)
|
||||
* Progress:
|
||||
* Conversations in slack have started
|
||||
* [ ] Cross lang
|
||||
* Objective:
|
||||
* Answer, what is needed to support many languages
|
||||
* Answer, what sort of encoding of passing between the cgo/ffi boundary
|
||||
* Progress:
|
||||
* working group is meeting bi weekly
|
||||
* ADR/RFC is in review
|
||||
|
||||
## Q3
|
||||
|
||||
### Storage
|
||||
|
||||
* Audit & release of storage refactor
|
||||
* Identify further optimizations for storage
|
||||
* Goal is to identify the next bottlenecks in storage or the state machine
|
||||
|
||||
### Dev UX
|
||||
|
||||
* Complete Toolkit/SDK implementation refactor
|
||||
* Goal is to release the new version of the sdk allowing for further composability
|
||||
* Implement fee market abstractions
|
||||
* Goal is to release an alpha version of fee market abstractions
|
||||
|
||||
### Modules
|
||||
|
||||
* Governance
|
||||
* Make gov and groups composable with each other, not duplicate
|
||||
* Staking
|
||||
* Research a new staking design
|
||||
* Begin Implementation
|
||||
|
||||
|
||||
### Research
|
||||
|
||||
* Nonce Lanes
|
||||
* Goal is to produce a spec and/or viability of using lanes for nonces instead of a single sequence number.
|
||||
|
||||
## Q4
|
||||
|
||||
### Research
|
||||
|
||||
* Stateless clients
|
||||
* research how stateless clients could evolve in cosmos
|
||||
|
||||
|
||||
|
||||
|
||||
This document will be updated at the end of the quarter on what was achieved and what was not. Shortly before the quarter concludes a new section will be added for the next quarter. We are working on updating the complete one year roadmap and will be posting it here as well.
|
||||
@ -66,7 +66,14 @@ If you follow these guidelines when reporting an issue to us, we commit to:
|
||||
|
||||
### More information
|
||||
|
||||
* See [Maintenance and Security](https://github.com/cosmos/security) for detailed policies.
|
||||
* See [TIMELINE.md] for an example timeline of a disclosure.
|
||||
* See [DISCLOSURE.md] to see more into the inner workings of the disclosure
|
||||
process.
|
||||
* See [EXAMPLES.md] for some of the examples that we are interested in for the
|
||||
bug bounty program.
|
||||
|
||||
[gh-private-advisory]: /../../security/advisories/new
|
||||
[h1]: https://hackerone.com/cosmos
|
||||
[TIMELINE.md]: https://github.com/cosmos/security/blob/main/TIMELINE.md
|
||||
[DISCLOSURE.md]: https://github.com/cosmos/security/blob/main/DISCLOSURE.md
|
||||
[EXAMPLES.md]: https://github.com/cosmos/security/blob/main/EXAMPLES.md
|
||||
|
||||
@ -6,21 +6,21 @@ This guide includes one **required** change and three **optional** features.
|
||||
|
||||
After completing this guide, applications will have:
|
||||
|
||||
* The `x/protocolpool` module
|
||||
* The `x/epochs` module
|
||||
* Unordered Transaction support
|
||||
- The `x/protocolpool` module
|
||||
- The `x/epochs` module
|
||||
- Unordered Transaction support
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [App Wiring Changes (REQUIRED)](#app-wiring-changes-required)
|
||||
* [Adding ProtocolPool Module (OPTIONAL)](#adding-protocolpool-module-optional)
|
||||
* [ProtocolPool Manual Wiring](#protocolpool-manual-wiring)
|
||||
* [ProtocolPool DI Wiring](#protocolpool-di-wiring)
|
||||
* [Adding Epochs Module (OPTIONAL)](#adding-epochs-module-optional)
|
||||
* [Epochs Manual Wiring](#epochs-manual-wiring)
|
||||
* [Epochs DI Wiring](#epochs-di-wiring)
|
||||
* [Enable Unordered Transactions (OPTIONAL)](#enable-unordered-transactions-optional)
|
||||
* [Upgrade Handler](#upgrade-handler)
|
||||
- [App Wiring Changes (REQUIRED)](#app-wiring-changes-required)
|
||||
- [Adding ProtocolPool Module (OPTIONAL)](#adding-protocolpool-module-optional)
|
||||
- [ProtocolPool Manual Wiring](#protocolpool-manual-wiring)
|
||||
- [ProtocolPool DI Wiring](#protocolpool-di-wiring)
|
||||
- [Adding Epochs Module (OPTIONAL)](#adding-epochs-module-optional)
|
||||
- [Epochs Manual Wiring](#epochs-manual-wiring)
|
||||
- [Epochs DI Wiring](#epochs-di-wiring)
|
||||
- [Enable Unordered Transactions (OPTIONAL)](#enable-unordered-transactions-optional)
|
||||
- [Upgrade Handler](#upgrade-handler)
|
||||
|
||||
## App Wiring Changes **REQUIRED**
|
||||
|
||||
@ -41,12 +41,12 @@ Using an external community pool such as `x/protocolpool` will cause the followi
|
||||
|
||||
**QueryService**
|
||||
|
||||
* `CommunityPool`
|
||||
- `CommunityPool`
|
||||
|
||||
**MsgService**
|
||||
|
||||
* `CommunityPoolSpend`
|
||||
* `FundCommunityPool`
|
||||
- `CommunityPoolSpend`
|
||||
- `FundCommunityPool`
|
||||
|
||||
If your services depend on this functionality from `x/distribution`, please update them to use either `x/protocolpool` or your custom external community pool alternatives.
|
||||
|
||||
@ -449,7 +449,7 @@ options := ante.HandlerOptions{
|
||||
SigVerifyOptions: []ante.SigVerificationDecoratorOption{
|
||||
// change below as needed.
|
||||
ante.WithUnorderedTxGasCost(ante.DefaultUnorderedTxGasCost),
|
||||
ante.WithMaxUnorderedTxTimeoutDuration(ante.DefaultMaxTimeoutDuration),
|
||||
ante.WithMaxUnorderedTxTimeoutDuration(ante.DefaultMaxTimoutDuration),
|
||||
},
|
||||
}
|
||||
```
|
||||
@ -500,4 +500,4 @@ func (app SimApp) RegisterUpgradeHandlers() {
|
||||
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
248
UPGRADING.md
248
UPGRADING.md
@ -1,77 +1,227 @@
|
||||
# Upgrade Reference
|
||||
|
||||
This document provides a quick reference for the upgrades from `v0.53.x` to `v0.54.x` of Cosmos SDK.
|
||||
This document provides a quick reference for the upgrades from `v0.50.x` to `v0.53.x` of Cosmos SDK.
|
||||
|
||||
Note, always read the **App Wiring Changes** section for more information on application wiring updates.
|
||||
|
||||
## TLDR
|
||||
🚨Upgrading to v0.53.x will require a **coordinated** chain upgrade.🚨
|
||||
|
||||
For a full list of changes, see the [Changelog](https://github.com/cosmos/cosmos-sdk/blob/release/v0.54.x/CHANGELOG.md).
|
||||
### TLDR;
|
||||
|
||||
## x/gov
|
||||
Unordered transactions, `x/protocolpool`, and `x/epoch` are the major new features added in v0.53.x.
|
||||
|
||||
### Keeper Initialization
|
||||
We also added the ability to add a `CheckTx` handler and enabled ed25519 signature verification.
|
||||
|
||||
The `x/gov` module has been decoupled from `x/staking`. The `keeper.NewKeeper` constructor now requires a `CalculateVoteResultsAndVotingPowerFn` parameter instead of a `StakingKeeper`.
|
||||
For a full list of changes, see the [Changelog](https://github.com/cosmos/cosmos-sdk/blob/release/v0.53.x/CHANGELOG.md).
|
||||
|
||||
### Unordered Transactions
|
||||
|
||||
The Cosmos SDK now supports unordered transactions. _This is an opt-in feature_.
|
||||
|
||||
Clients that use this feature may now submit their transactions in a fire-and-forget manner to chains that enabled unordered transactions.
|
||||
|
||||
To submit an unordered transaction, clients must set the `unordered` flag to
|
||||
`true` and ensure a reasonable `timeout_timestamp` is set. The `timeout_timestamp` is
|
||||
used as a TTL for the transaction and provides replay protection. Each transaction's `timeout_timestamp` must be
|
||||
unique to the account; however, the difference may be as small as a nanosecond. See [ADR-070](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-070-unordered-transactions.md) for more details.
|
||||
|
||||
Note that unordered transactions require sequence values to be zero, and will **FAIL** if a non-zero sequence value is set.
|
||||
Please ensure no sequence value is set when submitting an unordered transaction.
|
||||
Services that rely on prior assumptions about sequence values should be updated to handle unordered transactions.
|
||||
Services should be aware that when the transaction is unordered, the transaction sequence will always be zero.
|
||||
|
||||
#### Enabling Unordered Transactions
|
||||
|
||||
To enable unordered transactions, supply the `WithUnorderedTransactions` option to the `x/auth` keeper:
|
||||
|
||||
**Before:**
|
||||
```go
|
||||
govKeeper := keeper.NewKeeper(
|
||||
cdc,
|
||||
storeService,
|
||||
authKeeper,
|
||||
bankKeeper,
|
||||
stakingKeeper, // StakingKeeper parameter
|
||||
distrKeeper,
|
||||
router,
|
||||
config,
|
||||
authority,
|
||||
)
|
||||
app.AccountKeeper = authkeeper.NewAccountKeeper(
|
||||
appCodec,
|
||||
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
|
||||
authtypes.ProtoBaseAccount,
|
||||
maccPerms,
|
||||
authcodec.NewBech32Codec(sdk.Bech32MainPrefix),
|
||||
sdk.Bech32MainPrefix,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
authkeeper.WithUnorderedTransactions(true), // new option!
|
||||
)
|
||||
```
|
||||
|
||||
**After:**
|
||||
If using dependency injection, update the auth module config.
|
||||
|
||||
```go
|
||||
govKeeper := keeper.NewKeeper(
|
||||
cdc,
|
||||
storeService,
|
||||
authKeeper,
|
||||
bankKeeper,
|
||||
keeper.NewDefaultCalculateVoteResultsAndVotingPower(stakingKeeper), // Function parameter
|
||||
distrKeeper,
|
||||
router,
|
||||
config,
|
||||
authority,
|
||||
)
|
||||
{
|
||||
Name: authtypes.ModuleName,
|
||||
Config: appconfig.WrapAny(&authmodulev1.Module{
|
||||
Bech32Prefix: "cosmos",
|
||||
ModuleAccountPermissions: moduleAccPerms,
|
||||
EnableUnorderedTransactions: true, // remove this line if you do not want unordered transactions.
|
||||
}),
|
||||
},
|
||||
```
|
||||
|
||||
For applications using depinject, the governance module now accepts an optional `CalculateVoteResultsAndVotingPowerFn`. If not provided, it will use the `StakingKeeper` (also optional) to create the default function.
|
||||
By default, unordered transactions use a transaction timeout duration of 10 minutes and a default gas charge of 2240 gas units.
|
||||
To modify these default values, pass in the corresponding options to the new `SigVerifyOptions` field in `x/auth's` `ante.HandlerOptions`.
|
||||
|
||||
### GovHooks Interface
|
||||
|
||||
The `AfterProposalSubmission` hook now includes the proposer address as a parameter.
|
||||
|
||||
**Before:**
|
||||
```go
|
||||
func (h MyGovHooks) AfterProposalSubmission(ctx context.Context, proposalID uint64) error {
|
||||
// implementation
|
||||
options := ante.HandlerOptions{
|
||||
SigVerifyOptions: []ante.SigVerificationDecoratorOption{
|
||||
// change below as needed.
|
||||
ante.WithUnorderedTxGasCost(ante.DefaultUnorderedTxGasCost),
|
||||
ante.WithMaxUnorderedTxTimeoutDuration(ante.DefaultMaxTimoutDuration),
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
**After:**
|
||||
```go
|
||||
func (h MyGovHooks) AfterProposalSubmission(ctx context.Context, proposalID uint64, proposerAddr sdk.AccAddress) error {
|
||||
// implementation
|
||||
anteDecorators := []sdk.AnteDecorator{
|
||||
// ... other decorators ...
|
||||
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler, options.SigVerifyOptions...), // supply new options
|
||||
}
|
||||
```
|
||||
|
||||
## Adoption of OpenTelemetry and Deprecation of `github.com/hashicorp/go-metrics`
|
||||
### App Wiring Changes
|
||||
|
||||
Existing Cosmos SDK telemetry support is provided by `github.com/hashicorp/go-metrics` which is undermaintained and only supported metrics instrumentation.
|
||||
OpenTelemetry provides an integrated solution for metrics, traces, and logging which is widely adopted and actively maintained.
|
||||
The existing wrapper functions in the `telemetry` package required acquiring mutex locks and map lookups for every metric operation which is sub-optimal. OpenTelemetry's API uses atomic concurrency wherever possible and should introduce less performance overhead during metric collection.
|
||||
In this section, we describe the required app wiring changes to run a v0.53.x Cosmos SDK application.
|
||||
|
||||
The [README.md](telemetry/README.md) in the `telemetry` package provides more details on usage, but below is a quick summary:
|
||||
1. application developers should follow the official [go OpenTelemetry](https://pkg.go.dev/go.opentelemetry.io/otel) guidelines when instrumenting their applications.
|
||||
2. node operators who want to configure OpenTelemetry exporters should set the `OTEL_EXPERIMENTAL_CONFIG_FILE` environment variable to the path of a yaml file which follows the OpenTelemetry declarative configuration format specified here: https://pkg.go.dev/go.opentelemetry.io/contrib/otelconf. As long as the `telemetry` package has been imported somewhere (it should already be imported if you are using the SDK), OpenTelemetry will be initialized automatically based on the configuration file.
|
||||
**These changes are directly applicable to your application wiring.**
|
||||
|
||||
NOTE: the go implementation of [otelconf](https://pkg.go.dev/go.opentelemetry.io/contrib/otelconf) is still under development and we will update our usage of it as it matures.
|
||||
The `x/auth` module now contains a `PreBlocker` that _must_ be set in the module manager's `SetOrderPreBlockers` method.
|
||||
|
||||
```go
|
||||
app.ModuleManager.SetOrderPreBlockers(
|
||||
upgradetypes.ModuleName,
|
||||
authtypes.ModuleName, // NEW
|
||||
)
|
||||
```
|
||||
|
||||
That's it.
|
||||
|
||||
### New Modules
|
||||
|
||||
Below are some **optional** new modules you can include in your chain.
|
||||
To see a full example of wiring these modules, please check out the [SimApp](https://github.com/cosmos/cosmos-sdk/blob/release/v0.53.x/simapp/app.go).
|
||||
|
||||
#### Epochs
|
||||
|
||||
⚠️Adding this module requires a `StoreUpgrade`⚠️
|
||||
|
||||
The new, supplemental `x/epochs` module provides Cosmos SDK modules functionality to register and execute custom logic at fixed time-intervals.
|
||||
|
||||
Required wiring:
|
||||
- Keeper Instantiation
|
||||
- StoreKey addition
|
||||
- Hooks Registration
|
||||
- App Module Registration
|
||||
- entry in SetOrderBeginBlockers
|
||||
- entry in SetGenesisModuleOrder
|
||||
- entry in SetExportModuleOrder
|
||||
|
||||
#### ProtocolPool
|
||||
|
||||
:::warning
|
||||
|
||||
Using `protocolpool` will cause the following `x/distribution` handlers to return an error:
|
||||
|
||||
|
||||
**QueryService**
|
||||
|
||||
- `CommunityPool`
|
||||
|
||||
**MsgService**
|
||||
|
||||
- `CommunityPoolSpend`
|
||||
- `FundCommunityPool`
|
||||
|
||||
If you have services that rely on this functionality from `x/distribution`, please update them to use the `x/protocolpool` equivalents.
|
||||
|
||||
:::
|
||||
|
||||
⚠️Adding this module requires a `StoreUpgrade`⚠️
|
||||
|
||||
The new, supplemental `x/protocolpool` module provides extended functionality for managing and distributing block reward revenue.
|
||||
|
||||
Required wiring:
|
||||
- Module Account Permissions
|
||||
- protocolpooltypes.ModuleName (nil)
|
||||
- protocolpooltypes.ProtocolPoolEscrowAccount (nil)
|
||||
- Keeper Instantiation
|
||||
- StoreKey addition
|
||||
- Passing the keeper to the Distribution Keeper
|
||||
- `distrkeeper.WithExternalCommunityPool(app.ProtocolPoolKeeper)`
|
||||
- App Module Registration
|
||||
- entry in SetOrderBeginBlockers
|
||||
- entry in SetOrderEndBlockers
|
||||
- entry in SetGenesisModuleOrder
|
||||
- entry in SetExportModuleOrder **before `x/bank`**
|
||||
|
||||
## Custom Minting Function in `x/mint`
|
||||
|
||||
This release introduces the ability to configure a custom mint function in `x/mint`. The minting logic is now abstracted as a `MintFn` with a default implementation that can be overridden.
|
||||
|
||||
### What’s New
|
||||
|
||||
- **Configurable Mint Function:**
|
||||
A new `MintFn` abstraction is introduced. By default, the module uses `DefaultMintFn`, but you can supply your own implementation.
|
||||
|
||||
- **Deprecated InflationCalculationFn Parameter:**
|
||||
The `InflationCalculationFn` argument previously provided to `mint.NewAppModule()` is now ignored and must be `nil`. To customize the default minter’s inflation behavior, wrap your custom function with `mintkeeper.DefaultMintFn` and pass it via the `WithMintFn` option:
|
||||
|
||||
```go
|
||||
mintkeeper.WithMintFn(mintkeeper.DefaultMintFn(customInflationFn))
|
||||
```
|
||||
|
||||
### How to Upgrade
|
||||
|
||||
1. **Using the Default Minting Function**
|
||||
|
||||
No action is needed if you’re happy with the default behavior. Make sure your application wiring initializes the MintKeeper like this:
|
||||
|
||||
```go
|
||||
mintKeeper := mintkeeper.NewKeeper(
|
||||
appCodec,
|
||||
storeService,
|
||||
stakingKeeper,
|
||||
accountKeeper,
|
||||
bankKeeper,
|
||||
authtypes.FeeCollectorName,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
)
|
||||
```
|
||||
|
||||
2. **Using a Custom Minting Function**
|
||||
|
||||
To use a custom minting function, define it as follows and pass it you your mintKeeper when constructing it:
|
||||
|
||||
```go
|
||||
func myCustomMintFunc(ctx sdk.Context, k *mintkeeper.Keeper) {
|
||||
// do minting...
|
||||
}
|
||||
|
||||
// ...
|
||||
mintKeeper := mintkeeper.NewKeeper(
|
||||
appCodec,
|
||||
storeService,
|
||||
stakingKeeper,
|
||||
accountKeeper,
|
||||
bankKeeper,
|
||||
authtypes.FeeCollectorName,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
mintkeeper.WithMintFn(myCustomMintFunc), // Use custom minting function
|
||||
)
|
||||
```
|
||||
|
||||
### Misc Changes
|
||||
|
||||
#### Testnet's init-files Command
|
||||
|
||||
Some changes were made to `testnet`'s `init-files` command to support our new testing framework, `Systemtest`.
|
||||
|
||||
##### Flag Changes
|
||||
|
||||
- The flag for validator count was changed from `--v` to `--validator-count`(shorthand: `-v`).
|
||||
|
||||
##### Flag Additions
|
||||
- `--staking-denom` allows changing the default stake denom, `stake`.
|
||||
- `--commit-timeout` enables changing the commit timeout of the chain.
|
||||
- `--single-host` enables running a multi-node network on a single host. This bumps each subsequent node's network addresses by 1. For example, node1's gRPC address will be 9090, node2's 9091, etc...
|
||||
@ -1848,7 +1848,7 @@ type ModuleConfig struct {
|
||||
// cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same
|
||||
// and the framework knows that the v2 module should receive all the same state
|
||||
// that the v1 module had. Note: modules should provide info on which versions
|
||||
// they can migrate from in the ModuleDescriptor.can_migrate_from field.
|
||||
// they can migrate from in the ModuleDescriptor.can_migration_from field.
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// config is the config object for the module. Module config messages should
|
||||
// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension.
|
||||
|
||||
@ -1258,7 +1258,7 @@ type Module struct {
|
||||
ModuleAccountPermissions []*ModuleAccountPermission `protobuf:"bytes,2,rep,name=module_account_permissions,json=moduleAccountPermissions,proto3" json:"module_account_permissions,omitempty"`
|
||||
// authority defines the custom module authority. If not set, defaults to the governance module.
|
||||
Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
// enable_unordered_transactions determines whether unordered transactions should be supported or not.
|
||||
// enable_unordered_transactions determines whether unordered transactions should be processed or not.
|
||||
// When true, unordered transactions will be validated and processed.
|
||||
// When false, unordered transactions will be rejected.
|
||||
EnableUnorderedTransactions bool `protobuf:"varint,4,opt,name=enable_unordered_transactions,json=enableUnorderedTransactions,proto3" json:"enable_unordered_transactions,omitempty"`
|
||||
|
||||
@ -1128,7 +1128,7 @@ type EventGrant struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Msg type URL for which an authorization is granted
|
||||
// Msg type URL for which an autorization is granted
|
||||
MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
|
||||
// Granter account address
|
||||
Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
@ -1183,7 +1183,7 @@ type EventRevoke struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Msg type URL for which an authorization is revoked
|
||||
// Msg type URL for which an autorization is revoked
|
||||
MsgTypeUrl string `protobuf:"bytes,2,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
|
||||
// Granter account address
|
||||
Granter string `protobuf:"bytes,3,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
|
||||
@ -3382,7 +3382,7 @@ type QueryGrantsRequest struct {
|
||||
Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
|
||||
// Optional, msg_type_url, when set, will query only grants matching given msg type.
|
||||
MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
|
||||
// pagination defines a pagination for the request.
|
||||
// pagination defines an pagination for the request.
|
||||
Pagination *v1beta1.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3442,7 +3442,7 @@ type QueryGrantsResponse struct {
|
||||
|
||||
// authorizations is a list of grants granted for grantee by granter.
|
||||
Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
|
||||
// pagination defines a pagination for the response.
|
||||
// pagination defines an pagination for the response.
|
||||
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3487,7 +3487,7 @@ type QueryGranterGrantsRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
// pagination defines a pagination for the request.
|
||||
// pagination defines an pagination for the request.
|
||||
Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3533,7 +3533,7 @@ type QueryGranterGrantsResponse struct {
|
||||
|
||||
// grants is a list of grants granted by the granter.
|
||||
Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
|
||||
// pagination defines a pagination for the response.
|
||||
// pagination defines an pagination for the response.
|
||||
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3578,7 +3578,7 @@ type QueryGranteeGrantsRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"`
|
||||
// pagination defines a pagination for the request.
|
||||
// pagination defines an pagination for the request.
|
||||
Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3624,7 +3624,7 @@ type QueryGranteeGrantsResponse struct {
|
||||
|
||||
// grants is a list of grants granted to the grantee.
|
||||
Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
|
||||
// pagination defines a pagination for the response.
|
||||
// pagination defines an pagination for the response.
|
||||
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@ -12269,7 +12269,7 @@ type AppDescriptor struct {
|
||||
Codec *CodecDescriptor `protobuf:"bytes,3,opt,name=codec,proto3" json:"codec,omitempty"`
|
||||
// configuration provides metadata information regarding the sdk.Config type
|
||||
Configuration *ConfigurationDescriptor `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"`
|
||||
// query_services provides metadata information regarding the available queryable endpoints
|
||||
// query_services provides metadata information regarding the available queriable endpoints
|
||||
QueryServices *QueryServicesDescriptor `protobuf:"bytes,5,opt,name=query_services,json=queryServices,proto3" json:"query_services,omitempty"`
|
||||
// tx provides metadata information regarding how to send transactions to the given application
|
||||
Tx *TxDescriptor `protobuf:"bytes,6,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||
@ -12525,7 +12525,7 @@ type CodecDescriptor struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// interfaces is a list of the registered interfaces descriptors
|
||||
// interfaces is a list of the registerted interfaces descriptors
|
||||
Interfaces []*InterfaceDescriptor `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
|
||||
}
|
||||
|
||||
@ -13169,7 +13169,7 @@ func (x *GetTxDescriptorResponse) GetTx() *TxDescriptor {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryServicesDescriptor contains the list of cosmos-sdk queryable services
|
||||
// QueryServicesDescriptor contains the list of cosmos-sdk queriable services
|
||||
type QueryServicesDescriptor struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
||||
@ -1885,7 +1885,7 @@ func (x *Coin) GetAmount() string {
|
||||
|
||||
// DecCoin defines a token with a denomination and a decimal amount.
|
||||
//
|
||||
// NOTE: The amount field is a Dec which implements the custom method
|
||||
// NOTE: The amount field is an Dec which implements the custom method
|
||||
// signatures required by gogoproto.
|
||||
type DecCoin struct {
|
||||
state protoimpl.MessageState
|
||||
|
||||
@ -2,16 +2,15 @@
|
||||
package modulev1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -493,12 +492,11 @@ var file_cosmos_circuit_module_v1_module_proto_rawDesc = []byte{
|
||||
0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2e, 0xba, 0xc0, 0x96,
|
||||
0xda, 0x01, 0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64,
|
||||
0x6b, 0x2f, 0x78, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0xe2, 0x01, 0x0a, 0x1c,
|
||||
0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x1e, 0xba, 0xc0, 0x96,
|
||||
0xda, 0x01, 0x18, 0x0a, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69,
|
||||
0x6f, 0x2f, 0x78, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0xe2, 0x01, 0x0a, 0x1c,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x69, 0x72, 0x63, 0x75,
|
||||
0x69, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x63, 0x6f, 0x73,
|
||||
3174
api/cosmos/circuit/v1/query.pulsar.go
Normal file
3174
api/cosmos/circuit/v1/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
207
api/cosmos/circuit/v1/query_grpc.pb.go
Normal file
207
api/cosmos/circuit/v1/query_grpc.pb.go
Normal file
@ -0,0 +1,207 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/circuit/v1/query.proto
|
||||
|
||||
package circuitv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Account_FullMethodName = "/cosmos.circuit.v1.Query/Account"
|
||||
Query_Accounts_FullMethodName = "/cosmos.circuit.v1.Query/Accounts"
|
||||
Query_DisabledList_FullMethodName = "/cosmos.circuit.v1.Query/DisabledList"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Query defines the circuit gRPC querier service.
|
||||
type QueryClient interface {
|
||||
// Account returns account permissions.
|
||||
Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
|
||||
// Account returns account permissions.
|
||||
Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*AccountsResponse, error)
|
||||
// DisabledList returns a list of disabled message urls
|
||||
DisabledList(ctx context.Context, in *QueryDisabledListRequest, opts ...grpc.CallOption) (*DisabledListResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) Account(ctx context.Context, in *QueryAccountRequest, opts ...grpc.CallOption) (*AccountResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Account_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*AccountsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Accounts_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) DisabledList(ctx context.Context, in *QueryDisabledListRequest, opts ...grpc.CallOption) (*DisabledListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DisabledListResponse)
|
||||
err := c.cc.Invoke(ctx, Query_DisabledList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query defines the circuit gRPC querier service.
|
||||
type QueryServer interface {
|
||||
// Account returns account permissions.
|
||||
Account(context.Context, *QueryAccountRequest) (*AccountResponse, error)
|
||||
// Account returns account permissions.
|
||||
Accounts(context.Context, *QueryAccountsRequest) (*AccountsResponse, error)
|
||||
// DisabledList returns a list of disabled message urls
|
||||
DisabledList(context.Context, *QueryDisabledListRequest) (*DisabledListResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Account(context.Context, *QueryAccountRequest) (*AccountResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Account not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*AccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) DisabledList(context.Context, *QueryDisabledListRequest) (*DisabledListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DisabledList not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeQueryServer interface {
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_Account_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAccountRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Account(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Account_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Account(ctx, req.(*QueryAccountRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAccountsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Accounts(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Accounts_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_DisabledList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDisabledListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).DisabledList(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_DisabledList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).DisabledList(ctx, req.(*QueryDisabledListRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.circuit.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Account",
|
||||
Handler: _Query_Account_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Accounts",
|
||||
Handler: _Query_Accounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DisabledList",
|
||||
Handler: _Query_DisabledList_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/circuit/v1/query.proto",
|
||||
}
|
||||
3391
api/cosmos/circuit/v1/tx.pulsar.go
Normal file
3391
api/cosmos/circuit/v1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
211
api/cosmos/circuit/v1/tx_grpc.pb.go
Normal file
211
api/cosmos/circuit/v1/tx_grpc.pb.go
Normal file
@ -0,0 +1,211 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/circuit/v1/tx.proto
|
||||
|
||||
package circuitv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_AuthorizeCircuitBreaker_FullMethodName = "/cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker"
|
||||
Msg_TripCircuitBreaker_FullMethodName = "/cosmos.circuit.v1.Msg/TripCircuitBreaker"
|
||||
Msg_ResetCircuitBreaker_FullMethodName = "/cosmos.circuit.v1.Msg/ResetCircuitBreaker"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Msg defines the circuit Msg service.
|
||||
type MsgClient interface {
|
||||
// AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another
|
||||
// account's circuit breaker permissions.
|
||||
AuthorizeCircuitBreaker(ctx context.Context, in *MsgAuthorizeCircuitBreaker, opts ...grpc.CallOption) (*MsgAuthorizeCircuitBreakerResponse, error)
|
||||
// TripCircuitBreaker pauses processing of Msg's in the state machine.
|
||||
TripCircuitBreaker(ctx context.Context, in *MsgTripCircuitBreaker, opts ...grpc.CallOption) (*MsgTripCircuitBreakerResponse, error)
|
||||
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
|
||||
// have been been paused using TripCircuitBreaker.
|
||||
ResetCircuitBreaker(ctx context.Context, in *MsgResetCircuitBreaker, opts ...grpc.CallOption) (*MsgResetCircuitBreakerResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) AuthorizeCircuitBreaker(ctx context.Context, in *MsgAuthorizeCircuitBreaker, opts ...grpc.CallOption) (*MsgAuthorizeCircuitBreakerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgAuthorizeCircuitBreakerResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_AuthorizeCircuitBreaker_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) TripCircuitBreaker(ctx context.Context, in *MsgTripCircuitBreaker, opts ...grpc.CallOption) (*MsgTripCircuitBreakerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgTripCircuitBreakerResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_TripCircuitBreaker_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) ResetCircuitBreaker(ctx context.Context, in *MsgResetCircuitBreaker, opts ...grpc.CallOption) (*MsgResetCircuitBreakerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgResetCircuitBreakerResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_ResetCircuitBreaker_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the circuit Msg service.
|
||||
type MsgServer interface {
|
||||
// AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another
|
||||
// account's circuit breaker permissions.
|
||||
AuthorizeCircuitBreaker(context.Context, *MsgAuthorizeCircuitBreaker) (*MsgAuthorizeCircuitBreakerResponse, error)
|
||||
// TripCircuitBreaker pauses processing of Msg's in the state machine.
|
||||
TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error)
|
||||
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
|
||||
// have been been paused using TripCircuitBreaker.
|
||||
ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) AuthorizeCircuitBreaker(context.Context, *MsgAuthorizeCircuitBreaker) (*MsgAuthorizeCircuitBreakerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeCircuitBreaker not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TripCircuitBreaker not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResetCircuitBreaker not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_AuthorizeCircuitBreaker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgAuthorizeCircuitBreaker)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).AuthorizeCircuitBreaker(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_AuthorizeCircuitBreaker_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).AuthorizeCircuitBreaker(ctx, req.(*MsgAuthorizeCircuitBreaker))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_TripCircuitBreaker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgTripCircuitBreaker)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).TripCircuitBreaker(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_TripCircuitBreaker_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).TripCircuitBreaker(ctx, req.(*MsgTripCircuitBreaker))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_ResetCircuitBreaker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgResetCircuitBreaker)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).ResetCircuitBreaker(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_ResetCircuitBreaker_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).ResetCircuitBreaker(ctx, req.(*MsgResetCircuitBreaker))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.circuit.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AuthorizeCircuitBreaker",
|
||||
Handler: _Msg_AuthorizeCircuitBreaker_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TripCircuitBreaker",
|
||||
Handler: _Msg_TripCircuitBreaker_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetCircuitBreaker",
|
||||
Handler: _Msg_ResetCircuitBreaker_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/circuit/v1/tx.proto",
|
||||
}
|
||||
2018
api/cosmos/circuit/v1/types.pulsar.go
Normal file
2018
api/cosmos/circuit/v1/types.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,16 +2,15 @@
|
||||
package modulev1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
600
api/cosmos/crisis/v1beta1/genesis.pulsar.go
Normal file
600
api/cosmos/crisis/v1beta1/genesis.pulsar.go
Normal file
@ -0,0 +1,600 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package crisisv1beta1
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/amino"
|
||||
v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
md_GenesisState protoreflect.MessageDescriptor
|
||||
fd_GenesisState_constant_fee protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_init()
|
||||
md_GenesisState = File_cosmos_crisis_v1beta1_genesis_proto.Messages().ByName("GenesisState")
|
||||
fd_GenesisState_constant_fee = md_GenesisState.Fields().ByName("constant_fee")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_GenesisState)(nil)
|
||||
|
||||
type fastReflection_GenesisState GenesisState
|
||||
|
||||
func (x *GenesisState) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_GenesisState)(x)
|
||||
}
|
||||
|
||||
func (x *GenesisState) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{}
|
||||
|
||||
type fastReflection_GenesisState_messageType struct{}
|
||||
|
||||
func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_GenesisState)(nil)
|
||||
}
|
||||
func (x fastReflection_GenesisState_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_GenesisState)
|
||||
}
|
||||
func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_GenesisState
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_GenesisState
|
||||
}
|
||||
|
||||
// Type returns the message type, which encapsulates both Go and protobuf
|
||||
// type information. If the Go type information is not needed,
|
||||
// it is recommended that the message descriptor be used instead.
|
||||
func (x *fastReflection_GenesisState) Type() protoreflect.MessageType {
|
||||
return _fastReflection_GenesisState_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_GenesisState) New() protoreflect.Message {
|
||||
return new(fastReflection_GenesisState)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage {
|
||||
return (*GenesisState)(x)
|
||||
}
|
||||
|
||||
// Range iterates over every populated field in an undefined order,
|
||||
// calling f for each field descriptor and value encountered.
|
||||
// Range returns immediately if f returns false.
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.ConstantFee != nil {
|
||||
value := protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect())
|
||||
if !f(fd_GenesisState_constant_fee, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
//
|
||||
// Some fields have the property of nullability where it is possible to
|
||||
// distinguish between the default value of a field and whether the field
|
||||
// was explicitly populated with the default value. Singular message fields,
|
||||
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||
// fields are populated only if explicitly set.
|
||||
//
|
||||
// In other cases (aside from the nullable cases above),
|
||||
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
return x.ConstantFee != nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Clear clears the field such that a subsequent Has call reports false.
|
||||
//
|
||||
// Clearing an extension field clears both the extension type and value
|
||||
// associated with the given field number.
|
||||
//
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
x.ConstantFee = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Get retrieves the value for a field.
|
||||
//
|
||||
// For unpopulated scalars, it returns the default value, where
|
||||
// the default value of a bytes scalar is guaranteed to be a copy.
|
||||
// For unpopulated composite types, it returns an empty, read-only view
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
value := x.ConstantFee
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Set stores the value for a field.
|
||||
//
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType.
|
||||
// When setting a composite type, it is unspecified whether the stored value
|
||||
// aliases the source's memory in any way. If the composite value is an
|
||||
// empty, read-only value, then it panics.
|
||||
//
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
x.ConstantFee = value.Message().Interface().(*v1beta1.Coin)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Mutable returns a mutable reference to a composite type.
|
||||
//
|
||||
// If the field is unpopulated, it may allocate a composite value.
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType
|
||||
// if not already stored.
|
||||
// It panics if the field does not contain a composite type.
|
||||
//
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
if x.ConstantFee == nil {
|
||||
x.ConstantFee = new(v1beta1.Coin)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.ConstantFee.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// NewField returns a new value that is assignable to the field
|
||||
// for the given descriptor. For scalars, this returns the default value.
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cosmos.crisis.v1beta1.GenesisState.constant_fee":
|
||||
m := new(v1beta1.Coin)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.crisis.v1beta1.GenesisState"))
|
||||
}
|
||||
panic(fmt.Errorf("message cosmos.crisis.v1beta1.GenesisState does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// WhichOneof reports which field within the oneof is populated,
|
||||
// returning nil if none are populated.
|
||||
// It panics if the oneof descriptor does not belong to this message.
|
||||
func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in cosmos.crisis.v1beta1.GenesisState", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// GetUnknown retrieves the entire list of unknown fields.
|
||||
// The caller may only mutate the contents of the RawFields
|
||||
// if the mutated bytes are stored back into the message with SetUnknown.
|
||||
func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields {
|
||||
return x.unknownFields
|
||||
}
|
||||
|
||||
// SetUnknown stores an entire list of unknown fields.
|
||||
// The raw fields must be syntactically valid according to the wire format.
|
||||
// An implementation may panic if this is not the case.
|
||||
// Once stored, the caller must not mutate the content of the RawFields.
|
||||
// An empty RawFields may be passed to clear the fields.
|
||||
//
|
||||
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) {
|
||||
x.unknownFields = fields
|
||||
}
|
||||
|
||||
// IsValid reports whether the message is valid.
|
||||
//
|
||||
// An invalid message is an empty, read-only value.
|
||||
//
|
||||
// An invalid message often corresponds to a nil pointer of the concrete
|
||||
// message type, but the details are implementation dependent.
|
||||
// Validity is not part of the protobuf data model, and may not
|
||||
// be preserved in marshaling or other operations.
|
||||
func (x *fastReflection_GenesisState) IsValid() bool {
|
||||
return x != nil
|
||||
}
|
||||
|
||||
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
||||
// This method may return nil.
|
||||
//
|
||||
// The returned methods type is identical to
|
||||
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||
// Consult the protoiface package documentation for details.
|
||||
func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*GenesisState)
|
||||
if x == nil {
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: 0,
|
||||
}
|
||||
}
|
||||
options := runtime.SizeInputToOptions(input)
|
||||
_ = options
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if x.ConstantFee != nil {
|
||||
l = options.Size(x.ConstantFee)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: n,
|
||||
}
|
||||
}
|
||||
|
||||
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
x := input.Message.Interface().(*GenesisState)
|
||||
if x == nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.MarshalInputToOptions(input)
|
||||
_ = options
|
||||
size := options.Size(x)
|
||||
dAtA := make([]byte, size)
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if x.unknownFields != nil {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if x.ConstantFee != nil {
|
||||
encoded, err := options.Marshal(x.ConstantFee)
|
||||
if err != nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
input.Buf = dAtA
|
||||
}
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||
x := input.Message.Interface().(*GenesisState)
|
||||
if x == nil {
|
||||
return protoiface.UnmarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Flags: input.Flags,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.UnmarshalInputToOptions(input)
|
||||
_ = options
|
||||
dAtA := input.Buf
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConstantFee", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if x.ConstantFee == nil {
|
||||
x.ConstantFee = &v1beta1.Coin{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConstantFee); err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if !options.DiscardUnknown {
|
||||
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||
}
|
||||
return &protoiface.Methods{
|
||||
NoUnkeyedLiterals: struct{}{},
|
||||
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||
Size: size,
|
||||
Marshal: marshal,
|
||||
Unmarshal: unmarshal,
|
||||
Merge: nil,
|
||||
CheckInitialized: nil,
|
||||
}
|
||||
}
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
// protoc (unknown)
|
||||
// source: cosmos/crisis/v1beta1/genesis.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// GenesisState defines the crisis module's genesis state.
|
||||
type GenesisState struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// constant_fee is the fee used to verify the invariant in the crisis
|
||||
// module.
|
||||
ConstantFee *v1beta1.Coin `protobuf:"bytes,3,opt,name=constant_fee,json=constantFee,proto3" json:"constant_fee,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GenesisState) Reset() {
|
||||
*x = GenesisState{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GenesisState) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GenesisState) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.
|
||||
func (*GenesisState) Descriptor() ([]byte, []int) {
|
||||
return file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GenesisState) GetConstantFee() *v1beta1.Coin {
|
||||
if x != nil {
|
||||
return x.ConstantFee
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_cosmos_crisis_v1beta1_genesis_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = []byte{
|
||||
0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72,
|
||||
0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f,
|
||||
0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
|
||||
0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a,
|
||||
0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x42, 0xd5,
|
||||
0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72,
|
||||
0x69, 0x73, 0x69, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x47, 0x65,
|
||||
0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x72, 0x69, 0x73, 0x69, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0xca, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73,
|
||||
0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x21, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x5c, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x72, 0x69, 0x73, 0x69, 0x73, 0x3a, 0x3a, 0x56,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce sync.Once
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = file_cosmos_crisis_v1beta1_genesis_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_cosmos_crisis_v1beta1_genesis_proto_rawDescGZIP() []byte {
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_rawDescOnce.Do(func() {
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_crisis_v1beta1_genesis_proto_rawDescData)
|
||||
})
|
||||
return file_cosmos_crisis_v1beta1_genesis_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_cosmos_crisis_v1beta1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_cosmos_crisis_v1beta1_genesis_proto_goTypes = []interface{}{
|
||||
(*GenesisState)(nil), // 0: cosmos.crisis.v1beta1.GenesisState
|
||||
(*v1beta1.Coin)(nil), // 1: cosmos.base.v1beta1.Coin
|
||||
}
|
||||
var file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = []int32{
|
||||
1, // 0: cosmos.crisis.v1beta1.GenesisState.constant_fee:type_name -> cosmos.base.v1beta1.Coin
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_cosmos_crisis_v1beta1_genesis_proto_init() }
|
||||
func file_cosmos_crisis_v1beta1_genesis_proto_init() {
|
||||
if File_cosmos_crisis_v1beta1_genesis_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GenesisState); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_cosmos_crisis_v1beta1_genesis_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_cosmos_crisis_v1beta1_genesis_proto_goTypes,
|
||||
DependencyIndexes: file_cosmos_crisis_v1beta1_genesis_proto_depIdxs,
|
||||
MessageInfos: file_cosmos_crisis_v1beta1_genesis_proto_msgTypes,
|
||||
}.Build()
|
||||
File_cosmos_crisis_v1beta1_genesis_proto = out.File
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_rawDesc = nil
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_goTypes = nil
|
||||
file_cosmos_crisis_v1beta1_genesis_proto_depIdxs = nil
|
||||
}
|
||||
2133
api/cosmos/crisis/v1beta1/tx.pulsar.go
Normal file
2133
api/cosmos/crisis/v1beta1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
169
api/cosmos/crisis/v1beta1/tx_grpc.pb.go
Normal file
169
api/cosmos/crisis/v1beta1/tx_grpc.pb.go
Normal file
@ -0,0 +1,169 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/crisis/v1beta1/tx.proto
|
||||
|
||||
package crisisv1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_VerifyInvariant_FullMethodName = "/cosmos.crisis.v1beta1.Msg/VerifyInvariant"
|
||||
Msg_UpdateParams_FullMethodName = "/cosmos.crisis.v1beta1.Msg/UpdateParams"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Msg defines the bank Msg service.
|
||||
type MsgClient interface {
|
||||
// VerifyInvariant defines a method to verify a particular invariant.
|
||||
VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error)
|
||||
// UpdateParams defines a governance operation for updating the x/crisis module
|
||||
// parameters. The authority is defined in the keeper.
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) VerifyInvariant(ctx context.Context, in *MsgVerifyInvariant, opts ...grpc.CallOption) (*MsgVerifyInvariantResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgVerifyInvariantResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_VerifyInvariant_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the bank Msg service.
|
||||
type MsgServer interface {
|
||||
// VerifyInvariant defines a method to verify a particular invariant.
|
||||
VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error)
|
||||
// UpdateParams defines a governance operation for updating the x/crisis module
|
||||
// parameters. The authority is defined in the keeper.
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) VerifyInvariant(context.Context, *MsgVerifyInvariant) (*MsgVerifyInvariantResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VerifyInvariant not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_VerifyInvariant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgVerifyInvariant)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).VerifyInvariant(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_VerifyInvariant_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).VerifyInvariant(ctx, req.(*MsgVerifyInvariant))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateParams)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateParams(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateParams_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.crisis.v1beta1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "VerifyInvariant",
|
||||
Handler: _Msg_VerifyInvariant_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/crisis/v1beta1/tx.proto",
|
||||
}
|
||||
@ -977,7 +977,7 @@ const (
|
||||
)
|
||||
|
||||
// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey.
|
||||
// See cosmos.tx.v1beta1.ModeInfo.Multi for how to specify which signers
|
||||
// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers
|
||||
// signed and with which modes.
|
||||
type MultiSignature struct {
|
||||
state protoimpl.MessageState
|
||||
|
||||
@ -418,10 +418,9 @@ var file_cosmos_evidence_module_v1_module_proto_rawDesc = []byte{
|
||||
0x2e, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x2f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x29, 0x0a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73,
|
||||
0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||
|
||||
@ -418,10 +418,9 @@ var file_cosmos_feegrant_module_v1_module_proto_rawDesc = []byte{
|
||||
0x2e, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f,
|
||||
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x2f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x29, 0x0a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x29, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x1f, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73,
|
||||
0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x66, 0x65, 0x65, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||
|
||||
@ -3143,7 +3143,7 @@ type QueryAllowanceResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// allowance is an allowance granted for grantee by granter.
|
||||
// allowance is a allowance granted for grantee by granter.
|
||||
Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"`
|
||||
}
|
||||
|
||||
@ -3181,7 +3181,7 @@ type QueryAllowancesRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"`
|
||||
// pagination defines a pagination for the request.
|
||||
// pagination defines an pagination for the request.
|
||||
Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3227,7 +3227,7 @@ type QueryAllowancesResponse struct {
|
||||
|
||||
// allowances are allowance's granted for grantee by granter.
|
||||
Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"`
|
||||
// pagination defines a pagination for the response.
|
||||
// pagination defines an pagination for the response.
|
||||
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3272,7 +3272,7 @@ type QueryAllowancesByGranterRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
|
||||
// pagination defines a pagination for the request.
|
||||
// pagination defines an pagination for the request.
|
||||
Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
@ -3318,7 +3318,7 @@ type QueryAllowancesByGranterResponse struct {
|
||||
|
||||
// allowances that have been issued by the granter.
|
||||
Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"`
|
||||
// pagination defines a pagination for the response.
|
||||
// pagination defines an pagination for the response.
|
||||
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ const (
|
||||
//
|
||||
// Query defines the gRPC querier service.
|
||||
type QueryClient interface {
|
||||
// Allowance returns granted allowance to the grantee by the granter.
|
||||
// Allowance returns granted allwance to the grantee by the granter.
|
||||
Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error)
|
||||
// Allowances returns all the grants for the given grantee address.
|
||||
Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, error)
|
||||
@ -82,7 +82,7 @@ func (c *queryClient) AllowancesByGranter(ctx context.Context, in *QueryAllowanc
|
||||
//
|
||||
// Query defines the gRPC querier service.
|
||||
type QueryServer interface {
|
||||
// Allowance returns granted allowance to the grantee by the granter.
|
||||
// Allowance returns granted allwance to the grantee by the granter.
|
||||
Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error)
|
||||
// Allowances returns all the grants for the given grantee address.
|
||||
Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error)
|
||||
|
||||
@ -1239,21 +1239,21 @@ type GenesisState struct {
|
||||
// proposals defines all the proposals present at genesis.
|
||||
Proposals []*Proposal `protobuf:"bytes,4,rep,name=proposals,proto3" json:"proposals,omitempty"`
|
||||
// Deprecated: Prefer to use `params` instead.
|
||||
// deposit_params defines all the parameters of related to deposit.
|
||||
// deposit_params defines all the paramaters of related to deposit.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
DepositParams *DepositParams `protobuf:"bytes,5,opt,name=deposit_params,json=depositParams,proto3" json:"deposit_params,omitempty"`
|
||||
// Deprecated: Prefer to use `params` instead.
|
||||
// voting_params defines all the parameters of related to voting.
|
||||
// voting_params defines all the paramaters of related to voting.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
VotingParams *VotingParams `protobuf:"bytes,6,opt,name=voting_params,json=votingParams,proto3" json:"voting_params,omitempty"`
|
||||
// Deprecated: Prefer to use `params` instead.
|
||||
// tally_params defines all the parameters of related to tally.
|
||||
// tally_params defines all the paramaters of related to tally.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
TallyParams *TallyParams `protobuf:"bytes,7,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"`
|
||||
// params defines all the parameters of x/gov module.
|
||||
// params defines all the paramaters of x/gov module.
|
||||
Params *Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"`
|
||||
// The constitution allows builders to lay a foundation and define purpose.
|
||||
// This is an immutable string set in genesis.
|
||||
|
||||
@ -7253,7 +7253,7 @@ type Proposal struct {
|
||||
Title string `protobuf:"bytes,11,opt,name=title,proto3" json:"title,omitempty"`
|
||||
// summary is a short summary of the proposal
|
||||
Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
// proposer is the address of the proposal submitter
|
||||
// proposer is the address of the proposal sumbitter
|
||||
Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
// expedited defines if the proposal is expedited
|
||||
Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"`
|
||||
|
||||
@ -9158,7 +9158,7 @@ type QueryParamsResponse struct {
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
TallyParams *TallyParams `protobuf:"bytes,3,opt,name=tally_params,json=tallyParams,proto3" json:"tally_params,omitempty"`
|
||||
// params defines all the parameters of x/gov module.
|
||||
// params defines all the paramaters of x/gov module.
|
||||
Params *Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@ -2,19 +2,18 @@
|
||||
package modulev1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "cosmossdk.io/api/amino"
|
||||
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
5611
api/cosmos/group/v1/events.pulsar.go
Normal file
5611
api/cosmos/group/v1/events.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
1441
api/cosmos/group/v1/genesis.pulsar.go
Normal file
1441
api/cosmos/group/v1/genesis.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
15920
api/cosmos/group/v1/query.pulsar.go
Normal file
15920
api/cosmos/group/v1/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
655
api/cosmos/group/v1/query_grpc.pb.go
Normal file
655
api/cosmos/group/v1/query_grpc.pb.go
Normal file
@ -0,0 +1,655 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/group/v1/query.proto
|
||||
|
||||
package groupv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_GroupInfo_FullMethodName = "/cosmos.group.v1.Query/GroupInfo"
|
||||
Query_GroupPolicyInfo_FullMethodName = "/cosmos.group.v1.Query/GroupPolicyInfo"
|
||||
Query_GroupMembers_FullMethodName = "/cosmos.group.v1.Query/GroupMembers"
|
||||
Query_GroupsByAdmin_FullMethodName = "/cosmos.group.v1.Query/GroupsByAdmin"
|
||||
Query_GroupPoliciesByGroup_FullMethodName = "/cosmos.group.v1.Query/GroupPoliciesByGroup"
|
||||
Query_GroupPoliciesByAdmin_FullMethodName = "/cosmos.group.v1.Query/GroupPoliciesByAdmin"
|
||||
Query_Proposal_FullMethodName = "/cosmos.group.v1.Query/Proposal"
|
||||
Query_ProposalsByGroupPolicy_FullMethodName = "/cosmos.group.v1.Query/ProposalsByGroupPolicy"
|
||||
Query_VoteByProposalVoter_FullMethodName = "/cosmos.group.v1.Query/VoteByProposalVoter"
|
||||
Query_VotesByProposal_FullMethodName = "/cosmos.group.v1.Query/VotesByProposal"
|
||||
Query_VotesByVoter_FullMethodName = "/cosmos.group.v1.Query/VotesByVoter"
|
||||
Query_GroupsByMember_FullMethodName = "/cosmos.group.v1.Query/GroupsByMember"
|
||||
Query_TallyResult_FullMethodName = "/cosmos.group.v1.Query/TallyResult"
|
||||
Query_Groups_FullMethodName = "/cosmos.group.v1.Query/Groups"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Query is the cosmos.group.v1 Query service.
|
||||
type QueryClient interface {
|
||||
// GroupInfo queries group info based on group id.
|
||||
GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error)
|
||||
// GroupPolicyInfo queries group policy info based on account address of group policy.
|
||||
GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error)
|
||||
// GroupMembers queries members of a group by group id.
|
||||
GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error)
|
||||
// GroupsByAdmin queries groups by admin address.
|
||||
GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error)
|
||||
// GroupPoliciesByGroup queries group policies by group id.
|
||||
GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error)
|
||||
// GroupPoliciesByAdmin queries group policies by admin address.
|
||||
GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error)
|
||||
// Proposal queries a proposal based on proposal id.
|
||||
Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error)
|
||||
// ProposalsByGroupPolicy queries proposals based on account address of group policy.
|
||||
ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, error)
|
||||
// VoteByProposalVoter queries a vote by proposal id and voter.
|
||||
VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error)
|
||||
// VotesByProposal queries a vote by proposal id.
|
||||
VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error)
|
||||
// VotesByVoter queries a vote by voter.
|
||||
VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error)
|
||||
// GroupsByMember queries groups by member address.
|
||||
GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error)
|
||||
// TallyResult returns the tally result of a proposal. If the proposal is
|
||||
// still in voting period, then this query computes the current tally state,
|
||||
// which might not be final. On the other hand, if the proposal is final,
|
||||
// then it simply returns the `final_tally_result` state stored in the
|
||||
// proposal itself.
|
||||
TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error)
|
||||
// Groups queries all groups in state.
|
||||
Groups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupInfo(ctx context.Context, in *QueryGroupInfoRequest, opts ...grpc.CallOption) (*QueryGroupInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupPolicyInfo(ctx context.Context, in *QueryGroupPolicyInfoRequest, opts ...grpc.CallOption) (*QueryGroupPolicyInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupPolicyInfoResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupPolicyInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupMembers(ctx context.Context, in *QueryGroupMembersRequest, opts ...grpc.CallOption) (*QueryGroupMembersResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupMembersResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupMembers_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupsByAdmin(ctx context.Context, in *QueryGroupsByAdminRequest, opts ...grpc.CallOption) (*QueryGroupsByAdminResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupsByAdminResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupsByAdmin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupPoliciesByGroup(ctx context.Context, in *QueryGroupPoliciesByGroupRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByGroupResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupPoliciesByGroupResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupPoliciesByGroup_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupPoliciesByAdmin(ctx context.Context, in *QueryGroupPoliciesByAdminRequest, opts ...grpc.CallOption) (*QueryGroupPoliciesByAdminResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupPoliciesByAdminResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupPoliciesByAdmin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Proposal(ctx context.Context, in *QueryProposalRequest, opts ...grpc.CallOption) (*QueryProposalResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryProposalResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Proposal_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) ProposalsByGroupPolicy(ctx context.Context, in *QueryProposalsByGroupPolicyRequest, opts ...grpc.CallOption) (*QueryProposalsByGroupPolicyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryProposalsByGroupPolicyResponse)
|
||||
err := c.cc.Invoke(ctx, Query_ProposalsByGroupPolicy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) VoteByProposalVoter(ctx context.Context, in *QueryVoteByProposalVoterRequest, opts ...grpc.CallOption) (*QueryVoteByProposalVoterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryVoteByProposalVoterResponse)
|
||||
err := c.cc.Invoke(ctx, Query_VoteByProposalVoter_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) VotesByProposal(ctx context.Context, in *QueryVotesByProposalRequest, opts ...grpc.CallOption) (*QueryVotesByProposalResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryVotesByProposalResponse)
|
||||
err := c.cc.Invoke(ctx, Query_VotesByProposal_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) VotesByVoter(ctx context.Context, in *QueryVotesByVoterRequest, opts ...grpc.CallOption) (*QueryVotesByVoterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryVotesByVoterResponse)
|
||||
err := c.cc.Invoke(ctx, Query_VotesByVoter_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GroupsByMember(ctx context.Context, in *QueryGroupsByMemberRequest, opts ...grpc.CallOption) (*QueryGroupsByMemberResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupsByMemberResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GroupsByMember_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) TallyResult(ctx context.Context, in *QueryTallyResultRequest, opts ...grpc.CallOption) (*QueryTallyResultResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryTallyResultResponse)
|
||||
err := c.cc.Invoke(ctx, Query_TallyResult_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Groups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryGroupsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Groups_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query is the cosmos.group.v1 Query service.
|
||||
type QueryServer interface {
|
||||
// GroupInfo queries group info based on group id.
|
||||
GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error)
|
||||
// GroupPolicyInfo queries group policy info based on account address of group policy.
|
||||
GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error)
|
||||
// GroupMembers queries members of a group by group id.
|
||||
GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error)
|
||||
// GroupsByAdmin queries groups by admin address.
|
||||
GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error)
|
||||
// GroupPoliciesByGroup queries group policies by group id.
|
||||
GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error)
|
||||
// GroupPoliciesByAdmin queries group policies by admin address.
|
||||
GroupPoliciesByAdmin(context.Context, *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error)
|
||||
// Proposal queries a proposal based on proposal id.
|
||||
Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error)
|
||||
// ProposalsByGroupPolicy queries proposals based on account address of group policy.
|
||||
ProposalsByGroupPolicy(context.Context, *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error)
|
||||
// VoteByProposalVoter queries a vote by proposal id and voter.
|
||||
VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error)
|
||||
// VotesByProposal queries a vote by proposal id.
|
||||
VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error)
|
||||
// VotesByVoter queries a vote by voter.
|
||||
VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error)
|
||||
// GroupsByMember queries groups by member address.
|
||||
GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error)
|
||||
// TallyResult returns the tally result of a proposal. If the proposal is
|
||||
// still in voting period, then this query computes the current tally state,
|
||||
// which might not be final. On the other hand, if the proposal is final,
|
||||
// then it simply returns the `final_tally_result` state stored in the
|
||||
// proposal itself.
|
||||
TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error)
|
||||
// Groups queries all groups in state.
|
||||
Groups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) GroupInfo(context.Context, *QueryGroupInfoRequest) (*QueryGroupInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupPolicyInfo(context.Context, *QueryGroupPolicyInfoRequest) (*QueryGroupPolicyInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupPolicyInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupMembers(context.Context, *QueryGroupMembersRequest) (*QueryGroupMembersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupMembers not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupsByAdmin(context.Context, *QueryGroupsByAdminRequest) (*QueryGroupsByAdminResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupsByAdmin not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupPoliciesByGroup(context.Context, *QueryGroupPoliciesByGroupRequest) (*QueryGroupPoliciesByGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByGroup not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupPoliciesByAdmin(context.Context, *QueryGroupPoliciesByAdminRequest) (*QueryGroupPoliciesByAdminResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupPoliciesByAdmin not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Proposal(context.Context, *QueryProposalRequest) (*QueryProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Proposal not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) ProposalsByGroupPolicy(context.Context, *QueryProposalsByGroupPolicyRequest) (*QueryProposalsByGroupPolicyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ProposalsByGroupPolicy not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) VoteByProposalVoter(context.Context, *QueryVoteByProposalVoterRequest) (*QueryVoteByProposalVoterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VoteByProposalVoter not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) VotesByProposal(context.Context, *QueryVotesByProposalRequest) (*QueryVotesByProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VotesByProposal not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) VotesByVoter(context.Context, *QueryVotesByVoterRequest) (*QueryVotesByVoterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method VotesByVoter not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GroupsByMember(context.Context, *QueryGroupsByMemberRequest) (*QueryGroupsByMemberResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GroupsByMember not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) TallyResult(context.Context, *QueryTallyResultRequest) (*QueryTallyResultResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TallyResult not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Groups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Groups not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeQueryServer interface {
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupInfo(ctx, req.(*QueryGroupInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupPolicyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupPolicyInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupPolicyInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupPolicyInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupPolicyInfo(ctx, req.(*QueryGroupPolicyInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupMembersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupMembers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupMembers_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupMembers(ctx, req.(*QueryGroupMembersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupsByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupsByAdminRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupsByAdmin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupsByAdmin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupsByAdmin(ctx, req.(*QueryGroupsByAdminRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupPoliciesByGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupPoliciesByGroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupPoliciesByGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupPoliciesByGroup_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupPoliciesByGroup(ctx, req.(*QueryGroupPoliciesByGroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupPoliciesByAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupPoliciesByAdminRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupPoliciesByAdmin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupPoliciesByAdmin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupPoliciesByAdmin(ctx, req.(*QueryGroupPoliciesByAdminRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Proposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProposalRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Proposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Proposal_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Proposal(ctx, req.(*QueryProposalRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_ProposalsByGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryProposalsByGroupPolicyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).ProposalsByGroupPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_ProposalsByGroupPolicy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).ProposalsByGroupPolicy(ctx, req.(*QueryProposalsByGroupPolicyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_VoteByProposalVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryVoteByProposalVoterRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).VoteByProposalVoter(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_VoteByProposalVoter_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).VoteByProposalVoter(ctx, req.(*QueryVoteByProposalVoterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_VotesByProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryVotesByProposalRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).VotesByProposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_VotesByProposal_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).VotesByProposal(ctx, req.(*QueryVotesByProposalRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_VotesByVoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryVotesByVoterRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).VotesByVoter(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_VotesByVoter_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).VotesByVoter(ctx, req.(*QueryVotesByVoterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GroupsByMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupsByMemberRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GroupsByMember(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GroupsByMember_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GroupsByMember(ctx, req.(*QueryGroupsByMemberRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_TallyResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryTallyResultRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).TallyResult(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_TallyResult_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).TallyResult(ctx, req.(*QueryTallyResultRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Groups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGroupsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Groups(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Groups_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Groups(ctx, req.(*QueryGroupsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.group.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GroupInfo",
|
||||
Handler: _Query_GroupInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupPolicyInfo",
|
||||
Handler: _Query_GroupPolicyInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupMembers",
|
||||
Handler: _Query_GroupMembers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupsByAdmin",
|
||||
Handler: _Query_GroupsByAdmin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupPoliciesByGroup",
|
||||
Handler: _Query_GroupPoliciesByGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupPoliciesByAdmin",
|
||||
Handler: _Query_GroupPoliciesByAdmin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Proposal",
|
||||
Handler: _Query_Proposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ProposalsByGroupPolicy",
|
||||
Handler: _Query_ProposalsByGroupPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "VoteByProposalVoter",
|
||||
Handler: _Query_VoteByProposalVoter_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "VotesByProposal",
|
||||
Handler: _Query_VotesByProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "VotesByVoter",
|
||||
Handler: _Query_VotesByVoter_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GroupsByMember",
|
||||
Handler: _Query_GroupsByMember_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "TallyResult",
|
||||
Handler: _Query_TallyResult_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Groups",
|
||||
Handler: _Query_Groups_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/group/v1/query.proto",
|
||||
}
|
||||
15846
api/cosmos/group/v1/tx.pulsar.go
Normal file
15846
api/cosmos/group/v1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
647
api/cosmos/group/v1/tx_grpc.pb.go
Normal file
647
api/cosmos/group/v1/tx_grpc.pb.go
Normal file
@ -0,0 +1,647 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/group/v1/tx.proto
|
||||
|
||||
package groupv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_CreateGroup_FullMethodName = "/cosmos.group.v1.Msg/CreateGroup"
|
||||
Msg_UpdateGroupMembers_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupMembers"
|
||||
Msg_UpdateGroupAdmin_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupAdmin"
|
||||
Msg_UpdateGroupMetadata_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupMetadata"
|
||||
Msg_CreateGroupPolicy_FullMethodName = "/cosmos.group.v1.Msg/CreateGroupPolicy"
|
||||
Msg_CreateGroupWithPolicy_FullMethodName = "/cosmos.group.v1.Msg/CreateGroupWithPolicy"
|
||||
Msg_UpdateGroupPolicyAdmin_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin"
|
||||
Msg_UpdateGroupPolicyDecisionPolicy_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy"
|
||||
Msg_UpdateGroupPolicyMetadata_FullMethodName = "/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata"
|
||||
Msg_SubmitProposal_FullMethodName = "/cosmos.group.v1.Msg/SubmitProposal"
|
||||
Msg_WithdrawProposal_FullMethodName = "/cosmos.group.v1.Msg/WithdrawProposal"
|
||||
Msg_Vote_FullMethodName = "/cosmos.group.v1.Msg/Vote"
|
||||
Msg_Exec_FullMethodName = "/cosmos.group.v1.Msg/Exec"
|
||||
Msg_LeaveGroup_FullMethodName = "/cosmos.group.v1.Msg/LeaveGroup"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Msg is the cosmos.group.v1 Msg service.
|
||||
type MsgClient interface {
|
||||
// CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
|
||||
CreateGroup(ctx context.Context, in *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error)
|
||||
// UpdateGroupMembers updates the group members with given group id and admin address.
|
||||
UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembers, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error)
|
||||
// UpdateGroupAdmin updates the group admin with given group id and previous admin address.
|
||||
UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error)
|
||||
// UpdateGroupMetadata updates the group metadata with given group id and admin address.
|
||||
UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error)
|
||||
// CreateGroupPolicy creates a new group policy using given DecisionPolicy.
|
||||
CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error)
|
||||
// CreateGroupWithPolicy creates a new group with policy.
|
||||
CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error)
|
||||
// UpdateGroupPolicyAdmin updates a group policy admin.
|
||||
UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error)
|
||||
// UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.
|
||||
UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error)
|
||||
// UpdateGroupPolicyMetadata updates a group policy metadata.
|
||||
UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// SubmitProposal submits a new proposal.
|
||||
SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error)
|
||||
// WithdrawProposal withdraws a proposal.
|
||||
WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error)
|
||||
// LeaveGroup allows a group member to leave the group.
|
||||
LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) CreateGroup(ctx context.Context, in *MsgCreateGroup, opts ...grpc.CallOption) (*MsgCreateGroupResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgCreateGroupResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_CreateGroup_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupMembers(ctx context.Context, in *MsgUpdateGroupMembers, opts ...grpc.CallOption) (*MsgUpdateGroupMembersResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupMembersResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupMembers_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupAdmin(ctx context.Context, in *MsgUpdateGroupAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupAdminResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupAdminResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupAdmin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupMetadata(ctx context.Context, in *MsgUpdateGroupMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupMetadataResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupMetadataResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupMetadata_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) CreateGroupPolicy(ctx context.Context, in *MsgCreateGroupPolicy, opts ...grpc.CallOption) (*MsgCreateGroupPolicyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgCreateGroupPolicyResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_CreateGroupPolicy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) CreateGroupWithPolicy(ctx context.Context, in *MsgCreateGroupWithPolicy, opts ...grpc.CallOption) (*MsgCreateGroupWithPolicyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgCreateGroupWithPolicyResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_CreateGroupWithPolicy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupPolicyAdmin(ctx context.Context, in *MsgUpdateGroupPolicyAdmin, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyAdminResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupPolicyAdminResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupPolicyAdmin_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupPolicyDecisionPolicy(ctx context.Context, in *MsgUpdateGroupPolicyDecisionPolicy, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupPolicyDecisionPolicyResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupPolicyDecisionPolicy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateGroupPolicyMetadata(ctx context.Context, in *MsgUpdateGroupPolicyMetadata, opts ...grpc.CallOption) (*MsgUpdateGroupPolicyMetadataResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateGroupPolicyMetadataResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateGroupPolicyMetadata_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgSubmitProposalResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_SubmitProposal_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) WithdrawProposal(ctx context.Context, in *MsgWithdrawProposal, opts ...grpc.CallOption) (*MsgWithdrawProposalResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgWithdrawProposalResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_WithdrawProposal_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Vote(ctx context.Context, in *MsgVote, opts ...grpc.CallOption) (*MsgVoteResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgVoteResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Vote_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgExecResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Exec_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) LeaveGroup(ctx context.Context, in *MsgLeaveGroup, opts ...grpc.CallOption) (*MsgLeaveGroupResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgLeaveGroupResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_LeaveGroup_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg is the cosmos.group.v1 Msg service.
|
||||
type MsgServer interface {
|
||||
// CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
|
||||
CreateGroup(context.Context, *MsgCreateGroup) (*MsgCreateGroupResponse, error)
|
||||
// UpdateGroupMembers updates the group members with given group id and admin address.
|
||||
UpdateGroupMembers(context.Context, *MsgUpdateGroupMembers) (*MsgUpdateGroupMembersResponse, error)
|
||||
// UpdateGroupAdmin updates the group admin with given group id and previous admin address.
|
||||
UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error)
|
||||
// UpdateGroupMetadata updates the group metadata with given group id and admin address.
|
||||
UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error)
|
||||
// CreateGroupPolicy creates a new group policy using given DecisionPolicy.
|
||||
CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error)
|
||||
// CreateGroupWithPolicy creates a new group with policy.
|
||||
CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error)
|
||||
// UpdateGroupPolicyAdmin updates a group policy admin.
|
||||
UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error)
|
||||
// UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.
|
||||
UpdateGroupPolicyDecisionPolicy(context.Context, *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error)
|
||||
// UpdateGroupPolicyMetadata updates a group policy metadata.
|
||||
UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error)
|
||||
// SubmitProposal submits a new proposal.
|
||||
SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
|
||||
// WithdrawProposal withdraws a proposal.
|
||||
WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error)
|
||||
// Vote allows a voter to vote on a proposal.
|
||||
Vote(context.Context, *MsgVote) (*MsgVoteResponse, error)
|
||||
// Exec executes a proposal.
|
||||
Exec(context.Context, *MsgExec) (*MsgExecResponse, error)
|
||||
// LeaveGroup allows a group member to leave the group.
|
||||
LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) CreateGroup(context.Context, *MsgCreateGroup) (*MsgCreateGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupMembers(context.Context, *MsgUpdateGroupMembers) (*MsgUpdateGroupMembersResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMembers not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupAdmin(context.Context, *MsgUpdateGroupAdmin) (*MsgUpdateGroupAdminResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupAdmin not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupMetadata(context.Context, *MsgUpdateGroupMetadata) (*MsgUpdateGroupMetadataResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupMetadata not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) CreateGroupPolicy(context.Context, *MsgCreateGroupPolicy) (*MsgCreateGroupPolicyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateGroupPolicy not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) CreateGroupWithPolicy(context.Context, *MsgCreateGroupWithPolicy) (*MsgCreateGroupWithPolicyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateGroupWithPolicy not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupPolicyAdmin(context.Context, *MsgUpdateGroupPolicyAdmin) (*MsgUpdateGroupPolicyAdminResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyAdmin not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupPolicyDecisionPolicy(context.Context, *MsgUpdateGroupPolicyDecisionPolicy) (*MsgUpdateGroupPolicyDecisionPolicyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyDecisionPolicy not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) UpdateGroupPolicyMetadata(context.Context, *MsgUpdateGroupPolicyMetadata) (*MsgUpdateGroupPolicyMetadataResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateGroupPolicyMetadata not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SubmitProposal not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) WithdrawProposal(context.Context, *MsgWithdrawProposal) (*MsgWithdrawProposalResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WithdrawProposal not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) Vote(context.Context, *MsgVote) (*MsgVoteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Vote not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) Exec(context.Context, *MsgExec) (*MsgExecResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) LeaveGroup(context.Context, *MsgLeaveGroup) (*MsgLeaveGroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LeaveGroup not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgCreateGroup)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).CreateGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_CreateGroup_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).CreateGroup(ctx, req.(*MsgCreateGroup))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupMembers)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupMembers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupMembers_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupMembers(ctx, req.(*MsgUpdateGroupMembers))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupAdmin)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupAdmin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupAdmin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupAdmin(ctx, req.(*MsgUpdateGroupAdmin))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupMetadata)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupMetadata(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupMetadata_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupMetadata(ctx, req.(*MsgUpdateGroupMetadata))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_CreateGroupPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgCreateGroupPolicy)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).CreateGroupPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_CreateGroupPolicy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).CreateGroupPolicy(ctx, req.(*MsgCreateGroupPolicy))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_CreateGroupWithPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgCreateGroupWithPolicy)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).CreateGroupWithPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_CreateGroupWithPolicy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).CreateGroupWithPolicy(ctx, req.(*MsgCreateGroupWithPolicy))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupPolicyAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupPolicyAdmin)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupPolicyAdmin_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupPolicyAdmin(ctx, req.(*MsgUpdateGroupPolicyAdmin))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupPolicyDecisionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupPolicyDecisionPolicy)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupPolicyDecisionPolicy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupPolicyDecisionPolicy(ctx, req.(*MsgUpdateGroupPolicyDecisionPolicy))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_UpdateGroupPolicyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateGroupPolicyMetadata)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateGroupPolicyMetadata_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateGroupPolicyMetadata(ctx, req.(*MsgUpdateGroupPolicyMetadata))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_SubmitProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSubmitProposal)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).SubmitProposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_SubmitProposal_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).SubmitProposal(ctx, req.(*MsgSubmitProposal))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_WithdrawProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgWithdrawProposal)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_WithdrawProposal_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).WithdrawProposal(ctx, req.(*MsgWithdrawProposal))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Vote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgVote)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Vote(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Vote_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Vote(ctx, req.(*MsgVote))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgExec)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Exec(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Exec_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Exec(ctx, req.(*MsgExec))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_LeaveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgLeaveGroup)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).LeaveGroup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_LeaveGroup_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).LeaveGroup(ctx, req.(*MsgLeaveGroup))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.group.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateGroup",
|
||||
Handler: _Msg_CreateGroup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupMembers",
|
||||
Handler: _Msg_UpdateGroupMembers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupAdmin",
|
||||
Handler: _Msg_UpdateGroupAdmin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupMetadata",
|
||||
Handler: _Msg_UpdateGroupMetadata_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateGroupPolicy",
|
||||
Handler: _Msg_CreateGroupPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateGroupWithPolicy",
|
||||
Handler: _Msg_CreateGroupWithPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupPolicyAdmin",
|
||||
Handler: _Msg_UpdateGroupPolicyAdmin_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupPolicyDecisionPolicy",
|
||||
Handler: _Msg_UpdateGroupPolicyDecisionPolicy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateGroupPolicyMetadata",
|
||||
Handler: _Msg_UpdateGroupPolicyMetadata_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SubmitProposal",
|
||||
Handler: _Msg_SubmitProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WithdrawProposal",
|
||||
Handler: _Msg_WithdrawProposal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Vote",
|
||||
Handler: _Msg_Vote_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Exec",
|
||||
Handler: _Msg_Exec_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LeaveGroup",
|
||||
Handler: _Msg_LeaveGroup_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/group/v1/tx.proto",
|
||||
}
|
||||
8813
api/cosmos/group/v1/types.pulsar.go
Normal file
8813
api/cosmos/group/v1/types.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@ var (
|
||||
// algorithm used to generate the custom textual representation of the
|
||||
// protobuf message where this annotation is applied. We recommend to use a
|
||||
// short, versioned name as this identifier, e.g. "replace_with_username_v1".
|
||||
// We also recommend providing a human-readable description as protobuf
|
||||
// We also recommand providing a human-readable description as protobuf
|
||||
// comments on this annotation, for example a short specification or a link
|
||||
// to the relevant documentation.
|
||||
//
|
||||
|
||||
@ -2,16 +2,15 @@
|
||||
package modulev1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -418,10 +417,9 @@ var file_cosmos_nft_module_v1_module_proto_rawDesc = []byte{
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x2e,
|
||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x06, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x6e, 0x66,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x06, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x14, 0x0a, 0x12, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x78, 0x2f, 0x6e, 0x66,
|
||||
0x74, 0x42, 0xca, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b,
|
||||
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 0x63,
|
||||
2035
api/cosmos/nft/v1beta1/event.pulsar.go
Normal file
2035
api/cosmos/nft/v1beta1/event.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
1426
api/cosmos/nft/v1beta1/genesis.pulsar.go
Normal file
1426
api/cosmos/nft/v1beta1/genesis.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
1823
api/cosmos/nft/v1beta1/nft.pulsar.go
Normal file
1823
api/cosmos/nft/v1beta1/nft.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
7558
api/cosmos/nft/v1beta1/query.pulsar.go
Normal file
7558
api/cosmos/nft/v1beta1/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
369
api/cosmos/nft/v1beta1/query_grpc.pb.go
Normal file
369
api/cosmos/nft/v1beta1/query_grpc.pb.go
Normal file
@ -0,0 +1,369 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/nft/v1beta1/query.proto
|
||||
|
||||
package nftv1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Balance_FullMethodName = "/cosmos.nft.v1beta1.Query/Balance"
|
||||
Query_Owner_FullMethodName = "/cosmos.nft.v1beta1.Query/Owner"
|
||||
Query_Supply_FullMethodName = "/cosmos.nft.v1beta1.Query/Supply"
|
||||
Query_NFTs_FullMethodName = "/cosmos.nft.v1beta1.Query/NFTs"
|
||||
Query_NFT_FullMethodName = "/cosmos.nft.v1beta1.Query/NFT"
|
||||
Query_Class_FullMethodName = "/cosmos.nft.v1beta1.Query/Class"
|
||||
Query_Classes_FullMethodName = "/cosmos.nft.v1beta1.Query/Classes"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Query defines the gRPC querier service.
|
||||
type QueryClient interface {
|
||||
// Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721
|
||||
Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error)
|
||||
// Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721
|
||||
Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error)
|
||||
// Supply queries the number of NFTs from the given class, same as totalSupply of ERC721.
|
||||
Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error)
|
||||
// NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in
|
||||
// ERC721Enumerable
|
||||
NFTs(ctx context.Context, in *QueryNFTsRequest, opts ...grpc.CallOption) (*QueryNFTsResponse, error)
|
||||
// NFT queries an NFT based on its class and id.
|
||||
NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error)
|
||||
// Class queries an NFT class based on its id
|
||||
Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error)
|
||||
// Classes queries all NFT classes
|
||||
Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryBalanceResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Balance_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Owner(ctx context.Context, in *QueryOwnerRequest, opts ...grpc.CallOption) (*QueryOwnerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryOwnerResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Owner_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QuerySupplyResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Supply_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) NFTs(ctx context.Context, in *QueryNFTsRequest, opts ...grpc.CallOption) (*QueryNFTsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryNFTsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_NFTs_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) NFT(ctx context.Context, in *QueryNFTRequest, opts ...grpc.CallOption) (*QueryNFTResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryNFTResponse)
|
||||
err := c.cc.Invoke(ctx, Query_NFT_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Class(ctx context.Context, in *QueryClassRequest, opts ...grpc.CallOption) (*QueryClassResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryClassResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Class_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Classes(ctx context.Context, in *QueryClassesRequest, opts ...grpc.CallOption) (*QueryClassesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryClassesResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Classes_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query defines the gRPC querier service.
|
||||
type QueryServer interface {
|
||||
// Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721
|
||||
Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
|
||||
// Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721
|
||||
Owner(context.Context, *QueryOwnerRequest) (*QueryOwnerResponse, error)
|
||||
// Supply queries the number of NFTs from the given class, same as totalSupply of ERC721.
|
||||
Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error)
|
||||
// NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in
|
||||
// ERC721Enumerable
|
||||
NFTs(context.Context, *QueryNFTsRequest) (*QueryNFTsResponse, error)
|
||||
// NFT queries an NFT based on its class and id.
|
||||
NFT(context.Context, *QueryNFTRequest) (*QueryNFTResponse, error)
|
||||
// Class queries an NFT class based on its id
|
||||
Class(context.Context, *QueryClassRequest) (*QueryClassResponse, error)
|
||||
// Classes queries all NFT classes
|
||||
Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Owner(context.Context, *QueryOwnerRequest) (*QueryOwnerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Owner not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Supply not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) NFTs(context.Context, *QueryNFTsRequest) (*QueryNFTsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NFTs not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) NFT(context.Context, *QueryNFTRequest) (*QueryNFTResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NFT not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Class(context.Context, *QueryClassRequest) (*QueryClassResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Class not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Classes(context.Context, *QueryClassesRequest) (*QueryClassesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Classes not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeQueryServer interface {
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryBalanceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Balance(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Balance_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Owner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryOwnerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Owner(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Owner_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Owner(ctx, req.(*QueryOwnerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Supply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuerySupplyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Supply(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Supply_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Supply(ctx, req.(*QuerySupplyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_NFTs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryNFTsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).NFTs(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_NFTs_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).NFTs(ctx, req.(*QueryNFTsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_NFT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryNFTRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).NFT(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_NFT_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).NFT(ctx, req.(*QueryNFTRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Class_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryClassRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Class(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Class_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Class(ctx, req.(*QueryClassRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Classes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryClassesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Classes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Classes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Classes(ctx, req.(*QueryClassesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.nft.v1beta1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Balance",
|
||||
Handler: _Query_Balance_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Owner",
|
||||
Handler: _Query_Owner_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Supply",
|
||||
Handler: _Query_Supply_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NFTs",
|
||||
Handler: _Query_NFTs_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NFT",
|
||||
Handler: _Query_NFT_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Class",
|
||||
Handler: _Query_Class_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Classes",
|
||||
Handler: _Query_Classes_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/nft/v1beta1/query.proto",
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
127
api/cosmos/nft/v1beta1/tx_grpc.pb.go
Normal file
127
api/cosmos/nft/v1beta1/tx_grpc.pb.go
Normal file
@ -0,0 +1,127 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: cosmos/nft/v1beta1/tx.proto
|
||||
|
||||
package nftv1beta1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_Send_FullMethodName = "/cosmos.nft.v1beta1.Msg/Send"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// Msg defines the nft Msg service.
|
||||
type MsgClient interface {
|
||||
// Send defines a method to send a nft from one account to another account.
|
||||
Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgSendResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Send_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Msg defines the nft Msg service.
|
||||
type MsgServer interface {
|
||||
// Send defines a method to send a nft from one account to another account.
|
||||
Send(context.Context, *MsgSend) (*MsgSendResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) Send(context.Context, *MsgSend) (*MsgSendResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Send not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgSend)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Send(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Send_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Send(ctx, req.(*MsgSend))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.nft.v1beta1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Send",
|
||||
Handler: _Msg_Send_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/nft/v1beta1/tx.proto",
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user