mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
21 lines
839 B
Go
21 lines
839 B
Go
package committee_test
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/kava-labs/kava/app"
|
|
"github.com/kava-labs/kava/x/committee/types"
|
|
)
|
|
|
|
// Avoid cluttering test cases with long function names
|
|
func i(in int64) sdk.Int { return sdk.NewInt(in) }
|
|
func d(str string) sdk.Dec { return sdk.MustNewDecFromStr(str) }
|
|
func c(denom string, amount int64) sdk.Coin { return sdk.NewInt64Coin(denom, amount) }
|
|
func cs(coins ...sdk.Coin) sdk.Coins { return sdk.NewCoins(coins...) }
|
|
|
|
// NewCommitteeGenesisState marshals a committee genesis state into json for use in initializing test apps.
|
|
func NewCommitteeGenesisState(cdc *codec.Codec, gs types.GenesisState) app.GenesisState {
|
|
return app.GenesisState{types.ModuleName: cdc.MustMarshalJSON(gs)}
|
|
}
|