@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.
- package/.clang-format +116 -0
- package/Makefile +40 -68
- package/ante/ante.go +2 -2
- package/ante/inbound.go +1 -2
- package/ante/inbound_test.go +4 -2
- package/ante/vm_admission.go +1 -2
- package/app/app.go +421 -320
- package/app/encoding.go +6 -3
- package/app/export.go +52 -23
- package/app/genesis.go +9 -3
- package/app/params/encoding.go +1 -1
- package/app/params/proto.go +6 -4
- package/app/sim_test.go +297 -52
- package/app/txconfig/tx_config.go +169 -0
- package/app/upgrade.go +132 -80
- package/app/upgrade_test.go +63 -0
- package/cmd/agd/agvm.go +1 -1
- package/cmd/agd/main.go +1 -1
- package/cmd/libdaemon/main.go +34 -1
- package/daemon/cmd/root.go +119 -59
- package/daemon/cmd/root_test.go +15 -28
- package/daemon/main.go +2 -8
- package/git-revision.txt +1 -1
- package/go.mod +412 -147
- package/go.sum +994 -559
- package/go.work +39 -0
- package/go.work.sum +2636 -0
- package/index.cjs +0 -1
- package/package.json +10 -4
- package/proto/Dockerfile +14 -0
- package/proto/agoric/swingset/genesis.proto +7 -11
- package/proto/agoric/swingset/msgs.proto +196 -82
- package/proto/agoric/swingset/query.proto +33 -10
- package/proto/agoric/swingset/swingset.proto +179 -108
- package/proto/agoric/vbank/genesis.proto +5 -5
- package/proto/agoric/vbank/msgs.proto +3 -0
- package/proto/agoric/vbank/vbank.proto +42 -52
- package/proto/agoric/vibc/msgs.proto +57 -13
- package/proto/agoric/vstorage/genesis.proto +6 -9
- package/proto/agoric/vstorage/query.proto +19 -48
- package/proto/agoric/vstorage/vstorage.proto +4 -10
- package/proto/agoric/vtransfer/genesis.proto +7 -7
- package/proto/buf.gen.gogo.yaml +23 -0
- package/proto/buf.gen.pulsar.yaml +17 -0
- package/proto/buf.gen.swagger.yaml +14 -0
- package/proto/buf.yaml +11 -1
- package/scripts/mockgen.sh +4 -0
- package/scripts/protocgen.sh +23 -19
- package/tests/e2e/vbank/vbank_test.go +172 -0
- package/tests/integrations/types/aminojson_test.go +230 -0
- package/tests/integrations/vbank/vbank_test.go +349 -0
- package/third_party/proto/amino/amino.proto +84 -0
- package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +2 -3
- package/third_party/proto/cosmos/base/v1beta1/coin.proto +24 -6
- package/third_party/proto/cosmos/ics23/v1/proofs.proto +243 -0
- package/third_party/proto/cosmos/msg/v1/msg.proto +30 -0
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +21 -14
- package/third_party/proto/cosmos_proto/cosmos.proto +16 -1
- package/third_party/proto/gogoproto/gogo.proto +2 -2
- package/third_party/proto/google/protobuf/any.proto +6 -3
- package/third_party/proto/ibc/core/channel/v1/channel.proto +27 -18
- package/third_party/proto/ibc/core/client/v1/client.proto +15 -52
- package/types/address_hooks.go +235 -0
- package/types/address_hooks_test.go +221 -0
- package/types/codec.go +23 -0
- package/types/ibc_packet.go +64 -0
- package/types/ibc_packet_test.go +117 -0
- package/types/kv_entry_helpers.go +3 -27
- package/types/kv_entry_helpers_test.go +2 -2
- package/types/legacy_address_encoder.go +58 -0
- package/vm/client.go +32 -7
- package/vm/proto_json.go +2 -2
- package/vm/proto_json_test.go +1 -1
- package/vm/server.go +2 -1
- package/x/swingset/abci.go +8 -3
- package/x/swingset/alias.go +0 -1
- package/x/swingset/client/cli/tx.go +16 -14
- package/x/swingset/config.go +1 -1
- package/x/swingset/genesis.go +2 -1
- package/x/swingset/handler.go +2 -1
- package/x/swingset/keeper/chunked_artifact_id_test.go +168 -0
- package/x/swingset/keeper/extension_snapshotter.go +14 -5
- package/x/swingset/keeper/extension_snapshotter_test.go +1 -1
- package/x/swingset/keeper/grpc_query.go +30 -0
- package/x/swingset/keeper/keeper.go +241 -32
- package/x/swingset/keeper/keeper_test.go +26 -17
- package/x/swingset/keeper/msg_server.go +255 -5
- package/x/swingset/keeper/msg_server_test.go +417 -0
- package/x/swingset/keeper/proposal.go +4 -0
- package/x/swingset/keeper/querier.go +2 -31
- package/x/swingset/keeper/swing_store_exports_handler.go +1 -1
- package/x/swingset/keeper/swing_store_exports_handler_test.go +1 -1
- package/x/swingset/keeper/test_utils.go +2 -2
- package/x/swingset/module.go +20 -35
- package/x/swingset/testing/queue.go +12 -1
- package/x/swingset/testutil/mocks.go +379 -0
- package/x/swingset/types/codec.go +10 -5
- package/x/swingset/types/default-params.go +39 -21
- package/x/swingset/types/expected_keepers.go +29 -4
- package/x/swingset/types/genesis.pb.go +2 -2
- package/x/swingset/types/list_tools.go +103 -0
- package/x/swingset/types/msgs.go +182 -57
- package/x/swingset/types/msgs.pb.go +1286 -97
- package/x/swingset/types/msgs_test.go +12 -22
- package/x/swingset/types/params.go +103 -13
- package/x/swingset/types/params_test.go +138 -45
- package/x/swingset/types/query.pb.go +530 -35
- package/x/swingset/types/query.pb.gw.go +101 -0
- package/x/swingset/types/swingset.pb.go +1296 -125
- package/x/vbank/genesis.go +13 -9
- package/x/vbank/handler.go +2 -1
- package/x/vbank/keeper/grpc_query.go +4 -1
- package/x/vbank/keeper/keeper.go +108 -23
- package/x/vbank/keeper/querier.go +5 -22
- package/x/vbank/keeper/rewards.go +10 -5
- package/x/vbank/module.go +47 -90
- package/x/vbank/types/expected_keepers.go +15 -10
- package/x/vbank/types/genesis.pb.go +2 -2
- package/x/vbank/types/key.go +3 -0
- package/x/vbank/types/msgs.pb.go +13 -10
- package/x/vbank/types/params.go +4 -3
- package/x/vbank/types/query.pb.go +4 -3
- package/x/vbank/types/vbank.pb.go +43 -42
- package/x/vbank/vbank.go +29 -11
- package/x/vbank/vbank_test.go +291 -153
- package/x/vibc/alias.go +0 -1
- package/x/vibc/handler.go +2 -1
- package/x/vibc/keeper/dynamic_router.go +176 -0
- package/x/vibc/keeper/dynamic_router_test.go +240 -0
- package/x/vibc/keeper/keeper.go +44 -85
- package/x/vibc/keeper/migrations.go +36 -0
- package/x/vibc/keeper/scope.go +114 -0
- package/x/vibc/keeper/triggers.go +12 -37
- package/x/vibc/module.go +12 -37
- package/x/vibc/types/codec.go +2 -1
- package/x/vibc/types/expected_keepers.go +13 -28
- package/x/vibc/types/ibc_module.go +39 -36
- package/x/vibc/types/msgs.go +89 -9
- package/x/vibc/types/msgs.pb.go +688 -31
- package/x/vibc/types/receiver.go +28 -22
- package/x/vlocalchain/handler.go +2 -1
- package/x/vlocalchain/keeper/keeper.go +20 -8
- package/x/vlocalchain/keeper/keeper_test.go +41 -10
- package/x/vlocalchain/types/expected_keepers.go +7 -4
- package/x/vlocalchain/types/vlocalchain.pb.go +1 -1
- package/x/vlocalchain/vlocalchain_test.go +41 -29
- package/x/vstorage/README.md +0 -8
- package/x/vstorage/alias.go +0 -1
- package/x/vstorage/client/cli/query.go +1 -1
- package/x/vstorage/genesis.go +10 -10
- package/x/vstorage/handler.go +2 -1
- package/x/vstorage/keeper/grpc_query.go +1 -1
- package/x/vstorage/keeper/keeper.go +108 -51
- package/x/vstorage/keeper/keeper_test.go +95 -75
- package/x/vstorage/keeper/querier.go +2 -33
- package/x/vstorage/keeper/querier_test.go +41 -6
- package/x/vstorage/module.go +27 -26
- package/x/vstorage/testing/queue.go +10 -2
- package/x/vstorage/types/genesis.pb.go +2 -2
- package/x/vstorage/types/path_keys.go +7 -8
- package/x/vstorage/types/query.pb.go +8 -5
- package/x/vstorage/types/vstorage.pb.go +2 -2
- package/x/vstorage/vstorage.go +10 -9
- package/x/vstorage/vstorage_test.go +25 -19
- package/x/vtransfer/genesis.go +1 -3
- package/x/vtransfer/handler.go +6 -3
- package/x/vtransfer/ibc_middleware.go +18 -16
- package/x/vtransfer/ibc_middleware_test.go +526 -172
- package/x/vtransfer/keeper/keeper.go +220 -73
- package/x/vtransfer/module.go +8 -24
- package/x/vtransfer/types/expected_keepers.go +15 -24
- package/x/vtransfer/types/genesis.pb.go +2 -2
- package/x/vtransfer/utils_test.go +121 -0
- package/daemon/cmd/genaccounts.go +0 -195
- package/daemon/cmd/testnet.go +0 -413
- package/e2e_test/Makefile +0 -29
- package/e2e_test/README.md +0 -100
- package/e2e_test/go.mod +0 -217
- package/e2e_test/go.sum +0 -1323
- package/e2e_test/ibc_conformance_test.go +0 -56
- package/e2e_test/pfm_test.go +0 -613
- package/e2e_test/util.go +0 -271
- package/x/vtransfer/types/baseaddr.go +0 -156
- 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 =
|
|
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
|
-
|
|
94
|
-
PATH="${BIN}:$$PATH" ./scripts/protocgen.sh
|
|
93
|
+
BUF_CMD = go tool buf
|
|
95
94
|
|
|
96
|
-
proto-
|
|
97
|
-
${BIN}/buf lint
|
|
95
|
+
proto-all: proto-format proto-lint proto-gen
|
|
98
96
|
|
|
99
|
-
proto-
|
|
100
|
-
|
|
97
|
+
proto-gen:
|
|
98
|
+
@echo "Generating Protobuf files"
|
|
99
|
+
sh ./scripts/protocgen.sh
|
|
101
100
|
|
|
102
|
-
|
|
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/
|
|
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
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
proto
|
|
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/
|
|
9
|
-
ibckeeper "github.com/cosmos/ibc-go/
|
|
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"
|
package/ante/inbound_test.go
CHANGED
|
@@ -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/
|
|
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
|
-
|
|
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) {
|
package/ante/vm_admission.go
CHANGED
|
@@ -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
|
)
|