0g-chain/x/committee/integration_test.go

33 lines
1.5 KiB
Go
Raw Normal View History

2020-04-26 14:28:57 +00:00
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)}
}
2020-04-27 12:57:47 +00:00
var _ types.PubProposal = UnregisteredPubProposal{}
// UnregisteredPubProposal is a pubproposal type that is not registered on the amino codec.
type UnregisteredPubProposal struct{}
2020-04-27 18:19:05 +00:00
func (UnregisteredPubProposal) GetTitle() string { return "unregistered" }
func (UnregisteredPubProposal) GetDescription() string { return "unregistered" }
func (UnregisteredPubProposal) ProposalRoute() string { return "unregistered" }
func (UnregisteredPubProposal) ProposalType() string { return "unregistered" }
func (UnregisteredPubProposal) ValidateBasic() error { return nil }
func (UnregisteredPubProposal) String() string { return "unregistered" }