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 bump v47 to new develop #505

Merged
merged 178 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
1748237
modify: update add liquidity module
mkXultra Apr 6, 2022
aad95c4
modify: add version to the old moudles
mkXultra Apr 6, 2022
34841ee
modify: bug fix ConsensusVersion
mkXultra Apr 6, 2022
bd24966
modify: change upgrade logic
mkXultra Apr 8, 2022
80f82f8
modify: restore deleted module
mkXultra Apr 8, 2022
5d3401d
Merge branch 'develop' of https://github.com/UnUniFi/chain into upgra…
mkXultra Apr 19, 2022
cda6368
feat: enable ibc transfer prams
mkXultra Apr 20, 2022
a9d4439
modify: add comment
mkXultra Apr 20, 2022
3886266
feat: send coin when upgrading
mkXultra Apr 21, 2022
a9f86eb
Merge pull request #192 from UnUniFi/hotfix/update-readme
YasunoriMATSUOKA Jun 9, 2022
e26812d
test: upgrade test
hikaruNagamine Jul 23, 2022
e484a6e
test: Initial version for update
hikaruNagamine Jul 24, 2022
24c5151
test: ibcconnectiontypes comment out
hikaruNagamine Jul 24, 2022
79e0424
test: version upgrade for update confirmation
hikaruNagamine Jul 24, 2022
284f2d0
test: update test v0.2
hikaruNagamine Jul 24, 2022
2ef1933
test: update test v0.3
hikaruNagamine Jul 24, 2022
8796393
test: update test v0.4
hikaruNagamine Jul 25, 2022
31ff5d2
test: update test v0.5
hikaruNagamine Jul 25, 2022
02fbfcd
feat: make upgrades more manageable
hikaruNagamine Jul 27, 2022
7904406
feat: fix banksend target to read from json file
hikaruNagamine Jul 29, 2022
8010328
revert: this reverts commit 2ef1933db366a2188fbf47f8bf5e42eb32a87204.
hikaruNagamine Aug 1, 2022
907e978
revert: this reverts x folder commit-id= 02fbfcd3431be138d8a8e7e44850…
hikaruNagamine Aug 1, 2022
8daa5c8
feat: x module ConsensusVersion 2 -> 1
hikaruNagamine Aug 7, 2022
4bbf872
fix: fixed not to read files
hikaruNagamine Aug 7, 2022
b2ef0e6
feat: upgrade-v1 sample test script
hikaruNagamine Aug 7, 2022
ee79bf8
feat: added vesting and bank send for upgrade processing
hikaruNagamine Aug 17, 2022
0121733
add release and upgrade doc
Aug 17, 2022
fa65ae5
fix: modified test script to match mock genesis.json
hikaruNagamine Aug 18, 2022
1835b59
fix: bank send to vesting account
hikaruNagamine Aug 20, 2022
d4d26b5
fix: upgrade name "upgrade_v1" -> "v1-bate.2"
hikaruNagamine Aug 21, 2022
ef9fc33
fix: register an account that does not exist in genesis.json
hikaruNagamine Aug 21, 2022
053de9b
add script to check changes
Aug 22, 2022
44737b4
send normal token to validators additionaly
Aug 22, 2022
b93c452
forfeit token from certain accounts
Aug 22, 2022
e6545be
modify the location of sendCoins and delete cooresponding lines
Aug 22, 2022
c476c26
extend feats
Aug 22, 2022
297fca9
add moderators section
Aug 22, 2022
e769ea8
fix the part to add vesting amount
Aug 22, 2022
d38b362
fix: fix reference variables "cont_acc" -> "delayed_acc"
hikaruNagamine Aug 22, 2022
65348b7
test: script moderators checks added to also reference vesting amount
hikaruNagamine Aug 22, 2022
475023d
change folder and package name to follow the upgrade name
Aug 23, 2022
9e7fd48
script to serch block time
Aug 23, 2022
d93ac0d
clean
Aug 23, 2022
21bea96
change amount for two validators
Aug 23, 2022
e8ddd00
change version and description
Aug 23, 2022
642fdff
change send list for certain users
Aug 25, 2022
a87f235
Merge pull request #217 from UnUniFi/upgrade/upgrade_v1
Aug 25, 2022
52639a0
create networks dir
Aug 25, 2022
03850ef
Merge pull request #231 from UnUniFi/docs/upgrade-v1-beta.2
mkXultra Aug 25, 2022
0f0bade
give a description
Aug 25, 2022
54283cf
main statement
Aug 25, 2022
3759c63
add setup and help section
Aug 26, 2022
9c829a4
add purpose of this upgrade sec
Aug 26, 2022
2ca69ad
Merge pull request #232 from UnUniFi/docs/upgrade-v1-beta.2
mkXultra Aug 26, 2022
3127558
fix the block height
Aug 26, 2022
1f9e297
fix extimated block time
Aug 26, 2022
056ef67
Merge pull request #233 from UnUniFi/fix/upgrade-v1-beta.2-doc
mkXultra Aug 26, 2022
d73dabc
change name
Aug 29, 2022
41a5312
change upgrade name in chain code
Aug 29, 2022
1c8a7d9
add account in validator list
Aug 30, 2022
d288c0c
fix error by removing unnecessary comma
Aug 30, 2022
7970553
fix the amounts in validator sec
Aug 31, 2022
e1aecf5
add an account in validator sec
Aug 31, 2022
8b45295
add new sec
Sep 1, 2022
27c3b22
add operation for others
Sep 1, 2022
4a36ab9
fix constant
Sep 1, 2022
86084c9
Merge pull request #234 from UnUniFi/upgrade/v1-beta.3
Sep 2, 2022
f29c9ca
fix upgrade name and height
Sep 2, 2022
18657ad
add info about checksum of binary
Sep 2, 2022
4f2dd30
clearer description
Sep 2, 2022
a2f1ce1
fix the date
Sep 2, 2022
2cc3b3b
Merge pull request #241 from UnUniFi/doc/upgrade-v1-beta.3
mkXultra Sep 2, 2022
29479ca
fix md5sum
Sep 6, 2022
b3a1fc5
Merge pull request #243 from UnUniFi/doc/fix-build-status
Sep 6, 2022
54b2b64
remove two addresses from forfeit list since they delegate vested tok…
Sep 7, 2022
5d11ccb
Merge pull request #248 from UnUniFi/patch/upgrade-v1-beta.3
Sep 7, 2022
d557cca
Merge branch 'main' of https://github.com/UnUniFi/chain into upgrade/…
mkXultra Sep 12, 2022
ddfec88
aggregator integration with cosmwasm
jununifi Sep 20, 2022
c92f7f8
Merge branch 'upgrade/enable_q3_module' of github.com:UnUniFi/chain i…
jununifi Sep 20, 2022
56b65a0
wasmd version upgrade to 0.27
jununifi Sep 23, 2022
b448d9c
Update wasmd version to 0.28.0 to prevent halt case like Juno
jununifi Sep 28, 2022
6746927
yield aggregator connector with wasm
jununifi Oct 4, 2022
9ee5c20
add begin withdraw all tx and example command
jununifi Oct 5, 2022
996e4a7
ibc staking code prototype
jununifi Oct 20, 2022
564a17f
add params
jununifi Oct 20, 2022
3069739
resolve build errors on stride ibc integration
jununifi Oct 26, 2022
8372c75
resolve sealed capability keeper and remove duplicated store key
jununifi Nov 1, 2022
25ab1b8
resolve issues while testing
jununifi Nov 4, 2022
c83f9f2
modify: change default msg permmision on ibc
mkXultra Nov 11, 2022
da8b441
Write basic connection codebase between stakeibc and yield aggregator…
jununifi Dec 2, 2022
e2ee254
Add new LiquidStake and RedeemStake using ibc denom
jununifi Dec 5, 2022
3af5390
connect yield aggregator with stake ibc
jununifi Dec 8, 2022
a0e7ef4
add changes on aggregator for liquid staking connection
jununifi Feb 14, 2023
d2c5b31
add testnet generator
jununifi Feb 22, 2023
ec14120
update yieldaggregator to v1
jununifi Mar 9, 2023
00cc51b
feat: iya-v2
kimurayu45z Feb 28, 2023
cec83c5
chore: spec
kimurayu45z Feb 28, 2023
f412720
chore: docs
kimurayu45z Feb 28, 2023
038cf61
feat: proto thirdparty
kimurayu45z Mar 1, 2023
243f908
feat: make proto
kimurayu45z Mar 1, 2023
f752c5d
feat: keeper
kimurayu45z Mar 1, 2023
409dfd3
feat: keeper
kimurayu45z Mar 1, 2023
7011780
feat: keeper
kimurayu45z Mar 2, 2023
e631c14
feat: nullify
kimurayu45z Mar 2, 2023
d189ddc
feat: testutil
kimurayu45z Mar 2, 2023
40efac3
feat: testutil
kimurayu45z Mar 2, 2023
e596723
feat: testutil
kimurayu45z Mar 2, 2023
497152b
feat: iya v2
kimurayu45z Mar 2, 2023
cf21e68
fix: test
kimurayu45z Mar 2, 2023
10a13aa
feat: test
kimurayu45z Mar 2, 2023
9083b84
feat: test
kimurayu45z Mar 2, 2023
bd15934
feat: test
kimurayu45z Mar 2, 2023
c57d74e
feat: test
kimurayu45z Mar 2, 2023
eeb9b1c
feat: multi vault
kimurayu45z Mar 3, 2023
1480783
feat: withdraw commission rate
kimurayu45z Mar 3, 2023
e781e46
chore: docs
kimurayu45z Mar 7, 2023
daa3ddb
feat: mint burn
kimurayu45z Mar 7, 2023
700ea97
fix: testutils
kimurayu45z Mar 7, 2023
fb5970f
feat: lp
kimurayu45z Mar 8, 2023
7738acd
feat: estimate
kimurayu45z Mar 8, 2023
1b434d8
feat: estimate
kimurayu45z Mar 8, 2023
11dc48d
feat: ibc staking
kimurayu45z Mar 8, 2023
ac67d99
feat: cli tx
kimurayu45z Mar 9, 2023
c7a1ad8
feat: tx cli
kimurayu45z Mar 9, 2023
c3391da
feat: strategy module account
kimurayu45z Mar 9, 2023
bbf7b81
chore: comments
kimurayu45z Mar 9, 2023
08e71a4
chore: comment
kimurayu45z Mar 9, 2023
3fff2ad
resolve build error
jununifi Mar 10, 2023
39fb9c7
resolve test after merge
jununifi Mar 10, 2023
2e3730a
further modification on msg server and error handling
jununifi Mar 10, 2023
af755a8
modification on msgserver create/delete vault
jununifi Mar 13, 2023
285ece6
chore: comment
kimurayu45z Mar 13, 2023
1dfc8c4
add unbonding amount getter functionality on records keeper & connect…
jununifi Mar 14, 2023
96bf3cc
Merge branch 'feat/iya_v2_sdk_v045' of github.com:UnUniFi/chain into …
jununifi Mar 14, 2023
7695706
GetUserRedemptionRecordBySenderAndDenom
jununifi Mar 14, 2023
af949c5
basic implementation of strategy todo
jununifi Mar 14, 2023
5ebddfb
Implement validateBasic for MsgTransferVaultOwnership, MsgCreateVault…
jununifi Mar 15, 2023
dc8f18d
implement TODO on create vault
jununifi Mar 15, 2023
5c8ae58
update argument count for delete vault, deposit to vault, transfer va…
jununifi Mar 15, 2023
64a5246
update the param usage for GetUpdatedBalance on stakeibc
jununifi Mar 15, 2023
57e9f95
add osmomath
jununifi Mar 15, 2023
dfd2d97
- Further work for reserveMaintenanceRate change in formula
jununifi Mar 16, 2023
703bc06
add test for stake/unstake strategy
jununifi Mar 17, 2023
7a0a131
- Resolve wrong implementation for GetUserRedemptionRecordBySenderAnd…
jununifi Mar 20, 2023
4bbc458
Add test for VaultAmountInStrategie, VaultUnbondingAmountInStrategies…
jununifi Mar 20, 2023
4809e89
add update for yield aggregator tests, proposal, params, client
jununifi Mar 21, 2023
adf14bb
chore: update swagger
mkXultra Mar 23, 2023
b179b50
fix: jpyx => UnUniFi
Senna46 Mar 23, 2023
91d121d
update proto with params query
jununifi Mar 28, 2023
a64a73d
Merge branch 'feat/iya_v2_sdk_v045' of github.com:UnUniFi/chain into …
jununifi Mar 28, 2023
40c0100
add suggested changes aggregator api route
jununifi Mar 28, 2023
e00afcd
basic changes for sdk upgrade, ibc-go update, wasm update
jununifi Mar 29, 2023
22225d8
remove vault id validation and fix delete vault command
jununifi Mar 29, 2023
9d1df54
apply changes for strategy validation, vault info query, msg route
jununifi Mar 29, 2023
1e30730
- add vault address on vault query for debug
jununifi Mar 30, 2023
b732181
Merge branch 'feat/iya_v2_sdk_v045' of github.com:UnUniFi/chain into …
jununifi Mar 31, 2023
dfe0883
resolve module dependency issues and go mod tidy
jununifi Mar 31, 2023
a9cd410
changes on app.go
jununifi Mar 31, 2023
abe50ac
resolve build error on cmd folder
jununifi Apr 3, 2023
aa4cc0f
basic build error fixes on app.go
jununifi Apr 3, 2023
c6401e3
further update on dependency issues for sdk changes
jununifi Apr 3, 2023
95a815a
remove legacy endpoints
jununifi Apr 3, 2023
5c99ce6
further changes for Dec usage, legacy endpoints, gov module usage
jununifi Apr 3, 2023
86782b4
further changes on gov usage build error fixes
jununifi Apr 3, 2023
8985482
- Resolve cop module build errors for math functions
jununifi Apr 4, 2023
c8c59da
resolve build errors on tests
jununifi Apr 5, 2023
5e29769
put deprecated modules into a directory
jununifi Apr 5, 2023
c588aa4
further dependency removal
jununifi Apr 5, 2023
edbd1d5
- Update app New function input parameters to be normal SDK v47 version
jununifi Apr 6, 2023
da28db6
fix daemon build error
jununifi Apr 6, 2023
7492c55
resolve config init issue
jununifi Apr 6, 2023
178ef42
resolve collect-gentx panic issue
jununifi Apr 7, 2023
72d8cf0
add further changes while checking version issue
jununifi Apr 10, 2023
cf6c706
add changes based on wasmd diff
jununifi Apr 10, 2023
8f9c991
update fee keeper for ibc transfer failure with kvstore nil
jununifi Apr 11, 2023
ec15209
resolve zone registration issue
jununifi Apr 18, 2023
f0722c0
add further fixes for ica registration
jununifi Apr 20, 2023
630238d
fix comment
jununifi Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Release and Upgrade procedures and communications

The `#validators-private` channel on discord will be used for all communications from the team. Only **active validators** should be allowed access, for security reasons.

**The core team will endeavour to always make sure there is 48-72 hours notice of an impending upgrade, unless there is no alternative.**

Most of our validator communications is done on the [UnUniFi Discord](https://discord.gg/BjMtA434f4). You should join, and change your server name to `nick | validator-name`, then ask a mod for permission to see the private validator channels.

## Release versioning

**If a change crosses a major version number, i.e. `3.x.x -> 4.x.x` then it is definitely consensus-breaking.**

In the past, some releases have been consensus-breaking but only incremented a minor version, if clearly indicated. In future we will look to be clearer.

**Only patch versions, i.e. `x.x.1 -> x.x.2`, or `3.1.0 -> 3.1.1` are guaranteed to be non-consensus breaking.**

## Scheduled upgrade via governance

For a SoftwareUpgradeProposal via governance:

1. Validators will be told via announcements channel when the prop is live
2. Validators will be told via announcements channel if it passes
3. Validators will be told via announcements channel when the upgrade instructions are available, and the upgrade will be coordinated in the private validators channel as the target upgrade block nears.

## Emergency upgrade or security patch

If the team needs to upgrade the chain faster than the cadence of governance, then a special procedure applies.

This procedure minimizes the amount that is publicly shared about a potential issue.

1. An announcement calling validators to check in on the private validators channel will be posted on the _validators announcement channel_ on discord. No specifics will be shared here, as it is public.
2. Details of the patch and the upgrade plan will be shared on the private channel, as well as an expected ETA.
3. When instructions are available, they will be pinned, and a second announcement sent on the announcements channel. A thread for acknowledgements will be created for validators to signal readiness.
4. The team will compile a spreadsheet of validator readiness to check we are past 67%.

There are two further considerations:

1. If the change is consensus-breaking, a halt-height will be applied and validators will manually upgrade at that block, after halt.
2. If the change is non-consensus breaking, validators will apply when ready, and then signal readiness.

## Syncing from genesis

The team will be putting together instructions that will be kept up-to-date for syncing without using a backup.
933 changes: 628 additions & 305 deletions app/app.go

Large diffs are not rendered by default.

63 changes: 40 additions & 23 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package app

import (
"encoding/json"
"fmt"
"log"

tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -15,10 +16,7 @@ import (

// ExportAppStateAndValidators exports the state of the application for a genesis
// file.
func (app *App) ExportAppStateAndValidators(
forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error) {

func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error) {
// as if they could withdraw from the start of the next block
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})

Expand All @@ -30,22 +28,19 @@ func (app *App) ExportAppStateAndValidators(
app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs)
}

genState := app.mm.ExportGenesis(ctx, app.appCodec)
genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport)
appState, err := json.MarshalIndent(genState, "", " ")
if err != nil {
return servertypes.ExportedApp{}, err
}

validators, err := staking.WriteValidators(ctx, app.StakingKeeper)
if err != nil {
return servertypes.ExportedApp{}, err
}
return servertypes.ExportedApp{
AppState: appState,
Validators: validators,
Height: height,
ConsensusParams: app.BaseApp.GetConsensusParams(ctx),
}, nil
}, err
}

// prepare for fresh start at zero height
Expand Down Expand Up @@ -76,20 +71,23 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str

// withdraw all validator commission
app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) {
_, err := app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
if err != nil {
panic(err)
}
_, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
return false
})

// withdraw all delegator rewards
dels := app.StakingKeeper.GetAllDelegations(ctx)
for _, delegation := range dels {
_, err := app.DistrKeeper.WithdrawDelegationRewards(ctx, delegation.GetDelegatorAddr(), delegation.GetValidatorAddr())
valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress)
if err != nil {
panic(err)
}

delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress)

if _, err = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr); err != nil {
panic(err)
}
}

// clear validator slash events
Expand All @@ -110,14 +108,29 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str
feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
app.DistrKeeper.SetFeePool(ctx, feePool)

app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil {
panic(err)
}
return false
})

// reinitialize all delegations
for _, del := range dels {
app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, del.GetDelegatorAddr(), del.GetValidatorAddr())
app.DistrKeeper.Hooks().AfterDelegationModified(ctx, del.GetDelegatorAddr(), del.GetValidatorAddr())
valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress)
if err != nil {
panic(err)
}
delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress)

if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil {
// never called as BeforeDelegationCreated always returns nil
panic(fmt.Errorf("error while incrementing period: %w", err))
}

if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil {
// never called as AfterDelegationModified always returns nil
panic(fmt.Errorf("error while creating a new delegation period record: %w", err))
}
}

// reset context height
Expand Down Expand Up @@ -145,12 +158,12 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str

// Iterate through validators by power descending, reset bond heights, and
// update bond intra-tx counters.
store := ctx.KVStore(app.keys[stakingtypes.StoreKey])
store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey))
iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey)
counter := int16(0)

for ; iter.Valid(); iter.Next() {
addr := sdk.ValAddress(iter.Key()[1:])
addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
validator, found := app.StakingKeeper.GetValidator(ctx, addr)
if !found {
panic("expected validator, not found")
Expand All @@ -165,10 +178,14 @@ func (app *App) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []str
counter++
}

iter.Close()
if err := iter.Close(); err != nil {
app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err)
return
}

if _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx); err != nil {
panic(err)
_, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx)
if err != nil {
log.Fatal(err)
}

/* Handle slashing state. */
Expand Down
47 changes: 19 additions & 28 deletions app/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (

"github.com/stretchr/testify/require"

tmdb "github.com/tendermint/tm-db"

abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/libs/log"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

simapp "github.com/cosmos/cosmos-sdk/simapp"
dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/crypto"
"github.com/cometbft/cometbft/crypto/secp256k1"
"github.com/cometbft/cometbft/libs/log"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/server"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

Expand All @@ -32,11 +32,7 @@ import (
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

// "github.com/cosmos/cosmos-sdk/x/supply"
auctionkeeper "github.com/UnUniFi/chain/x/auction/keeper"
cdpkeeper "github.com/UnUniFi/chain/x/cdp/keeper"
incentivekeeper "github.com/UnUniFi/chain/x/incentive/keeper"
pricefeedkeeper "github.com/UnUniFi/chain/x/pricefeed/keeper"
ununifidistkeeper "github.com/UnUniFi/chain/x/ununifidist/keeper"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"

// authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
Expand Down Expand Up @@ -67,18 +63,19 @@ func NewTestApp() TestApp {
config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix)
// config.Seal()

db := tmdb.NewMemDB()
invCheckPeriod := uint(5)
appOptions := make(simtestutil.AppOptionsMap, 0)
appOptions[flags.FlagHome] = DefaultNodeHome
appOptions[server.FlagInvCheckPeriod] = invCheckPeriod

db := dbm.NewMemDB()
tApp := NewApp(
log.NewNopLogger(),
db,
nil,
true,
map[int64]bool{},
"", /* cast.ToString(appOpts.Get(flags.FlagHome)) */
0,
MakeEncodingConfig(), /* a.encCfg */
wasm.EnableAllProposals,
simapp.EmptyAppOptions{},
appOptions,
emptyWasmOpts,
)
return TestApp{App: *tApp}
Expand All @@ -89,24 +86,18 @@ func (tApp TestApp) GetAccountKeeper() authkeeper.AccountKeeper { return tApp.Ac
func (tApp TestApp) GetBankKeeper() bankkeeper.Keeper { return tApp.BankKeeper }

// func (tApp TestApp) GetSupplyKeeper() supply.Keeper { return tApp.SupplyKeeper }
func (tApp TestApp) GetStakingKeeper() stakingkeeper.Keeper { return tApp.StakingKeeper }
func (tApp TestApp) GetStakingKeeper() *stakingkeeper.Keeper { return tApp.StakingKeeper }
func (tApp TestApp) GetSlashingKeeper() slashingkeeper.Keeper { return tApp.SlashingKeeper }
func (tApp TestApp) GetMintKeeper() mintkeeper.Keeper { return tApp.MintKeeper }
func (tApp TestApp) GetDistrKeeper() distrkeeper.Keeper { return tApp.DistrKeeper }
func (tApp TestApp) GetGovKeeper() govkeeper.Keeper { return tApp.GovKeeper }
func (tApp TestApp) GetCrisisKeeper() crisiskeeper.Keeper { return tApp.CrisisKeeper }
func (tApp TestApp) GetUpgradeKeeper() upgradekeeper.Keeper { return tApp.UpgradeKeeper }
func (tApp TestApp) GetCrisisKeeper() *crisiskeeper.Keeper { return tApp.CrisisKeeper }
func (tApp TestApp) GetUpgradeKeeper() *upgradekeeper.Keeper { return tApp.UpgradeKeeper }
func (tApp TestApp) GetParamsKeeper() paramskeeper.Keeper { return tApp.ParamsKeeper }

// func (tApp TestApp) GetVVKeeper() validatorvesting.Keeper { return tApp.vvKeeper }
func (tApp TestApp) GetAuctionKeeper() auctionkeeper.Keeper { return tApp.auctionKeeper }
func (tApp TestApp) GetCDPKeeper() cdpkeeper.Keeper { return tApp.cdpKeeper }
func (tApp TestApp) GetPriceFeedKeeper() pricefeedkeeper.Keeper { return tApp.pricefeedKeeper }

// func (tApp TestApp) GetBep3Keeper() bep3.Keeper { return tApp.bep3Keeper }
func (tApp TestApp) GetUnunifidistKeeper() ununifidistkeeper.Keeper { return tApp.ununifidistKeeper }
func (tApp TestApp) GetIncentiveKeeper() incentivekeeper.Keeper { return tApp.incentiveKeeper }

// func (tApp TestApp) GetHarvestKeeper() harvest.Keeper { return tApp.harvestKeeper }
// func (tApp TestApp) GetCommitteeKeeper() committee.Keeper { return tApp.committeeKeeper }
// func (tApp TestApp) GetIssuanceKeeper() issuance.Keeper { return tApp.issuanceKeeper }
Expand Down
Loading