-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mint): customized mint module (#169)
* feat(mint): port mint module from cosmos sdk v0.50.7 * feat(mint): port mint module from cosmos sdk v0.50.7 * feat(mint): port mint module from cosmos sdk v0.50.7 * feat(mint): port mint module from cosmos sdk v0.50.7 * feat(mint): remove useless parameters * feat(mint): new inflation function * feat(mint): mint parameters change event log processing * feat(mint): mint module api * feat(mint): placeholder for param change events * feat(mint): fix unit test * feat(mint): fix based on comments * feat(mint): fix based on comments * feat(mint): update readme * feat(mint): update readme
- Loading branch information
1 parent
5be81ee
commit b4d9418
Showing
44 changed files
with
3,219 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package server | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/piplabs/story/client/server/utils" | ||
"github.com/piplabs/story/client/x/mint/keeper" | ||
minttypes "github.com/piplabs/story/client/x/mint/types" | ||
) | ||
|
||
func (s *Server) initMintRoute() { | ||
s.httpMux.HandleFunc("/mint/params", utils.SimpleWrap(s.aminoCodec, s.GetMintParams)) | ||
} | ||
|
||
// GetMintParams queries params of the mint module. | ||
func (s *Server) GetMintParams(r *http.Request) (resp any, err error) { | ||
queryContext, err := s.createQueryContextByHeader(r) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
queryResp, err := keeper.NewQuerier(s.store.GetMintKeeper()).Params(queryContext, &minttypes.QueryParamsRequest{}) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return queryResp, nil | ||
} |
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.