@agoric/cosmos 0.34.2-dev-64cb69f.0 → 0.34.2-dev-7ffae88.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.
package/Makefile CHANGED
@@ -100,7 +100,7 @@ proto-check-breaking: proto-tools
100
100
 
101
101
  GOGO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/gogo/protobuf)
102
102
  # GOOGLE_API_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/googleapis/googleapis)/google/api
103
- IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v5)/proto/ibc/core
103
+ IBC_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/ibc-go/v6)/proto/ibc/core
104
104
  COSMOS_PROTO_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-proto)/proto/cosmos_proto
105
105
  COSMOS_SDK_PROTO_URL := file://$(shell go list -m -f '{{ .Dir }}' github.com/cosmos/cosmos-sdk)/proto/cosmos
106
106
 
package/ante/ante.go CHANGED
@@ -4,8 +4,8 @@ import (
4
4
  sdk "github.com/cosmos/cosmos-sdk/types"
5
5
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
6
6
  "github.com/cosmos/cosmos-sdk/x/auth/ante"
7
- ibcante "github.com/cosmos/ibc-go/v5/modules/core/ante"
8
- ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper"
7
+ ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
8
+ ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
9
9
  )
10
10
 
11
11
  // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
package/app/app.go CHANGED
@@ -14,7 +14,7 @@ import (
14
14
 
15
15
  "github.com/cosmos/cosmos-sdk/baseapp"
16
16
  "github.com/cosmos/cosmos-sdk/client"
17
- nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
17
+ nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
18
18
  "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
19
19
  "github.com/cosmos/cosmos-sdk/codec"
20
20
  "github.com/cosmos/cosmos-sdk/codec/types"
@@ -81,22 +81,22 @@ import (
81
81
  upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
82
82
  upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
83
83
  upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
84
- ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts"
85
-
86
- icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host"
87
- icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper"
88
- icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types"
89
- icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"
90
- "github.com/cosmos/ibc-go/v5/modules/apps/transfer"
91
- ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper"
92
- ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"
93
- ibc "github.com/cosmos/ibc-go/v5/modules/core"
94
- ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client"
95
- ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client"
96
- ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
97
- porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types"
98
- ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host"
99
- ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper"
84
+ ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts"
85
+
86
+ icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host"
87
+ icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper"
88
+ icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"
89
+ icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"
90
+ "github.com/cosmos/ibc-go/v6/modules/apps/transfer"
91
+ ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper"
92
+ ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"
93
+ ibc "github.com/cosmos/ibc-go/v6/modules/core"
94
+ ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client"
95
+ ibcclientclient "github.com/cosmos/ibc-go/v6/modules/core/02-client/client"
96
+ ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
97
+ porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
98
+ ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host"
99
+ ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
100
100
  "github.com/gorilla/mux"
101
101
  "github.com/rakyll/statik/fs"
102
102
  "github.com/spf13/cast"
@@ -606,10 +606,10 @@ func NewAgoricApp(
606
606
  app.BaseApp.DeliverTx,
607
607
  encodingConfig.TxConfig,
608
608
  ),
609
- // REVIEWER: using innerAk here instead of app.AccountKeeper
609
+ // NOTE: using innerAk here instead of app.AccountKeeper
610
610
  // since migration method doesn't know how to unwrap the account keeper.
611
611
  // Needs access to some struct fields.
612
- // Alternative is to add accessor methods to the AccountKeeper interface.
612
+ // (Alternative is to add accessor methods to the AccountKeeper interface.)
613
613
  auth.NewAppModule(appCodec, innerAk, nil),
614
614
  vesting.NewAppModule(app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
615
615
  bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
@@ -1151,8 +1151,8 @@ func (app *GaiaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo
1151
1151
  // Register new tendermint queries routes from grpc-gateway.
1152
1152
  tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
1153
1153
 
1154
- // Register node gRPC service for grpc-gateway.
1155
- nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
1154
+ // Register node gRPC service for grpc-gateway.
1155
+ nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
1156
1156
 
1157
1157
  // Register grpc-gateway routes for all modules.
1158
1158
  ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
package/git-revision.txt CHANGED
@@ -1 +1 @@
1
- 64cb69f
1
+ 7ffae88
package/go.mod CHANGED
@@ -6,7 +6,7 @@ require (
6
6
  cosmossdk.io/math v1.0.0-rc.0
7
7
  github.com/armon/go-metrics v0.4.1
8
8
  github.com/cosmos/cosmos-sdk v0.46.16
9
- github.com/cosmos/ibc-go/v5 v5.3.2
9
+ github.com/cosmos/ibc-go/v6 v6.2.1
10
10
  github.com/gogo/protobuf v1.3.3
11
11
  github.com/golang/protobuf v1.5.3
12
12
  github.com/gorilla/mux v1.8.0
package/go.sum CHANGED
@@ -378,8 +378,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4
378
378
  github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw=
379
379
  github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU=
380
380
  github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw=
381
- github.com/cosmos/ibc-go/v5 v5.3.2 h1:PPSs5hNAjYd8jVfHvXsqfnCYd/r9C7wpu+O2A4TOO5g=
382
- github.com/cosmos/ibc-go/v5 v5.3.2/go.mod h1:Q2W1rjtwR738fqFQhE66dZ0frsLlr+Wiezlwei0TMGo=
381
+ github.com/cosmos/ibc-go/v6 v6.2.1 h1:NiaDXTRhKwf3n9kELD4VRIe5zby1yk1jBvaz9tXTQ6k=
382
+ github.com/cosmos/ibc-go/v6 v6.2.1/go.mod h1:XLsARy4Y7+GtAqzMcxNdlQf6lx+ti1e8KcMGv5NIK7A=
383
383
  github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
384
384
  github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
385
385
  github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/cosmos",
3
- "version": "0.34.2-dev-64cb69f.0+64cb69f",
3
+ "version": "0.34.2-dev-7ffae88.0+7ffae88",
4
4
  "description": "Connect JS to the Cosmos blockchain SDK",
5
5
  "parsers": {
6
6
  "js": "mjs"
@@ -38,5 +38,5 @@
38
38
  "typeCoverage": {
39
39
  "atLeast": 0
40
40
  },
41
- "gitHead": "64cb69fccd4b6ababc0f089dd80b4955a70f1da3"
41
+ "gitHead": "7ffae88ae37df782d5ffe3cf92261a498b0f636c"
42
42
  }
@@ -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/v5/modules/core/04-channel/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v6/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/v5/modules/core/02-client/types";
5
+ option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types";
6
6
 
7
7
  import "gogoproto/gogo.proto";
8
8
  import "google/protobuf/any.proto";
package/x/vibc/ibc.go CHANGED
@@ -8,11 +8,11 @@ import (
8
8
  "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
9
9
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
10
10
  capability "github.com/cosmos/cosmos-sdk/x/capability/types"
11
- channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
12
- porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types"
13
- host "github.com/cosmos/ibc-go/v5/modules/core/24-host"
11
+ channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
12
+ porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
13
+ host "github.com/cosmos/ibc-go/v6/modules/core/24-host"
14
14
 
15
- "github.com/cosmos/ibc-go/v5/modules/core/exported"
15
+ "github.com/cosmos/ibc-go/v6/modules/core/exported"
16
16
 
17
17
  sdk "github.com/cosmos/cosmos-sdk/types"
18
18
  )
@@ -81,29 +81,28 @@ func (ch IBCModule) Receive(cctx context.Context, str string) (ret string, err e
81
81
 
82
82
  switch msg.Method {
83
83
  case "sendPacket":
84
- seq, ok := keeper.GetNextSequenceSend(
85
- ctx,
86
- msg.Packet.SourcePort,
87
- msg.Packet.SourceChannel,
88
- )
89
- if !ok {
90
- return "", fmt.Errorf("unknown sequence number")
91
- }
92
-
93
84
  timeoutTimestamp := msg.Packet.TimeoutTimestamp
94
85
  if msg.Packet.TimeoutHeight.IsZero() && msg.Packet.TimeoutTimestamp == 0 {
95
86
  // Use the relative timeout if no absolute timeout is specifiied.
96
87
  timeoutTimestamp = uint64(ctx.BlockTime().UnixNano()) + msg.RelativeTimeoutNs
97
88
  }
98
89
 
99
- packet := channeltypes.NewPacket(
100
- msg.Packet.Data, seq,
101
- msg.Packet.SourcePort, msg.Packet.SourceChannel,
102
- msg.Packet.DestinationPort, msg.Packet.DestinationChannel,
103
- msg.Packet.TimeoutHeight, timeoutTimestamp,
90
+ seq, err := keeper.SendPacket(
91
+ ctx,
92
+ msg.Packet.SourcePort,
93
+ msg.Packet.SourceChannel,
94
+ msg.Packet.TimeoutHeight,
95
+ timeoutTimestamp,
96
+ msg.Packet.Data,
104
97
  )
105
- err = keeper.SendPacket(ctx, packet)
106
98
  if err == nil {
99
+ // synthesize the sent packet
100
+ packet := channeltypes.NewPacket(
101
+ msg.Packet.Data, seq,
102
+ msg.Packet.SourcePort, msg.Packet.SourceChannel,
103
+ msg.Packet.DestinationPort, msg.Packet.DestinationChannel,
104
+ msg.Packet.TimeoutHeight, timeoutTimestamp,
105
+ )
107
106
  bytes, err := json.Marshal(&packet)
108
107
  if err == nil {
109
108
  ret = string(bytes)
@@ -10,10 +10,11 @@ import (
10
10
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
11
11
  capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
12
12
  capability "github.com/cosmos/cosmos-sdk/x/capability/types"
13
- channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
14
- porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types"
15
- host "github.com/cosmos/ibc-go/v5/modules/core/24-host"
16
- ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported"
13
+ clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
14
+ channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
15
+ porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
16
+ host "github.com/cosmos/ibc-go/v6/modules/core/24-host"
17
+ ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
17
18
 
18
19
  bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
19
20
 
@@ -58,12 +59,6 @@ func (k Keeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) s
58
59
  return k.bankKeeper.GetBalance(ctx, addr, denom)
59
60
  }
60
61
 
61
- // GetNextSequenceSend defines a wrapper function for the channel Keeper's function
62
- // in order to expose it to the vibc IBC handler.
63
- func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) {
64
- return k.channelKeeper.GetNextSequenceSend(ctx, portID, channelID)
65
- }
66
-
67
62
  // GetChannel defines a wrapper function for the channel Keeper's function
68
63
  // in order to expose it to the vibc IBC handler.
69
64
  func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channeltypes.Channel, bool) {
@@ -99,15 +94,20 @@ func (k Keeper) ChanOpenInit(ctx sdk.Context, order channeltypes.Order, connecti
99
94
 
100
95
  // SendPacket defines a wrapper function for the channel Keeper's function
101
96
  // in order to expose it to the vibc IBC handler.
102
- func (k Keeper) SendPacket(ctx sdk.Context, packet ibcexported.PacketI) error {
103
- portID := packet.GetSourcePort()
104
- channelID := packet.GetSourceChannel()
105
- capName := host.ChannelCapabilityPath(portID, channelID)
97
+ func (k Keeper) SendPacket(
98
+ ctx sdk.Context,
99
+ sourcePort string,
100
+ sourceChannel string,
101
+ timeoutHeight clienttypes.Height,
102
+ timeoutTimestamp uint64,
103
+ data []byte,
104
+ ) (uint64, error) {
105
+ capName := host.ChannelCapabilityPath(sourcePort, sourceChannel)
106
106
  chanCap, ok := k.GetCapability(ctx, capName)
107
107
  if !ok {
108
- return sdkerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
108
+ return 0, sdkerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
109
109
  }
110
- return k.channelKeeper.SendPacket(ctx, chanCap, packet)
110
+ return k.channelKeeper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data)
111
111
  }
112
112
 
113
113
  var _ ibcexported.Acknowledgement = (*rawAcknowledgement)(nil)
@@ -3,16 +3,24 @@ package types
3
3
  import (
4
4
  sdk "github.com/cosmos/cosmos-sdk/types"
5
5
  capability "github.com/cosmos/cosmos-sdk/x/capability/types"
6
- connection "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types"
7
- channel "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
8
- ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported"
6
+ clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"
7
+ connection "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"
8
+ channel "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
9
+ ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported"
9
10
  )
10
11
 
11
12
  // ChannelKeeper defines the expected IBC channel keeper
12
13
  type ChannelKeeper interface {
13
14
  GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channel.Channel, found bool)
14
- GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
15
- SendPacket(ctx sdk.Context, channelCap *capability.Capability, packet ibcexported.PacketI) error
15
+ SendPacket(
16
+ ctx sdk.Context,
17
+ channelCap *capability.Capability,
18
+ sourcePort string,
19
+ sourceChannel string,
20
+ timeoutHeight clienttypes.Height,
21
+ timeoutTimestamp uint64,
22
+ data []byte,
23
+ ) (uint64, error)
16
24
  WriteAcknowledgement(ctx sdk.Context, channelCap *capability.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error
17
25
  ChanOpenInit(ctx sdk.Context, order channel.Order, connectionHops []string, portID string,
18
26
  portCap *capability.Capability, counterparty channel.Counterparty, version string) (string, *capability.Capability, error)
@@ -4,7 +4,7 @@ import (
4
4
  sdk "github.com/cosmos/cosmos-sdk/types"
5
5
  sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
6
6
 
7
- chanTypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
7
+ chanTypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
8
8
  )
9
9
 
10
10
  const RouterKey = ModuleName // this was defined in your key.go file
@@ -7,7 +7,7 @@ import (
7
7
  context "context"
8
8
  fmt "fmt"
9
9
  github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
10
- types "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
10
+ types "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"
11
11
  _ "github.com/gogo/protobuf/gogoproto"
12
12
  grpc1 "github.com/gogo/protobuf/grpc"
13
13
  proto "github.com/gogo/protobuf/proto"