-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from MrXJC/jiacheng/gov
IRISHUB-311: finish the parameter interface definition
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 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
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) | ||
|
||
} |