-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This is an automatic backport of pull request #2217 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details> Co-authored-by: Rootul P <[email protected]>
- Loading branch information
1 parent
c1e8909
commit d305b80
Showing
5 changed files
with
51 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
syntax = "proto3"; | ||
package celestia.mint.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "celestia/mint/v1/mint.proto"; | ||
|
||
option go_package = "github.com/celestiaorg/celestia-app/x/mint/types"; | ||
|
||
// GenesisState defines the mint module's genesis state. | ||
message GenesisState { | ||
// minter is a space for holding current inflation information. | ||
Minter minter = 1 [ (gogoproto.nullable) = false ]; | ||
reserved 1; // 1 was previously used for the `Minter` field. | ||
|
||
// BondDenom is the denomination of the token that should be minted. | ||
string bond_denom = 2; | ||
} |
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 |
---|---|---|
@@ -1,21 +1,26 @@ | ||
package types | ||
|
||
import "errors" | ||
|
||
// NewGenesisState creates a new GenesisState object | ||
func NewGenesisState(minter Minter) *GenesisState { | ||
func NewGenesisState(bondDenom string) *GenesisState { | ||
return &GenesisState{ | ||
Minter: minter, | ||
BondDenom: bondDenom, | ||
} | ||
} | ||
|
||
// DefaultGenesisState creates a default GenesisState object | ||
func DefaultGenesisState() *GenesisState { | ||
return &GenesisState{ | ||
Minter: DefaultMinter(), | ||
BondDenom: DefaultBondDenom, | ||
} | ||
} | ||
|
||
// ValidateGenesis validates the provided genesis state to ensure the | ||
// expected invariants holds. | ||
func ValidateGenesis(data GenesisState) error { | ||
return data.Minter.Validate() | ||
if data.BondDenom == "" { | ||
return errors.New("bond denom cannot be empty") | ||
} | ||
return nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.