Skip to content

Commit

Permalink
Merge branch 'main' into chore/new-network-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored Dec 1, 2024
2 parents c81813c + cd4e118 commit ef565e0
Show file tree
Hide file tree
Showing 31 changed files with 4,237 additions and 426 deletions.
20 changes: 16 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
- [#4131](https://github.com/ignite/cli/pull/4131) Support `bytes` as data type in the `scaffold` commands
- [#4300](https://github.com/ignite/cli/pull/4300) Only panics the module in the most top function level
- [#4327](https://github.com/ignite/cli/pull/4327) Use the TxConfig from simState instead create a new one
- [#4377](https://github.com/ignite/cli/pull/4377) Add multi node (validator) testnet.
- [#4326](https://github.com/ignite/cli/pull/4326) Add `buf.build` version to `ignite version` command
- [#4362](https://github.com/ignite/cli/pull/4362) Scaffold `Makefile`
- [#4289](https://github.com/ignite/cli/pull/4289) Cosmos SDK v0.52 support
- [#4289](https://github.com/ignite/cli/pull/4289), [#4423](https://github.com/ignite/cli/pull/4423) Cosmos SDK v0.52 support

### Changes

Expand All @@ -44,7 +42,6 @@
- [#4295](https://github.com/ignite/cli/pull/4295) Stop scaffolding `pulsar` files
- [#4317](https://github.com/ignite/cli/pull/4317) Remove xchisel dependency
- [#4361](https://github.com/ignite/cli/pull/4361) Remove unused `KeyPrefix` method
- [#4376](https://github.com/ignite/cli/pull/4376) Set different chain-id for in place testnet
- [#4384](https://github.com/ignite/cli/pull/4384) Compare genesis params into chain genesis tests

### Fixes
Expand All @@ -54,6 +51,21 @@
- [#4128](https://github.com/ignite/cli/pull/4128) Check for duplicate proto fields in config
- [#4402](https://github.com/ignite/cli/pull/4402) Fix gentx parser into the cosmosutil package

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

### Features

- [#4377](https://github.com/ignite/cli/pull/4377) Add multi node (validator) testnet
- [#4362](https://github.com/ignite/cli/pull/4362) Scaffold `Makefile`

### Changes

- [#4376](https://github.com/ignite/cli/pull/4376) Set different chain-id for in place testnet

### Bug Fixes

- [#4421](https://github.com/ignite/cli/pull/4422) Fix typo in simulation template

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

### Changes
Expand Down
2 changes: 0 additions & 2 deletions docs/docs/08-references/01-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2992,8 +2992,6 @@ This command does the following:
* Creates a directory with module's protocol buffer files in "proto/"
* Creates a directory with module's boilerplate Go code in "x/"
* Imports the newly created module by modifying "app/app.go"
* Creates a file in "testutil/keeper/" that contains logic to create a keeper
for testing purposes

This command will proceed with module scaffolding even if "app/app.go" doesn't
have the required default placeholders. If the placeholders are missing, you
Expand Down
30 changes: 29 additions & 1 deletion docs/versioned_docs/version-v28/02-guide/05-loan.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Notice the `--no-module` flag, in the next step we make sure the `bank` dependen

2. **Create a Module:**


Create a new "loan" module that is based on the standard Cosmos SDK `bank` module.

```bash
Expand Down Expand Up @@ -384,7 +385,33 @@ func (k msgServer) LiquidateLoan(goCtx context.Context, msg *types.MsgLiquidateL
}
```

Add the custom errors `ErrWrongLoanState` and `ErrDeadline`:
```go title="x/loan/keeper/msg_update_params.go"
package keeper

import (
"context"

errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"

"loan/x/loan/types"
)

func (k msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
if k.GetAuthority() != req.Authority {
return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority)
}

ctx := sdk.UnwrapSDKContext(goCtx)
if err := k.SetParams(ctx, req.Params); err != nil {
return nil, err
}

return &types.MsgUpdateParamsResponse{}, nil
}
```

Add the errors `ErrInvalidSigner`, `ErrWrongLoanState` and `ErrDeadline`:

```go title="x/loan/types/errors.go"
package types
Expand All @@ -394,6 +421,7 @@ import (
)

var (
ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
ErrWrongLoanState = sdkerrors.Register(ModuleName, 2, "wrong loan state")
ErrDeadline = sdkerrors.Register(ModuleName, 3, "deadline")
)
Expand Down
Loading

0 comments on commit ef565e0

Please sign in to comment.