Skip to content

Commit

Permalink
Merge branch 'main' into feat/improve-buf-rate
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani committed May 20, 2024
2 parents bb834c1 + c22073b commit cb7463c
Show file tree
Hide file tree
Showing 31 changed files with 284 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: golangci/golangci-lint-action@v6
if: env.GIT_DIFF
with:
version: v1.54.2
version: v1.58.0
install-mode: goinstall
args: --timeout 10m
github-token: ${{ secrets.github_token }}
Expand Down
19 changes: 15 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
run:
tests: false
skip-dirs:
- ignite/ui
# # timeout for analysis, e.g. 30s, 5m, default is 1m
# timeout: 5m

linters:
disable-all: true
Expand All @@ -17,6 +13,7 @@ linters:
- errchkjson
- errorlint
- exhaustive
- gci
- goconst
- gocritic
- godot
Expand Down Expand Up @@ -47,6 +44,16 @@ linters:
# - wsl

linters-settings:
gci:
custom-order: true
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
- prefix(github.com/cosmos/ibc-go
- prefix(github.com/cometbft/cometbft)
- prefix(github.com/ignite/cli)
forbidigo:
forbid:
- p: ^fmt\.Errorf$
Expand All @@ -61,5 +68,9 @@ linters-settings:
desc: Should be replaced by '"github.com/ignite/cli/ignite/pkg/errors"'

issues:
exclude-dirs:
- ignite/ui
# # timeout for analysis, e.g. 30s, 5m, default is 1m
# timeout: 5m
max-issues-per-linter: 0
max-same-issues: 0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## prep the base image.
#
FROM golang:1.21.5 as base
FROM golang as base

RUN apt update && \
apt-get install -y \
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

### Changes

- [#4159](https://github.com/ignite/cli/pull/4159) Enable gci linter
- [#4157](https://github.com/ignite/cli/pull/4157) Upgrade golang to 1.22
- [#4094](https://github.com/ignite/cli/pull/4094) Scaffolding a multi-index map using `ignite s map foo bar baz --index foobar,foobaz` is no longer supported. Use one index instead of use `collections.IndexedMap`.
- [#4058](https://github.com/ignite/cli/pull/4058) Simplify scaffolded modules by including `ValidateBasic()` logic in message handler.
- [#4058](https://github.com/ignite/cli/pull/4058) Use `address.Codec` instead of `AccAddressFromBech32`.
Expand Down
89 changes: 89 additions & 0 deletions docs/docs/08-references/03-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
sidebar_position: 4
description: Configuration file example.
title: Configuration file example
---

## Configuration file example

```yaml title="config.yml"
validation: (string) # Specifies the type of validation the blockchain uses (e.g., sovereign).
version: (uint) # Defines the configuration version number.
build: # Contains build configuration options.
main: (string) # Path to the main build file.
binary: (string) # Path to the binary file.
ldflags: (string list) # List of custom linker flags for building the binary.
proto: # Contains proto build configuration options.
path: (string) # Relative path where the application's proto files are located.
third_party_paths: (string list) # Relative paths to third-party proto files used by the application.
accounts: (list) # Lists the options for setting up Cosmos Accounts.
name: (string) # Local name associated with the Account's key pair.
coins: (string list) # List of token balances for the account.
mnemonic: (string) # Mnemonic phrase for the account.
address: (string) # Address of the account.
cointype: (string) # Coin type number for HD derivation (default is 118).
account_number: (string) # Account number for HD derivation (must be ≤ 2147483647).
address_index: (string) # Address index number for HD derivation (must be ≤ 2147483647).
faucet: # Configuration for the faucet.
name: (string) # Name of the faucet account.
coins: (string list) # Types and amounts of coins the faucet distributes.
coins_max: (string list) # Maximum amounts of coins that can be transferred to a single user.
rate_limit_window: (string) # Timeframe after which the limit will be refreshed.
host: (string) # Host address of the faucet server.
port: (uint) # Port number for the faucet server.
client: # Configures client code generation.
typescript: # Relative path where the application's Typescript files are located.
path: (string) # Relative path where the application's Typescript files are located.
composables: # Configures Vue 3 composables code generation.
path: (string) # Relative path where the application's composable files are located.
hooks: # Configures React hooks code generation.
path: (string) # Relative path where the application's hooks files are located.
openapi: # Configures OpenAPI spec generation for the API.
path: (string) # Relative path where the application's OpenAPI files are located.
genesis: (key/value) # Custom genesis block modifications. Follow the nesting of the genesis file here to access all the parameters.
minimal: (bool) # Indicates if the blockchain is minimal with the required Cosmos SDK modules.
validators: (list) # Contains information related to the list of validators and settings.
name: (string) # Name of the validator.
bonded: (string) # Amount staked by the validator.
app: (key/value) # Overwrites the appd's config/app.toml configurations.
config: (key/value) # Overwrites the appd's config/config.toml configurations.
client: (key/value) # Overwrites the appd's config/client.toml configurations.
home: (string) # Overwrites the default home directory used for the application.
gentx: # Overwrites the appd's config/gentx.toml configurations.
amount: (string) # Amount for the current Gentx.
moniker: (string) # Optional moniker for the validator.
home: (string) # Directory for configuration and data.
keyring-backend: (string) # Backend for the keyring.
chain-id: (string) # Network chain ID.
commission-max-change-rate: (string) # Maximum commission change rate percentage per day.
commission-max-rate: (string) # Maximum commission rate percentage (e.g., 0.01 = 1%).
commission-rate: (string) # Initial commission rate percentage (e.g., 0.01 = 1%).
details: (string) # Optional details about the validator.
security-contact: (string) # Optional security contact email for the validator.
website: (string) # Optional website for the validator.
account-number: (int) # Account number of the signing account (offline mode only).
broadcast-mode: (string) # Transaction broadcasting mode (sync|async|block) (default is 'sync').
dry-run: (bool) # Simulates the transaction without actually performing it, ignoring the --gas flag.
fee-account: (string) # Account that pays the transaction fees instead of the signer.
fee: (string) # Fee to pay with the transaction (e.g.: 10uatom).
from: (string) # Name or address of the private key used to sign the transaction.
gas: (string) # Gas limit per transaction; set to 'auto' to calculate sufficient gas automatically (default is 200000).
gas-adjustment: (string) # Factor to multiply against the estimated gas (default is 1).
gas-prices: (string) # Gas prices in decimal format to determine the transaction fee (e.g., 0.1uatom).
generate-only: (bool) # Creates an unsigned transaction and writes it to STDOUT.
identity: (string) # Identity signature (e.g., UPort or Keybase).
ip: (string) # Node's public IP address (default is '192.168.1.64').
keyring-dir: (string) # Directory for the client keyring; defaults to the 'home' directory if omitted.
ledger: (bool) # Uses a connected Ledger device if true.
min-self-delegation: (string) # Minimum self-delegation required for the validator.
node: (string) # <host>:<port> for the Tendermint RPC interface (default 'tcp://localhost:26657')
node-id: (string) # Node's NodeID
note: (string) # Adds a description to the transaction (formerly --memo).
offline: (bool) # Operates in offline mode, disallowing any online functionality.
output: (string) # Output format (text|json) (default 'json').
output-document: (string) # Writes the genesis transaction JSON document to the specified file instead of the default location.
pubkey: (string) # Protobuf JSON encoded public key of the validator.
sequence: (uint) # Sequence number of the signing account (offline mode only).
sign-mode: (string) # Chooses sign mode (direct|amino-json), an advanced feature.
timeout-height: (uint) # Sets a block timeout height to prevent the transaction from being committed past a certain height.
```
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/ignite/cli/v29

go 1.21.1
go 1.22

toolchain go1.21.3
toolchain go1.22.2

replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
Expand Down
3 changes: 2 additions & 1 deletion ignite/cmd/chain_faucet.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ignitecmd

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/cobra"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ignite/cli/v29/ignite/pkg/chaincmd"
"github.com/ignite/cli/v29/ignite/pkg/cliui"
"github.com/ignite/cli/v29/ignite/services/chain"
Expand Down
3 changes: 2 additions & 1 deletion ignite/cmd/chain_simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package ignitecmd
import (
"path/filepath"

"github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/spf13/cobra"

"github.com/cosmos/cosmos-sdk/types/simulation"

"github.com/ignite/cli/v29/ignite/services/chain"
)

Expand Down
3 changes: 2 additions & 1 deletion ignite/cmd/node_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package ignitecmd
import (
"fmt"

"github.com/cosmos/cosmos-sdk/types/query"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"

"github.com/cosmos/cosmos-sdk/types/query"

"github.com/ignite/cli/v29/ignite/pkg/errors"
)

Expand Down
3 changes: 2 additions & 1 deletion ignite/cmd/node_tx_bank_send.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package ignitecmd

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/spf13/cobra"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ignite/cli/v29/ignite/pkg/cliui"
)

Expand Down
Loading

0 comments on commit cb7463c

Please sign in to comment.