Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: SDK v0.46.0 #192

Merged
merged 33 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7c77dfe
Merge pull request #1 from aljo242/chore/remove-deprecated-rest
Jul 26, 2022
fbe5b88
Merge pull request #2 from aljo242/chore/add-make-targets
Jul 26, 2022
1728eaa
Merge pull request #3 from aljo242/chore/remove-ignite-dependency
Jul 26, 2022
6d850e0
Merge pull request #4 from aljo242/refactor/remove-ToDec
Jul 26, 2022
05040a2
update go mod
Jul 26, 2022
63d0c44
use storetypes package
Jul 26, 2022
f3f6c86
fix cmd package
Jul 26, 2022
1c58088
fix sdk.Coins Sub operations:
Jul 26, 2022
dceb125
resolve gov changes
Jul 26, 2022
dae6ad9
resolve remaining changes in app
Jul 26, 2022
281cb6b
remaining build errors
Jul 26, 2022
53ad8e1
fix remaining errors
Jul 26, 2022
fc9d3f7
format
Jul 26, 2022
3bfc4dd
update to go 1.18
Jul 26, 2022
a5f2404
fix workflow go versions
Jul 26, 2022
140c2df
update lint workflow
Jul 26, 2022
c39abf1
use go install instead of go get
Jul 26, 2022
4b74542
update test-coverage to use go1.18
Jul 27, 2022
34b1c9d
add .clang-format
Jul 31, 2022
e63d194
add scripts
Jul 31, 2022
233b752
update make targets
Jul 31, 2022
b70e339
init buf
Jul 31, 2022
9246f08
make proto-format
Jul 31, 2022
1ca38fb
make proto-gen
Jul 31, 2022
6ca8c56
fix test
Jul 31, 2022
89b0ffa
fix test
Jul 31, 2022
be69836
fix test
Jul 31, 2022
fb60718
format
Jul 31, 2022
28080e0
format
Jul 31, 2022
8ed9031
Merge pull request #5 from aljo242/feat/buf-proto-gen
Jul 31, 2022
bec850d
Merge commit '833b580e6ee94eefee9c4e300cee8231f928c4c2' into feat/v0.…
jaybxyz Aug 17, 2022
91ee716
test: update golangci-lint workflow
jaybxyz Aug 17, 2022
8a3ab5c
revert: use ModuleAccountAddr
jaybxyz Aug 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
Language: Proto
BasedOnStyle: Google
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: ".*"
Priority: 1
IncludeIsMainRegex: "(Test)?$"
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
RawStringFormats:
- Delimiters:
- pb
Language: TextProto
BasedOnStyle: Google
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
---
23 changes: 16 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@master
- uses: actions/setup-go@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.40
args: --timeout 10m
github-token: ${{ secrets.github_token }}
go-version: 1.18
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --out-format=tab
skip-go-installation: true
if: env.GIT_DIFF
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- name: Display go version
run: go version
- run: make build
Expand All @@ -26,11 +26,11 @@ jobs:
steps:
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- name: Display go version
run: go version
- name: Install runsim
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/[email protected]
run: export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/[email protected]
with:
path: ~/go/bin
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.17
go-version: 1.18
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand All @@ -50,7 +50,7 @@ jobs:
${{ runner.os }}-go-
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Run unit tests
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: display go version
run: go version
- name: test & coverage report creation
Expand All @@ -107,7 +107,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: display go version
run: go version
- name: test & coverage report creation
Expand Down
18 changes: 8 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,17 @@ test-sim-benchmark
### Protobuf ###
###############################################################################

containerProtoVer=v0.2
containerProtoImage=tendermintdev/sdk-proto-gen:$(containerProtoVer)
containerProtoGen=cosmos-sdk-proto-gen-$(containerProtoVer)
containerProtoGenSwagger=cosmos-sdk-proto-gen-swagger-$(containerProtoVer)
containerProtoFmt=cosmos-sdk-proto-fmt-$(containerProtoVer)
protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen:$(protoVer)
containerProtoGen=tendermint-fundraising-proto-gen-$(protoVer)
containerProtoFmt=tendermint-fundraising-proto-fmt-$(protoVer)

proto-all: proto-format proto-gen proto-swagger-gen
proto-all: proto-format proto-gen

proto-gen:
ignite generate proto-go

proto-swagger-gen:
ignite generate openapi
@echo "Generating Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \
sh ./scripts/protocgen.sh; fi

proto-format:
@echo "Formatting Protobuf files"
Expand Down
Loading