forked from cerc-io/laconicd-deprecated
bump SDK to v0.39.1 (#386)
* bump sdk version to v0.39.0 candidate * updates * update evm * bump commit * more changes * build * genesis * fix tests * fix tests * bump commit * bump commit * bump commit * add keygen func * bump version to 0.39.0-rc0 * update AnteHandler * fix TxDecoder * lint * fix test * update statedb * changelog * fixes * remove extra files * update make test-import * rename test * bump SDK version to final release * update to 0.39.1-rc1 * fix evm tests * update RPC * minor fixes * update to rc2 * bump to v0.39.1 * fix personal API * fix string type cast ambiguity (#449) * init * fix estimate gas test * minor genesis change * remove comments from unstable commit (stargate release) Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
This commit is contained in:
co-authored by
Alessio Treglia
parent
6fa5fafb12
commit
261f86fdf2
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client/utils"
|
||||
|
||||
"github.com/cosmos/ethermint/x/faucet/types"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/context"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
|
||||
authclient "github.com/cosmos/cosmos-sdk/x/auth/client/utils"
|
||||
|
||||
"github.com/cosmos/ethermint/x/faucet/types"
|
||||
)
|
||||
@@ -70,9 +70,10 @@ func requestHandler(cliCtx context.CLIContext) http.HandlerFunc {
|
||||
}
|
||||
|
||||
func fundedHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
return func(w http.ResponseWriter, _ *http.Request) {
|
||||
res, height, err := cliCtx.Query(fmt.Sprintf("custom/%s/%s", types.QuerierRoute, types.QueryFunded))
|
||||
if rest.CheckInternalServerError(w, err) {
|
||||
if err != nil {
|
||||
rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -38,6 +38,6 @@ func handleMsgFund(ctx sdk.Context, keeper Keeper, msg types.MsgFund) (*sdk.Resu
|
||||
)
|
||||
|
||||
return &sdk.Result{
|
||||
Events: ctx.EventManager().ABCIEvents(),
|
||||
Events: ctx.EventManager().Events(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
+8
-8
@@ -40,14 +40,14 @@ func (AppModuleBasic) RegisterCodec(cdc *codec.Codec) {
|
||||
|
||||
// DefaultGenesis returns default genesis state as raw bytes for the faucet
|
||||
// module.
|
||||
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage {
|
||||
return cdc.MustMarshalJSON(types.DefaultGenesisState())
|
||||
func (AppModuleBasic) DefaultGenesis() json.RawMessage {
|
||||
return types.ModuleCdc.MustMarshalJSON(types.DefaultGenesisState())
|
||||
}
|
||||
|
||||
// ValidateGenesis performs genesis state validation for the faucet module.
|
||||
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, bz json.RawMessage) error {
|
||||
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error {
|
||||
var genesisState types.GenesisState
|
||||
if err := cdc.UnmarshalJSON(bz, &genesisState); err != nil {
|
||||
if err := types.ModuleCdc.UnmarshalJSON(bz, &genesisState); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err)
|
||||
}
|
||||
|
||||
@@ -112,18 +112,18 @@ func (am AppModule) NewQuerierHandler() sdk.Querier {
|
||||
|
||||
// InitGenesis performs genesis initialization for the faucet module. It returns
|
||||
// no validator updates.
|
||||
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate {
|
||||
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate {
|
||||
var genesisState types.GenesisState
|
||||
ModuleCdc.MustUnmarshalJSON(data, &genesisState)
|
||||
types.ModuleCdc.MustUnmarshalJSON(data, &genesisState)
|
||||
InitGenesis(ctx, am.keeper, genesisState)
|
||||
return []abci.ValidatorUpdate{}
|
||||
}
|
||||
|
||||
// ExportGenesis returns the exported genesis state as raw bytes for the faucet
|
||||
// module.
|
||||
func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage {
|
||||
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage {
|
||||
gs := ExportGenesis(ctx, am.keeper)
|
||||
return cdc.MustMarshalJSON(gs)
|
||||
return types.ModuleCdc.MustMarshalJSON(gs)
|
||||
}
|
||||
|
||||
// BeginBlock returns the begin blocker for the faucet module.
|
||||
|
||||
Reference in New Issue
Block a user