diff --git a/.github/workflows/test-cov.yml b/.github/workflows/test-cov.yml index 977c037325..f85dea5526 100644 --- a/.github/workflows/test-cov.yml +++ b/.github/workflows/test-cov.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "stable" + go-version: "1.23.5" - run: ./scripts/test-coverage diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index f811e00274..e592c539cf 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "stable" + go-version: "1.23.5" - name: Run Integration Tests env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 816c28cd74..29b55ef39d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,6 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: "stable" + go-version: "1.23.5" - run: ./scripts/test diff --git a/changelog.md b/changelog.md index 2c8fa3b7e4..8c3da5d82c 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ ## Unreleased +### Features + +- [#4513](https://github.com/ignite/cli/pull/4513) Allow to pass tx fees to faucet server + ### Changes - [#4439](https://github.com/ignite/cli/pull/4439) Simplify Ignite CLI dependencies by removing `moby` and `gorilla` dependencies. diff --git a/ignite/config/chain/base/config.go b/ignite/config/chain/base/config.go index 389ae72b9b..078884e9fe 100644 --- a/ignite/config/chain/base/config.go +++ b/ignite/config/chain/base/config.go @@ -120,6 +120,9 @@ type Faucet struct { // Port number for faucet server to listen at. Port uint `yaml:"port,omitempty"` + + // TxFee is the tx fee the faucet needs to pay for each transaction. + TxFee string `yaml:"tx_fee,omitempty"` } // Init overwrites sdk configurations with given values. diff --git a/ignite/services/chain/faucet.go b/ignite/services/chain/faucet.go index 9b521ab3fb..60e1727fab 100644 --- a/ignite/services/chain/faucet.go +++ b/ignite/services/chain/faucet.go @@ -107,6 +107,16 @@ func (c *Chain) Faucet(ctx context.Context) (cosmosfaucet.Faucet, error) { faucetOptions = append(faucetOptions, cosmosfaucet.Coin(parsedCoin.Amount, amountMax, parsedCoin.Denom)) } + // parse fees to pass to the faucet as fees. + if fee := conf.Faucet.TxFee; fee != "" { + parsedFee, err := sdk.ParseCoinNormalized(fee) + if err != nil { + return cosmosfaucet.Faucet{}, errors.Errorf("%w: %s", err, fee) + } + + faucetOptions = append(faucetOptions, cosmosfaucet.FeeAmount(parsedFee.Amount, parsedFee.Denom)) + } + if conf.Faucet.RateLimitWindow != "" { rateLimitWindow, err := time.ParseDuration(conf.Faucet.RateLimitWindow) if err != nil {