Skip to content

Commit

Permalink
Merge pull request #207 from MrXJC/jiacheng/gov
Browse files Browse the repository at this point in the history
IRISHUB-311: finish the parameter interface  definition
  • Loading branch information
wukongcheng authored Sep 12, 2018
2 parents 3abf9ea + 4c30b28 commit 73cd02f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions modules/parameter/parameter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package parameter

import(
sdk "github.com/cosmos/cosmos-sdk/types"
)

type Parameter interface {

InitGenesis()

GetStoreKey() string

SaveValue(ctx sdk.Context)

LoadValue(ctx sdk.Context) bool
}

type SignalParameter interface {
Parameter
}

type GovParameter interface {

Parameter

Valid(json string) error

Update(ctx sdk.Context, json string)

ToJson() string

}

type GovArrayParameter interface {

GovParameter

LoadValueByKey(ctx sdk.Context, key string) bool

Insert(ctx sdk.Context, json string)

}

0 comments on commit 73cd02f

Please sign in to comment.