Skip to content

Commit

Permalink
feat: upgrade Cosmos SDK to v0.46.0 and IBC to v5 (#2677)
Browse files Browse the repository at this point in the history
* docs(changelog): add unreleased section

* feat!: Cosmos SDK v0.46.0 (#2675)

* update go mod

* update ibc path

* fix merge errors

* add temp client mock

* fix: deps (#2676)

* revert packages to old ibc-go

* fix remaining ibc paths

* fix template go.sum

* panic keyring errors

* add mockery generate instructions

* regenerate mocks

Co-authored-by: İlker G. Öztürk <[email protected]>

* fix merge

* update spn

* upgrade spn

* remove ibc-go fork

* template updates

* fix ibc and oracle templates

* update templates

* remaining tempalte updates

* fix template

* fix faucet test

* use beta ibc release

* update deps in template

* use ibcmodule idiom (#2692)

* Update ignite/templates/module/create/ibc/x/{{moduleName}}/module_ibc.go.plush

Co-authored-by: Lucas Btd <[email protected]>

* fix(`pkg/cosmosaccount`): register cryptocodec interfaces (#2702)

* register crypto codec interfaces

* improve error messages

* fix(template): removed unused methods and fix comments (#2708)

* fix(`cosmosclient`): use protobuf Any for TxMsgData  (#2714)

* fix comment

* use proto Any

* Update ignite/pkg/cosmosclient/cosmosclient.go

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* chore(0.46): upgrade spn version (#2730)

* feat(`app`): add interchain accounts for `v0.46.0` (#2703)

* update template for ica

* Update ignite/templates/app/stargate/app/app.go.plush

Co-authored-by: Lucas Btd <[email protected]>

Co-authored-by: Lucas Btd <[email protected]>

* fix: change relayer call to use secp256k1 private keys in call (#2729)

This chage uses secp256k1 private keys instead of ASCII armored ones as
gRPC arguments when calling the TS relayer.

* docs: update tutorials (#2737)

- Change `ibc-go` import to use "v5"
- Add package missing definition to code examples that can be copy/pasted
- Change file references to paths, for consistency with other tutorials
- Fix interchange tutorial to use ports that don't overlap
- Remove unused imports
- Fix documentation issues

* feat: upgrade `ts-relayer` dependencies (#2722)

* chore: upgrade `@confio/relayer` to the latest version 0.5.1
* chore: update `@cosmjs` to version 0.28.9
* chore: remove `@cosmjs/launchpad` from dependencies
* chore: add new dependency `@cosmjs/encoding` for relayer
* chore: add `sinon` dependency required to build the relayer
* fix: remove "gasLimit" option from relayer
* fix: update `@cosmjs` to version 0.28.11

* fix(cosmosclient): fix account prefix config (#2743)

* fix(cosmosclient): account prefix config not correct when broadcasting a tx from a newly created default account

* add issue

Co-authored-by: Alex Johnson <[email protected]>
Co-authored-by: Lucas Btd <[email protected]>
Co-authored-by: Denis Fadeev <[email protected]>
Co-authored-by: Jerónimo Albi <[email protected]>
  • Loading branch information
5 people authored Aug 17, 2022
1 parent 9a8814a commit 693bf79
Show file tree
Hide file tree
Showing 63 changed files with 2,966 additions and 2,428 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## Unreleased

### Changes

- Upgraded Cosmos SDK to v0.46.0 and IBC to v5 in CLI and scaffolding templates

### Features

- Add `--skip-proto` flag to `build`, `init` and `serve` commands to build the chain without building proto files


## [`v0.23.0`](https://github.com/ignite/cli/releases/tag/v0.23.0)

### Features
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guide/03-blog/02-connect-blockchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ go 1.18

require (
blog v0.0.0-00010101000000-000000000000
github.com/ignite/cli v0.22.2
github.com/ignite/cli v0.23.0
)

replace blog => ../blog
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
```

The `replace` directive uses the package from the local `blog` directory and is specified as a relative path.
The `replace` directive uses the package from the local `blog` directory and is specified as a relative path to the `blogclient` directory.

Cosmos SDK uses a custom version of the `protobuf` package, so use the `replace` directive to specify the correct dependency.

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guide/04-nameservice/02-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ These are the changes for each one of these files:
```go
syntax = "proto3";

package username.nameservice.nameservice;
package nameservice.nameservice;

// this line is used by starport scaffolding # proto/tx/import

option go_package = "github.com/username/nameservice/x/nameservice/types";
option go_package = "nameservice/x/nameservice/types";

// Msg defines the Msg service.
service Msg {
Expand Down
20 changes: 16 additions & 4 deletions docs/docs/guide/04-nameservice/04-keeper.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ In this section, define the keepers that are required by the nameservice module:

## Buy Name

To define the keeper for the buy name transaction, add this code to the `msg_server_buy_name.go` file:
To define the keeper for the buy name transaction, add this code to the `x/nameservice/keeper/msg_server_buy_name.go` file:

```go
// x/nameservice/keeper/msg_server_buy_name.go

package keeper

import (
"context"

Expand Down Expand Up @@ -91,10 +94,13 @@ This dependency automatically created an `expected_keepers.go` file with a `Bank

The `BuyName` transaction uses `SendCoins` and `SendCoinsFromAccountToModule` methods from the `bank` module.

Edit the `expected_keepers.go` file to add `SendCoins` and `SendCoinsFromAccountToModule` to be able to use it in the keeper methods of the `nameservice` module.
Edit the `x/nameservice/types/expected_keepers.go` file to add `SendCoins` and `SendCoinsFromAccountToModule` to be able to use it in the keeper methods of the `nameservice` module.

```go
// x/nameservice/types/expected_keepers.go

package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -107,10 +113,13 @@ type BankKeeper interface {

## Set Name

To define the keeper for the set name transaction, add this code to the `msg_server_set_name.go` file:
To define the keeper for the set name transaction, add this code to the `x/nameservice/keeper/msg_server_set_name.go` file:

```go
// x/nameservice/keeper/msg_server_set_name.go

package keeper

import (
"context"

Expand Down Expand Up @@ -148,10 +157,13 @@ func (k msgServer) SetName(goCtx context.Context, msg *types.MsgSetName) (*types

## Delete Name

To define the keeper for the delete name transaction, add this code to the `msg_server_delete_name.go` file:
To define the keeper for the delete name transaction, add this code to the `x/nameservice/keeper/msg_server_delete_name.go` file:

```go
// x/nameservice/keeper/msg_server_delete_name.go

package keeper

import (
"context"

Expand Down
9 changes: 9 additions & 0 deletions docs/docs/guide/05-scavenge/07-keeper.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Make the required changes in the `x/scavenge/keeper/msg_server_submit_scavenge.g
```go
// x/scavenge/keeper/msg_server_submit_scavenge.go

package keeper

import (
"context"

Expand Down Expand Up @@ -82,6 +84,9 @@ To use the `BankKeeper` interface in the keeper methods of the `scavenge` module

```go
// x/scavenge/types/expected_keepers.go

package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -101,6 +106,8 @@ Make the required changes in the `x/scavenge/keeper/msg_server_commit_solution.g
```go
// x/scavenge/keeper/msg_server_commit_solution.go

package keeper

import (
"context"

Expand Down Expand Up @@ -147,6 +154,8 @@ Make the required changes in the `x/scavenge/keeper/msg_server_reveal_solution.g
```go
// x/scavenge/keeper/msg_server_reveal_solution.go

package keeper

import (
"context"
"crypto/sha256"
Expand Down
6 changes: 4 additions & 2 deletions docs/docs/guide/05-scavenge/08-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ This method makes it easier to incorporate different modules for different reaso
```go
// x/scavenge/client/cli/tx_commit_solution.go

package cli

import (
"crypto/sha256"
"encoding/hex"
"strconv"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down Expand Up @@ -93,10 +94,11 @@ Note that this file makes use of the `sha256` library for hashing the plain text
```go
// x/scavenge/client/cli/tx_submit_scavenge.go

package cli

import (
"crypto/sha256"
"encoding/hex"
"strconv"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guide/07-ibc.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Use Ignite CLI to scaffold the blockchain app and the blog module.
To scaffold a new blockchain named `planet`:

```go
ignite scaffold chain github.com/username/planet --no-module
ignite scaffold chain planet --no-module
cd planet
```

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/guide/08-interchange/02-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ host:
rpc: ":26659"
p2p: ":26658"
prof: ":6061"
grpc: ":9091"
grpc: ":9092"
grpc-web: ":9093"
api: ":1318"
genesis:
chain_id: "venus"
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guide/08-interchange/05-mint-and-burn-voucher.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"strings"

sdk "github.com/cosmos/cosmos-sdk/types"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"

"interchange/x/dex/types"
)
Expand Down Expand Up @@ -140,7 +140,7 @@ package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"
ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types"

"interchange/x/dex/types"
)
Expand Down
4 changes: 3 additions & 1 deletion docs/docs/guide/08-interchange/06-creating-sell-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ The `SendSellOrder` command:
```go
// x/dex/keeper/msg_server_sell_order.go

package keeper

import (
"context"
"errors"

sdk "github.com/cosmos/cosmos-sdk/types"
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"

"interchange/x/dex/types"
)
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/guide/08-interchange/07-creating-buy-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ ignite generate proto-go --yes
```go
// x/dex/keeper/msg_server_buy_order.go

package keeper

import (
"context"
"errors"
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/guide/08-interchange/08-cancelling-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Move to the keeper directory and edit the `x/dex/keeper/msg_server_cancel_sell_o
```go
// x/dex/keeper/msg_server_cancel_sell_order.go

package keeper

import (
"context"
"errors"
Expand Down Expand Up @@ -112,6 +114,8 @@ To cancel a buy order, you have to get the ID of the specific buy order. Then yo
```go
// x/dex/keeper/msg_server_cancel_buy_order.go

package keeper

import (
"context"
"errors"
Expand Down
Loading

0 comments on commit 693bf79

Please sign in to comment.