@agoric/cosmos 0.34.2-other-dev-3eb1a1d.0 → 0.34.2-other-dev-ecf44df.0.ecf44df

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/.clang-format +116 -0
  2. package/Makefile +40 -68
  3. package/ante/ante.go +2 -2
  4. package/ante/inbound.go +1 -2
  5. package/ante/inbound_test.go +4 -2
  6. package/ante/vm_admission.go +1 -2
  7. package/app/app.go +421 -320
  8. package/app/encoding.go +6 -3
  9. package/app/export.go +52 -23
  10. package/app/genesis.go +9 -3
  11. package/app/params/encoding.go +1 -1
  12. package/app/params/proto.go +6 -4
  13. package/app/sim_test.go +297 -52
  14. package/app/txconfig/tx_config.go +169 -0
  15. package/app/upgrade.go +132 -80
  16. package/app/upgrade_test.go +63 -0
  17. package/cmd/agd/agvm.go +1 -1
  18. package/cmd/agd/main.go +1 -1
  19. package/cmd/libdaemon/main.go +34 -1
  20. package/daemon/cmd/root.go +119 -59
  21. package/daemon/cmd/root_test.go +15 -28
  22. package/daemon/main.go +2 -8
  23. package/git-revision.txt +1 -1
  24. package/go.mod +412 -147
  25. package/go.sum +994 -559
  26. package/go.work +39 -0
  27. package/go.work.sum +2636 -0
  28. package/index.cjs +0 -1
  29. package/package.json +10 -4
  30. package/proto/Dockerfile +14 -0
  31. package/proto/agoric/swingset/genesis.proto +7 -11
  32. package/proto/agoric/swingset/msgs.proto +196 -82
  33. package/proto/agoric/swingset/query.proto +33 -10
  34. package/proto/agoric/swingset/swingset.proto +179 -108
  35. package/proto/agoric/vbank/genesis.proto +5 -5
  36. package/proto/agoric/vbank/msgs.proto +3 -0
  37. package/proto/agoric/vbank/vbank.proto +42 -52
  38. package/proto/agoric/vibc/msgs.proto +57 -13
  39. package/proto/agoric/vstorage/genesis.proto +6 -9
  40. package/proto/agoric/vstorage/query.proto +19 -48
  41. package/proto/agoric/vstorage/vstorage.proto +4 -10
  42. package/proto/agoric/vtransfer/genesis.proto +7 -7
  43. package/proto/buf.gen.gogo.yaml +23 -0
  44. package/proto/buf.gen.pulsar.yaml +17 -0
  45. package/proto/buf.gen.swagger.yaml +14 -0
  46. package/proto/buf.yaml +11 -1
  47. package/scripts/mockgen.sh +4 -0
  48. package/scripts/protocgen.sh +23 -19
  49. package/tests/e2e/vbank/vbank_test.go +172 -0
  50. package/tests/integrations/types/aminojson_test.go +230 -0
  51. package/tests/integrations/vbank/vbank_test.go +349 -0
  52. package/third_party/proto/amino/amino.proto +84 -0
  53. package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +2 -3
  54. package/third_party/proto/cosmos/base/v1beta1/coin.proto +24 -6
  55. package/third_party/proto/cosmos/ics23/v1/proofs.proto +243 -0
  56. package/third_party/proto/cosmos/msg/v1/msg.proto +30 -0
  57. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +21 -14
  58. package/third_party/proto/cosmos_proto/cosmos.proto +16 -1
  59. package/third_party/proto/gogoproto/gogo.proto +2 -2
  60. package/third_party/proto/google/protobuf/any.proto +6 -3
  61. package/third_party/proto/ibc/core/channel/v1/channel.proto +27 -18
  62. package/third_party/proto/ibc/core/client/v1/client.proto +15 -52
  63. package/types/address_hooks.go +235 -0
  64. package/types/address_hooks_test.go +221 -0
  65. package/types/codec.go +23 -0
  66. package/types/ibc_packet.go +64 -0
  67. package/types/ibc_packet_test.go +117 -0
  68. package/types/kv_entry_helpers.go +3 -27
  69. package/types/kv_entry_helpers_test.go +2 -2
  70. package/types/legacy_address_encoder.go +58 -0
  71. package/vm/client.go +32 -7
  72. package/vm/proto_json.go +2 -2
  73. package/vm/proto_json_test.go +1 -1
  74. package/vm/server.go +2 -1
  75. package/x/swingset/abci.go +8 -3
  76. package/x/swingset/alias.go +0 -1
  77. package/x/swingset/client/cli/tx.go +16 -14
  78. package/x/swingset/config.go +1 -1
  79. package/x/swingset/genesis.go +2 -1
  80. package/x/swingset/handler.go +2 -1
  81. package/x/swingset/keeper/chunked_artifact_id_test.go +168 -0
  82. package/x/swingset/keeper/extension_snapshotter.go +14 -5
  83. package/x/swingset/keeper/extension_snapshotter_test.go +1 -1
  84. package/x/swingset/keeper/grpc_query.go +30 -0
  85. package/x/swingset/keeper/keeper.go +241 -32
  86. package/x/swingset/keeper/keeper_test.go +26 -17
  87. package/x/swingset/keeper/msg_server.go +255 -5
  88. package/x/swingset/keeper/msg_server_test.go +417 -0
  89. package/x/swingset/keeper/proposal.go +4 -0
  90. package/x/swingset/keeper/querier.go +2 -31
  91. package/x/swingset/keeper/swing_store_exports_handler.go +1 -1
  92. package/x/swingset/keeper/swing_store_exports_handler_test.go +1 -1
  93. package/x/swingset/keeper/test_utils.go +2 -2
  94. package/x/swingset/module.go +20 -35
  95. package/x/swingset/testing/queue.go +12 -1
  96. package/x/swingset/testutil/mocks.go +379 -0
  97. package/x/swingset/types/codec.go +10 -5
  98. package/x/swingset/types/default-params.go +39 -21
  99. package/x/swingset/types/expected_keepers.go +29 -4
  100. package/x/swingset/types/genesis.pb.go +2 -2
  101. package/x/swingset/types/list_tools.go +103 -0
  102. package/x/swingset/types/msgs.go +182 -57
  103. package/x/swingset/types/msgs.pb.go +1286 -97
  104. package/x/swingset/types/msgs_test.go +12 -22
  105. package/x/swingset/types/params.go +103 -13
  106. package/x/swingset/types/params_test.go +138 -45
  107. package/x/swingset/types/query.pb.go +530 -35
  108. package/x/swingset/types/query.pb.gw.go +101 -0
  109. package/x/swingset/types/swingset.pb.go +1296 -125
  110. package/x/vbank/genesis.go +13 -9
  111. package/x/vbank/handler.go +2 -1
  112. package/x/vbank/keeper/grpc_query.go +4 -1
  113. package/x/vbank/keeper/keeper.go +108 -23
  114. package/x/vbank/keeper/querier.go +5 -22
  115. package/x/vbank/keeper/rewards.go +10 -5
  116. package/x/vbank/module.go +47 -90
  117. package/x/vbank/types/expected_keepers.go +15 -10
  118. package/x/vbank/types/genesis.pb.go +2 -2
  119. package/x/vbank/types/key.go +3 -0
  120. package/x/vbank/types/msgs.pb.go +13 -10
  121. package/x/vbank/types/params.go +4 -3
  122. package/x/vbank/types/query.pb.go +4 -3
  123. package/x/vbank/types/vbank.pb.go +43 -42
  124. package/x/vbank/vbank.go +29 -11
  125. package/x/vbank/vbank_test.go +291 -153
  126. package/x/vibc/alias.go +0 -1
  127. package/x/vibc/handler.go +2 -1
  128. package/x/vibc/keeper/dynamic_router.go +176 -0
  129. package/x/vibc/keeper/dynamic_router_test.go +240 -0
  130. package/x/vibc/keeper/keeper.go +44 -85
  131. package/x/vibc/keeper/migrations.go +36 -0
  132. package/x/vibc/keeper/scope.go +114 -0
  133. package/x/vibc/keeper/triggers.go +12 -37
  134. package/x/vibc/module.go +12 -37
  135. package/x/vibc/types/codec.go +2 -1
  136. package/x/vibc/types/expected_keepers.go +13 -28
  137. package/x/vibc/types/ibc_module.go +39 -36
  138. package/x/vibc/types/msgs.go +89 -9
  139. package/x/vibc/types/msgs.pb.go +688 -31
  140. package/x/vibc/types/receiver.go +28 -22
  141. package/x/vlocalchain/handler.go +2 -1
  142. package/x/vlocalchain/keeper/keeper.go +20 -8
  143. package/x/vlocalchain/keeper/keeper_test.go +41 -10
  144. package/x/vlocalchain/types/expected_keepers.go +7 -4
  145. package/x/vlocalchain/types/vlocalchain.pb.go +1 -1
  146. package/x/vlocalchain/vlocalchain_test.go +41 -29
  147. package/x/vstorage/README.md +0 -8
  148. package/x/vstorage/alias.go +0 -1
  149. package/x/vstorage/client/cli/query.go +1 -1
  150. package/x/vstorage/genesis.go +10 -10
  151. package/x/vstorage/handler.go +2 -1
  152. package/x/vstorage/keeper/grpc_query.go +1 -1
  153. package/x/vstorage/keeper/keeper.go +108 -51
  154. package/x/vstorage/keeper/keeper_test.go +95 -75
  155. package/x/vstorage/keeper/querier.go +2 -33
  156. package/x/vstorage/keeper/querier_test.go +41 -6
  157. package/x/vstorage/module.go +27 -26
  158. package/x/vstorage/testing/queue.go +10 -2
  159. package/x/vstorage/types/genesis.pb.go +2 -2
  160. package/x/vstorage/types/path_keys.go +7 -8
  161. package/x/vstorage/types/query.pb.go +8 -5
  162. package/x/vstorage/types/vstorage.pb.go +2 -2
  163. package/x/vstorage/vstorage.go +10 -9
  164. package/x/vstorage/vstorage_test.go +25 -19
  165. package/x/vtransfer/genesis.go +1 -3
  166. package/x/vtransfer/handler.go +6 -3
  167. package/x/vtransfer/ibc_middleware.go +18 -16
  168. package/x/vtransfer/ibc_middleware_test.go +526 -172
  169. package/x/vtransfer/keeper/keeper.go +220 -73
  170. package/x/vtransfer/module.go +8 -24
  171. package/x/vtransfer/types/expected_keepers.go +15 -24
  172. package/x/vtransfer/types/genesis.pb.go +2 -2
  173. package/x/vtransfer/utils_test.go +121 -0
  174. package/daemon/cmd/genaccounts.go +0 -195
  175. package/daemon/cmd/testnet.go +0 -413
  176. package/e2e_test/Makefile +0 -29
  177. package/e2e_test/README.md +0 -100
  178. package/e2e_test/go.mod +0 -217
  179. package/e2e_test/go.sum +0 -1323
  180. package/e2e_test/ibc_conformance_test.go +0 -56
  181. package/e2e_test/pfm_test.go +0 -613
  182. package/e2e_test/util.go +0 -271
  183. package/x/vtransfer/types/baseaddr.go +0 -156
  184. package/x/vtransfer/types/baseaddr_test.go +0 -167
package/.clang-format ADDED
@@ -0,0 +1,116 @@
1
+ ---
2
+ Language: Proto
3
+ BasedOnStyle: Google
4
+ AccessModifierOffset: -2
5
+ AlignAfterOpenBracket: Align
6
+ AlignConsecutiveAssignments: true
7
+ AlignConsecutiveDeclarations: true
8
+ AlignEscapedNewlines: Right
9
+ AlignOperands: true
10
+ AlignTrailingComments: true
11
+ AllowAllParametersOfDeclarationOnNextLine: true
12
+ AllowShortBlocksOnASingleLine: true
13
+ AllowShortCaseLabelsOnASingleLine: false
14
+ AllowShortFunctionsOnASingleLine: Empty
15
+ AllowShortIfStatementsOnASingleLine: false
16
+ AllowShortLoopsOnASingleLine: false
17
+ AlwaysBreakAfterDefinitionReturnType: None
18
+ AlwaysBreakAfterReturnType: None
19
+ AlwaysBreakBeforeMultilineStrings: false
20
+ AlwaysBreakTemplateDeclarations: false
21
+ BinPackArguments: true
22
+ BinPackParameters: true
23
+ BraceWrapping:
24
+ AfterClass: false
25
+ AfterControlStatement: false
26
+ AfterEnum: false
27
+ AfterFunction: false
28
+ AfterNamespace: false
29
+ AfterObjCDeclaration: false
30
+ AfterStruct: false
31
+ AfterUnion: false
32
+ AfterExternBlock: false
33
+ BeforeCatch: false
34
+ BeforeElse: false
35
+ IndentBraces: false
36
+ SplitEmptyFunction: true
37
+ SplitEmptyRecord: true
38
+ SplitEmptyNamespace: true
39
+ BreakBeforeBinaryOperators: None
40
+ BreakBeforeBraces: Attach
41
+ BreakBeforeInheritanceComma: false
42
+ BreakBeforeTernaryOperators: true
43
+ BreakConstructorInitializersBeforeComma: false
44
+ BreakConstructorInitializers: BeforeColon
45
+ BreakAfterJavaFieldAnnotations: false
46
+ BreakStringLiterals: true
47
+ ColumnLimit: 120
48
+ CommentPragmas: '^ IWYU pragma:'
49
+ CompactNamespaces: false
50
+ ConstructorInitializerAllOnOneLineOrOnePerLine: false
51
+ ConstructorInitializerIndentWidth: 4
52
+ ContinuationIndentWidth: 4
53
+ Cpp11BracedListStyle: true
54
+ DerivePointerAlignment: false
55
+ DisableFormat: false
56
+ ExperimentalAutoDetectBinPacking: false
57
+ FixNamespaceComments: true
58
+ ForEachMacros:
59
+ - foreach
60
+ - Q_FOREACH
61
+ - BOOST_FOREACH
62
+ IncludeBlocks: Preserve
63
+ IncludeCategories:
64
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
65
+ Priority: 2
66
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
67
+ Priority: 3
68
+ - Regex: '.*'
69
+ Priority: 1
70
+ IncludeIsMainRegex: '(Test)?$'
71
+ IndentCaseLabels: false
72
+ IndentPPDirectives: None
73
+ IndentWidth: 2
74
+ IndentWrappedFunctionNames: false
75
+ JavaScriptQuotes: Leave
76
+ JavaScriptWrapImports: true
77
+ KeepEmptyLinesAtTheStartOfBlocks: true
78
+ MacroBlockBegin: ''
79
+ MacroBlockEnd: ''
80
+ MaxEmptyLinesToKeep: 1
81
+ NamespaceIndentation: None
82
+ ObjCBlockIndentWidth: 2
83
+ ObjCSpaceAfterProperty: false
84
+ ObjCSpaceBeforeProtocolList: true
85
+ PenaltyBreakAssignment: 2
86
+ PenaltyBreakBeforeFirstCallParameter: 19
87
+ PenaltyBreakComment: 300
88
+ PenaltyBreakFirstLessLess: 120
89
+ PenaltyBreakString: 1000
90
+ PenaltyExcessCharacter: 1000000
91
+ PenaltyReturnTypeOnItsOwnLine: 60
92
+ PointerAlignment: Right
93
+ RawStringFormats:
94
+ - Delimiters:
95
+ - pb
96
+ Language: TextProto
97
+ BasedOnStyle: Google
98
+ ReflowComments: true
99
+ SortIncludes: true
100
+ SortUsingDeclarations: true
101
+ SpaceAfterCStyleCast: false
102
+ SpaceAfterTemplateKeyword: true
103
+ SpaceBeforeAssignmentOperators: true
104
+ SpaceBeforeParens: ControlStatements
105
+ SpaceInEmptyParentheses: false
106
+ SpacesBeforeTrailingComments: 1
107
+ SpacesInAngles: false
108
+ SpacesInContainerLiterals: false
109
+ SpacesInCStyleCastParentheses: false
110
+ SpacesInParentheses: false
111
+ SpacesInSquareBrackets: false
112
+ Standard: Cpp11
113
+ TabWidth: 8
114
+ UseTab: Never
115
+ ---
116
+
package/Makefile CHANGED
@@ -3,7 +3,7 @@
3
3
  NAME := $(shell sed -ne 's/.*"name": "\([^"]*\)".*/\1/p' package.json)
4
4
  VERSION := $(shell sed -ne 's/.*"version": "\([^"]*\)".*/\1/p' package.json)
5
5
  GIT_COMMIT = $(shell hash=`git rev-parse --short HEAD 2>/dev/null`; if test -n "$$hash"; then echo $$hash`git diff --quiet || echo -dirty`; else cat git-revision.txt; fi)
6
- PR_TARGET_REPO = ../../.git
6
+ PR_TARGET_REPO = https://github.com/Agoric/agoric-sdk.git
7
7
  # TODO: figure out how to handle other branches like pismo-release
8
8
  PR_TARGET_BRANCH = master
9
9
 
@@ -90,22 +90,36 @@ endif
90
90
  ### Protobuf ###
91
91
  ###############################################################################
92
92
 
93
- proto-gen: proto-tools
94
- PATH="${BIN}:$$PATH" ./scripts/protocgen.sh
93
+ BUF_CMD = go tool buf
95
94
 
96
- proto-lint: proto-tools
97
- ${BIN}/buf lint
95
+ proto-all: proto-format proto-lint proto-gen
98
96
 
99
- proto-check-breaking: proto-tools
100
- ${BIN}/buf breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
97
+ proto-gen:
98
+ @echo "Generating Protobuf files"
99
+ sh ./scripts/protocgen.sh
101
100
 
102
- GOGO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
101
+ proto-format:
102
+ find ./proto -name "*.proto" -exec clang-format -i {} \;
103
+
104
+ proto-lint:
105
+ $(BUF_CMD) lint --error-format=json ./proto
106
+
107
+ proto-check-breaking:
108
+ $(BUF_CMD) breaking --against $(PR_TARGET_REPO)#branch=$(PR_TARGET_BRANCH),subdir=golang/cosmos
109
+
110
+ GOGO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/gogoproto)
103
111
  # GOOGLE_API_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
104
- IBC_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
112
+ IBC_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v8)/proto/ibc/core
105
113
  COSMOS_PROTO_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
106
114
  COSMOS_SDK_PROTO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
115
+ COSMOS_SDK_AMINO_URL = file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/amino
116
+
117
+ # Needed for cosmic-proto.
118
+ COSMOS_ICS23_URL = https://buf.build/cosmos/ics23/raw/main/-/cosmos/ics23/v1
107
119
 
108
120
  COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
121
+ COSMOS_ICS23_TYPES = third_party/proto/cosmos/ics23/v1
122
+ COSMOS_SDK_AMINO_TYPES = third_party/proto/amino
109
123
  GOGO_PROTO_TYPES = third_party/proto/gogoproto
110
124
  GOOGLE_API_TYPES = third_party/proto/google/api
111
125
  GOOGLE_PROTO_TYPES = third_party/proto/google/protobuf
@@ -114,12 +128,17 @@ IBC_CLIENT_TYPES = third_party/proto/ibc/core/client/v1
114
128
  SDK_BASE_TYPES = third_party/proto/cosmos/base/v1beta1
115
129
  SDK_QUERY_TYPES = third_party/proto/cosmos/base/query/v1beta1
116
130
  SDK_UPGRADE_TYPES = third_party/proto/cosmos/upgrade/v1beta1
131
+ SDK_MSG_TYPES = third_party/proto/cosmos/msg/v1
117
132
 
118
133
  proto-update-deps:
119
134
  mkdir -p $(COSMOS_PROTO_TYPES)
120
135
  url="$(COSMOS_PROTO_PROTO_URL)"; \
121
136
  curl -sSL $$url/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
122
137
 
138
+ mkdir -p $(COSMOS_ICS23_TYPES)
139
+ url="$(COSMOS_ICS23_URL)"; \
140
+ curl -sSL $$url/proofs.proto > $(COSMOS_ICS23_TYPES)/proofs.proto
141
+
123
142
  mkdir -p $(GOGO_PROTO_TYPES)
124
143
  url="$(GOGO_PROTO_URL)"; \
125
144
  curl -sSL $$url/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto
@@ -147,69 +166,22 @@ proto-update-deps:
147
166
  mkdir -p $(SDK_QUERY_TYPES) && \
148
167
  curl -sSL $$url/base/query/v1beta1/pagination.proto > $(SDK_QUERY_TYPES)/pagination.proto && \
149
168
  mkdir -p $(SDK_UPGRADE_TYPES) && \
150
- curl -sSL $$url/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto
151
-
152
- UNAME_S ?= $(shell uname -s)
153
- UNAME_M ?= $(shell uname -m)
154
-
155
- BUF_VERSION ?= 1.0.0
156
-
157
- PROTOC_VERSION ?= 3.11.2
158
- ifeq ($(UNAME_S),Linux)
159
- ifeq ($(UNAME_M),aarch64)
160
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-aarch_64.zip
161
- else
162
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-linux-x86_64.zip
163
- endif
164
- endif
165
- ifeq ($(UNAME_S),Darwin)
166
- PROTOC_ZIP ?= protoc-${PROTOC_VERSION}-osx-x86_64.zip
167
- endif
169
+ curl -sSL $$url/upgrade/v1beta1/upgrade.proto > $(SDK_UPGRADE_TYPES)/upgrade.proto && \
170
+ mkdir -p $(SDK_MSG_TYPES) && \
171
+ curl -sSL $$url/msg/v1/msg.proto > $(SDK_MSG_TYPES)/msg.proto
168
172
 
169
- proto-tools: proto-tools-stamp buf grpc-gateway-stamp
170
-
171
- proto-tools-stamp:
172
- echo "Installing protoc compiler..."
173
- mkdir -p "${BIN}"
174
- (cd /tmp; \
175
- curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \
176
- unzip -o ${PROTOC_ZIP} -d "${BIN}/.." bin/protoc 'include/*'; \
177
- rm -f ${PROTOC_ZIP})
178
-
179
- echo "Installing protoc-gen-gocosmos..."
180
- go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos
181
-
182
- # Create dummy file to satisfy dependency and avoid
183
- # rebuilding when this Makefile target is hit twice
184
- # in a row
185
- touch $@
186
-
187
- buf: buf-stamp
188
-
189
- buf-stamp:
190
- echo "Installing buf..."
191
- curl -sSL \
192
- "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \
193
- -o "${BIN}/buf" && \
194
- chmod +x "${BIN}/buf"
195
-
196
- touch $@
197
-
198
- GATEWAY_PKGS = \
199
- github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
200
- github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
201
- google.golang.org/protobuf/cmd/protoc-gen-go
202
-
203
- grpc-gateway-stamp:
204
- go install $(GATEWAY_PKGS)
205
- touch $@
206
-
207
- tools-clean:
208
- rm -f proto-tools-stamp buf-stamp grpc-gateway-stamp
173
+ url="$(COSMOS_SDK_AMINO_URL)"; \
174
+ mkdir -p $(COSMOS_SDK_AMINO_TYPES) && \
175
+ curl -sSL $$url/amino.proto > $(COSMOS_SDK_AMINO_TYPES)/amino.proto
209
176
 
177
+ .PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps mocks
210
178
 
211
179
  lint:
212
- golangci-lint run
180
+ go tool golangci-lint run
213
181
 
214
182
  test:
215
183
  go test -coverprofile=coverage.txt -covermode=atomic ./...
184
+
185
+ mocks:
186
+ @echo "Generating mocks"
187
+ ./scripts/mockgen.sh
package/ante/ante.go CHANGED
@@ -5,8 +5,8 @@ import (
5
5
  sdk "github.com/cosmos/cosmos-sdk/types"
6
6
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
7
7
  "github.com/cosmos/cosmos-sdk/x/auth/ante"
8
- ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
9
- ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
8
+ ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
9
+ ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
10
10
  )
11
11
 
12
12
  // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
package/ante/inbound.go CHANGED
@@ -1,11 +1,10 @@
1
1
  package ante
2
2
 
3
3
  import (
4
- "github.com/armon/go-metrics"
5
-
6
4
  "github.com/cosmos/cosmos-sdk/telemetry"
7
5
  sdk "github.com/cosmos/cosmos-sdk/types"
8
6
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
7
+ "github.com/hashicorp/go-metrics"
9
8
 
10
9
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
11
10
  swingtypes "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"
@@ -11,8 +11,9 @@ import (
11
11
  "github.com/cosmos/cosmos-sdk/codec/types"
12
12
  sdk "github.com/cosmos/cosmos-sdk/types"
13
13
  "github.com/cosmos/cosmos-sdk/types/tx"
14
+ authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
14
15
  banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
15
- "github.com/gogo/protobuf/proto"
16
+ "github.com/cosmos/gogoproto/proto"
16
17
  )
17
18
 
18
19
  func TestInboundAnteHandle(t *testing.T) {
@@ -168,11 +169,12 @@ func makeTestTx(msgs ...proto.Message) sdk.Tx {
168
169
  }
169
170
  wrappedMsgs[i] = any
170
171
  }
171
- return &tx.Tx{
172
+ protoTx := &tx.Tx{
172
173
  Body: &tx.TxBody{
173
174
  Messages: wrappedMsgs,
174
175
  },
175
176
  }
177
+ return authtx.WrapTx(protoTx).GetTx()
176
178
  }
177
179
 
178
180
  func nilAnteHandler(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) {
@@ -1,12 +1,11 @@
1
1
  package ante
2
2
 
3
3
  import (
4
- "github.com/armon/go-metrics"
5
-
6
4
  sdkioerrors "cosmossdk.io/errors"
7
5
  "github.com/cosmos/cosmos-sdk/telemetry"
8
6
  sdk "github.com/cosmos/cosmos-sdk/types"
9
7
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
8
+ "github.com/hashicorp/go-metrics"
10
9
 
11
10
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
12
11
  )