Skip to content

Commit

Permalink
test: global fee e2e tests, bypass fee e2e (#1594)
Browse files Browse the repository at this point in the history
* add: globalfee e2e test

* add: genesis.go for global fee

* Update tests/e2e/e2e_test.go

Co-authored-by: lg <8335464+glnro@users.noreply.github.com>

* remove redundancy

* add globalfee decorator to bypass min fee decorator

* fix: fee.go

* add: tests for min_gas_price, globalfee and bypass fee

* fix: lint

* feat: check fee not paid in the denom of global fee

* fix ledger nano s dependency (#1575)

thanks @julienrbrt ! Will make a new issue to follow up on cosmos/ledger-go

* feat: custom globalfee checks

* fix:global fee TestValidateGenesis

* fix: lint, add more testcases

* remove automatically sort globalfee denom

* remove original globalfee antehandler, add more testcases

* fix: build test

* Update ante/fee.go

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* add comments, change IsAnyGTEIncludingZero to consider empty sets

* refactor: fee_test.go

* refactor: add setTestGasLimit func

* fumpt (#1581)

* fumpt

* remove gitpod

* Fix error handling and fix linting (#1507)

* Fix error handling and fix linting.

* Update lint.yml

* Update .golangci.yml

* keep actions same as main

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* gofumpt -w -l for consistency with cosmos-sdk (#1512)

* Update lint.yml (#1547)

* Update lint.yml

opening in place of #1509 to make gaia consistent with cosmos sdk

* Update .golangci.yml

* Update .github/workflows/lint.yml

Co-authored-by: Marko <marbar3778@yahoo.com>

* Fix typo (#1583)

* Bump actions/cache from 3.0.4 to 3.0.5 (#1585)

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3.0.4...v3.0.5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update Docs: Overview page (#1586)

Made changes to the Wallet section:
 - Put Crypto.com in alphabetical order
 - Added Citadel.One

* Bump actions/stale from 5.0.0 to 5.1.0 (#1589)

Bumps [actions/stale](https://github.com/actions/stale) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix formatting in join-testnet.md (#1588)

The code block endquote was misplaced.

* Update CODEOWNERS (#1591)

Remove tokamak-git from codeowners

* Update markdown links/config (#1590)

* Update mlc_config.json

Http header check to (hopefully) remove the 403 error for some url's

* Update mlc_config.json

Header check does not work, reverting.

* Update overview.md

Disabled check for token.im

* Update join-mainnet.md

Disabled check for cosmos.stake.id

* Bump github.com/golangci/golangci-lint from 1.46.0 to 1.47.0 (#1593)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.46.0...v1.47.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add e2e test: gov propose globalfee

* add e2e test: empty globalfee

* Bump github.com/golangci/golangci-lint from 1.47.0 to 1.47.1 (#1597)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.0 to 1.47.1.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.47.0...v1.47.1)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump docker/build-push-action from 2.5.0 to 3.1.0 (#1598)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 3.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@ad44023...1cb9d22)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump terser from 4.8.0 to 4.8.1 in /docs (#1599)

Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Correcting the email address in Code of Conduct (#1600)

contact@interchain.berlin is no longer active/monitored. Changing to hello@interchain.io

* fix: globalfee antehandler to exclude the cases of zero paidfee

* increase validator set to 175 (#1603)

* add: test cases for globalfee contains zero coins

* Bump JamesIves/github-pages-deploy-action from 4.3.2 to 4.4.0 (#1606)

Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.3.2 to 4.4.0.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](JamesIves/github-pages-deploy-action@v4.3.2...v4.4.0)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/golangci/golangci-lint from 1.47.1 to 1.47.2 (#1605)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.1 to 1.47.2.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.47.1...v1.47.2)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add: tests for global fee

* add: all tests

* tests: add e2e tests for bypass_min_fee

* Update release-sims.yml (#1613)

* Update sims.yml (#1612)

* Update sims.yml

* Update sims.yml

* Update sims.yml

* Update sims.yml

* Update sims.yml

* Update sims.yml

* Bump actions/stale from 5.1.0 to 5.1.1 (#1617)

Bumps [actions/stale](https://github.com/actions/stale) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/v5.1.1/CHANGELOG.md)
- [Commits](actions/stale@v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Morelint (#1611)

* Update lint.yml

* Update lint.yml

* Update lint.yml

* Update lint.yml

* linting

* linting complete

* Cosmos Hub with ibc-go v5 and cosmos-sdk v0.46.0 (#1616)

* Cosmos Hub with ibc-go v5 and cosmos-sdk v0.46.0

* e2e cleanup

* fix e2e

* note the many golangci-lint warnings

* complete linting

* remove linters replaced by gofumpt

* tidy

* math

* tidy

* Update lint.yml

* use go workspace for e2e

* use go workspace

* remove unused but not deadcode

* pause

* fix e2e

* update figment.io for link CI

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* remove now-unnecessary replace statement in go.mod (#1626)

* remove now-unnecessary replace statement in go.mod

* name the decorator

* fixup

* Bump github.com/gravity-devs/liquidity/v2 from 2.0.0-rc3 to 2.0.0 (#1637)

[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [github.com/gravity-devs/liquidity/v2](https://github.com/gravity-devs/liquidity) from 2.0.0-rc3 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/gravity-devs/liquidity/releases">github.com/gravity-devs/liquidity/v2's releases</a>.</em></p>
<blockquote>
<h3>v2.0.0 contain state-breaking changes <a href="https://github-redirect.dependabot.com/Gravity-Devs/liquidity/pull/15">Gravity-Devs/liquidity#15</a></h3>
<ul>
<li>bump cosmos-sdk to v0.46.0-rc2</li>
<li>remove swap functionality (circuit breaker enabled and deprecated on the cosmos-hub)</li>
<li>bump package name to liquididty/v2</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/Gravity-Devs/liquidity/compare/v1.5.0...v2.0.0">https://github.com/Gravity-Devs/liquidity/compare/v1.5.0...v2.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Gravity-Devs/liquidity/blob/master/CHANGELOG.md">github.com/gravity-devs/liquidity/v2's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/Gravity-Devs/liquidity/releases/tag/v2.0.0">v2.0.0</a> - 2022.07.27</h2>
<h3>State Machine Breaking</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/Gravity-Devs/liquidity/pull/15">#15</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.0-rc1">v0.46.0-rc1</a></li>
<li><a href="https://github-redirect.dependabot.com/Gravity-Devs/liquidity/pull/15">#15</a> Remove swap functionality (circuit breaker enabled on cosmos-hub, deprecated)</li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.5.0">v1.5.0</a> - 2022.02.23</h2>
<h3>State Machine Breaking</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/466">#466</a> fix: exclude circuit breaking logic for MsgWithdrawWithinBatch</li>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/473">#473</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1">v0.45.1</a></li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.6">v1.4.6</a> - 2022.02.23</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/475">#475</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.6">v0.44.6</a></li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.5">v1.4.5</a> - 2022.01.30</h2>
<ul>
<li>Unusable release</li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.4">v1.4.4</a> - 2022.01.26</h2>
<ul>
<li>Unusable release</li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.2">v1.4.2</a> - 2021.11.11</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/461">#461</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.3">v0.44.3</a></li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.1">v1.4.1</a> - 2021.10.25</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/455">#455</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.2">v0.44.2</a></li>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/446">#446</a> Fix: Pool Coin Decimal Truncation During Deposit</li>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/448">#448</a> Fix: add overflow checking and test codes for cover edge cases</li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.4.0">v1.4.0</a> - 2021.09.07</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/440">#440</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.0">v0.44.0</a></li>
</ul>
<h2><a href="https://github.com/tendermint/liquidity/releases/tag/v1.3.0">v1.3.0</a> - 2021-08-31</h2>
<h3>State Machine Breaking</h3>
<ul>
<li>
<p><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/433">#433</a> (sdk) Bump SDK version to <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0">v0.43.0</a>.</p>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/436">#436</a> Validation <code>MsgSwapWithinBatch</code> and <code>OfferCoinFee</code> ceiling</p>
<ul>
<li>When calculating <code>OfferCoinFee</code>, the decimal points are rounded up.
<ul>
<li>before (v1.2.x):  <code>MsgSwapWithinBatch.OfferCoinFee</code> should be <code>OfferCoin</code> * <code>params.SwapFeeRate/2</code> with Truncate or 0</li>
<li>after (v1.3.x):  <code>MsgSwapWithinBatch.OfferCoinFee</code> should be <code>OfferCoin</code> * <code>params.SwapFeeRate/2</code> with Ceil</li>
</ul>
</li>
<li>Fix reserveOfferCoinFee residual Issue due to decimal error</li>
</ul>
</li>
<li>
<p><a href="https://github-redirect.dependabot.com/tendermint/liquidity/pull/438">#438</a> Fix PoolBatch index, beginHeight issues and genesis logic</p>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/Gravity-Devs/liquidity/commit/05cd43d414ae0d3f0ad523e38b88b196bbf8ecfd"><code>05cd43d</code></a> bump gogo/proto down to a version that exists upstream</li>
<li><a href="https://github.com/Gravity-Devs/liquidity/commit/ba7b225e20d79dfeb8daa59db791ae6367ff7ef3"><code>ba7b225</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gravity-devs/liquidity/issues/15">#15</a> from Gravity-Devs/v2-rho-prepare</li>
<li>See full diff in <a href="https://github.com/gravity-devs/liquidity/compare/v2.0.0-rc3...v2.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gravity-devs/liquidity/v2&package-manager=go_modules&previous-version=2.0.0-rc3&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

* Bump github.com/golangci/golangci-lint from 1.47.2 to 1.47.3 (#1636)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.2 to 1.47.3.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](golangci/golangci-lint@v1.47.2...v1.47.3)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump cosmossdk.io/math from 1.0.0-beta.2 to 1.0.0-beta.3 (#1635)

Bumps [cosmossdk.io/math](https://github.com/cosmos/cosmos-sdk) from 1.0.0-beta.2 to 1.0.0-beta.3.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@math/v1.0.0-beta.2...math/v1.0.0-beta.3)

---
updated-dependencies:
- dependency-name: cosmossdk.io/math
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update cosmos/ledger-go to release version (#1634)

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* work on the workspace (#1641)

thank you @faddat !

* closes #1621 (#1628)

* closes #1621

* run from root

* change to nonroot

* Create .gitpod.yml (#1601)

thanks @faddat !

* Revert "closes #1621 (#1628)" (#1646)

This reverts commit e911a62.

* add back ibc e2e tests (#1625)

* add back ibc e2e tests

* added teardown but fund_community_pool fails now

* fixed calculation

* add sleep

* ensure correct endpoint

* try skipping cancel upgrade

* add back upgrade but make height further in future

* skip  cancel upgrade test

* docs: add testing building artifacts in release (#1647)

* Bump github.com/golangci/golangci-lint from 1.47.3 to 1.48.0 (#1649)

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.3 to 1.48.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.48.0</h2>
<h2>Changelog</h2>
<ul>
<li>368c41cd build(deps): bump github.com/daixiang0/gci from 0.5.0 to 0.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3035">#3035</a>)</li>
<li>2d8fea81 build(deps): bump github.com/daixiang0/gci from 0.6.0 to 0.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3058">#3058</a>)</li>
<li>aeb5860c build(deps): bump github.com/kisielk/errcheck from 1.6.1 to 1.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3059">#3059</a>)</li>
<li>0559b922 build(deps): bump revgrep to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3054">#3054</a>)</li>
<li>6313fa9a contextcheck: disable linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3050">#3050</a>)</li>
<li>0ba1388a feat: add usestdlibvars (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3016">#3016</a>)</li>
<li>1557692e feat: go1.19 support  (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3037">#3037</a>)</li>
<li>15cba447 gci: add missing <code>custom-order</code> setting (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3052">#3052</a>)</li>
<li>9a1b9492 ifshort: deprecate linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3034">#3034</a>)</li>
<li>f8f8f9a6 nolint: drop allow-leading-space option and add &quot;nolint:all&quot; (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3002">#3002</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.48.0</h3>
<ol>
<li>new linters
<ul>
<li><code>usestdlibvars</code>:<a href="https://github.com/sashamelentyev/usestdlibvars">https://github.com/sashamelentyev/usestdlibvars</a></li>
</ul>
</li>
<li>updated linters
<ul>
<li><code>contextcheck</code>: disable linter</li>
<li><code>errcheck</code>: from 1.6.1 to 1.6.2</li>
<li><code>gci</code>: add missing <code>custom-order</code> setting</li>
<li><code>gci</code>: from 0.5.0 to 0.6.0</li>
<li><code>ifshort</code>: deprecate linter</li>
<li><code>nolint</code>: drop allow-leading-space option and add &quot;nolint:all&quot;</li>
<li><code>revgrep</code>: bump to HEAD</li>
</ul>
</li>
<li>documentation
<ul>
<li>remove outdated info on source install</li>
</ul>
</li>
<li>misc
<ul>
<li>go1.19 support</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/golangci/golangci-lint/commit/2d8fea819e651d384cf47784a5fb9c789cf5bd59"><code>2d8fea8</code></a> build(deps): bump github.com/daixiang0/gci from 0.6.0 to 0.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3058">#3058</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/aeb5860ca84aa6115f8c5b469cec174921350c29"><code>aeb5860</code></a> build(deps): bump github.com/kisielk/errcheck from 1.6.1 to 1.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3059">#3059</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/0559b9220bcc3b726041135fca2fd7f26c763a5c"><code>0559b92</code></a> build(deps): bump revgrep to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3054">#3054</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/3ffde13a17071e61d3ab75a6ddd158cf81046d95"><code>3ffde13</code></a> dev: remove stable from actions/setup-go (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3055">#3055</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/1557692e59c0db1b6eaa771a5887f9434158683d"><code>1557692</code></a> feat: go1.19 support  (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3037">#3037</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/6313fa9a673cbbc339501f077154115254e28509"><code>6313fa9</code></a> contextcheck: disable linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3050">#3050</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/0ba1388a4194525dfea1e8b91211c49de9d260f2"><code>0ba1388</code></a> feat: add usestdlibvars (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3016">#3016</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/15cba447fd0e577f1f60170bb188b5c0eca04dab"><code>15cba44</code></a> gci: add missing <code>custom-order</code> setting (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3052">#3052</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/452544a2e7ae9a8fff6422298b0384818de77807"><code>452544a</code></a> build(deps): bump gatsby from 4.15.2 to 4.19.2 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3046">#3046</a>)</li>
<li><a href="https://github.com/golangci/golangci-lint/commit/f9dfb687aa3a7ea9789219e9eb4842ece424b739"><code>f9dfb68</code></a> build(deps): bump gatsby-transformer-yaml from 4.13.0 to 4.19.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/3045">#3045</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.47.3...v1.48.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.47.3&new-version=1.48.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

* bump packet-forward-midddleware (#1651)

* bump packet-forward-middleware

* import packet-forward-middleware

* fix: lint

* fix: gofumpt

* formatting

* fix: formatting

* Bump actions/cache from 3.0.5 to 3.0.6 (#1650)

* Bump actions/cache from 3.0.5 to 3.0.6

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3.0.5...v3.0.6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Removed spacing for nolint directives

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>

* bump: update codeql version to v2 + Remove Python check (#1654)

* update-codeql-version-to-v2

* Remove Python from code quality check

* Bump docker/build-push-action from 3.1.0 to 3.1.1 (#1656)

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@1cb9d22...c84f382)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix merge

* fix unit tests

* fix: lint

* fix: e2e fee denoms swap

* fix: e2e

* fix: e2e reset global fee

* fix: dead link

* PR review updates

Co-authored-by: lg <8335464+glnro@users.noreply.github.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Rootul Patel <rootulp@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Syed C <101879995+syed-Interchain@users.noreply.github.com>
Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com>
Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com>
Co-authored-by: Barrie Byron <barrie.byron@tendermint.com>
Co-authored-by: Gjermund Bjaanes <gjermund@empower.eco>
  • Loading branch information
12 people authored Aug 10, 2022
1 parent 7d264ee commit d5bd5e8
Show file tree
Hide file tree
Showing 18 changed files with 643 additions and 139 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go', 'python' ]
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

Expand All @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@1cb9d22b932e4832bb29793b7777ec860fc1cde0
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
with:
context: .
push: true
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,10 @@ start-localnet-ci:
./build/gaiad keys add val --home ~/.gaiad-liveness
./build/gaiad add-genesis-account val 10000000000000000000000000stake --home ~/.gaiad-liveness --keyring-backend test
./build/gaiad gentx val 1000000000stake --home ~/.gaiad-liveness --chain-id liveness
./build/gaiad collect-gentxs --home ~/.gaiad-liveness
./build/gaiad collect-gentxs --home ~/.gaiad-liveness
sed -i'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' ~/.gaiad-liveness/config/app.toml
./build/gaiad start --home ~/.gaiad-liveness --x-crisis-skip-assert-invariants


.PHONY: start-localnet-ci

###############################################################################
Expand Down
1 change: 1 addition & 0 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(opts.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
// todo check
ibcante.NewRedundantRelayDecorator(opts.IBCkeeper),
}

Expand Down
3 changes: 1 addition & 2 deletions ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func (mfd BypassMinFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
allowedToBypassMinFee := containsOnlyBypassMinFeeMsgs && doesNotExceedMaxGasUsage

var allFees sdk.Coins

requiredFees := getMinGasPrice(ctx, feeTx)

if ctx.IsCheckTx() && !simulate && !allowedToBypassMinFee {
Expand Down Expand Up @@ -92,7 +91,7 @@ func (mfd BypassMinFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
}
// bypass with fee, fee denom must in requiredGlobalFees
if !DenomsSubsetOfIncludingZero(feeCoins, requiredGlobalFees) {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "wrong fees denom; got: %s required: %s", feeCoins, requiredGlobalFees)
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "fees denom is wrong; got: %s required: %s", feeCoins, requiredGlobalFees)
}
}

Expand Down
13 changes: 7 additions & 6 deletions ante/fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ func (s *IntegrationTestSuite) TestGlobalFeeMinimumGasFeeAnteHandler() {
"empty min_gas_price, nonempty global fee, fee higher/equal than global_fee": {
minGasPrice: minGasPriceEmpty,
globalFeeParams: globalfeeParamsHigh,
gasPrice: sdk.NewCoins(sdk.NewCoin("uatom", highFeeAmt)),
gasLimit: testdata.NewTestGasLimit(),
txMsg: testdata.NewTestMsg(addr1),
txCheck: true,
expErr: false,
// sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String())
gasPrice: sdk.NewCoins(sdk.NewCoin("uatom", highFeeAmt)),
gasLimit: testdata.NewTestGasLimit(),
txMsg: testdata.NewTestMsg(addr1),
txCheck: true,
expErr: false,
},
"empty min_gas_price, nonempty global fee, fee lower than global_fee": {
minGasPrice: minGasPriceEmpty,
Expand Down Expand Up @@ -404,7 +405,7 @@ func (s *IntegrationTestSuite) TestGlobalFeeMinimumGasFeeAnteHandler() {
txCheck: true,
expErr: false,
},
"globalfee contains zero coin, fee contains lower fee of zero coins's denom, globalfee also contains nonzero coin ,fee contains higher fee of nonzero coins's denom": {
"globalfee contains zero coin, fee contains lower fee of zero coins's denom, globalfee also contains nonzero coin,fee contains higher fee of nonzero coins's denom, ": {
minGasPrice: minGasPrice0,
globalFeeParams: globalfeeParamsContain0,
gasPrice: sdk.NewCoins(
Expand Down
2 changes: 0 additions & 2 deletions ante/fee_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,11 @@ func (s *feeUtilsTestSuite) TestIsAnyGTEIncludingZero() {
zeroCoinNewDenom1 := sdk.NewCoin("newphoton", sdk.NewInt(10))
zeroCoinNewDenom2 := sdk.NewCoin("newstake", sdk.NewInt(20))
zeroCoinNewDenom3 := sdk.NewCoin("newquark", sdk.NewInt(30))
// coinNewDenom1Zero := sdk.NewCoin("newphoton", sdk.ZeroInt())
// coins must be valid !!! and sorted!!!
coinsAllZero := sdk.Coins{zeroCoin1, zeroCoin2, zeroCoin3}.Sort()
coinsAllNewDenomAllZero := sdk.Coins{zeroCoinNewDenom1, zeroCoinNewDenom2, zeroCoinNewDenom3}.Sort()
coinsAllZeroShort := sdk.Coins{zeroCoin1, zeroCoin2}.Sort()
coinsContainZero := sdk.Coins{zeroCoin1, zeroCoin2, coin3}.Sort()
// coinsContainZeroNewDenoms := sdk.Coins{zeroCoin1, zeroCoin2, coinNewDenom1Zero}.Sort()

coins := sdk.Coins{coin1, coin2, coin3}.Sort()
coinsHighHigh := sdk.Coins{coin1High, coin2High}
Expand Down
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/cosmos/gaia/v8/x/globalfee"
ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts"
icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host"
Expand Down Expand Up @@ -117,6 +116,7 @@ import (

gaiaante "github.com/cosmos/gaia/v8/ante"
gaiaappparams "github.com/cosmos/gaia/v8/app/params"
"github.com/cosmos/gaia/v8/x/globalfee"

// unnamed import of statik for swagger UI support
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand Down Expand Up @@ -543,6 +543,7 @@ func NewGaiaApp(
liquidity.NewAppModule(appCodec, app.LiquidityKeeper, app.AccountKeeper, app.BankKeeper, app.DistrKeeper),
transferModule,
icaModule,
routerModule,
globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)),
routerModule,
)
Expand Down
3 changes: 2 additions & 1 deletion contrib/generate_release_note/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// go:build exclude
//go:build exclude
// +build exclude

package main

Expand Down
2 changes: 1 addition & 1 deletion docs/interchain-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ To distinguish fees in a Partial Validator Set (Opt-In), the distribution module

## IBC & Cross Chain Validation

There are a number of IBC application layer modules and packets that need to be developed to fully realize the IBC component of Interchain Security. This work has begun with a spec draft from Informal Systems that is visible at [@ibc/cross-chain-validation](https://github.com/cosmos/ibc/tree/marius/ccv/spec/app/ics-028-cross-chain-validation). Instead of diving into the details of what they are and exactly how they work this section will be reserved for high level responsibilities of these mechanisms.
There are a number of IBC application layer modules and packets that need to be developed to fully realize the IBC component of Interchain Security. This work has begun with a spec draft from Informal Systems that is visible at [@ibc/cross-chain-validation](https://github.com/cosmos/ibc/tree/main/spec/app/ics-028-cross-chain-validation). Instead of diving into the details of what they are and exactly how they work this section will be reserved for high level responsibilities of these mechanisms.

There are three types of operations within Cross Chain Validation which must be present for Interchain Security to take place:

Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ require (
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.20
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
google.golang.org/grpc v1.48.0
)

require (
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/grpc-gateway v1.16.0
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
google.golang.org/grpc v1.48.0
)

require (
Expand Down
72 changes: 0 additions & 72 deletions go.work.sum
Original file line number Diff line number Diff line change
@@ -1,75 +1,3 @@
bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM=
cosmossdk.io/api v0.1.0-alpha8/go.mod h1:gIs3NW5OSNK5wKqxF8JHnGTL82QMsXpwGeKmu2i5xFA=
cosmossdk.io/errors v1.0.0-beta.6/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
cosmossdk.io/math v1.0.0-beta.2/go.mod h1:u/MXvf8wbUbCsAEyQSSYXXMsczAsFX48e2D6JI86T4o=
github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU=
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/adlio/schema v1.3.0/go.mod h1:51QzxkpeFs6lRY11kPye26IaFPOV+HqEj01t5aXXKfs=
github.com/armon/go-metrics v0.3.11/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=
github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ=
github.com/containerd/continuity v0.2.1/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cosmos/cosmos-sdk v0.46.0-rc1.0.20220616181117-53d0cc919f1a/go.mod h1:Ch4QFoljBcroLele1DOgAe6Enxh9aQZ4efu68jGrJ9E=
github.com/cosmos/cosmos-sdk/db v1.0.0-beta.1/go.mod h1:JUMM2MxF9wuwzRWZJjb8BjXsn1BmPmdBd3a75pIct4I=
github.com/cosmos/iavl v0.18.0/go.mod h1:L0VZHfq0tqMNJvXlslGExaaiZM7eSm+90Vh9QUbp6j4=
github.com/cosmos/ibc-go/v3 v3.0.0-alpha1.0.20220530074104-c7c115244bad/go.mod h1:xsWQXKbydQ0px9z1tuOhHVKLohTUbRd1G+S0sjKdnX8=
github.com/creachadair/atomicfile v0.2.6/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc=
github.com/creachadair/command v0.0.0-20220426235536-a748effdf6a1/go.mod h1:bAM+qFQb/KwWyCc9MLC4U1jvn3XyakqP5QRkds5T6cY=
github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk=
github.com/creachadair/tomledit v0.0.22/go.mod h1:cIu/4x5L855oSRejIqr+WRFh+mv9g4fWLiUFaApYn/Y=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U=
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golangci/golangci-lint v1.46.0/go.mod h1:IJpcNOUfx/XLRwE95FHQ6QtbhYwwqcm0H5QkwUfF4ZE=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gravity-devs/liquidity/v2 v2.0.0-rc1/go.mod h1:RibbX8H7R3+5sqfrs1Qgv0UJrNCcP55/vSNXRvQZTIg=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc=
github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554/go.mod h1:9+Pb2/tg1PvEgW7aFx4bFhDE4bvbI03zuJ8kb7nJ9Jc=
github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM=
github.com/lufeee/execinquery v1.0.0/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM=
github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A=
github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE=
github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM=
github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0=
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8=
github.com/polyfloyd/go-errorlint v0.0.0-20211125173453-6d6d39c5bb8b/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc=
github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3HDkhpcdum6VeU3R4=
github.com/tendermint/tendermint v0.35.6/go.mod h1:2hAS7fqHf1/XusWqSl5m7MOrXeptvYVeHpkPup/CAJg=
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/vektra/mockery/v2 v2.12.3/go.mod h1:8vf4KDDUptfkyypzdHLuE7OE2xA7Gdt60WgIS8PgD+U=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 h1:FR+oGxGfbQu1d+jglI3rCkjAjUnhRSZcUxr+DqlDLNo=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
25 changes: 24 additions & 1 deletion tests/e2e/e2e_cli_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"

globalfee "github.com/cosmos/gaia/v8/x/globalfee/types"
)

func queryGaiaTx(endpoint, txHash string) error {
Expand Down Expand Up @@ -37,6 +39,7 @@ func queryGaiaTx(endpoint, txHash string) error {
return nil
}

// if coin is zero, return empty coin.
func getSpecificBalance(endpoint, addr, denom string) (amt sdk.Coin, err error) {
balances, err := queryGaiaAllBalances(endpoint, addr)
if err != nil {
Expand Down Expand Up @@ -115,11 +118,31 @@ func queryGovProposal(endpoint string, proposalID int) (govv1beta1.QueryProposal
if err != nil {
return emptyProp, err
}
var govProposalResp govv1beta1.QueryProposalResponse

var govProposalResp govv1beta1.QueryProposalResponse
if err := cdc.UnmarshalJSON(body, &govProposalResp); err != nil {
return emptyProp, err
}

return govProposalResp, nil
}

func queryGlobalFees(endpoint string) (amt sdk.DecCoins, err error) {
resp, err := http.Get(fmt.Sprintf("%s/gaia/globalfee/v1beta1/minimum_gas_prices", endpoint))
if err != nil {
return nil, fmt.Errorf("failed to execute HTTP request: %w", err)
}
defer resp.Body.Close()

bz, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}

var fees globalfee.QueryMinimumGasPricesResponse
if err := cdc.UnmarshalJSON(bz, &fees); err != nil {
return sdk.DecCoins{}, err
}

return fees.MinimumGasPrices, nil
}
Loading

0 comments on commit d5bd5e8

Please sign in to comment.