@agoric/cosmos 0.34.2-dev-9f6644d.0 → 0.34.2-dev-0467291.0

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 (109) hide show
  1. package/.clang-format +116 -0
  2. package/Makefile +38 -67
  3. package/ante/ante.go +2 -2
  4. package/ante/inbound_test.go +1 -1
  5. package/app/app.go +173 -142
  6. package/app/export.go +6 -6
  7. package/app/genesis.go +4 -0
  8. package/app/sim_test.go +299 -50
  9. package/app/upgrade.go +70 -3
  10. package/cmd/agd/agvm.go +1 -1
  11. package/cmd/agd/main.go +1 -1
  12. package/cmd/libdaemon/main.go +1 -1
  13. package/daemon/cmd/root.go +25 -34
  14. package/daemon/cmd/root_test.go +5 -4
  15. package/daemon/cmd/testnet.go +221 -95
  16. package/daemon/main.go +1 -0
  17. package/git-revision.txt +1 -1
  18. package/go.mod +93 -58
  19. package/go.sum +148 -95
  20. package/package.json +2 -2
  21. package/proto/agoric/swingset/genesis.proto +7 -11
  22. package/proto/agoric/swingset/msgs.proto +56 -75
  23. package/proto/agoric/swingset/query.proto +7 -10
  24. package/proto/agoric/swingset/swingset.proto +79 -108
  25. package/proto/agoric/vbank/genesis.proto +5 -5
  26. package/proto/agoric/vbank/msgs.proto +1 -2
  27. package/proto/agoric/vbank/vbank.proto +42 -52
  28. package/proto/agoric/vibc/msgs.proto +8 -11
  29. package/proto/agoric/vstorage/genesis.proto +6 -9
  30. package/proto/agoric/vstorage/query.proto +19 -48
  31. package/proto/agoric/vstorage/vstorage.proto +4 -10
  32. package/proto/agoric/vtransfer/genesis.proto +7 -7
  33. package/proto/buf.gen.gogo.yaml +8 -0
  34. package/proto/buf.gen.pulsar.yaml +17 -0
  35. package/proto/buf.gen.swagger.yaml +5 -0
  36. package/proto/buf.yaml +10 -0
  37. package/scripts/protocgen.sh +14 -21
  38. package/third_party/proto/amino/amino.proto +79 -0
  39. package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -2
  40. package/third_party/proto/cosmos/ics23/v1/proofs.proto +243 -0
  41. package/third_party/proto/cosmos/msg/v1/msg.proto +30 -0
  42. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +17 -5
  43. package/third_party/proto/cosmos_proto/cosmos.proto +16 -1
  44. package/third_party/proto/gogoproto/gogo.proto +2 -2
  45. package/third_party/proto/google/protobuf/any.proto +6 -3
  46. package/third_party/proto/ibc/core/channel/v1/channel.proto +1 -1
  47. package/third_party/proto/ibc/core/client/v1/client.proto +4 -2
  48. package/types/address_hooks.go +2 -2
  49. package/types/address_hooks_test.go +3 -3
  50. package/types/ibc_packet.go +3 -3
  51. package/types/ibc_packet_test.go +3 -3
  52. package/vm/proto_json.go +2 -2
  53. package/x/swingset/abci.go +1 -1
  54. package/x/swingset/alias.go +0 -1
  55. package/x/swingset/config.go +1 -1
  56. package/x/swingset/keeper/extension_snapshotter.go +1 -1
  57. package/x/swingset/keeper/extension_snapshotter_test.go +1 -1
  58. package/x/swingset/keeper/keeper.go +1 -1
  59. package/x/swingset/keeper/keeper_test.go +1 -1
  60. package/x/swingset/keeper/querier.go +1 -30
  61. package/x/swingset/keeper/swing_store_exports_handler.go +1 -1
  62. package/x/swingset/keeper/swing_store_exports_handler_test.go +1 -1
  63. package/x/swingset/module.go +1 -14
  64. package/x/swingset/types/genesis.pb.go +2 -2
  65. package/x/swingset/types/msgs.pb.go +4 -3
  66. package/x/swingset/types/msgs_test.go +1 -1
  67. package/x/swingset/types/query.pb.go +4 -3
  68. package/x/swingset/types/swingset.pb.go +2 -2
  69. package/x/vbank/genesis.go +1 -1
  70. package/x/vbank/keeper/querier.go +1 -21
  71. package/x/vbank/module.go +1 -16
  72. package/x/vbank/types/genesis.pb.go +2 -2
  73. package/x/vbank/types/msgs.pb.go +3 -2
  74. package/x/vbank/types/query.pb.go +4 -3
  75. package/x/vbank/types/vbank.pb.go +2 -2
  76. package/x/vbank/vbank_test.go +16 -16
  77. package/x/vibc/keeper/keeper.go +8 -5
  78. package/x/vibc/keeper/migrations.go +36 -0
  79. package/x/vibc/keeper/triggers.go +1 -1
  80. package/x/vibc/module.go +9 -17
  81. package/x/vibc/types/expected_keepers.go +5 -10
  82. package/x/vibc/types/ibc_module.go +4 -4
  83. package/x/vibc/types/msgs.go +1 -1
  84. package/x/vibc/types/msgs.pb.go +5 -4
  85. package/x/vibc/types/receiver.go +2 -2
  86. package/x/vlocalchain/keeper/keeper.go +3 -3
  87. package/x/vlocalchain/types/vlocalchain.pb.go +1 -1
  88. package/x/vlocalchain/vlocalchain_test.go +6 -6
  89. package/x/vstorage/alias.go +0 -1
  90. package/x/vstorage/client/cli/query.go +1 -1
  91. package/x/vstorage/genesis.go +1 -1
  92. package/x/vstorage/keeper/keeper.go +6 -5
  93. package/x/vstorage/keeper/keeper_test.go +24 -24
  94. package/x/vstorage/keeper/querier.go +1 -32
  95. package/x/vstorage/keeper/querier_test.go +41 -6
  96. package/x/vstorage/module.go +1 -14
  97. package/x/vstorage/types/genesis.pb.go +2 -2
  98. package/x/vstorage/types/query.pb.go +8 -5
  99. package/x/vstorage/types/vstorage.pb.go +2 -2
  100. package/x/vstorage/vstorage_test.go +3 -3
  101. package/x/vtransfer/genesis.go +1 -1
  102. package/x/vtransfer/ibc_middleware.go +4 -4
  103. package/x/vtransfer/ibc_middleware_test.go +10 -11
  104. package/x/vtransfer/keeper/keeper.go +5 -5
  105. package/x/vtransfer/module.go +1 -14
  106. package/x/vtransfer/types/expected_keepers.go +2 -18
  107. package/x/vtransfer/types/genesis.pb.go +2 -2
  108. package/x/vtransfer/utils_test.go +15 -15
  109. package/daemon/cmd/genaccounts.go +0 -195
@@ -0,0 +1,30 @@
1
+ syntax = "proto3";
2
+
3
+ package cosmos.msg.v1;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ // TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated.
8
+ // We need this right now because gogoproto codegen needs to import the extension.
9
+ option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice";
10
+
11
+ extend google.protobuf.ServiceOptions {
12
+ // service indicates that the service is a Msg service and that requests
13
+ // must be transported via blockchain transactions rather than gRPC.
14
+ // Tooling can use this annotation to distinguish between Msg services and
15
+ // other types of services via reflection.
16
+ bool service = 11110000;
17
+ }
18
+
19
+ extend google.protobuf.MessageOptions {
20
+ // signer must be used in cosmos messages in order
21
+ // to signal to external clients which fields in a
22
+ // given cosmos message must be filled with signer
23
+ // information (address).
24
+ // The field must be the protobuf name of the message
25
+ // field extended with this MessageOption.
26
+ // The field must either be of string kind, or of message
27
+ // kind in case the signer information is contained within
28
+ // a message inside the cosmos message.
29
+ repeated string signer = 11110000;
30
+ }
@@ -5,12 +5,14 @@ import "google/protobuf/any.proto";
5
5
  import "gogoproto/gogo.proto";
6
6
  import "google/protobuf/timestamp.proto";
7
7
  import "cosmos_proto/cosmos.proto";
8
+ import "amino/amino.proto";
8
9
 
9
10
  option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
10
11
  option (gogoproto.goproto_getters_all) = false;
11
12
 
12
13
  // Plan specifies information about a planned upgrade and when it should occur.
13
14
  message Plan {
15
+ option (amino.name) = "cosmos-sdk/Plan";
14
16
  option (gogoproto.equal) = true;
15
17
  option (gogoproto.goproto_stringer) = false;
16
18
 
@@ -26,10 +28,10 @@ message Plan {
26
28
  // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
27
29
  // has been removed from the SDK.
28
30
  // If this field is not empty, an error will be thrown.
29
- google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false];
31
+ google.protobuf.Timestamp time = 2
32
+ [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true];
30
33
 
31
34
  // The height at which the upgrade must be performed.
32
- // Only used if Time is not set.
33
35
  int64 height = 3;
34
36
 
35
37
  // Any application specific upgrade info to be included on-chain
@@ -49,12 +51,18 @@ message Plan {
49
51
  message SoftwareUpgradeProposal {
50
52
  option deprecated = true;
51
53
  option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
54
+ option (amino.name) = "cosmos-sdk/SoftwareUpgradeProposal";
52
55
  option (gogoproto.equal) = true;
53
56
  option (gogoproto.goproto_stringer) = false;
54
57
 
55
- string title = 1;
58
+ // title of the proposal
59
+ string title = 1;
60
+
61
+ // description of the proposal
56
62
  string description = 2;
57
- Plan plan = 3 [(gogoproto.nullable) = false];
63
+
64
+ // plan of the proposal
65
+ Plan plan = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
58
66
  }
59
67
 
60
68
  // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
@@ -64,10 +72,14 @@ message SoftwareUpgradeProposal {
64
72
  message CancelSoftwareUpgradeProposal {
65
73
  option deprecated = true;
66
74
  option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
75
+ option (amino.name) = "cosmos-sdk/CancelSoftwareUpgradeProposal";
67
76
  option (gogoproto.equal) = true;
68
77
  option (gogoproto.goproto_stringer) = false;
69
78
 
70
- string title = 1;
79
+ // title of the proposal
80
+ string title = 1;
81
+
82
+ // description of the proposal
71
83
  string description = 2;
72
84
  }
73
85
 
@@ -5,6 +5,12 @@ import "google/protobuf/descriptor.proto";
5
5
 
6
6
  option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto";
7
7
 
8
+ extend google.protobuf.MethodOptions {
9
+
10
+ // method_added_in is used to indicate from which version the method was added.
11
+ string method_added_in = 93001;
12
+ }
13
+
8
14
  extend google.protobuf.MessageOptions {
9
15
 
10
16
  // implements_interface is used to indicate the type name of the interface
@@ -13,6 +19,9 @@ extend google.protobuf.MessageOptions {
13
19
  // interfaces. Interfaces should be declared using a declare_interface
14
20
  // file option.
15
21
  repeated string implements_interface = 93001;
22
+
23
+ // message_added_in is used to indicate from which version the message was added.
24
+ string message_added_in = 93002;
16
25
  }
17
26
 
18
27
  extend google.protobuf.FieldOptions {
@@ -27,6 +36,9 @@ extend google.protobuf.FieldOptions {
27
36
  // generators may choose to use this information to map this field to a
28
37
  // language-specific type representing the scalar.
29
38
  string scalar = 93002;
39
+
40
+ // field_added_in is used to indicate from which version the field was added.
41
+ string field_added_in = 93003;
30
42
  }
31
43
 
32
44
  extend google.protobuf.FileOptions {
@@ -46,6 +58,9 @@ extend google.protobuf.FileOptions {
46
58
  // expected that the declaration will be found in a protobuf file named
47
59
  // a/b/scalars.proto in the file descriptor set.
48
60
  repeated ScalarDescriptor declare_scalar = 793022;
61
+
62
+ // file_added_in is used to indicate from which the version the file was added.
63
+ string file_added_in = 793023;
49
64
  }
50
65
 
51
66
  // InterfaceDescriptor describes an interface type to be used with
@@ -94,4 +109,4 @@ enum ScalarType {
94
109
  SCALAR_TYPE_UNSPECIFIED = 0;
95
110
  SCALAR_TYPE_STRING = 1;
96
111
  SCALAR_TYPE_BYTES = 2;
97
- }
112
+ }
@@ -1,7 +1,7 @@
1
1
  // Protocol Buffers for Go with Gadgets
2
2
  //
3
3
  // Copyright (c) 2013, The GoGo Authors. All rights reserved.
4
- // http://github.com/gogo/protobuf
4
+ // http://github.com/cosmos/gogoproto
5
5
  //
6
6
  // Redistribution and use in source and binary forms, with or without
7
7
  // modification, are permitted provided that the following conditions are
@@ -33,7 +33,7 @@ import "google/protobuf/descriptor.proto";
33
33
 
34
34
  option java_package = "com.google.protobuf";
35
35
  option java_outer_classname = "GoGoProtos";
36
- option go_package = "github.com/gogo/protobuf/gogoproto";
36
+ option go_package = "github.com/cosmos/gogoproto/gogoproto";
37
37
 
38
38
  extend google.protobuf.EnumOptions {
39
39
  optional bool goproto_enum_prefix = 62001;
@@ -33,7 +33,7 @@ syntax = "proto3";
33
33
  package google.protobuf;
34
34
 
35
35
  option csharp_namespace = "Google.Protobuf.WellKnownTypes";
36
- option go_package = "types";
36
+ option go_package = "google.golang.org/protobuf/types/known/anypb";
37
37
  option java_package = "com.google.protobuf";
38
38
  option java_outer_classname = "AnyProto";
39
39
  option java_multiple_files = true;
@@ -77,10 +77,13 @@ option objc_class_prefix = "GPB";
77
77
  // Example 4: Pack and unpack a message in Go
78
78
  //
79
79
  // foo := &pb.Foo{...}
80
- // any, err := ptypes.MarshalAny(foo)
80
+ // any, err := anypb.New(foo)
81
+ // if err != nil {
82
+ // ...
83
+ // }
81
84
  // ...
82
85
  // foo := &pb.Foo{}
83
- // if err := ptypes.UnmarshalAny(any, foo); err != nil {
86
+ // if err := any.UnmarshalTo(foo); err != nil {
84
87
  // ...
85
88
  // }
86
89
  //
@@ -2,7 +2,7 @@ syntax = "proto3";
2
2
 
3
3
  package ibc.core.channel.v1;
4
4
 
5
- option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types";
6
6
 
7
7
  import "gogoproto/gogo.proto";
8
8
  import "ibc/core/client/v1/client.proto";
@@ -2,7 +2,7 @@ syntax = "proto3";
2
2
 
3
3
  package ibc.core.client.v1;
4
4
 
5
- option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v7/modules/core/02-client/types";
6
6
 
7
7
  import "gogoproto/gogo.proto";
8
8
  import "google/protobuf/any.proto";
@@ -98,6 +98,8 @@ message Height {
98
98
 
99
99
  // Params defines the set of IBC light client parameters.
100
100
  message Params {
101
- // allowed_clients defines the list of allowed client state types.
101
+ // allowed_clients defines the list of allowed client state types which can be created
102
+ // and interacted with. If a client type is removed from the allowed clients list, usage
103
+ // of this client will be disabled until it is added again to the list.
102
104
  repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""];
103
105
  }
@@ -7,8 +7,8 @@ import (
7
7
  "github.com/cosmos/cosmos-sdk/codec"
8
8
  "github.com/cosmos/cosmos-sdk/types/bech32"
9
9
 
10
- transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
11
- ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
10
+ transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
11
+ ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
12
12
  )
13
13
 
14
14
  type AddressRole string
@@ -8,9 +8,9 @@ import (
8
8
  codec "github.com/cosmos/cosmos-sdk/codec"
9
9
  cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
10
10
 
11
- transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
12
- clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
13
- channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
11
+ transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
12
+ clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
13
+ channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
14
14
 
15
15
  agtypes "github.com/Agoric/agoric-sdk/golang/cosmos/types"
16
16
  )
@@ -3,9 +3,9 @@ package types
3
3
  import (
4
4
  "encoding/json"
5
5
 
6
- clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
7
- channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
8
- "github.com/cosmos/ibc-go/v6/modules/core/exported"
6
+ clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
7
+ channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
8
+ "github.com/cosmos/ibc-go/v7/modules/core/exported"
9
9
  )
10
10
 
11
11
  var _ json.Marshaler = IBCPacket{}
@@ -11,9 +11,9 @@ import (
11
11
  "github.com/stretchr/testify/assert"
12
12
  "github.com/stretchr/testify/require"
13
13
 
14
- clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
15
- channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
16
- ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
14
+ clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
15
+ channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
16
+ ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
17
17
  )
18
18
 
19
19
  func CreateTestChannelPacket() channeltypes.Packet {
package/vm/proto_json.go CHANGED
@@ -3,8 +3,8 @@ package vm
3
3
  import (
4
4
  "encoding/json"
5
5
 
6
- "github.com/gogo/protobuf/jsonpb"
7
- "github.com/gogo/protobuf/proto"
6
+ "github.com/cosmos/gogoproto/jsonpb"
7
+ "github.com/cosmos/gogoproto/proto"
8
8
  )
9
9
 
10
10
  // We need jsonpb for its access to the global registry.
@@ -6,9 +6,9 @@ import (
6
6
  "fmt"
7
7
  "time"
8
8
 
9
+ abci "github.com/cometbft/cometbft/abci/types"
9
10
  "github.com/cosmos/cosmos-sdk/telemetry"
10
11
  sdk "github.com/cosmos/cosmos-sdk/types"
11
- abci "github.com/tendermint/tendermint/abci/types"
12
12
 
13
13
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
14
14
  "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"
@@ -13,7 +13,6 @@ const (
13
13
 
14
14
  var (
15
15
  NewKeeper = keeper.NewKeeper
16
- NewQuerier = keeper.NewQuerier
17
16
  NewMsgDeliverInbound = types.NewMsgDeliverInbound
18
17
  NewMsgProvision = types.NewMsgProvision
19
18
  NewMailbox = types.NewMailbox
@@ -7,9 +7,9 @@ import (
7
7
  "github.com/spf13/viper"
8
8
 
9
9
  "github.com/cosmos/cosmos-sdk/client/flags"
10
- pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types"
11
10
  serverconfig "github.com/cosmos/cosmos-sdk/server/config"
12
11
  servertypes "github.com/cosmos/cosmos-sdk/server/types"
12
+ pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types"
13
13
 
14
14
  "github.com/Agoric/agoric-sdk/golang/cosmos/util"
15
15
  )
@@ -9,9 +9,9 @@ import (
9
9
 
10
10
  agoric "github.com/Agoric/agoric-sdk/golang/cosmos/types"
11
11
  "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"
12
+ "github.com/cometbft/cometbft/libs/log"
12
13
  "github.com/cosmos/cosmos-sdk/baseapp"
13
14
  snapshots "github.com/cosmos/cosmos-sdk/snapshots/types"
14
- "github.com/tendermint/tendermint/libs/log"
15
15
  )
16
16
 
17
17
  // This module implements a Cosmos ExtensionSnapshotter to capture and restore
@@ -4,7 +4,7 @@ import (
4
4
  "io"
5
5
  "testing"
6
6
 
7
- "github.com/tendermint/tendermint/libs/log"
7
+ "github.com/cometbft/cometbft/libs/log"
8
8
  )
9
9
 
10
10
  func newTestExtensionSnapshotter() *ExtensionSnapshotter {
@@ -9,7 +9,7 @@ import (
9
9
 
10
10
  sdkmath "cosmossdk.io/math"
11
11
 
12
- "github.com/tendermint/tendermint/libs/log"
12
+ "github.com/cometbft/cometbft/libs/log"
13
13
 
14
14
  "github.com/cosmos/cosmos-sdk/baseapp"
15
15
  "github.com/cosmos/cosmos-sdk/codec"
@@ -11,7 +11,7 @@ import (
11
11
  storetypes "github.com/cosmos/cosmos-sdk/store/types"
12
12
  sdk "github.com/cosmos/cosmos-sdk/types"
13
13
 
14
- dbm "github.com/tendermint/tm-db"
14
+ dbm "github.com/cometbft/cometbft-db"
15
15
  )
16
16
 
17
17
  func mkcoin(denom string) func(amt int64) sdk.Coin {
@@ -2,9 +2,8 @@ package keeper
2
2
 
3
3
  import (
4
4
  "fmt"
5
- "strings"
6
5
 
7
- abci "github.com/tendermint/tendermint/abci/types"
6
+ abci "github.com/cometbft/cometbft/abci/types"
8
7
 
9
8
  sdkioerrors "cosmossdk.io/errors"
10
9
  "github.com/cosmos/cosmos-sdk/codec"
@@ -22,34 +21,6 @@ const (
22
21
  LegacyQueryKeys = "keys"
23
22
  )
24
23
 
25
- // NewQuerier is the module level router for state queries
26
- func NewQuerier(keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
27
- return func(ctx sdk.Context, path []string, req abci.RequestQuery) (res []byte, err error) {
28
- var queryType string
29
- if len(path) > 0 {
30
- queryType = path[0]
31
- }
32
- switch queryType {
33
- case QueryEgress:
34
- if len(path) < 2 || path[1] == "" {
35
- return nil, sdkioerrors.Wrap(sdkerrors.ErrInvalidRequest, "missing egress address")
36
- }
37
- return queryEgress(ctx, path[1], req, keeper, legacyQuerierCdc)
38
- case QueryMailbox:
39
- if len(path) < 2 || path[1] == "" {
40
- return nil, sdkioerrors.Wrap(sdkerrors.ErrInvalidRequest, "missing mailbox peer")
41
- }
42
- return queryMailbox(ctx, path[1], req, keeper, legacyQuerierCdc)
43
- case LegacyQueryStorage:
44
- return legacyQueryStorage(ctx, strings.Join(path[1:], "/"), req, keeper, legacyQuerierCdc)
45
- case LegacyQueryKeys:
46
- return legacyQueryKeys(ctx, strings.Join(path[1:], "/"), req, keeper, legacyQuerierCdc)
47
- default:
48
- return nil, sdkioerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown swingset query path")
49
- }
50
- }
51
- }
52
-
53
24
  // nolint: unparam
54
25
  func queryEgress(ctx sdk.Context, bech32 string, req abci.RequestQuery, keeper Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) {
55
26
  acc, err := sdk.AccAddressFromBech32(bech32)
@@ -13,7 +13,7 @@ import (
13
13
  agoric "github.com/Agoric/agoric-sdk/golang/cosmos/types"
14
14
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
15
15
  "github.com/Agoric/agoric-sdk/golang/cosmos/x/swingset/types"
16
- "github.com/tendermint/tendermint/libs/log"
16
+ "github.com/cometbft/cometbft/libs/log"
17
17
  )
18
18
 
19
19
  // This module abstracts the generation and handling of swing-store exports,
@@ -6,7 +6,7 @@ import (
6
6
  "testing"
7
7
 
8
8
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
9
- "github.com/tendermint/tendermint/libs/log"
9
+ "github.com/cometbft/cometbft/libs/log"
10
10
  )
11
11
 
12
12
  func newTestSwingStoreExportsHandler() *SwingStoreExportsHandler {
@@ -16,8 +16,8 @@ import (
16
16
  cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
17
17
  "github.com/cosmos/cosmos-sdk/types/module"
18
18
 
19
+ abci "github.com/cometbft/cometbft/abci/types"
19
20
  sdk "github.com/cosmos/cosmos-sdk/types"
20
- abci "github.com/tendermint/tendermint/abci/types"
21
21
  )
22
22
 
23
23
  // type check to ensure the interface is properly implemented
@@ -115,19 +115,6 @@ func (am *AppModule) SetSwingStoreExportDir(dir string) {
115
115
 
116
116
  func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {}
117
117
 
118
- func (am AppModule) Route() sdk.Route {
119
- return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper))
120
- }
121
-
122
- func (am AppModule) QuerierRoute() string {
123
- return ModuleName
124
- }
125
-
126
- // LegacyQuerierHandler returns the sdk.Querier for deployment module
127
- func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
128
- return keeper.NewQuerier(am.keeper, legacyQuerierCdc)
129
- }
130
-
131
118
  func (am AppModule) RegisterServices(cfg module.Configurator) {
132
119
  types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper))
133
120
  querier := keeper.Querier{Keeper: am.keeper}
@@ -5,8 +5,8 @@ package types
5
5
 
6
6
  import (
7
7
  fmt "fmt"
8
- _ "github.com/gogo/protobuf/gogoproto"
9
- proto "github.com/gogo/protobuf/proto"
8
+ _ "github.com/cosmos/gogoproto/gogoproto"
9
+ proto "github.com/cosmos/gogoproto/proto"
10
10
  io "io"
11
11
  math "math"
12
12
  math_bits "math/bits"
@@ -7,9 +7,9 @@ import (
7
7
  context "context"
8
8
  fmt "fmt"
9
9
  github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
10
- _ "github.com/gogo/protobuf/gogoproto"
11
- grpc1 "github.com/gogo/protobuf/grpc"
12
- proto "github.com/gogo/protobuf/proto"
10
+ _ "github.com/cosmos/gogoproto/gogoproto"
11
+ grpc1 "github.com/cosmos/gogoproto/grpc"
12
+ proto "github.com/cosmos/gogoproto/proto"
13
13
  grpc "google.golang.org/grpc"
14
14
  codes "google.golang.org/grpc/codes"
15
15
  status "google.golang.org/grpc/status"
@@ -811,6 +811,7 @@ func _Msg_Provision_Handler(srv interface{}, ctx context.Context, dec func(inter
811
811
  return interceptor(ctx, in, info, handler)
812
812
  }
813
813
 
814
+ var Msg_serviceDesc = _Msg_serviceDesc
814
815
  var _Msg_serviceDesc = grpc.ServiceDesc{
815
816
  ServiceName: "agoric.swingset.Msg",
816
817
  HandlerType: (*MsgServer)(nil),
@@ -7,7 +7,7 @@ import (
7
7
 
8
8
  "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
9
9
  sdk "github.com/cosmos/cosmos-sdk/types"
10
- "github.com/gogo/protobuf/proto"
10
+ "github.com/cosmos/gogoproto/proto"
11
11
  )
12
12
 
13
13
  var (
@@ -7,9 +7,9 @@ import (
7
7
  context "context"
8
8
  fmt "fmt"
9
9
  github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
10
- _ "github.com/gogo/protobuf/gogoproto"
11
- grpc1 "github.com/gogo/protobuf/grpc"
12
- proto "github.com/gogo/protobuf/proto"
10
+ _ "github.com/cosmos/gogoproto/gogoproto"
11
+ grpc1 "github.com/cosmos/gogoproto/grpc"
12
+ proto "github.com/cosmos/gogoproto/proto"
13
13
  _ "google.golang.org/genproto/googleapis/api/annotations"
14
14
  grpc "google.golang.org/grpc"
15
15
  codes "google.golang.org/grpc/codes"
@@ -476,6 +476,7 @@ func _Query_Mailbox_Handler(srv interface{}, ctx context.Context, dec func(inter
476
476
  return interceptor(ctx, in, info, handler)
477
477
  }
478
478
 
479
+ var Query_serviceDesc = _Query_serviceDesc
479
480
  var _Query_serviceDesc = grpc.ServiceDesc{
480
481
  ServiceName: "agoric.swingset.Query",
481
482
  HandlerType: (*QueryServer)(nil),
@@ -7,8 +7,8 @@ import (
7
7
  fmt "fmt"
8
8
  github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
9
9
  types "github.com/cosmos/cosmos-sdk/types"
10
- _ "github.com/gogo/protobuf/gogoproto"
11
- proto "github.com/gogo/protobuf/proto"
10
+ _ "github.com/cosmos/gogoproto/gogoproto"
11
+ proto "github.com/cosmos/gogoproto/proto"
12
12
  io "io"
13
13
  math "math"
14
14
  math_bits "math/bits"
@@ -4,8 +4,8 @@ import (
4
4
  "fmt"
5
5
 
6
6
  "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"
7
+ abci "github.com/cometbft/cometbft/abci/types"
7
8
  sdk "github.com/cosmos/cosmos-sdk/types"
8
- abci "github.com/tendermint/tendermint/abci/types"
9
9
  )
10
10
 
11
11
  func NewGenesisState() *types.GenesisState {
@@ -1,34 +1,14 @@
1
1
  package keeper
2
2
 
3
3
  import (
4
- abci "github.com/tendermint/tendermint/abci/types"
4
+ abci "github.com/cometbft/cometbft/abci/types"
5
5
 
6
6
  sdkioerrors "cosmossdk.io/errors"
7
- "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"
8
7
  "github.com/cosmos/cosmos-sdk/codec"
9
8
  sdk "github.com/cosmos/cosmos-sdk/types"
10
9
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
11
10
  )
12
11
 
13
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
14
- return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) {
15
- var queryType string
16
- if len(path) > 0 {
17
- queryType = path[0]
18
- }
19
- switch queryType {
20
- case types.QueryParams:
21
- return queryParams(ctx, path[1:], req, k, legacyQuerierCdc)
22
-
23
- case types.QueryState:
24
- return queryState(ctx, path[1:], req, k, legacyQuerierCdc)
25
-
26
- default:
27
- return nil, sdkioerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown vbank query path")
28
- }
29
- }
30
- }
31
-
32
12
  func queryParams(ctx sdk.Context, _ []string, _ abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) {
33
13
  params := k.GetParams(ctx)
34
14
 
package/x/vbank/module.go CHANGED
@@ -17,9 +17,9 @@ import (
17
17
  cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
18
18
  "github.com/cosmos/cosmos-sdk/types/module"
19
19
 
20
+ abci "github.com/cometbft/cometbft/abci/types"
20
21
  sdk "github.com/cosmos/cosmos-sdk/types"
21
22
  banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
22
- abci "github.com/tendermint/tendermint/abci/types"
23
23
  )
24
24
 
25
25
  // type check to ensure the interface is properly implemented
@@ -184,21 +184,6 @@ func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
184
184
  // TODO
185
185
  }
186
186
 
187
- // Route implements the AppModule interface
188
- func (am AppModule) Route() sdk.Route {
189
- return sdk.NewRoute(RouterKey, NewHandler(am.keeper))
190
- }
191
-
192
- // QuerierRoute implements the AppModule interface
193
- func (AppModule) QuerierRoute() string {
194
- return ModuleName
195
- }
196
-
197
- // LegacyQuerierHandler implements the AppModule interface
198
- func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier {
199
- return keeper.NewQuerier(am.keeper, legacyQuerierCdc)
200
- }
201
-
202
187
  // RegisterServices registers module services.
203
188
  func (am AppModule) RegisterServices(cfg module.Configurator) {
204
189
  tx := &types.UnimplementedMsgServer{}
@@ -5,8 +5,8 @@ package types
5
5
 
6
6
  import (
7
7
  fmt "fmt"
8
- _ "github.com/gogo/protobuf/gogoproto"
9
- proto "github.com/gogo/protobuf/proto"
8
+ _ "github.com/cosmos/gogoproto/gogoproto"
9
+ proto "github.com/cosmos/gogoproto/proto"
10
10
  io "io"
11
11
  math "math"
12
12
  math_bits "math/bits"
@@ -6,8 +6,8 @@ package types
6
6
  import (
7
7
  context "context"
8
8
  fmt "fmt"
9
- grpc1 "github.com/gogo/protobuf/grpc"
10
- proto "github.com/gogo/protobuf/proto"
9
+ grpc1 "github.com/cosmos/gogoproto/grpc"
10
+ proto "github.com/cosmos/gogoproto/proto"
11
11
  grpc "google.golang.org/grpc"
12
12
  math "math"
13
13
  )
@@ -72,6 +72,7 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
72
72
  s.RegisterService(&_Msg_serviceDesc, srv)
73
73
  }
74
74
 
75
+ var Msg_serviceDesc = _Msg_serviceDesc
75
76
  var _Msg_serviceDesc = grpc.ServiceDesc{
76
77
  ServiceName: "agoric.vbank.Msg",
77
78
  HandlerType: (*MsgServer)(nil),