Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/CosmWasm/wa…
Browse files Browse the repository at this point in the history
…smvm/v2-2.0.1
  • Loading branch information
pr0n00gler committed Jul 8, 2024
2 parents dea4110 + dabafd6 commit 1f303c2
Show file tree
Hide file tree
Showing 120 changed files with 4,774 additions and 673 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
push:
tags:
- "*"
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"
pull_request:
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"
workflow_dispatch:
inputs:
tag:
description: 'Tag to run the workflow for'
required: false
default: ''

jobs:
docker:
runs-on: self-hosted
env:
DOCKER_BUILDKIT: 1

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y jq curl git

- name: Install Go
run: |
GO_VERSION=1.22.4
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
source $HOME/.profile
shell: bash

- name: Download Buildx with Hydrobuilder support
run: |
ARCH=amd64
BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$ARCH\"))")
mkdir -vp ~/.docker/cli-plugins/
curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL
chmod a+x ~/.docker/cli-plugins/docker-buildx
- name: Get version from git tags or input
id: get_version
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
VERSION=${{ github.event.inputs.tag }}
else
VERSION=$(git describe --tags --abbrev=0)
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "neutronorg/neutron"
install: true

- name: Build and push Docker image
env:
VERSION: ${{ env.VERSION }}
BUILDER: ${{ steps.buildx.outputs.name }}
run: |
docker buildx use $BUILDER
make build-static-linux-amd64
docker tag neutron-amd64:latest neutronorg/neutron:${{ env.VERSION }}
docker push neutronorg/neutron:${{ env.VERSION }}
- name: Cleanup temporary container
run: docker rm -f neutronbinary || true
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
tests:
name: Test
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
dispatch:
name: Dispatch Tests Workflow
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Evaluate PR Merged Status and Labels
run: |
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ build-static-linux-amd64: go.sum $(BUILDDIR)/
$(DOCKER) cp neutronbinary:/bin/neutrond $(BUILDDIR)/neutrond-linux-amd64
$(DOCKER) rm -f neutronbinary

build-slinky-e2e-docker-image: go.sum $(BUILDDIR)/
build-e2e-docker-image: go.sum $(BUILDDIR)/
$(DOCKER) buildx create --name neutronbuilder || true
$(DOCKER) buildx use neutronbuilder
$(DOCKER) buildx build \
Expand All @@ -136,7 +136,12 @@ build-slinky-e2e-docker-image: go.sum $(BUILDDIR)/
-f Dockerfile.builder .

slinky-e2e-test:
cd ./tests/slinky && go mod tidy && go test -v -race -timeout 20m -count=1 ./...
@echo "Running e2e slinky tests..."
cd ./tests/slinky && go mod tidy && go test -v -race -timeout 30m -count=1 ./...

feemarket-e2e-test:
@echo "Running e2e feemarket tests..."
@cd ./tests/feemarket && go mod tidy && go test -p 1 -v -race -timeout 30m -count=1 ./...

install-test-binary: check_version go.sum
go install -mod=readonly $(BUILD_FLAGS_TEST_BINARY) ./cmd/neutrond
Expand Down Expand Up @@ -197,15 +202,14 @@ test-sim-multi-seed-short: runsim
###############################################################################

lint:
golangci-lint run
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofmt -d -s
golangci-lint run --skip-files ".*.pb.go"
find . -name '*.go' -not -name "*.pb.go" -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofmt -d -s

format:
@go install mvdan.cc/gofumpt@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs gofumpt -w -l
golangci-lint run --fix
goimports -w -local github.com/neutron-org .
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs -I % sh -c 'gofumpt -w -l % && goimports -w -local github.com/neutron-org %'
golangci-lint run --fix --skip-files ".*.pb.go"

.PHONY: format

Expand Down
6 changes: 3 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
oracleclient "github.com/skip-mev/slinky/service/clients/oracle"
servicemetrics "github.com/skip-mev/slinky/service/metrics"

v400 "github.com/neutron-org/neutron/v4/app/upgrades/v4.0.0"
v401 "github.com/neutron-org/neutron/v4/app/upgrades/v4.0.1"
"github.com/neutron-org/neutron/v4/x/globalfee"
globalfeetypes "github.com/neutron-org/neutron/v4/x/globalfee/types"

Expand Down Expand Up @@ -225,7 +225,7 @@ const (
)

var (
Upgrades = []upgrades.Upgrade{v400.Upgrade}
Upgrades = []upgrades.Upgrade{v401.Upgrade}

// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Expand Down Expand Up @@ -1094,8 +1094,8 @@ func New(
crontypes.ModuleName,
globalfee.ModuleName,
feemarkettypes.ModuleName,
marketmaptypes.ModuleName,
oracletypes.ModuleName,
marketmaptypes.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
dynamicfeestypes.ModuleName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ import (

const (
// UpgradeName defines the on-chain upgrade name.
UpgradeName = "v4.0.0"
UpgradeName = "v4.0.1"

// MarketMapAuthorityMultisig defines the address of a market-map authority governed by a
// multi-sig of contributors.
MarketMapAuthorityMultisig = "neutron1ua63s43u2p4v38pxhcxmps0tj2gudyw2hfeetz"

DecimalsAdjustment = 1_000_000_000_000
)

var Upgrade = upgrades.Upgrade{
Expand Down
95 changes: 53 additions & 42 deletions app/upgrades/v4.0.0/upgrades.go → app/upgrades/v4.0.1/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,70 +92,76 @@ func setMarketMapParams(ctx sdk.Context, marketmapKeeper *marketmapkeeper.Keeper
}

// NtrnPrices describes prices of any token in NTRN for dynamic fee resolver
// there are several 18decimals coins, we need to adjust all the coins with the same base (6 decimals) prior to do any math
// by dividing by 10^12
var NtrnPrices = sdk.NewDecCoins(
// Token,Denom,TWAP30D (USD),Price in NTRN (30d TWAP of DENOM / 30d TWAP of NTRN),Price + 30% premium
// wstETH,factory/neutron1ug740qrkquxzrk2hh29qrlx3sktkfml3je7juusc2te7xmvsscns0n2wry/wstETH,3392.58,4772.232381488255,5790.006381488255
sdk.NewDecCoinFromDec("factory/neutron1ug740qrkquxzrk2hh29qrlx3sktkfml3je7juusc2te7xmvsscns0n2wry/wstETH", math.LegacyMustNewDecFromStr("5790.006381488255")),
// wstETH,factory/neutron1ug740qrkquxzrk2hh29qrlx3sktkfml3je7juusc2te7xmvsscns0n2wry/wstETH,3616.34,5779.670768739013,7513.571999360713
// 18 decimals coin
sdk.NewDecCoinFromDec("factory/neutron1ug740qrkquxzrk2hh29qrlx3sktkfml3je7juusc2te7xmvsscns0n2wry/wstETH", math.LegacyMustNewDecFromStr("7513.571999360713").QuoInt64(DecimalsAdjustment)),

// stATOM,ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C,8.559,12.039668026445,14.607368026445
sdk.NewDecCoinFromDec("ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C", math.LegacyMustNewDecFromStr("14.607368026445")),
// stATOM,ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C,10.268,16.410420329231,21.333546427991
sdk.NewDecCoinFromDec("ibc/B7864B03E1B9FD4F049243E92ABD691586F682137037A9F3FCA5222815620B3C", math.LegacyMustNewDecFromStr("21.333546427991")),

// stTIA,ibc/6569E05DEE32B339D9286A52BE33DFCEFC97267F23EF9CFDE0C055140967A9A5,9.99,14.052609368406,17.049609368406
sdk.NewDecCoinFromDec("ibc/6569E05DEE32B339D9286A52BE33DFCEFC97267F23EF9CFDE0C055140967A9A5", math.LegacyMustNewDecFromStr("17.049609368406")),
// stTIA,ibc/6569E05DEE32B339D9286A52BE33DFCEFC97267F23EF9CFDE0C055140967A9A5,8.52,13.61674924085,17.70177401312
sdk.NewDecCoinFromDec("ibc/6569E05DEE32B339D9286A52BE33DFCEFC97267F23EF9CFDE0C055140967A9A5", math.LegacyMustNewDecFromStr("17.70177401312")),

// stkATOM,ibc/3649CE0C8A2C79048D8C6F31FF18FA69C9BC7EB193512E0BD03B733011290445,8.559,12.039668026445,14.607368026445
sdk.NewDecCoinFromDec("ibc/3649CE0C8A2C79048D8C6F31FF18FA69C9BC7EB193512E0BD03B733011290445", math.LegacyMustNewDecFromStr("14.607368026445")),
// stkATOM,ibc/3649CE0C8A2C79048D8C6F31FF18FA69C9BC7EB193512E0BD03B733011290445,9.656,15.432315806297,20.062010548187
sdk.NewDecCoinFromDec("ibc/3649CE0C8A2C79048D8C6F31FF18FA69C9BC7EB193512E0BD03B733011290445", math.LegacyMustNewDecFromStr("20.062010548187")),

// USDC.noble,ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81,1,1.406667604445,1.706667604445
sdk.NewDecCoinFromDec("ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81", math.LegacyMustNewDecFromStr("1.706667604445")),
// USDC.noble,ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81,1,1.598210004795,2.077673006235
sdk.NewDecCoinFromDec("ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81", math.LegacyMustNewDecFromStr("2.077673006235")),

// USDC.axl,ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349,1,1.406667604445,1.706667604445
sdk.NewDecCoinFromDec("ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349", math.LegacyMustNewDecFromStr("1.706667604445")),
// USDC.axl,ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349,1,1.598210004795,2.077673006235
sdk.NewDecCoinFromDec("ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349", math.LegacyMustNewDecFromStr("2.077673006235")),

// USDT,ibc/57503D7852EF4E1899FE6D71C5E81D7C839F76580F86F21E39348FC2BC9D7CE2,1,1.406667604445,1.706667604445
sdk.NewDecCoinFromDec("ibc/57503D7852EF4E1899FE6D71C5E81D7C839F76580F86F21E39348FC2BC9D7CE2", math.LegacyMustNewDecFromStr("1.706667604445")),
// USDT,ibc/57503D7852EF4E1899FE6D71C5E81D7C839F76580F86F21E39348FC2BC9D7CE2,1,1.598210004795,2.077673006235
sdk.NewDecCoinFromDec("ibc/57503D7852EF4E1899FE6D71C5E81D7C839F76580F86F21E39348FC2BC9D7CE2", math.LegacyMustNewDecFromStr("2.077673006235")),

// http://astro.cw/,ibc/5751B8BCDA688FD0A8EC0B292EEF1CDEAB4B766B63EC632778B196D317C40C3A,0.0020456,0.002877479252,0.003491159252
sdk.NewDecCoinFromDec("ibc/5751B8BCDA688FD0A8EC0B292EEF1CDEAB4B766B63EC632778B196D317C40C3A", math.LegacyMustNewDecFromStr("0.003491159252")),
// http://astro.cw/,ibc/5751B8BCDA688FD0A8EC0B292EEF1CDEAB4B766B63EC632778B196D317C40C3A,0.0693,0.110755953332,0.143982739322
sdk.NewDecCoinFromDec("ibc/5751B8BCDA688FD0A8EC0B292EEF1CDEAB4B766B63EC632778B196D317C40C3A", math.LegacyMustNewDecFromStr("0.143982739322")),

// ASTRO,factory/neutron1ffus553eet978k024lmssw0czsxwr97mggyv85lpcsdkft8v9ufsz3sa07/astro,0.0020456,0.002877479252,0.003491159252
sdk.NewDecCoinFromDec("factory/neutron1ffus553eet978k024lmssw0czsxwr97mggyv85lpcsdkft8v9ufsz3sa07/astro", math.LegacyMustNewDecFromStr("0.003491159252")),
// ASTRO,factory/neutron1ffus553eet978k024lmssw0czsxwr97mggyv85lpcsdkft8v9ufsz3sa07/astro,0.0693,0.110755953332,0.143982739322
sdk.NewDecCoinFromDec("factory/neutron1ffus553eet978k024lmssw0czsxwr97mggyv85lpcsdkft8v9ufsz3sa07/astro", math.LegacyMustNewDecFromStr("0.143982739322")),

// MARS,ibc/9598CDEB7C6DB7FC21E746C8E0250B30CD5154F39CA111A9D4948A4362F638BD,0.086318,0.12142073428,0.14731613428
sdk.NewDecCoinFromDec("ibc/9598CDEB7C6DB7FC21E746C8E0250B30CD5154F39CA111A9D4948A4362F638BD", math.LegacyMustNewDecFromStr("0.14731613428")),
// MARS,ibc/9598CDEB7C6DB7FC21E746C8E0250B30CD5154F39CA111A9D4948A4362F638BD,0.0652,0.104203292313,0.135464280003
sdk.NewDecCoinFromDec("ibc/9598CDEB7C6DB7FC21E746C8E0250B30CD5154F39CA111A9D4948A4362F638BD", math.LegacyMustNewDecFromStr("0.135464280003")),

// APOLLO,factory/neutron154gg0wtm2v4h9ur8xg32ep64e8ef0g5twlsgvfeajqwghdryvyqsqhgk8e/APOLLO,0.1824,0.256576171051,0.311296171051
sdk.NewDecCoinFromDec("factory/neutron154gg0wtm2v4h9ur8xg32ep64e8ef0g5twlsgvfeajqwghdryvyqsqhgk8e/APOLLO", math.LegacyMustNewDecFromStr("0.311296171051")),
// APOLLO,factory/neutron154gg0wtm2v4h9ur8xg32ep64e8ef0g5twlsgvfeajqwghdryvyqsqhgk8e/APOLLO,0.06079,0.097155186191,0.126301742051
sdk.NewDecCoinFromDec("factory/neutron154gg0wtm2v4h9ur8xg32ep64e8ef0g5twlsgvfeajqwghdryvyqsqhgk8e/APOLLO", math.LegacyMustNewDecFromStr("0.126301742051")),

// TIA,ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7,9.99,14.052609368406,17.049609368406
sdk.NewDecCoinFromDec("ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7", math.LegacyMustNewDecFromStr("17.049609368406")),
// TIA,ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7,8.52,13.61674924085,17.70177401312
sdk.NewDecCoinFromDec("ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7", math.LegacyMustNewDecFromStr("17.70177401312")),

// ATOM,ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9,8.559,12.039668026445,14.607368026445
sdk.NewDecCoinFromDec("ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", math.LegacyMustNewDecFromStr("14.607368026445")),
// ATOM,ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9,7.559,12.080869426243,15.705130254103
sdk.NewDecCoinFromDec("ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9", math.LegacyMustNewDecFromStr("15.705130254103")),

// axlWETH,ibc/A585C2D15DCD3B010849B453A2CFCB5E213208A5AB665691792684C26274304D,3392.58,4772.232381488255,5790.006381488255
sdk.NewDecCoinFromDec("ibc/A585C2D15DCD3B010849B453A2CFCB5E213208A5AB665691792684C26274304D", math.LegacyMustNewDecFromStr("5790.006381488255")),
// axlWETH,ibc/A585C2D15DCD3B010849B453A2CFCB5E213208A5AB665691792684C26274304D,3616.34,5779.670768739013,7513.571999360713
// 18 decimals coin
sdk.NewDecCoinFromDec("ibc/A585C2D15DCD3B010849B453A2CFCB5E213208A5AB665691792684C26274304D", math.LegacyMustNewDecFromStr("7513.571999360713").QuoInt64(DecimalsAdjustment)),

// OSMO,ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955,0.8784,1.235616823745,1.499136823745
sdk.NewDecCoinFromDec("ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955", math.LegacyMustNewDecFromStr("1.499136823745")),
// OSMO,ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955,0.6699,1.070640882212,1.391833146872
sdk.NewDecCoinFromDec("ibc/376222D6D9DAE23092E29740E56B758580935A6D77C24C2ABD57A6A78A1F3955", math.LegacyMustNewDecFromStr("1.391833146872")),

// DYM,ibc/4A6A46D4263F2ED3DCE9CF866FE15E6903FB5E12D87EB8BDC1B6B1A1E2D397B4,3.043,4.280489520326,5.193389520326
sdk.NewDecCoinFromDec("ibc/4A6A46D4263F2ED3DCE9CF866FE15E6903FB5E12D87EB8BDC1B6B1A1E2D397B4", math.LegacyMustNewDecFromStr("5.193389520326")),
// DYM,ibc/4A6A46D4263F2ED3DCE9CF866FE15E6903FB5E12D87EB8BDC1B6B1A1E2D397B4,2.329,3.722231101167,4.838900431527
// 18 decimals coin
sdk.NewDecCoinFromDec("ibc/4A6A46D4263F2ED3DCE9CF866FE15E6903FB5E12D87EB8BDC1B6B1A1E2D397B4", math.LegacyMustNewDecFromStr("4.838900431527").QuoInt64(DecimalsAdjustment)),

// DYDX,ibc/2CB87BCE0937B1D1DFCEE79BE4501AAF3C265E923509AEAC410AD85D27F35130,2.036,2.86397524265,3.47477524265
sdk.NewDecCoinFromDec("ibc/2CB87BCE0937B1D1DFCEE79BE4501AAF3C265E923509AEAC410AD85D27F35130", math.LegacyMustNewDecFromStr("3.47477524265")),
// DYDX,ibc/2CB87BCE0937B1D1DFCEE79BE4501AAF3C265E923509AEAC410AD85D27F35130,1.71,2.732939108199,3.552820840659
// 18 decimals coin
sdk.NewDecCoinFromDec("ibc/2CB87BCE0937B1D1DFCEE79BE4501AAF3C265E923509AEAC410AD85D27F35130", math.LegacyMustNewDecFromStr("3.552820840659").QuoInt64(DecimalsAdjustment)),

// KUJI,ibc/1053E271314D36FECBC915B51474F8B3962597CE88FF3E4A74795B0E3F367A8B,1.49,2.095934730623,2.542934730623
sdk.NewDecCoinFromDec("ibc/1053E271314D36FECBC915B51474F8B3962597CE88FF3E4A74795B0E3F367A8B", math.LegacyMustNewDecFromStr("2.542934730623")),
// KUJI,ibc/1053E271314D36FECBC915B51474F8B3962597CE88FF3E4A74795B0E3F367A8B,1.22,1.949816205849,2.534761067589
sdk.NewDecCoinFromDec("ibc/1053E271314D36FECBC915B51474F8B3962597CE88FF3E4A74795B0E3F367A8B", math.LegacyMustNewDecFromStr("2.534761067589")),

// STARS,ibc/A139C0E0B5E87CBA8EAEEB12B9BEE13AC7C814CFBBFA87BBCADD67E31003466C,0.017794524,0.025030980447,0.030369337647
sdk.NewDecCoinFromDec("ibc/A139C0E0B5E87CBA8EAEEB12B9BEE13AC7C814CFBBFA87BBCADD67E31003466C", math.LegacyMustNewDecFromStr("0.030369337647")),
// STARS,ibc/A139C0E0B5E87CBA8EAEEB12B9BEE13AC7C814CFBBFA87BBCADD67E31003466C,0.0138,0.022055298066,0.028671887496
sdk.NewDecCoinFromDec("ibc/A139C0E0B5E87CBA8EAEEB12B9BEE13AC7C814CFBBFA87BBCADD67E31003466C", math.LegacyMustNewDecFromStr("0.028671887496")),

// AXL,ibc/C0E66D1C81D8AAF0E6896E05190FDFBC222367148F86AC3EA679C28327A763CD,1.0637,1.496272330848,1.815382330848
sdk.NewDecCoinFromDec("ibc/C0E66D1C81D8AAF0E6896E05190FDFBC222367148F86AC3EA679C28327A763CD", math.LegacyMustNewDecFromStr("1.815382330848")),
// AXL,ibc/C0E66D1C81D8AAF0E6896E05190FDFBC222367148F86AC3EA679C28327A763CD,0.802,1.281764423845,1.666293750985
sdk.NewDecCoinFromDec("ibc/C0E66D1C81D8AAF0E6896E05190FDFBC222367148F86AC3EA679C28327A763CD", math.LegacyMustNewDecFromStr("1.666293750985")),

// STRD,ibc/3552CECB7BCE1891DB6070D37EC6E954C972B1400141308FCD85FD148BD06DE5,1.713582985,2.410441672528,2.924516568028
sdk.NewDecCoinFromDec("ibc/3552CECB7BCE1891DB6070D37EC6E954C972B1400141308FCD85FD148BD06DE5", math.LegacyMustNewDecFromStr("2.924516568028")),
// STRD,ibc/3552CECB7BCE1891DB6070D37EC6E954C972B1400141308FCD85FD148BD06DE5,1.542,2.464439827393,3.203771775613
sdk.NewDecCoinFromDec("ibc/3552CECB7BCE1891DB6070D37EC6E954C972B1400141308FCD85FD148BD06DE5", math.LegacyMustNewDecFromStr("3.203771775613")),
)

func setDynamicFeesParams(ctx sdk.Context, dfKeeper *dynamicfeeskeeper.Keeper) error {
Expand Down Expand Up @@ -232,6 +238,11 @@ func enableVoteExtensions(ctx sdk.Context, consensusKeeper *consensuskeeper.Keep
return err
}

oldParams.Params.Version = &comettypes.VersionParams{App: 0}
if err := consensusKeeper.ParamsStore.Set(ctx, *oldParams.Params); err != nil {
return err
}

// we need to enable VoteExtensions for Slinky
oldParams.Params.Abci = &comettypes.ABCIParams{VoteExtensionsEnableHeight: ctx.BlockHeight() + 4}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/stretchr/testify/suite"

v400 "github.com/neutron-org/neutron/v4/app/upgrades/v4.0.0"
v400 "github.com/neutron-org/neutron/v4/app/upgrades/v4.0.1"
"github.com/neutron-org/neutron/v4/testutil"
)

Expand Down Expand Up @@ -133,13 +133,6 @@ func (suite *UpgradeTestSuite) TestDynamicFeesUpgrade() {
ctx := suite.ChainA.GetContext()
t := suite.T()

oldParams, err := app.ConsensusParamsKeeper.Params(ctx, &types.QueryParamsRequest{})
suite.Require().NoError(err)
// it is automatically tracked in upgrade handler, we need to set it manually for tests
oldParams.Params.Version = &comettypes.VersionParams{App: 0}
// we need to properly set consensus params for tests or we get a panic
suite.Require().NoError(app.ConsensusParamsKeeper.ParamsStore.Set(ctx, *oldParams.Params))

upgrade := upgradetypes.Plan{
Name: v400.UpgradeName,
Info: "some text here",
Expand Down
Binary file modified contracts/neutron_chain_manager.wasm
Binary file not shown.
Loading

0 comments on commit 1f303c2

Please sign in to comment.