Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge duality neutron (CORRECT BRANCH) #341

Merged
merged 117 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
6cdcbf2
copy over duality files
Sep 22, 2023
e12f6b6
edit and recompile protos to match neutron namespace
Oct 10, 2023
ad47181
update duality code to connect with neutron
Sep 28, 2023
f5e47be
downgrade packet-forward-middleware
Sep 29, 2023
6380617
add dex, incentives and epochs modules to storeUpgrades keys
Oct 10, 2023
2167283
change dex params to kv store
Oct 10, 2023
678a700
switch incentives to kvstore params
Oct 10, 2023
7d06f9b
start using "cosmossdk.io/math"
Oct 10, 2023
5b598bf
FIX: deprecation github.com/cosmos/cosmos-sdk/types/errors => cosmoss…
Oct 16, 2023
5d44551
FIX: missing import
Oct 16, 2023
c4dea36
go fumpt --extra on all duality files
Oct 16, 2023
d3d5368
misc linting fixes
Oct 16, 2023
f0c7447
General Test cleanup
Oct 17, 2023
040d012
set max_gas in init-neutrond.sh
Oct 17, 2023
6a06cc2
remove vestigial code
Oct 17, 2023
549c39a
rename duality => neutron where applicable in code
Oct 18, 2023
fe5a99d
add dex and incentives updaateParams msgs to proposal whitelist
Oct 18, 2023
9db539c
Add note to dex and incentives UpdateParams msg
Oct 18, 2023
56ac653
FIX: update incentives cli tests to match new denom format
Oct 18, 2023
32d3e07
FIX: more canonical naming for GoodTilPurgeHitGasLimit event
Oct 24, 2023
c1672b7
FIX: remove vestigial tests
Oct 25, 2023
eed9cef
Rewrite test helpers to default to BIGToken (exponent 6)
Nov 1, 2023
554fda3
small fixes per PR feedback
Nov 1, 2023
ee0ef23
Audit Fix: Don't use coin.Add in deposit
Oct 24, 2023
ffc8bd2
Mint shares at the end depositCore; not inside the loop
Oct 24, 2023
e94daf1
Audit Fix: check that deposit options array is correct length
Oct 24, 2023
c4329fc
remove outdated READMEs from code ported from osmosis
Nov 1, 2023
8fa3c19
typo: fix inconsistent dex/tx.proto naming
Nov 2, 2023
cda97ec
Remove incentives and epochs module.
Nov 2, 2023
ac9156a
small improvements
pr0n00gler Nov 7, 2023
c6469ed
fix core.go
pr0n00gler Nov 7, 2023
7867e06
pool validation
pr0n00gler Nov 7, 2023
7f957b0
fix: add more multihop validation
NeverHappened Nov 8, 2023
923584c
Merge pull request #353 from neutron-org/remove_incentives_module
pr0n00gler Nov 8, 2023
725ec75
Merge branch 'merge_duality_neutron' into fix/small-improvements-duality
pr0n00gler Nov 8, 2023
bab7505
camelCase -> snake_case
pr0n00gler Nov 8, 2023
7fd8ba3
fix json and yaml tags
pr0n00gler Nov 8, 2023
2d5d67a
fix json tags
pr0n00gler Nov 8, 2023
f5cf934
save
Nov 8, 2023
7c55b9f
Merge branch 'update-sdk47' into merge_duality_neutron
Nov 8, 2023
e4f3ea5
fix max_gas limit for tests
pr0n00gler Nov 8, 2023
10ab425
Upgrade x/ibcswap to be compatible with PFM v7.0.2
Nov 9, 2023
2940131
Add extra logic to ensure GetLimitOrderTrancheByKey cannot return nil…
Nov 10, 2023
0249e41
Rename SwapExactAmountIn to be more accurate and add more disclaimers
Nov 10, 2023
dde0a57
FIX: valid options array is correct length for deposit
Nov 10, 2023
47d47db
Ensure deposit, withdraw and place/withdraw limit order correctly val…
Nov 10, 2023
8afbca9
revert returning an error in Swap()
pr0n00gler Nov 11, 2023
69462f8
Merge pull request #343 from neutron-org/fix_deposit_validation
pr0n00gler Nov 13, 2023
8e38b07
Merge pull request #356 from neutron-org/fix/incomplete-pool-validation
pr0n00gler Nov 13, 2023
0afa726
Merge pull request #355 from neutron-org/fix/small-improvements-duality
pr0n00gler Nov 13, 2023
7dd4800
Merge branch 'merge_duality_neutron' into fix_coin_add
pr0n00gler Nov 13, 2023
d182738
Merge pull request #342 from neutron-org/fix_coin_add
pr0n00gler Nov 13, 2023
7cab32d
Merge branch 'merge_duality_neutron' into fix/msg-multihop-validation
pr0n00gler Nov 13, 2023
a7f2b0c
Merge branch 'merge_duality_neutron' into fix/misc_security_fixes
pr0n00gler Nov 13, 2023
39a6068
Merge pull request #361 from neutron-org/fix/misc_security_fixes
pr0n00gler Nov 13, 2023
e0f8d7d
switch rounding to favor taker
Nov 10, 2023
b50963a
Add swap logic to abort if taker will be getting an unfair price due …
Nov 10, 2023
4ff3498
handle swap case where amountIn is 0
Nov 10, 2023
1836856
add tests for swap rouding behavior
Nov 10, 2023
3892305
Store MaxTrueTakerSpread as a dex param
Nov 13, 2023
35a0950
FIX: cleanup tests; make linter happy
Nov 13, 2023
8e1018d
Merge pull request #357 from neutron-org/fix/msg-multihop-validation
pr0n00gler Nov 14, 2023
2c5362e
Merge pull request #360 from neutron-org/fix_tick_fee_validation
pr0n00gler Nov 14, 2023
4804545
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 14, 2023
1ffecd0
bump pfm to the latest release
pr0n00gler Nov 14, 2023
9d51475
fmt
pr0n00gler Nov 14, 2023
c248b08
Update to pfm v7.1.0
Nov 14, 2023
483f875
Merge pull request #363 from neutron-org/chore/bump-pfm
pr0n00gler Nov 14, 2023
787f3ca
Merge branch 'merge_duality_neutron' into fix/ibc-_swap_pfm_issues
pr0n00gler Nov 14, 2023
798bb43
Merge pull request #359 from neutron-org/fix/ibc-_swap_pfm_issues
pr0n00gler Nov 14, 2023
9353775
Merge remote-tracking branch 'origin/merge_duality_neutron' into fix_…
Nov 14, 2023
e150568
Fix test logic to account for PFM changes
Nov 14, 2023
02c9268
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 15, 2023
587fab1
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 15, 2023
83770b7
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 16, 2023
009e80e
whitelist dex stargate queries
pr0n00gler Nov 16, 2023
739f1aa
/neutron.dex.Query/LimitOrderTrancheAll query
pr0n00gler Nov 16, 2023
d5a6f7b
Revert "Merge pull request #359 from neutron-org/fix/ibc-_swap_pfm_is…
Nov 17, 2023
72ee33a
Revert "Merge pull request #369 from neutron-org/chore/bump-pfm-again"
Nov 17, 2023
70f2884
Revert "bump pfm to the latest release"
Nov 17, 2023
a43c2e8
Add validation for ibcSwap to ensure transfer receiver is sender
Nov 17, 2023
0151403
Fix tests
Nov 17, 2023
e80d0f0
Merge pull request #371 from neutron-org/fix/whitelist-dex-stargate-q…
pr0n00gler Nov 17, 2023
5579267
update whitelisted msgs
pr0n00gler Nov 14, 2023
4a4c0f3
whitelist ccvconsumer params
pr0n00gler Nov 17, 2023
196b157
pfm update params whitelits
pr0n00gler Nov 17, 2023
c0c3d51
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 17, 2023
75c2ec3
Merge pull request #344 from neutron-org/fix_deposit_spread
pr0n00gler Nov 17, 2023
22e763c
fix tokenfactory params upgrade
pr0n00gler Nov 17, 2023
d634e21
Merge branch 'merge_duality_neutron' into fix/revert-pfm-upgrade
Nov 17, 2023
0988cc4
fix ibcswap tests to account for changes to swap rounding
Nov 17, 2023
208737b
Revert "pfm update params whitelits"
Nov 17, 2023
433576a
whitelist pfm params
Nov 17, 2023
4e974e4
Merge pull request #372 from neutron-org/fix/revert-pfm-upgrade
pr0n00gler Nov 17, 2023
12150a9
Merge branch 'merge_duality_neutron' into chore/duality-proto-camelCa…
pr0n00gler Nov 17, 2023
e8d5668
Merge pull request #358 from neutron-org/chore/duality-proto-camelCas…
pr0n00gler Nov 17, 2023
cae3608
Revert "Merge pull request #372 from neutron-org/fix/revert-pfm-upgrade"
Nov 20, 2023
ccb2211
disable use of ibcswap middleware with forward-middleware
Nov 20, 2023
5ab3c49
Return unused tokenIn to original creator addr
Nov 14, 2023
535a383
Disable gmp swap and forward tests.
Nov 20, 2023
0289bba
Add test to ensure that swap-and-forward fails gracefully
Nov 20, 2023
5f225af
fix typo
Nov 20, 2023
8757db9
remove unused NonRefundable key from SwapMetadata
Nov 20, 2023
5845ebd
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 20, 2023
853f1a1
Merge branch 'merge_duality_neutron' into fix/disable-pfm-revert-reverts
pr0n00gler Nov 20, 2023
25b8b59
lint && format
pr0n00gler Nov 20, 2023
728a63e
delete commented code
Nov 20, 2023
d13ded6
bump pfm to 7.1.2
Nov 20, 2023
c6445fc
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 24, 2023
37df8d5
Merge branch 'merge_duality_neutron' into fix/disable-pfm-revert-reverts
pr0n00gler Nov 24, 2023
6c7507d
fix go.sum
pr0n00gler Nov 24, 2023
bc7fa37
update linter in actions
pr0n00gler Nov 24, 2023
70e9fbc
bump pfm
pr0n00gler Nov 24, 2023
1151d0d
update contracts
pr0n00gler Nov 24, 2023
0fe332f
Merge branch 'update-sdk47' into merge_duality_neutron
pr0n00gler Nov 25, 2023
1d73a13
Merge branch 'merge_duality_neutron' into fix/disable-pfm-revert-reverts
pr0n00gler Nov 25, 2023
bce776e
Merge pull request #374 from neutron-org/fix/disable-pfm-revert-reverts
pr0n00gler Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.20'
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: 'v1.51.2'
version: 'v1.52.1'
# Optional: working directory, useful for monorepos
# working-directory: somedir

Expand Down
84 changes: 71 additions & 13 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

globalfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"

"github.com/cosmos/interchain-security/v3/testutil/integration"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
Expand Down Expand Up @@ -149,6 +148,16 @@ import (
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
pfmkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
pfmtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"

"github.com/neutron-org/neutron/x/dex"
dexkeeper "github.com/neutron-org/neutron/x/dex/keeper"
dextypes "github.com/neutron-org/neutron/x/dex/types"

"github.com/neutron-org/neutron/x/ibcswap"
ibcswapkeeper "github.com/neutron-org/neutron/x/ibcswap/keeper"
ibcswaptypes "github.com/neutron-org/neutron/x/ibcswap/types"

gmpmiddleware "github.com/neutron-org/neutron/x/gmp"
)

const (
Expand Down Expand Up @@ -204,6 +213,8 @@ var (
ibchooks.AppModuleBasic{},
packetforward.AppModuleBasic{},
globalfee.AppModule{},
dex.AppModuleBasic{},
ibcswap.AppModuleBasic{},
)

// module account permissions
Expand All @@ -219,6 +230,8 @@ var (
ccvconsumertypes.ConsumerToSendToProviderName: nil,
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
crontypes.ModuleName: nil,
dextypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcswaptypes.ModuleName: {authtypes.Burner},
}
)

Expand Down Expand Up @@ -279,9 +292,11 @@ type App struct {
ConsumerKeeper ccvconsumerkeeper.Keeper
TokenFactoryKeeper *tokenfactorykeeper.Keeper
CronKeeper cronkeeper.Keeper
RouterKeeper *pfmkeeper.Keeper
PFMKeeper *pfmkeeper.Keeper
DexKeeper dexkeeper.Keeper
SwapKeeper ibcswapkeeper.Keeper

RouterModule packetforward.AppModule
PFMModule packetforward.AppModule

HooksTransferIBCModule *ibchooks.IBCMiddleware
HooksICS4Wrapper ibchooks.ICS4Middleware
Expand Down Expand Up @@ -356,7 +371,7 @@ func New(
icahosttypes.StoreKey, capabilitytypes.StoreKey,
interchainqueriesmoduletypes.StoreKey, contractmanagermoduletypes.StoreKey, interchaintxstypes.StoreKey, wasmtypes.StoreKey, feetypes.StoreKey,
feeburnertypes.StoreKey, adminmoduletypes.StoreKey, ccvconsumertypes.StoreKey, tokenfactorytypes.StoreKey, pfmtypes.StoreKey,
crontypes.StoreKey, ibchookstypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey,
crontypes.StoreKey, ibchookstypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey, dextypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, feetypes.MemStoreKey)
Expand Down Expand Up @@ -490,8 +505,8 @@ func New(
)
feeBurnerModule := feeburner.NewAppModule(appCodec, *app.FeeBurnerKeeper)

// RouterKeeper must be created before TransferKeeper
app.RouterKeeper = pfmkeeper.NewKeeper(
// PFMKeeper must be created before TransferKeeper
app.PFMKeeper = pfmkeeper.NewKeeper(
appCodec,
app.keys[pfmtypes.StoreKey],
app.TransferKeeper.Keeper,
Expand All @@ -504,7 +519,7 @@ func New(
wasmHooks := ibchooks.NewWasmHooks(nil, sdk.GetConfig().GetBech32AccountAddrPrefix()) // The contract keeper needs to be set later
app.HooksICS4Wrapper = ibchooks.NewICS4Middleware(
app.IBCKeeper.ChannelKeeper,
app.RouterKeeper,
app.PFMKeeper,
&wasmHooks,
)

Expand All @@ -523,7 +538,7 @@ func New(
contractmanager.NewSudoLimitWrapper(app.ContractManagerKeeper, &app.WasmKeeper),
)

app.RouterKeeper.SetTransferKeeper(app.TransferKeeper.Keeper)
app.PFMKeeper.SetTransferKeeper(app.TransferKeeper.Keeper)

transferModule := transferSudo.NewAppModule(app.TransferKeeper)

Expand Down Expand Up @@ -569,6 +584,25 @@ func New(
app.TokenFactoryKeeper.Hooks(),
))

app.DexKeeper = *dexkeeper.NewKeeper(
appCodec,
keys[dextypes.StoreKey],
keys[dextypes.MemStoreKey],
app.BankKeeper.WithMintCoinsRestriction(dextypes.NewDexDenomMintCoinsRestriction()),
authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
)

dexModule := dex.NewAppModule(appCodec, app.DexKeeper, app.BankKeeper)

app.SwapKeeper = ibcswapkeeper.NewKeeper(
appCodec,
app.MsgServiceRouter(),
app.IBCKeeper.ChannelKeeper,
app.BankKeeper,
)

swapModule := ibcswap.NewAppModule(app.SwapKeeper)

wasmDir := filepath.Join(homePath, "wasm")
wasmConfig, err := wasm.ReadWasmConfig(appOpts)
if err != nil {
Expand Down Expand Up @@ -681,16 +715,19 @@ func New(
contractManagerModule := contractmanager.NewAppModule(appCodec, app.ContractManagerKeeper)
ibcHooksModule := ibchooks.NewAppModule(app.AccountKeeper)

app.RouterModule = packetforward.NewAppModule(app.RouterKeeper, app.GetSubspace(pfmtypes.ModuleName))
app.PFMModule = packetforward.NewAppModule(app.PFMKeeper, app.GetSubspace(pfmtypes.ModuleName))

ibcStack := packetforward.NewIBCMiddleware(
var ibcStack ibcporttypes.IBCModule = packetforward.NewIBCMiddleware(
app.HooksTransferIBCModule,
app.RouterKeeper,
app.PFMKeeper,
0,
pfmkeeper.DefaultForwardTransferPacketTimeoutTimestamp,
pfmkeeper.DefaultRefundTransferPacketTimeoutTimestamp,
)

ibcStack = ibcswap.NewIBCMiddleware(ibcStack, app.SwapKeeper)
ibcStack = gmpmiddleware.NewIBCMiddleware(ibcStack)

ibcRouter.AddRoute(icacontrollertypes.SubModuleName, icaControllerStack).
AddRoute(icahosttypes.SubModuleName, icaHostIBCModule).
AddRoute(ibctransfertypes.ModuleName, ibcStack).
Expand Down Expand Up @@ -726,7 +763,7 @@ func New(
transferModule,
consumerModule,
icaModule,
app.RouterModule,
app.PFMModule,
interchainQueriesModule,
interchainTxsModule,
feeModule,
Expand All @@ -737,6 +774,8 @@ func New(
tokenfactory.NewAppModule(appCodec, *app.TokenFactoryKeeper, app.AccountKeeper, app.BankKeeper),
cronModule,
globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)),
swapModule,
dexModule,
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them
)

Expand Down Expand Up @@ -772,6 +811,8 @@ func New(
pfmtypes.ModuleName,
crontypes.ModuleName,
globalfee.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
)

app.mm.SetOrderEndBlockers(
Expand Down Expand Up @@ -802,6 +843,10 @@ func New(
pfmtypes.ModuleName,
crontypes.ModuleName,
globalfee.ModuleName,
ibcswaptypes.ModuleName,
// NOTE: Because of the gas sensitivity of PurgeExpiredLimit order operations
// dexmodule must be the last endBlock module to run
dextypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -837,6 +882,8 @@ func New(
pfmtypes.ModuleName,
crontypes.ModuleName,
globalfee.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand All @@ -860,11 +907,12 @@ func New(
transferModule,
consumerModule,
icaModule,
app.RouterModule,
app.PFMModule,
interchainQueriesModule,
interchainTxsModule,
feeBurnerModule,
cronModule,
dexModule,
)
app.sm.RegisterStoreDecoders()

Expand Down Expand Up @@ -998,12 +1046,22 @@ func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Respo
return app.mm.EndBlock(ctx, req)
}

func (app *App) EnsureBlockGasMeter(ctx sdk.Context) {
// TrancheKey generation and LimitOrderExpirationPurge both rely on a BlockGas meter.
// check that it works at startup
cp := app.GetConsensusParams(ctx)
if cp == nil || cp.Block == nil || cp.Block.MaxGas <= 0 {
panic("BlockGas meter must be initialized. Genesis must provide value for Block.MaxGas")
}
}

// InitChainer application update at chain initialization
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain {
var genesisState GenesisState
if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
panic(err)
}
app.EnsureBlockGasMeter(ctx)
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
}
Expand Down
4 changes: 4 additions & 0 deletions app/proposals_allowlisting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import (
"github.com/cosmos/cosmos-sdk/x/params/types/proposal"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
globalfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types"
pfmtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
ccvconsumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"

contractmanagertypes "github.com/neutron-org/neutron/x/contractmanager/types"
crontypes "github.com/neutron-org/neutron/x/cron/types"
dextypes "github.com/neutron-org/neutron/x/dex/types"
feeburnertypes "github.com/neutron-org/neutron/x/feeburner/types"
feerefundertypes "github.com/neutron-org/neutron/x/feerefunder/types"
interchainqueriestypes "github.com/neutron-org/neutron/x/interchainqueries/types"
Expand Down Expand Up @@ -66,9 +68,11 @@ func isSdkMessageWhitelisted(msg sdk.Msg) bool {
*feerefundertypes.MsgUpdateParams,
*crontypes.MsgUpdateParams,
*contractmanagertypes.MsgUpdateParams,
*dextypes.MsgUpdateParams,
*banktypes.MsgUpdateParams,
*crisistypes.MsgUpdateParams,
*minttypes.MsgUpdateParams,
*pfmtypes.MsgUpdateParams,
*authtypes.MsgUpdateParams:
return true
}
Expand Down
2 changes: 2 additions & 0 deletions app/upgrades/v1.1.0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"

"github.com/neutron-org/neutron/app/upgrades"
dextypes "github.com/neutron-org/neutron/x/dex/types"
)

const (
Expand All @@ -22,6 +23,7 @@ var Upgrade = upgrades.Upgrade{
Added: []string{
consensusparamtypes.ModuleName,
crisistypes.ModuleName,
dextypes.ModuleName,
},
},
}
Binary file added contracts/credits_vault.wasm
Binary file not shown.
Binary file modified contracts/cwd_core.wasm
Binary file not shown.
Binary file modified contracts/cwd_pre_propose_multiple.wasm
Binary file not shown.
Binary file modified contracts/cwd_pre_propose_overrule.wasm
Binary file not shown.
Binary file modified contracts/cwd_pre_propose_single.wasm
Binary file not shown.
Binary file modified contracts/cwd_proposal_multiple.wasm
Binary file not shown.
Binary file modified contracts/cwd_proposal_single.wasm
Binary file not shown.
Binary file added contracts/cwd_security_subdao_pre_propose.wasm
Binary file not shown.
Binary file modified contracts/cwd_subdao_core.wasm
Binary file not shown.
Binary file modified contracts/cwd_subdao_pre_propose_single.wasm
Binary file not shown.
Binary file not shown.
Binary file modified contracts/cwd_subdao_proposal_single.wasm
Binary file not shown.
Binary file modified contracts/cwd_subdao_timelock_single.wasm
Binary file not shown.
Binary file modified contracts/investors_vesting_vault.wasm
Binary file not shown.
Binary file modified contracts/lockdrop_vault.wasm
Binary file not shown.
Binary file modified contracts/neutron_distribution.wasm
Binary file not shown.
Binary file modified contracts/neutron_reserve.wasm
Binary file not shown.
Binary file modified contracts/neutron_vault.wasm
Binary file not shown.
Binary file modified contracts/neutron_voting_registry.wasm
Binary file not shown.
Binary file added contracts/vesting_lp_vault.wasm
Binary file not shown.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/cosmos/cosmos-sdk v0.47.6
github.com/cosmos/gaia/v11 v11.0.0-00010101000000-000000000000
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.1
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2
github.com/cosmos/ibc-go/v7 v7.3.1
github.com/cosmos/ics23/go v0.10.0
github.com/cosmos/interchain-security/v3 v3.1.0
Expand All @@ -27,6 +27,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1
github.com/iancoleman/orderedmap v0.2.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/rs/zerolog v1.30.0
Expand All @@ -35,8 +36,10 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -121,7 +124,6 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
Expand Down Expand Up @@ -168,7 +170,6 @@ require (
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.3.0 // indirect
Expand All @@ -180,7 +181,6 @@ require (
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK
github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek=
github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg=
github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.1 h1:PqIK9vTr6zxCdQmrDZwxwL4KMAqg/GRGsiMEiaMP4wA=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.1/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2 h1:6zjj+yIpMbCTRI2eJ2fXuflElENs3mrUSLH/TSWL8fk=
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.2/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s=
github.com/cosmos/ibc-go/v7 v7.3.1 h1:bil1IjnHdyWDASFYKfwdRiNtFP6WK3osW7QFEAgU4I8=
github.com/cosmos/ibc-go/v7 v7.3.1/go.mod h1:wvx4pPBofe5ZdMNV3OFRxSI4auEP5Qfqf8JXLLNV04g=
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
Expand Down
3 changes: 1 addition & 2 deletions network/init-neutrond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,7 @@ set_genesis_param_jq ".app_state.globalfee.params.bypass_min_fee_msg_types" "$BY
set_genesis_param proposer_fee "\"0.25\"" # builder(POB)
set_genesis_param escrow_account_address "\"$CONSUMER_REDISTRIBUTE_ACCOUNT_ADDRESS_B64\"," # builder(POB)
set_genesis_param sudo_call_gas_limit "\"1000000\"" # contractmanager

cat $GENESIS_PATH
set_genesis_param max_gas "\"1000000000\"" # consensus_params

if ! jq -e . "$GENESIS_PATH" >/dev/null 2>&1; then
echo "genesis appears to become incorrect json" >&2
Expand Down
20 changes: 20 additions & 0 deletions proto/neutron/dex/deposit_record.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";
package neutron.dex;

option go_package = "github.com/neutron-org/neutron/x/dex/types";
import "gogoproto/gogo.proto";
import "neutron/dex/pair_id.proto";

message DepositRecord {
PairID pair_id = 1;
string shares_owned = 2 [
(gogoproto.moretags) = "yaml:\"shares_owned\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "shares_owned"
];
int64 center_tick_index = 3;
int64 lower_tick_index = 4;
int64 upper_tick_index = 5;
uint64 fee = 6;
}
Loading
Loading