-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(testutil): deduplicate simapp setup (#1197)
* refactor(testutil): deduplicate simapp setup * chore: update changelog
- Loading branch information
Showing
56 changed files
with
275 additions
and
646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package genesis | ||
|
||
import ( | ||
"time" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | ||
|
||
"github.com/NibiruChain/nibiru/app" | ||
"github.com/NibiruChain/nibiru/x/common/denoms" | ||
) | ||
|
||
/* | ||
NewTestGenesisState returns 'NewGenesisState' using the default | ||
genesis as input. The blockchain genesis state is represented as a map from module | ||
identifier strings to raw json messages. | ||
*/ | ||
func NewTestGenesisState() app.GenesisState { | ||
encodingConfig := app.MakeTestEncodingConfig() | ||
codec := encodingConfig.Marshaler | ||
genState := app.NewDefaultGenesisState(codec) | ||
|
||
// Set short voting period to allow fast gov proposals in tests | ||
var govGenState govtypes.GenesisState | ||
codec.MustUnmarshalJSON(genState[govtypes.ModuleName], &govGenState) | ||
govGenState.VotingParams.VotingPeriod = time.Second * 20 | ||
govGenState.DepositParams.MinDeposit = sdk.NewCoins(sdk.NewInt64Coin(denoms.NIBI, 1_000_000)) // min deposit of 1 NIBI | ||
genState[govtypes.ModuleName] = codec.MustMarshalJSON(&govGenState) | ||
|
||
return genState | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.