forked from cerc-io/laconicd-deprecated
		
	chore(evm): Deprecate x/params usage in x/evm (#1472)
* imp(evm): Migrate from old Cosmos SDK params module to new way of keeping params in module Keeper * Updated changelog * Apply changes from code review * (impv): Added Shanghai and Cancun blocks to current types and latest migration * (tests): Update unit tests to include Shanghai and Cancun blocks * (fix) - ran golangci-lint on the entire project * (fix) - remove deprecated params method * (impv): added marshaling of booleans per individual param key * (impv): added individual param getting and setting * (impv): replaced getters with individual param * (impv): added amino codec for MsgEthereumTx * Added changes suggested in code review * (fix): updated the migration files for v4 * (fix): fixed unit tests panic for incorrect interface * (fix): updated module msg handler * (fix): rename to original params getter method * (refactor): registered implementation for the new msg * (refactor): added correct amino codec for MsgUpdateParams and removed for MsgEthTx * Applied changes from code review * (fix): removed unnecessary duplicate * (fix): removed params_legacy from the types and moved logic to migration * (fix): Added v4 mocks to the migrations_test * (fix): undo all the non related work regarding the Cancun and Shanghai blocks * (fix): reverted linting the entire project - will make a separate PR for it * Applied changes from review * Applied changes from code review * (fix): removed comments * (fix): Ran formatter and fixed linting issues on unsed functions * (fix): Linting issues resolved * (fix): refactor migrations and added default EIPs * (fix): Combined into one call * (fix): Added more straightforward way to handle migration * (fix): corrected migration test * Applied changes from code review * (fix): Linter fix * (fix): Linter * (fix): Lint proto files * Apply suggestions from code review Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> * (fix): Added new block to migration * (fix): Added additional comments and formatted proto files * (fix): Added name to unit test cases * (fix): removed unused import * Apply changes from code review * (fix): typo * (fix): remove HTTP endpoint exposure * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> * applied changes from code review * fix: extra line added in merge removed * fix: applied changes from code review Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									e4ac0c9b42
								
							
						
					
					
						commit
						0f7bdceaa0
					
				| @ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | ||||
| 
 | ||||
| ### State Machine Breaking | ||||
| 
 | ||||
| * (evm) [#1472](https://github.com/evmos/ethermint/pull/1472) Deprecate x/params usage in x/evm | ||||
| * (deps) #[1575](https://github.com/evmos/ethermint/pull/1575) bump ibc-go to [`v6.1.0`] | ||||
| * (deps) [#1361](https://github.com/evmos/ethermint/pull/1361) Bump ibc-go to [`v5.1.0`](https://github.com/cosmos/ibc-go/releases/tag/v5.1.0) | ||||
| * (evm) [\#1272](https://github.com/evmos/ethermint/pull/1272) Implement modular interface for the EVM. | ||||
|  | ||||
| @ -50,10 +50,10 @@ type EVMKeeper interface { | ||||
| 	ResetTransientGasUsed(ctx sdk.Context) | ||||
| 	GetTxIndexTransient(ctx sdk.Context) uint64 | ||||
| 	GetChainConfig(ctx sdk.Context) evmtypes.ChainConfig | ||||
| 	GetEVMDenom(ctx sdk.Context) string | ||||
| 	GetEnableCreate(ctx sdk.Context) bool | ||||
| 	GetEnableCall(ctx sdk.Context) bool | ||||
| 	GetAllowUnprotectedTxs(ctx sdk.Context) bool | ||||
| 	GetEVMDenom(ctx sdk.Context) string | ||||
| 	GetEnableCall(ctx sdk.Context) bool | ||||
| 	GetEnableCreate(ctx sdk.Context) bool | ||||
| } | ||||
| 
 | ||||
| type protoTxProvider interface { | ||||
|  | ||||
| @ -416,8 +416,9 @@ func NewEthermintApp( | ||||
| 		appCodec, app.GetSubspace(feemarkettypes.ModuleName), keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], | ||||
| 	) | ||||
| 
 | ||||
| 	// Set authority to x/gov module account to only expect the module account to update params
 | ||||
| 	app.EvmKeeper = evmkeeper.NewKeeper( | ||||
| 		appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), | ||||
| 		appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), | ||||
| 		app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, | ||||
| 		nil, geth.NewEVM, tracer, | ||||
| 	) | ||||
| @ -505,7 +506,7 @@ func NewEthermintApp( | ||||
| 		ibc.NewAppModule(app.IBCKeeper), | ||||
| 		transferModule, | ||||
| 		// Ethermint app modules
 | ||||
| 		evm.NewAppModule(app.EvmKeeper, app.AccountKeeper), | ||||
| 		evm.NewAppModule(app.EvmKeeper, app.AccountKeeper, app.GetSubspace(evmtypes.ModuleName)), | ||||
| 		feemarket.NewAppModule(app.FeeMarketKeeper), | ||||
| 	) | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										6
									
								
								client/docs/statik/statik.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								client/docs/statik/statik.go
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -15,7 +15,11 @@ message Params { | ||||
|   // enable_call toggles state transitions that use the vm.Call function | ||||
|   bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""]; | ||||
|   // extra_eips defines the additional EIPs for the vm.Config | ||||
|   repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""]; | ||||
|   ExtraEIPs extra_eips = 4 [ | ||||
|     (gogoproto.customname) = "ExtraEIPs", | ||||
|     (gogoproto.moretags) = "yaml:\"extra_eips\"", | ||||
|     (gogoproto.nullable) = false | ||||
|   ]; | ||||
|   // chain_config defines the EVM chain configuration parameters | ||||
|   ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; | ||||
|   // allow_unprotected_txs defines if replay-protected (i.e non EIP155 | ||||
| @ -23,6 +27,12 @@ message Params { | ||||
|   bool allow_unprotected_txs = 6; | ||||
| } | ||||
| 
 | ||||
| // ExtraEIPs represents extra EIPs for the vm.Config | ||||
| message ExtraEIPs { | ||||
|   // eips defines the additional EIPs for the vm.Config | ||||
|   repeated int64 eips = 1 [(gogoproto.customname) = "EIPs", (gogoproto.moretags) = "yaml:\"eips\""]; | ||||
| } | ||||
| 
 | ||||
| // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values | ||||
| // instead of *big.Int. | ||||
| message ChainConfig { | ||||
| @ -39,7 +49,7 @@ message ChainConfig { | ||||
|   ]; | ||||
|   // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork | ||||
|   bool dao_fork_support = 3 | ||||
|   [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""]; | ||||
|       [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""]; | ||||
|   // eip150_block: EIP150 implements the Gas price changes | ||||
|   // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) | ||||
|   string eip150_block = 4 [ | ||||
| @ -127,7 +137,6 @@ message ChainConfig { | ||||
|     (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||||
|     (gogoproto.moretags) = "yaml:\"cancun_block\"" | ||||
|   ]; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| // State represents a single Storage key value pair item. | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| syntax = "proto3"; | ||||
| package ethermint.evm.v1; | ||||
| 
 | ||||
| import "cosmos/msg/v1/msg.proto"; | ||||
| import "cosmos_proto/cosmos.proto"; | ||||
| import "ethermint/evm/v1/evm.proto"; | ||||
| import "gogoproto/gogo.proto"; | ||||
| @ -15,6 +16,9 @@ service Msg { | ||||
|   rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { | ||||
|     option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; | ||||
|   }; | ||||
|   // UpdateParams defined a governance operation for updating the x/evm module parameters. | ||||
|   // The authority is hard-coded to the Cosmos SDK x/gov module account | ||||
|   rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); | ||||
| } | ||||
| 
 | ||||
| // MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. | ||||
| @ -158,3 +162,19 @@ message MsgEthereumTxResponse { | ||||
|   // gas_used specifies how much gas was consumed by the transaction | ||||
|   uint64 gas_used = 5; | ||||
| } | ||||
| 
 | ||||
| // MsgUpdateParams defines a Msg for updating the x/evm module parameters. | ||||
| message MsgUpdateParams { | ||||
|   option (cosmos.msg.v1.signer) = "authority"; | ||||
| 
 | ||||
|   // authority is the address of the governance account. | ||||
|   string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||||
| 
 | ||||
|   // params defines the x/evm parameters to update. | ||||
|   // NOTE: All parameters must be supplied. | ||||
|   Params params = 2 [(gogoproto.nullable) = false]; | ||||
| } | ||||
| 
 | ||||
| // MsgUpdateParamsResponse defines the response structure for executing a | ||||
| // MsgUpdateParams message. | ||||
| message MsgUpdateParamsResponse {} | ||||
|  | ||||
| @ -7,8 +7,6 @@ import ( | ||||
| 	"path/filepath" | ||||
| 	"testing" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/crypto/ethsecp256k1" | ||||
| 
 | ||||
| 	dbm "github.com/tendermint/tm-db" | ||||
| 
 | ||||
| 	"github.com/cosmos/cosmos-sdk/client" | ||||
| @ -21,6 +19,7 @@ import ( | ||||
| 	tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/app" | ||||
| 	"github.com/evmos/ethermint/crypto/ethsecp256k1" | ||||
| 	"github.com/evmos/ethermint/crypto/hd" | ||||
| 	"github.com/evmos/ethermint/encoding" | ||||
| 	"github.com/evmos/ethermint/indexer" | ||||
|  | ||||
| @ -39,7 +39,10 @@ func InitGenesis( | ||||
| ) []abci.ValidatorUpdate { | ||||
| 	k.WithChainID(ctx) | ||||
| 
 | ||||
| 	k.SetParams(ctx, data.Params) | ||||
| 	err := k.SetParams(ctx, data.Params) | ||||
| 	if err != nil { | ||||
| 		panic(fmt.Errorf("error setting params %s", err)) | ||||
| 	} | ||||
| 
 | ||||
| 	// ensure evm module account is set
 | ||||
| 	if addr := accountKeeper.GetModuleAddress(types.ModuleName); addr == nil { | ||||
|  | ||||
| @ -30,10 +30,11 @@ func NewHandler(server types.MsgServer) sdk.Handler { | ||||
| 
 | ||||
| 		switch msg := msg.(type) { | ||||
| 		case *types.MsgEthereumTx: | ||||
| 			// execute state transition
 | ||||
| 			res, err := server.EthereumTx(sdk.WrapSDKContext(ctx), msg) | ||||
| 			return sdk.WrapServiceResult(ctx, res, err) | ||||
| 
 | ||||
| 		case *types.MsgUpdateParams: | ||||
| 			res, err := server.UpdateParams(sdk.WrapSDKContext(ctx), msg) | ||||
| 			return sdk.WrapServiceResult(ctx, res, err) | ||||
| 		default: | ||||
| 			err := errorsmod.Wrapf(errortypes.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) | ||||
| 			return nil, err | ||||
|  | ||||
| @ -540,7 +540,11 @@ func (suite *KeeperTestSuite) TestEstimateGas() { | ||||
| 			"enough balance", | ||||
| 			func() { | ||||
| 				args = types.TransactionArgs{To: &common.Address{}, From: &suite.address, Value: (*hexutil.Big)(big.NewInt(100))} | ||||
| 			}, false, 0, false}, | ||||
| 			}, | ||||
| 			false, | ||||
| 			0, | ||||
| 			false, | ||||
| 		}, | ||||
| 		// should success, because gas limit lower than 21000 is ignored
 | ||||
| 		{ | ||||
| 			"gas exceed allowance", | ||||
| @ -1261,9 +1265,7 @@ func (suite *KeeperTestSuite) TestQueryBaseFee() { | ||||
| } | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestEthCall() { | ||||
| 	var ( | ||||
| 		req *types.EthCallRequest | ||||
| 	) | ||||
| 	var req *types.EthCallRequest | ||||
| 
 | ||||
| 	address := tests.GenerateAddress() | ||||
| 	suite.Require().Equal(uint64(0), suite.app.EvmKeeper.GetNonce(suite.ctx, address)) | ||||
| @ -1334,7 +1336,6 @@ func (suite *KeeperTestSuite) TestEthCall() { | ||||
| 			} | ||||
| 		}) | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestEmptyRequest() { | ||||
|  | ||||
| @ -23,7 +23,6 @@ import ( | ||||
| 	"github.com/cosmos/cosmos-sdk/store/prefix" | ||||
| 	storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||||
| 	"github.com/ethereum/go-ethereum/common" | ||||
| 	"github.com/ethereum/go-ethereum/core" | ||||
| 	ethtypes "github.com/ethereum/go-ethereum/core/types" | ||||
| @ -51,8 +50,8 @@ type Keeper struct { | ||||
| 	// key to access the transient store, which is reset on every block during Commit
 | ||||
| 	transientKey storetypes.StoreKey | ||||
| 
 | ||||
| 	// module specific parameter space that can be configured through governance
 | ||||
| 	paramSpace paramtypes.Subspace | ||||
| 	// the address capable of executing a MsgUpdateParams message. Typically, this should be the x/gov module account.
 | ||||
| 	authority sdk.AccAddress | ||||
| 	// access to account state
 | ||||
| 	accountKeeper types.AccountKeeper | ||||
| 	// update balance and accounting operations with coins
 | ||||
| @ -82,7 +81,7 @@ type Keeper struct { | ||||
| func NewKeeper( | ||||
| 	cdc codec.BinaryCodec, | ||||
| 	storeKey, transientKey storetypes.StoreKey, | ||||
| 	paramSpace paramtypes.Subspace, | ||||
| 	authority sdk.AccAddress, | ||||
| 	ak types.AccountKeeper, | ||||
| 	bankKeeper types.BankKeeper, | ||||
| 	sk types.StakingKeeper, | ||||
| @ -96,15 +95,15 @@ func NewKeeper( | ||||
| 		panic("the EVM module account has not been set") | ||||
| 	} | ||||
| 
 | ||||
| 	// set KeyTable if it has not already been set
 | ||||
| 	if !paramSpace.HasKeyTable() { | ||||
| 		paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) | ||||
| 	// ensure the authority account is correct
 | ||||
| 	if err := sdk.VerifyAddressFormat(authority); err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
| 
 | ||||
| 	// NOTE: we pass in the parameter space to the CommitStateDB in order to use custom denominations for the EVM operations
 | ||||
| 	return &Keeper{ | ||||
| 		cdc:               cdc, | ||||
| 		paramSpace:        paramSpace, | ||||
| 		authority:         authority, | ||||
| 		accountKeeper:     ak, | ||||
| 		bankKeeper:        bankKeeper, | ||||
| 		stakingKeeper:     sk, | ||||
| @ -156,6 +155,11 @@ func (k Keeper) EmitBlockBloomEvent(ctx sdk.Context, bloom ethtypes.Bloom) { | ||||
| 	) | ||||
| } | ||||
| 
 | ||||
| // GetAuthority returns the x/evm module authority address
 | ||||
| func (k Keeper) GetAuthority() sdk.AccAddress { | ||||
| 	return k.authority | ||||
| } | ||||
| 
 | ||||
| // GetBlockBloomTransient returns bloom bytes for the current block height
 | ||||
| func (k Keeper) GetBlockBloomTransient(ctx sdk.Context) *big.Int { | ||||
| 	store := prefix.NewStore(ctx.TransientStore(k.transientKey), types.KeyPrefixTransientBloom) | ||||
| @ -312,8 +316,7 @@ func (k *Keeper) GetNonce(ctx sdk.Context, addr common.Address) uint64 { | ||||
| // GetBalance load account's balance of gas token
 | ||||
| func (k *Keeper) GetBalance(ctx sdk.Context, addr common.Address) *big.Int { | ||||
| 	cosmosAddr := sdk.AccAddress(addr.Bytes()) | ||||
| 	evmDenom := "" | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEVMDenom, &evmDenom) | ||||
| 	evmDenom := k.GetEVMDenom(ctx) | ||||
| 	// if node is pruned, params is empty. Return invalid value
 | ||||
| 	if evmDenom == "" { | ||||
| 		return big.NewInt(-1) | ||||
|  | ||||
| @ -489,10 +489,8 @@ func (suite *KeeperTestSuite) TestGetAccountStorage() { | ||||
| 				i++ | ||||
| 				return false | ||||
| 			}) | ||||
| 
 | ||||
| 		}) | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestGetAccountOrEmpty() { | ||||
| @ -529,7 +527,6 @@ func (suite *KeeperTestSuite) TestGetAccountOrEmpty() { | ||||
| 			} else { | ||||
| 				suite.Require().NotEqual(empty, res) | ||||
| 			} | ||||
| 
 | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -15,14 +15,27 @@ | ||||
| // along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE
 | ||||
| package keeper | ||||
| 
 | ||||
| import ( | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	v4 "github.com/evmos/ethermint/x/evm/migrations/v4" | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| ) | ||||
| 
 | ||||
| // Migrator is a struct for handling in-place store migrations.
 | ||||
| type Migrator struct { | ||||
| 	keeper Keeper | ||||
| 	keeper         Keeper | ||||
| 	legacySubspace types.Subspace | ||||
| } | ||||
| 
 | ||||
| // NewMigrator returns a new Migrator.
 | ||||
| func NewMigrator(keeper Keeper) Migrator { | ||||
| func NewMigrator(keeper Keeper, legacySubspace types.Subspace) Migrator { | ||||
| 	return Migrator{ | ||||
| 		keeper: keeper, | ||||
| 		keeper:         keeper, | ||||
| 		legacySubspace: legacySubspace, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Migrate3to4 migrates the store from consensus version 3 to 4
 | ||||
| func (m Migrator) Migrate3to4(ctx sdk.Context) error { | ||||
| 	return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc) | ||||
| } | ||||
|  | ||||
							
								
								
									
										42
									
								
								x/evm/keeper/migrations_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								x/evm/keeper/migrations_test.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,42 @@ | ||||
| package keeper_test | ||||
| 
 | ||||
| import ( | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	evmkeeper "github.com/evmos/ethermint/x/evm/keeper" | ||||
| 	v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types" | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| ) | ||||
| 
 | ||||
| type mockSubspace struct { | ||||
| 	ps v4types.V4Params | ||||
| } | ||||
| 
 | ||||
| func newMockSubspace(ps v4types.V4Params) mockSubspace { | ||||
| 	return mockSubspace{ps: ps} | ||||
| } | ||||
| 
 | ||||
| func (ms mockSubspace) GetParamSetIfExists(_ sdk.Context, ps types.LegacyParams) { | ||||
| 	*ps.(*v4types.V4Params) = ms.ps | ||||
| } | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestMigrations() { | ||||
| 	legacySubspace := newMockSubspace(v4types.DefaultParams()) | ||||
| 	migrator := evmkeeper.NewMigrator(*suite.app.EvmKeeper, legacySubspace) | ||||
| 
 | ||||
| 	testCases := []struct { | ||||
| 		name        string | ||||
| 		migrateFunc func(ctx sdk.Context) error | ||||
| 	}{ | ||||
| 		{ | ||||
| 			"Run Migrate3to4", | ||||
| 			migrator.Migrate3to4, | ||||
| 		}, | ||||
| 	} | ||||
| 
 | ||||
| 	for _, tc := range testCases { | ||||
| 		suite.Run(tc.name, func() { | ||||
| 			err := tc.migrateFunc(suite.ctx) | ||||
| 			suite.Require().NoError(err) | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
| @ -21,6 +21,8 @@ import ( | ||||
| 	"fmt" | ||||
| 	"strconv" | ||||
| 
 | ||||
| 	govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | ||||
| 
 | ||||
| 	tmbytes "github.com/tendermint/tendermint/libs/bytes" | ||||
| 	tmtypes "github.com/tendermint/tendermint/types" | ||||
| 
 | ||||
| @ -140,3 +142,20 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t | ||||
| 
 | ||||
| 	return response, nil | ||||
| } | ||||
| 
 | ||||
| // UpdateParams implements the gRPC MsgServer interface. When an UpdateParams
 | ||||
| // proposal passes, it updates the module parameters. The update can only be
 | ||||
| // performed if the requested authority is the Cosmos SDK governance module
 | ||||
| // account.
 | ||||
| func (k *Keeper) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { | ||||
| 	if k.authority.String() != req.Authority { | ||||
| 		return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority, expected %s, got %s", k.authority.String(), req.Authority) | ||||
| 	} | ||||
| 
 | ||||
| 	ctx := sdk.UnwrapSDKContext(goCtx) | ||||
| 	if err := k.SetParams(ctx, req.Params); err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 
 | ||||
| 	return &types.MsgUpdateParamsResponse{}, nil | ||||
| } | ||||
|  | ||||
| @ -3,6 +3,9 @@ package keeper_test | ||||
| import ( | ||||
| 	"math/big" | ||||
| 
 | ||||
| 	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||||
| 	govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" | ||||
| 
 | ||||
| 	ethtypes "github.com/ethereum/go-ethereum/core/types" | ||||
| 	"github.com/ethereum/go-ethereum/params" | ||||
| 	"github.com/evmos/ethermint/x/evm/statedb" | ||||
| @ -78,3 +81,37 @@ func (suite *KeeperTestSuite) TestEthereumTx() { | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestUpdateParams() { | ||||
| 	testCases := []struct { | ||||
| 		name      string | ||||
| 		request   *types.MsgUpdateParams | ||||
| 		expectErr bool | ||||
| 	}{ | ||||
| 		{ | ||||
| 			name:      "fail - invalid authority", | ||||
| 			request:   &types.MsgUpdateParams{Authority: "foobar"}, | ||||
| 			expectErr: true, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name: "pass - valid Update msg", | ||||
| 			request: &types.MsgUpdateParams{ | ||||
| 				Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), | ||||
| 				Params:    types.DefaultParams(), | ||||
| 			}, | ||||
| 			expectErr: false, | ||||
| 		}, | ||||
| 	} | ||||
| 
 | ||||
| 	for _, tc := range testCases { | ||||
| 		tc := tc | ||||
| 		suite.Run("MsgUpdateParams", func() { | ||||
| 			_, err := suite.app.EvmKeeper.UpdateParams(suite.ctx, tc.request) | ||||
| 			if tc.expectErr { | ||||
| 				suite.Require().Error(err) | ||||
| 			} else { | ||||
| 				suite.Require().NoError(err) | ||||
| 			} | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -17,57 +17,135 @@ package keeper | ||||
| 
 | ||||
| import ( | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| ) | ||||
| 
 | ||||
| // GetParams returns the total set of evm parameters.
 | ||||
| func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { | ||||
| 	// TODO: update once https://github.com/cosmos/cosmos-sdk/pull/12615 is merged
 | ||||
| 	// and released
 | ||||
| 	for _, pair := range params.ParamSetPairs() { | ||||
| 		k.paramSpace.GetIfExists(ctx, pair.Key, pair.Value) | ||||
| 	} | ||||
| 	evmDenom := k.GetEVMDenom(ctx) | ||||
| 	allowUnprotectedTx := k.GetAllowUnprotectedTxs(ctx) | ||||
| 	enableCreate := k.GetEnableCreate(ctx) | ||||
| 	enableCall := k.GetEnableCall(ctx) | ||||
| 	chainCfg := k.GetChainConfig(ctx) | ||||
| 	extraEIPs := k.GetExtraEIPs(ctx) | ||||
| 
 | ||||
| 	return params | ||||
| 	return types.NewParams(evmDenom, allowUnprotectedTx, enableCreate, enableCall, chainCfg, extraEIPs) | ||||
| } | ||||
| 
 | ||||
| // SetParams sets the evm parameters to the param space.
 | ||||
| func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { | ||||
| 	k.paramSpace.SetParamSet(ctx, ¶ms) | ||||
| // SetParams sets the EVM params each in their individual key for better get performance
 | ||||
| func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { | ||||
| 	if err := params.Validate(); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	k.setExtraEIPs(ctx, params.ExtraEIPs) | ||||
| 	k.setChainConfig(ctx, params.ChainConfig) | ||||
| 	k.setEvmDenom(ctx, params.EvmDenom) | ||||
| 	k.setEnableCall(ctx, params.EnableCall) | ||||
| 	k.setEnableCreate(ctx, params.EnableCreate) | ||||
| 	k.setAllowUnprotectedTxs(ctx, params.AllowUnprotectedTxs) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| // GetExtraEIPs returns the extra EIPs enabled on the chain.
 | ||||
| func (k Keeper) GetExtraEIPs(ctx sdk.Context) types.ExtraEIPs { | ||||
| 	var extraEIPs types.ExtraEIPs | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	bz := store.Get(types.ParamStoreKeyExtraEIPs) | ||||
| 	if len(bz) == 0 { | ||||
| 		return extraEIPs | ||||
| 	} | ||||
| 	k.cdc.MustUnmarshal(bz, &extraEIPs) | ||||
| 	return extraEIPs | ||||
| } | ||||
| 
 | ||||
| // GetChainConfig returns the chain configuration parameter.
 | ||||
| func (k Keeper) GetChainConfig(ctx sdk.Context) types.ChainConfig { | ||||
| 	var chainCfg types.ChainConfig | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyChainConfig, &chainCfg) | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	bz := store.Get(types.ParamStoreKeyChainConfig) | ||||
| 	if len(bz) == 0 { | ||||
| 		return chainCfg | ||||
| 	} | ||||
| 	k.cdc.MustUnmarshal(bz, &chainCfg) | ||||
| 	return chainCfg | ||||
| } | ||||
| 
 | ||||
| // GetEVMDenom returns the EVM denom.
 | ||||
| func (k Keeper) GetEVMDenom(ctx sdk.Context) string { | ||||
| 	var evmDenom string | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEVMDenom, &evmDenom) | ||||
| 	return evmDenom | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	bz := store.Get(types.ParamStoreKeyEVMDenom) | ||||
| 	if len(bz) == 0 { | ||||
| 		return "" | ||||
| 	} | ||||
| 	return string(bz) | ||||
| } | ||||
| 
 | ||||
| // GetEnableCall returns true if the EVM Call operation is enabled.
 | ||||
| func (k Keeper) GetEnableCall(ctx sdk.Context) bool { | ||||
| 	var enableCall bool | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCall, &enableCall) | ||||
| 	return enableCall | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	return store.Has(types.ParamStoreKeyEnableCall) | ||||
| } | ||||
| 
 | ||||
| // GetEnableCreate returns true if the EVM Create contract operation is enabled.
 | ||||
| func (k Keeper) GetEnableCreate(ctx sdk.Context) bool { | ||||
| 	var enableCreate bool | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyEnableCreate, &enableCreate) | ||||
| 	return enableCreate | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	return store.Has(types.ParamStoreKeyEnableCreate) | ||||
| } | ||||
| 
 | ||||
| // GetAllowUnprotectedTxs returns true if unprotected txs (i.e non-replay protected as per EIP-155) are supported by the chain.
 | ||||
| func (k Keeper) GetAllowUnprotectedTxs(ctx sdk.Context) bool { | ||||
| 	var allowUnprotectedTx bool | ||||
| 	k.paramSpace.GetIfExists(ctx, types.ParamStoreKeyAllowUnprotectedTxs, &allowUnprotectedTx) | ||||
| 	return allowUnprotectedTx | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	return store.Has(types.ParamStoreKeyAllowUnprotectedTxs) | ||||
| } | ||||
| 
 | ||||
| // setChainConfig sets the ChainConfig in the store
 | ||||
| func (k Keeper) setChainConfig(ctx sdk.Context, chainCfg types.ChainConfig) { | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	chainCfgBz := k.cdc.MustMarshal(&chainCfg) | ||||
| 	store.Set(types.ParamStoreKeyChainConfig, chainCfgBz) | ||||
| } | ||||
| 
 | ||||
| // setExtraEIPs sets the ExtraEIPs in the store
 | ||||
| func (k Keeper) setExtraEIPs(ctx sdk.Context, extraEIPs types.ExtraEIPs) { | ||||
| 	extraEIPsBz := k.cdc.MustMarshal(&extraEIPs) | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	store.Set(types.ParamStoreKeyExtraEIPs, extraEIPsBz) | ||||
| } | ||||
| 
 | ||||
| // setEvmDenom sets the EVMDenom param in the store
 | ||||
| func (k Keeper) setEvmDenom(ctx sdk.Context, evmDenom string) { | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	store.Set(types.ParamStoreKeyEVMDenom, []byte(evmDenom)) | ||||
| } | ||||
| 
 | ||||
| // setAllowUnprotectedTxs sets the AllowUnprotectedTxs param in the store
 | ||||
| func (k Keeper) setAllowUnprotectedTxs(ctx sdk.Context, enable bool) { | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	if enable { | ||||
| 		store.Set(types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01}) | ||||
| 		return | ||||
| 	} | ||||
| 	store.Delete(types.ParamStoreKeyAllowUnprotectedTxs) | ||||
| } | ||||
| 
 | ||||
| // setEnableCreate sets the EnableCreate param in the store
 | ||||
| func (k Keeper) setEnableCreate(ctx sdk.Context, enable bool) { | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	if enable { | ||||
| 		store.Set(types.ParamStoreKeyEnableCreate, []byte{0x01}) | ||||
| 		return | ||||
| 	} | ||||
| 	store.Delete(types.ParamStoreKeyEnableCreate) | ||||
| } | ||||
| 
 | ||||
| // setEnableCall sets the EnableCall param in the store
 | ||||
| func (k Keeper) setEnableCall(ctx sdk.Context, enable bool) { | ||||
| 	store := ctx.KVStore(k.storeKey) | ||||
| 	if enable { | ||||
| 		store.Set(types.ParamStoreKeyEnableCall, []byte{0x01}) | ||||
| 		return | ||||
| 	} | ||||
| 	store.Delete(types.ParamStoreKeyEnableCall) | ||||
| } | ||||
|  | ||||
| @ -1,8 +1,9 @@ | ||||
| package keeper_test | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| 	"reflect" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| ) | ||||
| 
 | ||||
| func (suite *KeeperTestSuite) TestParams() { | ||||
| @ -91,5 +92,4 @@ func (suite *KeeperTestSuite) TestParams() { | ||||
| 			suite.Require().Equal(tc.expected, outcome) | ||||
| 		}) | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -143,7 +143,6 @@ func newNativeMessage( | ||||
| 	msgSigner := ethtypes.MakeSigner(cfg, big.NewInt(blockHeight)) | ||||
| 
 | ||||
| 	msg, baseFee, err := newEthMsgTx(nonce, blockHeight, address, cfg, krSigner, ethSigner, txType, data, accessList) | ||||
| 
 | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
| @ -897,7 +897,6 @@ func (suite *KeeperTestSuite) TestSetBalance() { | ||||
| 				suite.Require().NoError(err) | ||||
| 				suite.Require().Equal(amount, balance) | ||||
| 			} | ||||
| 
 | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
|  | ||||
							
								
								
									
										51
									
								
								x/evm/migrations/v4/migrate.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								x/evm/migrations/v4/migrate.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,51 @@ | ||||
| package v4 | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/cosmos/cosmos-sdk/codec" | ||||
| 	storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types" | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| ) | ||||
| 
 | ||||
| // MigrateStore migrates the x/evm module state from the consensus version 3 to
 | ||||
| // version 4. Specifically, it takes the parameters that are currently stored
 | ||||
| // and managed by the Cosmos SDK params module and stores them directly into the x/evm module state.
 | ||||
| func MigrateStore( | ||||
| 	ctx sdk.Context, | ||||
| 	storeKey storetypes.StoreKey, | ||||
| 	legacySubspace types.Subspace, | ||||
| 	cdc codec.BinaryCodec, | ||||
| ) error { | ||||
| 	var ( | ||||
| 		store  = ctx.KVStore(storeKey) | ||||
| 		params v4types.V4Params | ||||
| 	) | ||||
| 
 | ||||
| 	legacySubspace.GetParamSetIfExists(ctx, ¶ms) | ||||
| 
 | ||||
| 	if err := params.Validate(); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	chainCfgBz := cdc.MustMarshal(¶ms.ChainConfig) | ||||
| 	extraEIPsBz := cdc.MustMarshal(&v4types.ExtraEIPs{EIPs: v4types.AvailableExtraEIPs}) | ||||
| 
 | ||||
| 	store.Set(v4types.ParamStoreKeyEVMDenom, []byte(params.EvmDenom)) | ||||
| 	store.Set(v4types.ParamStoreKeyExtraEIPs, extraEIPsBz) | ||||
| 	store.Set(v4types.ParamStoreKeyChainConfig, chainCfgBz) | ||||
| 
 | ||||
| 	if params.AllowUnprotectedTxs { | ||||
| 		store.Set(v4types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01}) | ||||
| 	} | ||||
| 
 | ||||
| 	if params.EnableCall { | ||||
| 		store.Set(v4types.ParamStoreKeyEnableCall, []byte{0x01}) | ||||
| 	} | ||||
| 
 | ||||
| 	if params.EnableCreate { | ||||
| 		store.Set(v4types.ParamStoreKeyEnableCreate, []byte{0x01}) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
							
								
								
									
										64
									
								
								x/evm/migrations/v4/migrate_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								x/evm/migrations/v4/migrate_test.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,64 @@ | ||||
| package v4_test | ||||
| 
 | ||||
| import ( | ||||
| 	"testing" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| 	gogotypes "github.com/gogo/protobuf/types" | ||||
| 
 | ||||
| 	"github.com/cosmos/cosmos-sdk/testutil" | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	"github.com/evmos/ethermint/app" | ||||
| 	"github.com/evmos/ethermint/encoding" | ||||
| 	v4 "github.com/evmos/ethermint/x/evm/migrations/v4" | ||||
| 	v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
| 
 | ||||
| type mockSubspace struct { | ||||
| 	ps v4types.V4Params | ||||
| } | ||||
| 
 | ||||
| func newMockSubspace(ps v4types.V4Params) mockSubspace { | ||||
| 	return mockSubspace{ps: ps} | ||||
| } | ||||
| 
 | ||||
| func (ms mockSubspace) GetParamSetIfExists(ctx sdk.Context, ps types.LegacyParams) { | ||||
| 	*ps.(*v4types.V4Params) = ms.ps | ||||
| } | ||||
| 
 | ||||
| func TestMigrate(t *testing.T) { | ||||
| 	encCfg := encoding.MakeConfig(app.ModuleBasics) | ||||
| 	cdc := encCfg.Codec | ||||
| 
 | ||||
| 	storeKey := sdk.NewKVStoreKey(types.ModuleName) | ||||
| 	tKey := sdk.NewTransientStoreKey("transient_test") | ||||
| 	ctx := testutil.DefaultContext(storeKey, tKey) | ||||
| 	kvStore := ctx.KVStore(storeKey) | ||||
| 
 | ||||
| 	legacySubspace := newMockSubspace(v4types.DefaultParams()) | ||||
| 	require.NoError(t, v4.MigrateStore(ctx, storeKey, legacySubspace, cdc)) | ||||
| 
 | ||||
| 	// Get all the new parameters from the kvStore
 | ||||
| 	var evmDenom string | ||||
| 	bz := kvStore.Get(v4types.ParamStoreKeyEVMDenom) | ||||
| 	evmDenom = string(bz) | ||||
| 
 | ||||
| 	var allowUnprotectedTx gogotypes.BoolValue | ||||
| 	bz = kvStore.Get(v4types.ParamStoreKeyAllowUnprotectedTxs) | ||||
| 	cdc.MustUnmarshal(bz, &allowUnprotectedTx) | ||||
| 
 | ||||
| 	enableCreate := kvStore.Has(v4types.ParamStoreKeyEnableCreate) | ||||
| 	enableCall := kvStore.Has(v4types.ParamStoreKeyEnableCall) | ||||
| 
 | ||||
| 	var chainCfg v4types.ChainConfig | ||||
| 	bz = kvStore.Get(v4types.ParamStoreKeyChainConfig) | ||||
| 	cdc.MustUnmarshal(bz, &chainCfg) | ||||
| 
 | ||||
| 	var extraEIPs v4types.ExtraEIPs | ||||
| 	bz = kvStore.Get(v4types.ParamStoreKeyExtraEIPs) | ||||
| 	cdc.MustUnmarshal(bz, &extraEIPs) | ||||
| 
 | ||||
| 	params := v4types.NewParams(evmDenom, allowUnprotectedTx.Value, enableCreate, enableCall, chainCfg, extraEIPs) | ||||
| 	require.Equal(t, legacySubspace.ps, params) | ||||
| } | ||||
							
								
								
									
										175
									
								
								x/evm/migrations/v4/types/chain_config.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										175
									
								
								x/evm/migrations/v4/types/chain_config.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,175 @@ | ||||
| package types | ||||
| 
 | ||||
| import ( | ||||
| 	"math/big" | ||||
| 	"strings" | ||||
| 
 | ||||
| 	"github.com/evmos/ethermint/x/evm/types" | ||||
| 
 | ||||
| 	sdkmath "cosmossdk.io/math" | ||||
| 
 | ||||
| 	errorsmod "cosmossdk.io/errors" | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 
 | ||||
| 	"github.com/ethereum/go-ethereum/common" | ||||
| 	"github.com/ethereum/go-ethereum/params" | ||||
| ) | ||||
| 
 | ||||
| // EthereumConfig returns an Ethereum ChainConfig for EVM state transitions.
 | ||||
| // All the negative or nil values are converted to nil
 | ||||
| func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { | ||||
| 	return ¶ms.ChainConfig{ | ||||
| 		ChainID:                 chainID, | ||||
| 		HomesteadBlock:          getBlockValue(cc.HomesteadBlock), | ||||
| 		DAOForkBlock:            getBlockValue(cc.DAOForkBlock), | ||||
| 		DAOForkSupport:          cc.DAOForkSupport, | ||||
| 		EIP150Block:             getBlockValue(cc.EIP150Block), | ||||
| 		EIP150Hash:              common.HexToHash(cc.EIP150Hash), | ||||
| 		EIP155Block:             getBlockValue(cc.EIP155Block), | ||||
| 		EIP158Block:             getBlockValue(cc.EIP158Block), | ||||
| 		ByzantiumBlock:          getBlockValue(cc.ByzantiumBlock), | ||||
| 		ConstantinopleBlock:     getBlockValue(cc.ConstantinopleBlock), | ||||
| 		PetersburgBlock:         getBlockValue(cc.PetersburgBlock), | ||||
| 		IstanbulBlock:           getBlockValue(cc.IstanbulBlock), | ||||
| 		MuirGlacierBlock:        getBlockValue(cc.MuirGlacierBlock), | ||||
| 		BerlinBlock:             getBlockValue(cc.BerlinBlock), | ||||
| 		LondonBlock:             getBlockValue(cc.LondonBlock), | ||||
| 		ArrowGlacierBlock:       getBlockValue(cc.ArrowGlacierBlock), | ||||
| 		GrayGlacierBlock:        getBlockValue(cc.GrayGlacierBlock), | ||||
| 		MergeNetsplitBlock:      getBlockValue(cc.MergeNetsplitBlock), | ||||
| 		ShanghaiBlock:           getBlockValue(cc.ShanghaiBlock), | ||||
| 		CancunBlock:             getBlockValue(cc.CancunBlock), | ||||
| 		TerminalTotalDifficulty: nil, | ||||
| 		Ethash:                  nil, | ||||
| 		Clique:                  nil, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DefaultChainConfig returns default evm parameters.
 | ||||
| func DefaultChainConfig() ChainConfig { | ||||
| 	homesteadBlock := sdk.ZeroInt() | ||||
| 	daoForkBlock := sdk.ZeroInt() | ||||
| 	eip150Block := sdk.ZeroInt() | ||||
| 	eip155Block := sdk.ZeroInt() | ||||
| 	eip158Block := sdk.ZeroInt() | ||||
| 	byzantiumBlock := sdk.ZeroInt() | ||||
| 	constantinopleBlock := sdk.ZeroInt() | ||||
| 	petersburgBlock := sdk.ZeroInt() | ||||
| 	istanbulBlock := sdk.ZeroInt() | ||||
| 	muirGlacierBlock := sdk.ZeroInt() | ||||
| 	berlinBlock := sdk.ZeroInt() | ||||
| 	londonBlock := sdk.ZeroInt() | ||||
| 	arrowGlacierBlock := sdk.ZeroInt() | ||||
| 	grayGlacierBlock := sdk.ZeroInt() | ||||
| 	mergeNetsplitBlock := sdk.ZeroInt() | ||||
| 
 | ||||
| 	return ChainConfig{ | ||||
| 		HomesteadBlock:      &homesteadBlock, | ||||
| 		DAOForkBlock:        &daoForkBlock, | ||||
| 		DAOForkSupport:      true, | ||||
| 		EIP150Block:         &eip150Block, | ||||
| 		EIP150Hash:          common.Hash{}.String(), | ||||
| 		EIP155Block:         &eip155Block, | ||||
| 		EIP158Block:         &eip158Block, | ||||
| 		ByzantiumBlock:      &byzantiumBlock, | ||||
| 		ConstantinopleBlock: &constantinopleBlock, | ||||
| 		PetersburgBlock:     &petersburgBlock, | ||||
| 		IstanbulBlock:       &istanbulBlock, | ||||
| 		MuirGlacierBlock:    &muirGlacierBlock, | ||||
| 		BerlinBlock:         &berlinBlock, | ||||
| 		LondonBlock:         &londonBlock, | ||||
| 		ArrowGlacierBlock:   &arrowGlacierBlock, | ||||
| 		GrayGlacierBlock:    &grayGlacierBlock, | ||||
| 		MergeNetsplitBlock:  &mergeNetsplitBlock, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| func getBlockValue(block *sdkmath.Int) *big.Int { | ||||
| 	if block == nil || block.IsNegative() { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	return block.BigInt() | ||||
| } | ||||
| 
 | ||||
| // Validate performs a basic validation of the ChainConfig params. The function will return an error
 | ||||
| // if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
 | ||||
| func (cc ChainConfig) Validate() error { | ||||
| 	if err := validateBlock(cc.HomesteadBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "homesteadBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.DAOForkBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "daoForkBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.EIP150Block); err != nil { | ||||
| 		return errorsmod.Wrap(err, "eip150Block") | ||||
| 	} | ||||
| 	if err := validateHash(cc.EIP150Hash); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	if err := validateBlock(cc.EIP155Block); err != nil { | ||||
| 		return errorsmod.Wrap(err, "eip155Block") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.EIP158Block); err != nil { | ||||
| 		return errorsmod.Wrap(err, "eip158Block") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.ByzantiumBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "byzantiumBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.ConstantinopleBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "constantinopleBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.PetersburgBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "petersburgBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.IstanbulBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "istanbulBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.MuirGlacierBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "muirGlacierBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.BerlinBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "berlinBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.LondonBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "londonBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.ArrowGlacierBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "arrowGlacierBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.GrayGlacierBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "GrayGlacierBlock") | ||||
| 	} | ||||
| 	if err := validateBlock(cc.MergeNetsplitBlock); err != nil { | ||||
| 		return errorsmod.Wrap(err, "MergeNetsplitBlock") | ||||
| 	} | ||||
| 
 | ||||
| 	// NOTE: chain ID is not needed to check config order
 | ||||
| 	if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { | ||||
| 		return errorsmod.Wrap(err, "invalid config fork order") | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| func validateHash(hex string) error { | ||||
| 	if hex != "" && strings.TrimSpace(hex) == "" { | ||||
| 		return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank") | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| func validateBlock(block *sdkmath.Int) error { | ||||
| 	// nil value means that the fork has not yet been applied
 | ||||
| 	if block == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	if block.IsNegative() { | ||||
| 		return errorsmod.Wrapf( | ||||
| 			types.ErrInvalidChainConfig, "block value cannot be negative: %s", block, | ||||
| 		) | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
							
								
								
									
										4235
									
								
								x/evm/migrations/v4/types/evm.pb.go
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										4235
									
								
								x/evm/migrations/v4/types/evm.pb.go
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										154
									
								
								x/evm/migrations/v4/types/params.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										154
									
								
								x/evm/migrations/v4/types/params.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,154 @@ | ||||
| package types | ||||
| 
 | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"math/big" | ||||
| 
 | ||||
| 	evmtypes "github.com/evmos/ethermint/x/evm/types" | ||||
| 
 | ||||
| 	"github.com/ethereum/go-ethereum/params" | ||||
| 
 | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||||
| 	"github.com/ethereum/go-ethereum/core/vm" | ||||
| 	"github.com/evmos/ethermint/types" | ||||
| ) | ||||
| 
 | ||||
| var _ evmtypes.LegacyParams = &V4Params{} | ||||
| 
 | ||||
| var ( | ||||
| 	// DefaultEVMDenom defines the default EVM denomination on Ethermint
 | ||||
| 	DefaultEVMDenom = types.AttoPhoton | ||||
| 	// DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false)
 | ||||
| 	DefaultAllowUnprotectedTxs = false | ||||
| 	DefaultEnableCreate        = true | ||||
| 	DefaultEnableCall          = true | ||||
| 	DefaultExtraEIPs           = ExtraEIPs{AvailableExtraEIPs} | ||||
| ) | ||||
| 
 | ||||
| // Parameter keys
 | ||||
| var ( | ||||
| 	ParamStoreKeyEVMDenom            = []byte("EVMDenom") | ||||
| 	ParamStoreKeyEnableCreate        = []byte("EnableCreate") | ||||
| 	ParamStoreKeyEnableCall          = []byte("EnableCall") | ||||
| 	ParamStoreKeyExtraEIPs           = []byte("EnableExtraEIPs") | ||||
| 	ParamStoreKeyChainConfig         = []byte("ChainConfig") | ||||
| 	ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs") | ||||
| 
 | ||||
| 	// AvailableExtraEIPs define the list of all EIPs that can be enabled by the
 | ||||
| 	// EVM interpreter. These EIPs are applied in order and can override the
 | ||||
| 	// instruction sets from the latest hard fork enabled by the ChainConfig. For
 | ||||
| 	// more info check:
 | ||||
| 	// https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L97
 | ||||
| 	AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529} | ||||
| ) | ||||
| 
 | ||||
| // ParamKeyTable returns the parameter key table.
 | ||||
| func ParamKeyTable() paramtypes.KeyTable { | ||||
| 	return paramtypes.NewKeyTable().RegisterParamSet(&V4Params{}) | ||||
| } | ||||
| 
 | ||||
| // NewParams creates a new Params instance
 | ||||
| func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs ExtraEIPs) V4Params { | ||||
| 	return V4Params{ | ||||
| 		EvmDenom:            evmDenom, | ||||
| 		AllowUnprotectedTxs: allowUnprotectedTxs, | ||||
| 		EnableCreate:        enableCreate, | ||||
| 		EnableCall:          enableCall, | ||||
| 		ExtraEIPs:           extraEIPs, | ||||
| 		ChainConfig:         config, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // DefaultParams returns default evm parameters
 | ||||
| // ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
 | ||||
| func DefaultParams() V4Params { | ||||
| 	return V4Params{ | ||||
| 		EvmDenom:            DefaultEVMDenom, | ||||
| 		EnableCreate:        DefaultEnableCreate, | ||||
| 		EnableCall:          DefaultEnableCall, | ||||
| 		ChainConfig:         DefaultChainConfig(), | ||||
| 		ExtraEIPs:           DefaultExtraEIPs, | ||||
| 		AllowUnprotectedTxs: DefaultAllowUnprotectedTxs, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // ParamSetPairs returns the parameter set pairs.
 | ||||
| func (p *V4Params) ParamSetPairs() paramtypes.ParamSetPairs { | ||||
| 	return paramtypes.ParamSetPairs{ | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool), | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Validate performs basic validation on evm parameters.
 | ||||
| func (p V4Params) Validate() error { | ||||
| 	if err := sdk.ValidateDenom(p.EvmDenom); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	if err := validateEIPs(p.ExtraEIPs); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	return p.ChainConfig.Validate() | ||||
| } | ||||
| 
 | ||||
| // EIPs returns the ExtraEIPS as a int slice
 | ||||
| func (p V4Params) EIPs() []int { | ||||
| 	eips := make([]int, len(p.ExtraEIPs.EIPs)) | ||||
| 	for i, eip := range p.ExtraEIPs.EIPs { | ||||
| 		eips[i] = int(eip) | ||||
| 	} | ||||
| 	return eips | ||||
| } | ||||
| 
 | ||||
| func validateEVMDenom(i interface{}) error { | ||||
| 	denom, ok := i.(string) | ||||
| 	if !ok { | ||||
| 		return fmt.Errorf("invalid parameter EVM denom type: %T", i) | ||||
| 	} | ||||
| 
 | ||||
| 	return sdk.ValidateDenom(denom) | ||||
| } | ||||
| 
 | ||||
| func validateBool(i interface{}) error { | ||||
| 	_, ok := i.(bool) | ||||
| 	if !ok { | ||||
| 		return fmt.Errorf("invalid parameter type: %T", i) | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| func validateEIPs(i interface{}) error { | ||||
| 	eips, ok := i.(ExtraEIPs) | ||||
| 	if !ok { | ||||
| 		return fmt.Errorf("invalid EIP slice type: %T", i) | ||||
| 	} | ||||
| 
 | ||||
| 	for _, eip := range eips.EIPs { | ||||
| 		if !vm.ValidEip(int(eip)) { | ||||
| 			return fmt.Errorf("EIP %d is not activateable, valid EIPS are: %s", eip, vm.ActivateableEips()) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| func validateChainConfig(i interface{}) error { | ||||
| 	cfg, ok := i.(ChainConfig) | ||||
| 	if !ok { | ||||
| 		return fmt.Errorf("invalid chain config type: %T", i) | ||||
| 	} | ||||
| 
 | ||||
| 	return cfg.Validate() | ||||
| } | ||||
| 
 | ||||
| // IsLondon returns if london hardfork is enabled.
 | ||||
| func IsLondon(ethConfig *params.ChainConfig, height int64) bool { | ||||
| 	return ethConfig.IsLondon(big.NewInt(height)) | ||||
| } | ||||
| @ -52,13 +52,14 @@ func (AppModuleBasic) Name() string { | ||||
| 	return types.ModuleName | ||||
| } | ||||
| 
 | ||||
| // RegisterLegacyAminoCodec performs a no-op as the evm module doesn't support amino.
 | ||||
| func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) { | ||||
| // RegisterLegacyAminoCodec registers the module's types with the given codec.
 | ||||
| func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { | ||||
| 	types.RegisterLegacyAminoCodec(cdc) | ||||
| } | ||||
| 
 | ||||
| // ConsensusVersion returns the consensus state-breaking version for the module.
 | ||||
| func (AppModuleBasic) ConsensusVersion() uint64 { | ||||
| 	return 3 | ||||
| 	return 4 | ||||
| } | ||||
| 
 | ||||
| // DefaultGenesis returns default genesis state as raw bytes for the evm
 | ||||
| @ -110,14 +111,17 @@ type AppModule struct { | ||||
| 	AppModuleBasic | ||||
| 	keeper *keeper.Keeper | ||||
| 	ak     types.AccountKeeper | ||||
| 	// legacySubspace is used solely for migration of x/params managed parameters
 | ||||
| 	legacySubspace types.Subspace | ||||
| } | ||||
| 
 | ||||
| // NewAppModule creates a new AppModule object
 | ||||
| func NewAppModule(k *keeper.Keeper, ak types.AccountKeeper) AppModule { | ||||
| func NewAppModule(k *keeper.Keeper, ak types.AccountKeeper, ss types.Subspace) AppModule { | ||||
| 	return AppModule{ | ||||
| 		AppModuleBasic: AppModuleBasic{}, | ||||
| 		keeper:         k, | ||||
| 		ak:             ak, | ||||
| 		legacySubspace: ss, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| @ -136,6 +140,12 @@ func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { | ||||
| func (am AppModule) RegisterServices(cfg module.Configurator) { | ||||
| 	types.RegisterMsgServer(cfg.MsgServer(), am.keeper) | ||||
| 	types.RegisterQueryServer(cfg.QueryServer(), am.keeper) | ||||
| 
 | ||||
| 	m := keeper.NewMigrator(*am.keeper, am.legacySubspace) | ||||
| 	err := cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4) | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Route returns the message routing key for the evm module.
 | ||||
| @ -167,7 +177,6 @@ func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.V | ||||
| // no validator updates.
 | ||||
| func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { | ||||
| 	var genesisState types.GenesisState | ||||
| 
 | ||||
| 	cdc.MustUnmarshalJSON(data, &genesisState) | ||||
| 	InitGenesis(ctx, am.keeper, am.ak, genesisState) | ||||
| 	return []abci.ValidatorUpdate{} | ||||
|  | ||||
| @ -26,18 +26,38 @@ import ( | ||||
| 	proto "github.com/gogo/protobuf/proto" | ||||
| ) | ||||
| 
 | ||||
| var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) | ||||
| var ( | ||||
| 	amino = codec.NewLegacyAmino() | ||||
| 	// ModuleCdc references the global evm module codec. Note, the codec should
 | ||||
| 	// ONLY be used in certain instances of tests and for JSON encoding.
 | ||||
| 	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) | ||||
| 
 | ||||
| 	// AminoCdc is a amino codec created to support amino JSON compatible msgs.
 | ||||
| 	AminoCdc = codec.NewAminoCodec(amino) | ||||
| ) | ||||
| 
 | ||||
| const ( | ||||
| 	// Amino names
 | ||||
| 	updateParamsName = "ethermint/MsgUpdateParams" | ||||
| ) | ||||
| 
 | ||||
| // NOTE: This is required for the GetSignBytes function
 | ||||
| func init() { | ||||
| 	RegisterLegacyAminoCodec(amino) | ||||
| 	amino.Seal() | ||||
| } | ||||
| 
 | ||||
| // RegisterInterfaces registers the client interfaces to protobuf Any.
 | ||||
| func RegisterInterfaces(registry codectypes.InterfaceRegistry) { | ||||
| 	registry.RegisterImplementations( | ||||
| 		(*sdk.Msg)(nil), | ||||
| 		&MsgEthereumTx{}, | ||||
| 	) | ||||
| 	registry.RegisterImplementations( | ||||
| 		(*tx.TxExtensionOptionI)(nil), | ||||
| 		&ExtensionOptionsEthereumTx{}, | ||||
| 	) | ||||
| 	registry.RegisterImplementations( | ||||
| 		(*sdk.Msg)(nil), | ||||
| 		&MsgEthereumTx{}, | ||||
| 		&MsgUpdateParams{}, | ||||
| 	) | ||||
| 	registry.RegisterInterface( | ||||
| 		"ethermint.evm.v1.TxData", | ||||
| 		(*TxData)(nil), | ||||
| @ -49,7 +69,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { | ||||
| 	msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) | ||||
| } | ||||
| 
 | ||||
| // PackClientState constructs a new Any packed with the given tx data value. It returns
 | ||||
| // PackTxData constructs a new Any packed with the given tx data value. It returns
 | ||||
| // an error if the client state can't be casted to a protobuf message or if the concrete
 | ||||
| // implementation is not registered to the protobuf codec.
 | ||||
| func PackTxData(txData TxData) (*codectypes.Any, error) { | ||||
| @ -80,3 +100,8 @@ func UnpackTxData(any *codectypes.Any) (TxData, error) { | ||||
| 
 | ||||
| 	return txData, nil | ||||
| } | ||||
| 
 | ||||
| // RegisterLegacyAminoCodec required for EIP-712
 | ||||
| func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { | ||||
| 	cdc.RegisterConcrete(&MsgUpdateParams{}, updateParamsName, nil) | ||||
| } | ||||
|  | ||||
							
								
								
									
										594
									
								
								x/evm/types/evm.pb.go
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										594
									
								
								x/evm/types/evm.pb.go
									
									
									
										generated
									
									
									
								
							| @ -34,7 +34,7 @@ type Params struct { | ||||
| 	// enable_call toggles state transitions that use the vm.Call function
 | ||||
| 	EnableCall bool `protobuf:"varint,3,opt,name=enable_call,json=enableCall,proto3" json:"enable_call,omitempty" yaml:"enable_call"` | ||||
| 	// extra_eips defines the additional EIPs for the vm.Config
 | ||||
| 	ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` | ||||
| 	ExtraEIPs ExtraEIPs `protobuf:"bytes,4,opt,name=extra_eips,json=extraEips,proto3" json:"extra_eips" yaml:"extra_eips"` | ||||
| 	// chain_config defines the EVM chain configuration parameters
 | ||||
| 	ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` | ||||
| 	// allow_unprotected_txs defines if replay-protected (i.e non EIP155
 | ||||
| @ -96,11 +96,11 @@ func (m *Params) GetEnableCall() bool { | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| func (m *Params) GetExtraEIPs() []int64 { | ||||
| func (m *Params) GetExtraEIPs() ExtraEIPs { | ||||
| 	if m != nil { | ||||
| 		return m.ExtraEIPs | ||||
| 	} | ||||
| 	return nil | ||||
| 	return ExtraEIPs{} | ||||
| } | ||||
| 
 | ||||
| func (m *Params) GetChainConfig() ChainConfig { | ||||
| @ -117,6 +117,52 @@ func (m *Params) GetAllowUnprotectedTxs() bool { | ||||
| 	return false | ||||
| } | ||||
| 
 | ||||
| // ExtraEIPs represents extra EIPs for the vm.Config
 | ||||
| type ExtraEIPs struct { | ||||
| 	// eips defines the additional EIPs for the vm.Config
 | ||||
| 	EIPs []int64 `protobuf:"varint,1,rep,packed,name=eips,proto3" json:"eips,omitempty" yaml:"eips"` | ||||
| } | ||||
| 
 | ||||
| func (m *ExtraEIPs) Reset()         { *m = ExtraEIPs{} } | ||||
| func (m *ExtraEIPs) String() string { return proto.CompactTextString(m) } | ||||
| func (*ExtraEIPs) ProtoMessage()    {} | ||||
| func (*ExtraEIPs) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{1} | ||||
| } | ||||
| func (m *ExtraEIPs) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| } | ||||
| func (m *ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | ||||
| 	if deterministic { | ||||
| 		return xxx_messageInfo_ExtraEIPs.Marshal(b, m, deterministic) | ||||
| 	} else { | ||||
| 		b = b[:cap(b)] | ||||
| 		n, err := m.MarshalToSizedBuffer(b) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		return b[:n], nil | ||||
| 	} | ||||
| } | ||||
| func (m *ExtraEIPs) XXX_Merge(src proto.Message) { | ||||
| 	xxx_messageInfo_ExtraEIPs.Merge(m, src) | ||||
| } | ||||
| func (m *ExtraEIPs) XXX_Size() int { | ||||
| 	return m.Size() | ||||
| } | ||||
| func (m *ExtraEIPs) XXX_DiscardUnknown() { | ||||
| 	xxx_messageInfo_ExtraEIPs.DiscardUnknown(m) | ||||
| } | ||||
| 
 | ||||
| var xxx_messageInfo_ExtraEIPs proto.InternalMessageInfo | ||||
| 
 | ||||
| func (m *ExtraEIPs) GetEIPs() []int64 { | ||||
| 	if m != nil { | ||||
| 		return m.EIPs | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
 | ||||
| // instead of *big.Int.
 | ||||
| type ChainConfig struct { | ||||
| @ -165,7 +211,7 @@ func (m *ChainConfig) Reset()         { *m = ChainConfig{} } | ||||
| func (m *ChainConfig) String() string { return proto.CompactTextString(m) } | ||||
| func (*ChainConfig) ProtoMessage()    {} | ||||
| func (*ChainConfig) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{1} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{2} | ||||
| } | ||||
| func (m *ChainConfig) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -220,7 +266,7 @@ func (m *State) Reset()         { *m = State{} } | ||||
| func (m *State) String() string { return proto.CompactTextString(m) } | ||||
| func (*State) ProtoMessage()    {} | ||||
| func (*State) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{2} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{3} | ||||
| } | ||||
| func (m *State) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -277,7 +323,7 @@ func (m *TransactionLogs) Reset()         { *m = TransactionLogs{} } | ||||
| func (m *TransactionLogs) String() string { return proto.CompactTextString(m) } | ||||
| func (*TransactionLogs) ProtoMessage()    {} | ||||
| func (*TransactionLogs) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{3} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{4} | ||||
| } | ||||
| func (m *TransactionLogs) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -353,7 +399,7 @@ func (m *Log) Reset()         { *m = Log{} } | ||||
| func (m *Log) String() string { return proto.CompactTextString(m) } | ||||
| func (*Log) ProtoMessage()    {} | ||||
| func (*Log) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{4} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{5} | ||||
| } | ||||
| func (m *Log) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -468,7 +514,7 @@ func (m *TxResult) Reset()         { *m = TxResult{} } | ||||
| func (m *TxResult) String() string { return proto.CompactTextString(m) } | ||||
| func (*TxResult) ProtoMessage()    {} | ||||
| func (*TxResult) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{5} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{6} | ||||
| } | ||||
| func (m *TxResult) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -509,7 +555,7 @@ func (m *AccessTuple) Reset()         { *m = AccessTuple{} } | ||||
| func (m *AccessTuple) String() string { return proto.CompactTextString(m) } | ||||
| func (*AccessTuple) ProtoMessage()    {} | ||||
| func (*AccessTuple) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{6} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{7} | ||||
| } | ||||
| func (m *AccessTuple) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -569,7 +615,7 @@ func (m *TraceConfig) Reset()         { *m = TraceConfig{} } | ||||
| func (m *TraceConfig) String() string { return proto.CompactTextString(m) } | ||||
| func (*TraceConfig) ProtoMessage()    {} | ||||
| func (*TraceConfig) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{7} | ||||
| 	return fileDescriptor_d21ecc92c8c8583e, []int{8} | ||||
| } | ||||
| func (m *TraceConfig) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| @ -677,6 +723,7 @@ func (m *TraceConfig) GetTracerJsonConfig() string { | ||||
| 
 | ||||
| func init() { | ||||
| 	proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params") | ||||
| 	proto.RegisterType((*ExtraEIPs)(nil), "ethermint.evm.v1.ExtraEIPs") | ||||
| 	proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") | ||||
| 	proto.RegisterType((*State)(nil), "ethermint.evm.v1.State") | ||||
| 	proto.RegisterType((*TransactionLogs)(nil), "ethermint.evm.v1.TransactionLogs") | ||||
| @ -689,108 +736,110 @@ func init() { | ||||
| func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) } | ||||
| 
 | ||||
| var fileDescriptor_d21ecc92c8c8583e = []byte{ | ||||
| 	// 1608 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x6e, 0xe3, 0xc6, | ||||
| 	0x15, 0xb6, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x8e, 0xb2, 0x8b, 0x9a, 0x2e, 0x2f, | ||||
| 	0x0a, 0x17, 0x48, 0xec, 0xd8, 0x81, 0xd1, 0x45, 0x82, 0x16, 0xb5, 0x76, 0x9d, 0xc4, 0xee, 0x36, | ||||
| 	0x35, 0xc6, 0x0e, 0x0a, 0x14, 0x28, 0x88, 0x11, 0x39, 0xa1, 0x18, 0x93, 0x1c, 0x61, 0x66, 0xa8, | ||||
| 	0x95, 0xda, 0x3e, 0x40, 0x8b, 0xde, 0xf4, 0x09, 0x8a, 0x3c, 0x4e, 0xd0, 0xab, 0xbd, 0x2c, 0x7a, | ||||
| 	0x41, 0x14, 0xde, 0x3b, 0x5f, 0xea, 0x09, 0x8a, 0xf9, 0x11, 0xf5, 0x63, 0xa3, 0xad, 0x75, 0xe5, | ||||
| 	0xf9, 0xce, 0x39, 0xf3, 0x7d, 0x33, 0x67, 0xce, 0x68, 0x0e, 0x0d, 0x9e, 0x13, 0xd1, 0x23, 0x2c, | ||||
| 	0x8d, 0x33, 0x71, 0x44, 0x06, 0xe9, 0xd1, 0xe0, 0x58, 0xfe, 0x39, 0xec, 0x33, 0x2a, 0x28, 0x74, | ||||
| 	0x4a, 0xdf, 0xa1, 0x34, 0x0e, 0x8e, 0x9f, 0xb7, 0x22, 0x1a, 0x51, 0xe5, 0x3c, 0x92, 0x23, 0x1d, | ||||
| 	0xe7, 0xfd, 0xa5, 0x02, 0x36, 0xae, 0x30, 0xc3, 0x29, 0x87, 0xc7, 0xa0, 0x4a, 0x06, 0xa9, 0x1f, | ||||
| 	0x92, 0x8c, 0xa6, 0xed, 0xd5, 0xfd, 0xd5, 0x83, 0x6a, 0xa7, 0x35, 0x2e, 0x5c, 0x67, 0x84, 0xd3, | ||||
| 	0xe4, 0x33, 0xaf, 0x74, 0x79, 0xc8, 0x26, 0x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x1b, 0xd9, 0xdd, 0xe5, 0x2f, | ||||
| 	0xc7, 0x3c, 0x93, 0x87, 0xb6, 0x26, 0x86, 0xb2, 0x7e, 0x02, 0x9c, 0x05, 0xf9, 0xa4, 0x7e, 0x3e, | ||||
| 	0x58, 0xbe, 0x7e, 0x66, 0x79, 0x64, 0xfb, 0xa1, 0xa0, 0x52, 0xb9, 0xb4, 0xec, 0x86, 0xd3, 0xbc, | ||||
| 	0xb4, 0xec, 0xa6, 0xe3, 0x5c, 0x5a, 0xb6, 0xe3, 0x6c, 0x5f, 0x5a, 0xf6, 0x8e, 0xd3, 0x42, 0x5b, | ||||
| 	0x23, 0x9a, 0x50, 0x7f, 0xf0, 0xa9, 0x9e, 0x84, 0x6a, 0xe4, 0x2d, 0xe6, 0xe6, 0x37, 0x12, 0x35, | ||||
| 	0x02, 0x2c, 0x70, 0x32, 0xe2, 0x26, 0x55, 0xc8, 0xd1, 0x09, 0x9c, 0x79, 0xb5, 0x8f, 0xc0, 0xfa, | ||||
| 	0xb5, 0x90, 0x8d, 0x9b, 0x03, 0x2a, 0xb7, 0x64, 0xa4, 0xbb, 0x11, 0x24, 0x87, 0xb0, 0x05, 0xd6, | ||||
| 	0x07, 0x38, 0xc9, 0x75, 0x07, 0x58, 0x45, 0x1a, 0x78, 0x57, 0xa0, 0x79, 0xc3, 0x70, 0xc6, 0x71, | ||||
| 	0x20, 0x62, 0x9a, 0xbd, 0xa1, 0x11, 0x87, 0x10, 0x58, 0xea, 0x55, 0xd4, 0x73, 0xd5, 0x18, 0xfe, | ||||
| 	0x14, 0x58, 0x09, 0x8d, 0x78, 0x7b, 0x6d, 0xbf, 0x72, 0x50, 0x3b, 0x79, 0xf6, 0xb0, 0x07, 0x7b, | ||||
| 	0x43, 0x23, 0xa4, 0x42, 0xbc, 0x7f, 0xac, 0x81, 0xca, 0x1b, 0x1a, 0xc1, 0x36, 0xd8, 0xc4, 0x61, | ||||
| 	0xc8, 0x08, 0xe7, 0x86, 0x69, 0x02, 0xe1, 0x2e, 0xd8, 0x10, 0xb4, 0x1f, 0x07, 0x9a, 0xae, 0x8a, | ||||
| 	0x0c, 0x92, 0xc2, 0x21, 0x16, 0x58, 0xf5, 0x15, 0x75, 0xa4, 0xc6, 0xf0, 0x04, 0xd4, 0xd5, 0xce, | ||||
| 	0xfc, 0x2c, 0x4f, 0xbb, 0x84, 0xa9, 0xf6, 0xc0, 0xea, 0x34, 0xef, 0x0b, 0xb7, 0xa6, 0xec, 0x5f, | ||||
| 	0x2b, 0x33, 0x9a, 0x05, 0xf0, 0x23, 0xb0, 0x29, 0x86, 0xb3, 0x2f, 0xfb, 0xce, 0x7d, 0xe1, 0x36, | ||||
| 	0xc5, 0x74, 0x9b, 0xf2, 0xe1, 0x46, 0x1b, 0x62, 0xa8, 0x1e, 0xf0, 0x23, 0x60, 0x8b, 0xa1, 0x1f, | ||||
| 	0x67, 0x21, 0x19, 0xaa, 0xc7, 0xdb, 0xea, 0xb4, 0xee, 0x0b, 0xd7, 0x99, 0x09, 0xbf, 0x90, 0x3e, | ||||
| 	0xb4, 0x29, 0x86, 0x6a, 0x00, 0x3f, 0x02, 0x40, 0x2f, 0x49, 0x29, 0xe8, 0xa7, 0x77, 0xeb, 0xbe, | ||||
| 	0x70, 0xab, 0xca, 0xaa, 0xb8, 0xa7, 0x43, 0xe8, 0x81, 0x75, 0xcd, 0x6d, 0x2b, 0xee, 0xfa, 0x7d, | ||||
| 	0xe1, 0xda, 0x09, 0x8d, 0x34, 0xa7, 0x76, 0xc9, 0x54, 0x31, 0x92, 0xd2, 0x01, 0x09, 0xd5, 0xeb, | ||||
| 	0x66, 0xa3, 0x09, 0xf4, 0xfe, 0xba, 0x06, 0xec, 0x9b, 0x21, 0x22, 0x3c, 0x4f, 0x04, 0xfc, 0x02, | ||||
| 	0x38, 0x01, 0xcd, 0x04, 0xc3, 0x81, 0xf0, 0xe7, 0x52, 0xdb, 0x79, 0x31, 0x7d, 0x69, 0x16, 0x23, | ||||
| 	0x3c, 0xd4, 0x9c, 0x98, 0xce, 0x4c, 0xfe, 0x5b, 0x60, 0xbd, 0x9b, 0x50, 0x9a, 0xaa, 0x4a, 0xa8, | ||||
| 	0x23, 0x0d, 0x20, 0x52, 0x59, 0x53, 0xa7, 0x5c, 0x51, 0x9d, 0xf6, 0x8f, 0x1f, 0x9e, 0xf2, 0x42, | ||||
| 	0xa9, 0x74, 0x76, 0x4d, 0xb7, 0xdd, 0xd0, 0xda, 0x66, 0xbe, 0x27, 0x73, 0xab, 0x4a, 0xc9, 0x01, | ||||
| 	0x15, 0x46, 0x84, 0x3a, 0xb4, 0x3a, 0x92, 0x43, 0xf8, 0x1c, 0xd8, 0x8c, 0x0c, 0x08, 0x13, 0x24, | ||||
| 	0x54, 0x87, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x81, 0x1d, 0x61, 0xee, 0xe7, 0x9c, 0x84, 0xfa, 0x24, | ||||
| 	0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, 0x5d, 0xf1, 0x30, 0xa8, | ||||
| 	0x9d, 0x05, 0x01, 0xe1, 0xfc, 0x26, 0xef, 0x27, 0xe4, 0xbf, 0x54, 0xd8, 0x09, 0xa8, 0x73, 0x41, | ||||
| 	0x19, 0x8e, 0x88, 0x7f, 0x4b, 0x46, 0xa6, 0xce, 0x74, 0xd5, 0x18, 0xfb, 0xaf, 0xc8, 0x88, 0xa3, | ||||
| 	0x59, 0x60, 0x24, 0xbe, 0xb7, 0x40, 0xed, 0x86, 0xe1, 0x80, 0x98, 0x0e, 0x5f, 0xd6, 0xaa, 0x84, | ||||
| 	0xcc, 0x48, 0x18, 0x24, 0xb5, 0x45, 0x9c, 0x12, 0x9a, 0x0b, 0x73, 0x9f, 0x26, 0x50, 0xce, 0x60, | ||||
| 	0x84, 0x0c, 0x49, 0xa0, 0xd2, 0x68, 0x21, 0x83, 0xe0, 0x29, 0xd8, 0x0a, 0x63, 0xae, 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eb, 0xfc, 0xf2, 0x87, 0xbb, 0xbd, 0xd5, 0x77, 0x77, 0x7b, | ||||
| 	0xab, 0xff, 0xbe, 0xdb, 0x5b, 0xfd, 0xdb, 0xfb, 0xbd, 0x95, 0x77, 0xef, 0xf7, 0x56, 0xfe, 0xf9, | ||||
| 	0x7e, 0x6f, 0xe5, 0x77, 0xb3, 0xef, 0x03, 0x19, 0xc8, 0xe7, 0x61, 0xfa, 0xfd, 0x3f, 0x54, 0xff, | ||||
| 	0x01, 0x50, 0x6f, 0x44, 0x77, 0x43, 0x7d, 0xd9, 0x7f, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, | ||||
| 	0xe2, 0xe1, 0x18, 0x7a, 0x1f, 0x10, 0x00, 0x00, | ||||
| 	// 1644 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0xe3, 0xc6, | ||||
| 	0x15, 0xb7, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x5e, 0x65, 0x17, 0x35, 0x5d, 0x1e, | ||||
| 	0x02, 0x17, 0x4d, 0xec, 0xd8, 0x81, 0xd1, 0x45, 0x82, 0x16, 0x5d, 0xed, 0x3a, 0x89, 0xdd, 0x6d, | ||||
| 	0x6a, 0x8c, 0x1d, 0x14, 0x28, 0x50, 0x10, 0x23, 0x72, 0x42, 0x31, 0x26, 0x39, 0xc2, 0xcc, 0x50, | ||||
| 	0x2b, 0xb5, 0xfd, 0x00, 0x05, 0x7a, 0xe9, 0x27, 0x28, 0x72, 0xee, 0x27, 0x09, 0x7a, 0xda, 0x63, | ||||
| 	0xd1, 0x03, 0x51, 0x78, 0x6f, 0x3e, 0xea, 0x13, 0x14, 0xf3, 0x47, 0xd4, 0x1f, 0x1b, 0x6d, 0xad, | ||||
| 	0x93, 0xe7, 0xf7, 0xde, 0x9b, 0xdf, 0x6f, 0xde, 0x9b, 0x37, 0x9e, 0xa1, 0xc0, 0x33, 0x22, 0x7a, | ||||
| 	0x84, 0xa5, 0x71, 0x26, 0x8e, 0xc8, 0x20, 0x3d, 0x1a, 0x1c, 0xcb, 0x3f, 0x87, 0x7d, 0x46, 0x05, | ||||
| 	0x85, 0x4e, 0xe9, 0x3b, 0x94, 0xc6, 0xc1, 0xf1, 0xb3, 0x56, 0x44, 0x23, 0xaa, 0x9c, 0x47, 0x72, | ||||
| 	0xa4, 0xe3, 0xbc, 0xbf, 0x57, 0xc0, 0xc6, 0x25, 0x66, 0x38, 0xe5, 0xf0, 0x18, 0x54, 0xc9, 0x20, | ||||
| 	0xf5, 0x43, 0x92, 0xd1, 0xb4, 0xbd, 0xba, 0xbf, 0x7a, 0x50, 0xed, 0xb4, 0xc6, 0x85, 0xeb, 0x8c, | ||||
| 	0x70, 0x9a, 0x7c, 0xe6, 0x95, 0x2e, 0x0f, 0xd9, 0x64, 0x90, 0xbe, 0x96, 0x43, 0xf8, 0x73, 0xb0, | ||||
| 	0x45, 0x32, 0xdc, 0x4d, 0x88, 0x1f, 0x30, 0x82, 0x05, 0x69, 0xaf, 0xed, 0xaf, 0x1e, 0xd8, 0x9d, | ||||
| 	0xf6, 0xb8, 0x70, 0x5b, 0x66, 0xda, 0xac, 0xdb, 0x43, 0x75, 0x8d, 0x5f, 0x29, 0x08, 0x7f, 0x06, | ||||
| 	0x6a, 0x13, 0x3f, 0x4e, 0x92, 0x76, 0x45, 0x4d, 0xde, 0x1d, 0x17, 0x2e, 0x9c, 0x9f, 0x8c, 0x93, | ||||
| 	0xc4, 0x43, 0xc0, 0x4c, 0xc5, 0x49, 0x02, 0xbb, 0x00, 0x90, 0xa1, 0x60, 0xd8, 0x27, 0x71, 0x9f, | ||||
| 	0xb7, 0xad, 0xfd, 0xd5, 0x83, 0xda, 0xc9, 0xf3, 0xc3, 0xc5, 0x94, 0x0f, 0xcf, 0x64, 0xcc, 0xd9, | ||||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, 0x42, 0x5b, 0x23, 0x9a, 0x50, 0x7f, 0xf0, 0xa9, 0x9e, 0x84, 0x6a, 0xe4, 0x2d, 0xe6, 0xe6, | ||||
| 	0x7f, 0x24, 0x6a, 0x04, 0x58, 0xe0, 0x64, 0xc4, 0x4d, 0xa9, 0x90, 0xa3, 0x0b, 0x38, 0x73, 0x6b, | ||||
| 	0x1f, 0x81, 0xf5, 0x2b, 0x21, 0xdf, 0x84, 0x0e, 0xa8, 0xdc, 0x90, 0x91, 0x7e, 0x8d, 0x20, 0x39, | ||||
| 	0x84, 0x2d, 0xb0, 0x3e, 0xc0, 0x49, 0xae, 0x1f, 0x97, 0x55, 0xa4, 0x81, 0x77, 0x09, 0x9a, 0xd7, | ||||
| 	0x0c, 0x67, 0x1c, 0x07, 0x22, 0xa6, 0xd9, 0x1b, 0x1a, 0x71, 0x08, 0x81, 0xa5, 0x6e, 0x45, 0x3d, | ||||
| 	0x57, 0x8d, 0xe1, 0x4f, 0x80, 0x95, 0xd0, 0x88, 0xb7, 0xd7, 0xf6, 0x2b, 0x07, 0xb5, 0x93, 0x27, | ||||
| 	0xf7, 0x5f, 0x6f, 0x6f, 0x68, 0x84, 0x54, 0x88, 0xf7, 0x8f, 0x35, 0x50, 0x79, 0x43, 0x23, 0xd8, | ||||
| 	0x06, 0x9b, 0x38, 0x0c, 0x19, 0xe1, 0xdc, 0x30, 0x4d, 0x20, 0xdc, 0x05, 0x1b, 0x82, 0xf6, 0xe3, | ||||
| 	0x40, 0xd3, 0x55, 0x91, 0x41, 0x52, 0x38, 0xc4, 0x02, 0xab, 0x77, 0x45, 0x1d, 0xa9, 0x31, 0x3c, | ||||
| 	0x01, 0x75, 0x95, 0x99, 0x9f, 0xe5, 0x69, 0x97, 0x30, 0xf5, 0x3c, 0xb0, 0x3a, 0xcd, 0xbb, 0xc2, | ||||
| 	0xad, 0x29, 0xfb, 0xd7, 0xca, 0x8c, 0x66, 0x01, 0xfc, 0x08, 0x6c, 0x8a, 0xe1, 0xec, 0xcd, 0xbe, | ||||
| 	0x73, 0x57, 0xb8, 0x4d, 0x31, 0x4d, 0x53, 0x5e, 0xdc, 0x68, 0x43, 0x0c, 0xd5, 0x05, 0x7e, 0x04, | ||||
| 	0x6c, 0x31, 0xf4, 0xe3, 0x2c, 0x24, 0x43, 0x75, 0x79, 0x5b, 0x9d, 0xd6, 0x5d, 0xe1, 0x3a, 0x33, | ||||
| 	0xe1, 0xe7, 0xd2, 0x87, 0x36, 0xc5, 0x50, 0x0d, 0xe0, 0x47, 0x00, 0xe8, 0x25, 0x29, 0x05, 0x7d, | ||||
| 	0xf5, 0x6e, 0xdd, 0x15, 0x6e, 0x55, 0x59, 0x15, 0xf7, 0x74, 0x08, 0x3d, 0xb0, 0xae, 0xb9, 0x6d, | ||||
| 	0xc5, 0x5d, 0xbf, 0x2b, 0x5c, 0x3b, 0xa1, 0x91, 0xe6, 0xd4, 0x2e, 0x59, 0x2a, 0x46, 0x52, 0x3a, | ||||
| 	0x20, 0xa1, 0xba, 0xdd, 0x6c, 0x34, 0x81, 0xde, 0x5f, 0xd6, 0x80, 0x7d, 0x3d, 0x44, 0x84, 0xe7, | ||||
| 	0x89, 0x80, 0x5f, 0x00, 0x27, 0xa0, 0x99, 0x60, 0x38, 0x10, 0xfe, 0x5c, 0x69, 0x3b, 0xcf, 0xa7, | ||||
| 	0x37, 0xcd, 0x62, 0x84, 0x87, 0x9a, 0x13, 0xd3, 0x4b, 0x53, 0xff, 0x16, 0x58, 0xef, 0x26, 0x94, | ||||
| 	0xa6, 0xaa, 0x13, 0xea, 0x48, 0x03, 0x88, 0x54, 0xd5, 0xd4, 0x2e, 0x57, 0xd4, 0x1b, 0xfd, 0xc7, | ||||
| 	0xf7, 0x77, 0x79, 0xa1, 0x55, 0x3a, 0xbb, 0xe6, 0x9d, 0xde, 0xd0, 0xda, 0x66, 0xbe, 0x27, 0x6b, | ||||
| 	0xab, 0x5a, 0xc9, 0x01, 0x15, 0x46, 0x84, 0xda, 0xb4, 0x3a, 0x92, 0x43, 0xf8, 0x0c, 0xd8, 0x8c, | ||||
| 	0x0c, 0x08, 0x13, 0x24, 0x54, 0x9b, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x80, 0x1d, 0x61, 0xee, 0xe7, | ||||
| 	0x9c, 0x84, 0x7a, 0x27, 0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, | ||||
| 	0x5d, 0xf1, 0x30, 0xa8, 0xbd, 0x0c, 0x02, 0xc2, 0xf9, 0x75, 0xde, 0x4f, 0xc8, 0x7f, 0xe9, 0xb0, | ||||
| 	0x13, 0x50, 0xe7, 0x82, 0x32, 0x1c, 0x11, 0xff, 0x86, 0x8c, 0x4c, 0x9f, 0xe9, 0xae, 0x31, 0xf6, | ||||
| 	0x5f, 0x91, 0x11, 0x47, 0xb3, 0xc0, 0x48, 0x7c, 0x6f, 0x81, 0xda, 0x35, 0xc3, 0x01, 0x31, 0x2f, | ||||
| 	0x7c, 0xd9, 0xab, 0x12, 0x32, 0x23, 0x61, 0x90, 0xd4, 0x16, 0x71, 0x4a, 0x68, 0x2e, 0xcc, 0x79, | ||||
| 	0x9a, 0x40, 0x39, 0x83, 0x11, 0x32, 0x24, 0x81, 0x2a, 0xa3, 0x85, 0x0c, 0x82, 0xa7, 0x60, 0x2b, | ||||
| 	0x8c, 0xb9, 0xfa, 0x12, 0xe3, 0x02, 0x07, 0x37, 0x3a, 0xfd, 0x8e, 0x73, 0x57, 0xb8, 0x75, 0xe3, | ||||
| 	0xb8, 0x92, 0x76, 0x34, 0x87, 0xe0, 0xe7, 0xa0, 0x39, 0x9d, 0xa6, 0x56, 0xab, 0x3f, 0x6d, 0x3a, | ||||
| 	0xf0, 0xae, 0x70, 0x1b, 0x65, 0xa8, 0xf2, 0xa0, 0x05, 0x2c, 0x77, 0x3a, 0x24, 0xdd, 0x3c, 0x52, | ||||
| 	0xcd, 0x67, 0x23, 0x0d, 0xa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0x04, | ||||
| 	0x00, 0x00, 0xff, 0xff, 0x68, 0xce, 0x8e, 0x23, 0x7a, 0x10, 0x00, 0x00, | ||||
| } | ||||
| 
 | ||||
| func (m *Params) Marshal() (dAtA []byte, err error) { | ||||
| @ -833,25 +882,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	} | ||||
| 	i-- | ||||
| 	dAtA[i] = 0x2a | ||||
| 	if len(m.ExtraEIPs) > 0 { | ||||
| 		dAtA3 := make([]byte, len(m.ExtraEIPs)*10) | ||||
| 		var j2 int | ||||
| 		for _, num1 := range m.ExtraEIPs { | ||||
| 			num := uint64(num1) | ||||
| 			for num >= 1<<7 { | ||||
| 				dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) | ||||
| 				num >>= 7 | ||||
| 				j2++ | ||||
| 			} | ||||
| 			dAtA3[j2] = uint8(num) | ||||
| 			j2++ | ||||
| 	{ | ||||
| 		size, err := m.ExtraEIPs.MarshalToSizedBuffer(dAtA[:i]) | ||||
| 		if err != nil { | ||||
| 			return 0, err | ||||
| 		} | ||||
| 		i -= j2 | ||||
| 		copy(dAtA[i:], dAtA3[:j2]) | ||||
| 		i = encodeVarintEvm(dAtA, i, uint64(j2)) | ||||
| 		i-- | ||||
| 		dAtA[i] = 0x22 | ||||
| 		i -= size | ||||
| 		i = encodeVarintEvm(dAtA, i, uint64(size)) | ||||
| 	} | ||||
| 	i-- | ||||
| 	dAtA[i] = 0x22 | ||||
| 	if m.EnableCall { | ||||
| 		i-- | ||||
| 		if m.EnableCall { | ||||
| @ -882,6 +922,48 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	return len(dAtA) - i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *ExtraEIPs) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
| 
 | ||||
| func (m *ExtraEIPs) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	size := m.Size() | ||||
| 	return m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| } | ||||
| 
 | ||||
| func (m *ExtraEIPs) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	i := len(dAtA) | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if len(m.EIPs) > 0 { | ||||
| 		dAtA4 := make([]byte, len(m.EIPs)*10) | ||||
| 		var j3 int | ||||
| 		for _, num1 := range m.EIPs { | ||||
| 			num := uint64(num1) | ||||
| 			for num >= 1<<7 { | ||||
| 				dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) | ||||
| 				num >>= 7 | ||||
| 				j3++ | ||||
| 			} | ||||
| 			dAtA4[j3] = uint8(num) | ||||
| 			j3++ | ||||
| 		} | ||||
| 		i -= j3 | ||||
| 		copy(dAtA[i:], dAtA4[:j3]) | ||||
| 		i = encodeVarintEvm(dAtA, i, uint64(j3)) | ||||
| 		i-- | ||||
| 		dAtA[i] = 0xa | ||||
| 	} | ||||
| 	return len(dAtA) - i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *ChainConfig) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| @ -1555,13 +1637,8 @@ func (m *Params) Size() (n int) { | ||||
| 	if m.EnableCall { | ||||
| 		n += 2 | ||||
| 	} | ||||
| 	if len(m.ExtraEIPs) > 0 { | ||||
| 		l = 0 | ||||
| 		for _, e := range m.ExtraEIPs { | ||||
| 			l += sovEvm(uint64(e)) | ||||
| 		} | ||||
| 		n += 1 + sovEvm(uint64(l)) + l | ||||
| 	} | ||||
| 	l = m.ExtraEIPs.Size() | ||||
| 	n += 1 + l + sovEvm(uint64(l)) | ||||
| 	l = m.ChainConfig.Size() | ||||
| 	n += 1 + l + sovEvm(uint64(l)) | ||||
| 	if m.AllowUnprotectedTxs { | ||||
| @ -1570,6 +1647,22 @@ func (m *Params) Size() (n int) { | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *ExtraEIPs) Size() (n int) { | ||||
| 	if m == nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	if len(m.EIPs) > 0 { | ||||
| 		l = 0 | ||||
| 		for _, e := range m.EIPs { | ||||
| 			l += sovEvm(uint64(e)) | ||||
| 		} | ||||
| 		n += 1 + sovEvm(uint64(l)) + l | ||||
| 	} | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *ChainConfig) Size() (n int) { | ||||
| 	if m == nil { | ||||
| 		return 0 | ||||
| @ -1935,81 +2028,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { | ||||
| 			} | ||||
| 			m.EnableCall = bool(v != 0) | ||||
| 		case 4: | ||||
| 			if wireType == 0 { | ||||
| 				var v int64 | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return ErrIntOverflowEvm | ||||
| 					} | ||||
| 					if iNdEx >= l { | ||||
| 						return io.ErrUnexpectedEOF | ||||
| 					} | ||||
| 					b := dAtA[iNdEx] | ||||
| 					iNdEx++ | ||||
| 					v |= int64(b&0x7F) << shift | ||||
| 					if b < 0x80 { | ||||
| 						break | ||||
| 					} | ||||
| 				} | ||||
| 				m.ExtraEIPs = append(m.ExtraEIPs, v) | ||||
| 			} else if wireType == 2 { | ||||
| 				var packedLen int | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return ErrIntOverflowEvm | ||||
| 					} | ||||
| 					if iNdEx >= l { | ||||
| 						return io.ErrUnexpectedEOF | ||||
| 					} | ||||
| 					b := dAtA[iNdEx] | ||||
| 					iNdEx++ | ||||
| 					packedLen |= int(b&0x7F) << shift | ||||
| 					if b < 0x80 { | ||||
| 						break | ||||
| 					} | ||||
| 				} | ||||
| 				if packedLen < 0 { | ||||
| 					return ErrInvalidLengthEvm | ||||
| 				} | ||||
| 				postIndex := iNdEx + packedLen | ||||
| 				if postIndex < 0 { | ||||
| 					return ErrInvalidLengthEvm | ||||
| 				} | ||||
| 				if postIndex > l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				var elementCount int | ||||
| 				var count int | ||||
| 				for _, integer := range dAtA[iNdEx:postIndex] { | ||||
| 					if integer < 128 { | ||||
| 						count++ | ||||
| 					} | ||||
| 				} | ||||
| 				elementCount = count | ||||
| 				if elementCount != 0 && len(m.ExtraEIPs) == 0 { | ||||
| 					m.ExtraEIPs = make([]int64, 0, elementCount) | ||||
| 				} | ||||
| 				for iNdEx < postIndex { | ||||
| 					var v int64 | ||||
| 					for shift := uint(0); ; shift += 7 { | ||||
| 						if shift >= 64 { | ||||
| 							return ErrIntOverflowEvm | ||||
| 						} | ||||
| 						if iNdEx >= l { | ||||
| 							return io.ErrUnexpectedEOF | ||||
| 						} | ||||
| 						b := dAtA[iNdEx] | ||||
| 						iNdEx++ | ||||
| 						v |= int64(b&0x7F) << shift | ||||
| 						if b < 0x80 { | ||||
| 							break | ||||
| 						} | ||||
| 					} | ||||
| 					m.ExtraEIPs = append(m.ExtraEIPs, v) | ||||
| 				} | ||||
| 			} else { | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType) | ||||
| 			} | ||||
| 			var msglen int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowEvm | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				msglen |= int(b&0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if msglen < 0 { | ||||
| 				return ErrInvalidLengthEvm | ||||
| 			} | ||||
| 			postIndex := iNdEx + msglen | ||||
| 			if postIndex < 0 { | ||||
| 				return ErrInvalidLengthEvm | ||||
| 			} | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			if err := m.ExtraEIPs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			iNdEx = postIndex | ||||
| 		case 5: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) | ||||
| @ -2084,6 +2134,132 @@ func (m *Params) Unmarshal(dAtA []byte) error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowEvm | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= uint64(b&0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: ExtraEIPs: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: ExtraEIPs: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType == 0 { | ||||
| 				var v int64 | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return ErrIntOverflowEvm | ||||
| 					} | ||||
| 					if iNdEx >= l { | ||||
| 						return io.ErrUnexpectedEOF | ||||
| 					} | ||||
| 					b := dAtA[iNdEx] | ||||
| 					iNdEx++ | ||||
| 					v |= int64(b&0x7F) << shift | ||||
| 					if b < 0x80 { | ||||
| 						break | ||||
| 					} | ||||
| 				} | ||||
| 				m.EIPs = append(m.EIPs, v) | ||||
| 			} else if wireType == 2 { | ||||
| 				var packedLen int | ||||
| 				for shift := uint(0); ; shift += 7 { | ||||
| 					if shift >= 64 { | ||||
| 						return ErrIntOverflowEvm | ||||
| 					} | ||||
| 					if iNdEx >= l { | ||||
| 						return io.ErrUnexpectedEOF | ||||
| 					} | ||||
| 					b := dAtA[iNdEx] | ||||
| 					iNdEx++ | ||||
| 					packedLen |= int(b&0x7F) << shift | ||||
| 					if b < 0x80 { | ||||
| 						break | ||||
| 					} | ||||
| 				} | ||||
| 				if packedLen < 0 { | ||||
| 					return ErrInvalidLengthEvm | ||||
| 				} | ||||
| 				postIndex := iNdEx + packedLen | ||||
| 				if postIndex < 0 { | ||||
| 					return ErrInvalidLengthEvm | ||||
| 				} | ||||
| 				if postIndex > l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				var elementCount int | ||||
| 				var count int | ||||
| 				for _, integer := range dAtA[iNdEx:postIndex] { | ||||
| 					if integer < 128 { | ||||
| 						count++ | ||||
| 					} | ||||
| 				} | ||||
| 				elementCount = count | ||||
| 				if elementCount != 0 && len(m.EIPs) == 0 { | ||||
| 					m.EIPs = make([]int64, 0, elementCount) | ||||
| 				} | ||||
| 				for iNdEx < postIndex { | ||||
| 					var v int64 | ||||
| 					for shift := uint(0); ; shift += 7 { | ||||
| 						if shift >= 64 { | ||||
| 							return ErrIntOverflowEvm | ||||
| 						} | ||||
| 						if iNdEx >= l { | ||||
| 							return io.ErrUnexpectedEOF | ||||
| 						} | ||||
| 						b := dAtA[iNdEx] | ||||
| 						iNdEx++ | ||||
| 						v |= int64(b&0x7F) << shift | ||||
| 						if b < 0x80 { | ||||
| 							break | ||||
| 						} | ||||
| 					} | ||||
| 					m.EIPs = append(m.EIPs, v) | ||||
| 				} | ||||
| 			} else { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field EIPs", wireType) | ||||
| 			} | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipEvm(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if (skippy < 0) || (iNdEx+skippy) < 0 { | ||||
| 				return ErrInvalidLengthEvm | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *ChainConfig) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
|  | ||||
| @ -18,6 +18,8 @@ package types | ||||
| import ( | ||||
| 	"math/big" | ||||
| 
 | ||||
| 	paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||||
| 
 | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||||
| 	stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" | ||||
| @ -70,3 +72,12 @@ type EvmHooks interface { | ||||
| 	// Must be called after tx is processed successfully, if return an error, the whole transaction is reverted.
 | ||||
| 	PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *ethtypes.Receipt) error | ||||
| } | ||||
| 
 | ||||
| type ( | ||||
| 	LegacyParams = paramtypes.ParamSet | ||||
| 	// Subspace defines an interface that implements the legacy Cosmos SDK x/params Subspace type.
 | ||||
| 	// NOTE: This is used solely for migration of the Cosmos SDK x/params managed parameters.
 | ||||
| 	Subspace interface { | ||||
| 		GetParamSetIfExists(ctx sdk.Context, ps LegacyParams) | ||||
| 	} | ||||
| ) | ||||
|  | ||||
| @ -43,6 +43,7 @@ var ( | ||||
| 	_ sdk.Msg    = &MsgEthereumTx{} | ||||
| 	_ sdk.Tx     = &MsgEthereumTx{} | ||||
| 	_ ante.GasTx = &MsgEthereumTx{} | ||||
| 	_ sdk.Msg    = &MsgUpdateParams{} | ||||
| 
 | ||||
| 	_ codectypes.UnpackInterfacesMessage = MsgEthereumTx{} | ||||
| ) | ||||
| @ -389,3 +390,24 @@ func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing. | ||||
| 	tx := builder.GetTx() | ||||
| 	return tx, nil | ||||
| } | ||||
| 
 | ||||
| // GetSigners returns the expected signers for a MsgUpdateParams message.
 | ||||
| func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { | ||||
| 	//#nosec G703 -- gosec raises a warning about a non-handled error which we deliberately ignore here
 | ||||
| 	addr, _ := sdk.AccAddressFromBech32(m.Authority) | ||||
| 	return []sdk.AccAddress{addr} | ||||
| } | ||||
| 
 | ||||
| // ValidateBasic does a sanity check of the provided data
 | ||||
| func (m *MsgUpdateParams) ValidateBasic() error { | ||||
| 	if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { | ||||
| 		return errortypes.Wrap(err, "invalid authority address") | ||||
| 	} | ||||
| 
 | ||||
| 	return m.Params.Validate() | ||||
| } | ||||
| 
 | ||||
| // GetSignBytes implements the LegacyMsg interface.
 | ||||
| func (m MsgUpdateParams) GetSignBytes() []byte { | ||||
| 	return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) | ||||
| } | ||||
|  | ||||
| @ -22,20 +22,21 @@ import ( | ||||
| 	"github.com/ethereum/go-ethereum/params" | ||||
| 
 | ||||
| 	sdk "github.com/cosmos/cosmos-sdk/types" | ||||
| 	paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||||
| 	"github.com/ethereum/go-ethereum/core/vm" | ||||
| 	"github.com/evmos/ethermint/types" | ||||
| ) | ||||
| 
 | ||||
| var _ paramtypes.ParamSet = &Params{} | ||||
| 
 | ||||
| var ( | ||||
| 	// DefaultEVMDenom defines the default EVM denomination on Ethermint
 | ||||
| 	DefaultEVMDenom = types.AttoPhoton | ||||
| 	// DefaultMinGasMultiplier is 0.5 or 50%
 | ||||
| 	DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2) | ||||
| 	// DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false)
 | ||||
| 	DefaultAllowUnprotectedTxs = false | ||||
| 	// DefaultEnableCreate enables contract creation (i.e true)
 | ||||
| 	DefaultEnableCreate = true | ||||
| 	// DefaultEnableCall enables contract calls (i.e true)
 | ||||
| 	DefaultEnableCall = true | ||||
| 	// DefaultExtraEIPs  defines the set of activateable Ethereum Improvement Proposals
 | ||||
| 	DefaultExtraEIPs = ExtraEIPs{AvailableExtraEIPs} | ||||
| ) | ||||
| 
 | ||||
| // Parameter keys
 | ||||
| @ -55,19 +56,15 @@ var ( | ||||
| 	AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529} | ||||
| ) | ||||
| 
 | ||||
| // ParamKeyTable returns the parameter key table.
 | ||||
| func ParamKeyTable() paramtypes.KeyTable { | ||||
| 	return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) | ||||
| } | ||||
| 
 | ||||
| // NewParams creates a new Params instance
 | ||||
| func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, extraEIPs ...int64) Params { | ||||
| func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs ExtraEIPs) Params { | ||||
| 	return Params{ | ||||
| 		EvmDenom:     evmDenom, | ||||
| 		EnableCreate: enableCreate, | ||||
| 		EnableCall:   enableCall, | ||||
| 		ExtraEIPs:    extraEIPs, | ||||
| 		ChainConfig:  config, | ||||
| 		EvmDenom:            evmDenom, | ||||
| 		AllowUnprotectedTxs: allowUnprotectedTxs, | ||||
| 		EnableCreate:        enableCreate, | ||||
| 		EnableCall:          enableCall, | ||||
| 		ExtraEIPs:           extraEIPs, | ||||
| 		ChainConfig:         config, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| @ -76,43 +73,43 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi | ||||
| func DefaultParams() Params { | ||||
| 	return Params{ | ||||
| 		EvmDenom:            DefaultEVMDenom, | ||||
| 		EnableCreate:        true, | ||||
| 		EnableCall:          true, | ||||
| 		EnableCreate:        DefaultEnableCreate, | ||||
| 		EnableCall:          DefaultEnableCall, | ||||
| 		ChainConfig:         DefaultChainConfig(), | ||||
| 		ExtraEIPs:           nil, | ||||
| 		ExtraEIPs:           DefaultExtraEIPs, | ||||
| 		AllowUnprotectedTxs: DefaultAllowUnprotectedTxs, | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // ParamSetPairs returns the parameter set pairs.
 | ||||
| func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { | ||||
| 	return paramtypes.ParamSetPairs{ | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig), | ||||
| 		paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool), | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Validate performs basic validation on evm parameters.
 | ||||
| func (p Params) Validate() error { | ||||
| 	if err := sdk.ValidateDenom(p.EvmDenom); err != nil { | ||||
| 	if err := validateEVMDenom(p.EvmDenom); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	if err := validateEIPs(p.ExtraEIPs); err != nil { | ||||
| 	if err := validateEIPs(p.ExtraEIPs.EIPs); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	return p.ChainConfig.Validate() | ||||
| 	if err := validateBool(p.EnableCall); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	if err := validateBool(p.EnableCreate); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	if err := validateBool(p.AllowUnprotectedTxs); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 	return validateChainConfig(p.ChainConfig) | ||||
| } | ||||
| 
 | ||||
| // EIPs returns the ExtraEips as a int slice
 | ||||
| // EIPs returns the ExtraEIPS as a int slice
 | ||||
| func (p Params) EIPs() []int { | ||||
| 	eips := make([]int, len(p.ExtraEIPs)) | ||||
| 	for i, eip := range p.ExtraEIPs { | ||||
| 	eips := make([]int, len(p.ExtraEIPs.EIPs)) | ||||
| 	for i, eip := range p.ExtraEIPs.EIPs { | ||||
| 		eips[i] = int(eip) | ||||
| 	} | ||||
| 	return eips | ||||
|  | ||||
| @ -5,15 +5,11 @@ import ( | ||||
| 
 | ||||
| 	"github.com/ethereum/go-ethereum/params" | ||||
| 
 | ||||
| 	paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
| 
 | ||||
| func TestParamKeyTable(t *testing.T) { | ||||
| 	require.IsType(t, paramtypes.KeyTable{}, ParamKeyTable()) | ||||
| } | ||||
| 
 | ||||
| func TestParamsValidate(t *testing.T) { | ||||
| 	extraEips := ExtraEIPs{[]int64{2929, 1884, 1344}} | ||||
| 	testCases := []struct { | ||||
| 		name     string | ||||
| 		params   Params | ||||
| @ -22,7 +18,7 @@ func TestParamsValidate(t *testing.T) { | ||||
| 		{"default", DefaultParams(), false}, | ||||
| 		{ | ||||
| 			"valid", | ||||
| 			NewParams("ara", true, true, DefaultChainConfig(), 2929, 1884, 1344), | ||||
| 			NewParams("ara", false, true, true, DefaultChainConfig(), extraEips), | ||||
| 			false, | ||||
| 		}, | ||||
| 		{ | ||||
| @ -41,7 +37,7 @@ func TestParamsValidate(t *testing.T) { | ||||
| 			"invalid eip", | ||||
| 			Params{ | ||||
| 				EvmDenom:  "stake", | ||||
| 				ExtraEIPs: []int64{1}, | ||||
| 				ExtraEIPs: ExtraEIPs{[]int64{1}}, | ||||
| 			}, | ||||
| 			true, | ||||
| 		}, | ||||
| @ -59,7 +55,8 @@ func TestParamsValidate(t *testing.T) { | ||||
| } | ||||
| 
 | ||||
| func TestParamsEIPs(t *testing.T) { | ||||
| 	params := NewParams("ara", true, true, DefaultChainConfig(), 2929, 1884, 1344) | ||||
| 	extraEips := ExtraEIPs{[]int64{2929, 1884, 1344}} | ||||
| 	params := NewParams("ara", false, true, true, DefaultChainConfig(), extraEips) | ||||
| 	actual := params.EIPs() | ||||
| 
 | ||||
| 	require.Equal(t, []int([]int{2929, 1884, 1344}), actual) | ||||
|  | ||||
							
								
								
									
										507
									
								
								x/evm/types/tx.pb.go
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										507
									
								
								x/evm/types/tx.pb.go
									
									
									
										generated
									
									
									
								
							| @ -10,6 +10,7 @@ import ( | ||||
| 	_ "github.com/cosmos/cosmos-proto" | ||||
| 	types "github.com/cosmos/cosmos-sdk/codec/types" | ||||
| 	github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | ||||
| 	_ "github.com/cosmos/cosmos-sdk/types/msgservice" | ||||
| 	_ "github.com/cosmos/gogoproto/gogoproto" | ||||
| 	grpc1 "github.com/gogo/protobuf/grpc" | ||||
| 	proto "github.com/gogo/protobuf/proto" | ||||
| @ -345,6 +346,100 @@ func (m *MsgEthereumTxResponse) XXX_DiscardUnknown() { | ||||
| 
 | ||||
| var xxx_messageInfo_MsgEthereumTxResponse proto.InternalMessageInfo | ||||
| 
 | ||||
| // MsgUpdateParams defines a Msg for updating the x/evm module parameters.
 | ||||
| type MsgUpdateParams struct { | ||||
| 	// authority is the address of the governance account.
 | ||||
| 	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` | ||||
| 	// params defines the x/evm parameters to update.
 | ||||
| 	// NOTE: All parameters must be supplied.
 | ||||
| 	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) Reset()         { *m = MsgUpdateParams{} } | ||||
| func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } | ||||
| func (*MsgUpdateParams) ProtoMessage()    {} | ||||
| func (*MsgUpdateParams) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_f75ac0a12d075f21, []int{6} | ||||
| } | ||||
| func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| } | ||||
| func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | ||||
| 	if deterministic { | ||||
| 		return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) | ||||
| 	} else { | ||||
| 		b = b[:cap(b)] | ||||
| 		n, err := m.MarshalToSizedBuffer(b) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		return b[:n], nil | ||||
| 	} | ||||
| } | ||||
| func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { | ||||
| 	xxx_messageInfo_MsgUpdateParams.Merge(m, src) | ||||
| } | ||||
| func (m *MsgUpdateParams) XXX_Size() int { | ||||
| 	return m.Size() | ||||
| } | ||||
| func (m *MsgUpdateParams) XXX_DiscardUnknown() { | ||||
| 	xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) | ||||
| } | ||||
| 
 | ||||
| var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo | ||||
| 
 | ||||
| func (m *MsgUpdateParams) GetAuthority() string { | ||||
| 	if m != nil { | ||||
| 		return m.Authority | ||||
| 	} | ||||
| 	return "" | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) GetParams() Params { | ||||
| 	if m != nil { | ||||
| 		return m.Params | ||||
| 	} | ||||
| 	return Params{} | ||||
| } | ||||
| 
 | ||||
| // MsgUpdateParamsResponse defines the response structure for executing a
 | ||||
| // MsgUpdateParams message.
 | ||||
| type MsgUpdateParamsResponse struct { | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParamsResponse) Reset()         { *m = MsgUpdateParamsResponse{} } | ||||
| func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } | ||||
| func (*MsgUpdateParamsResponse) ProtoMessage()    {} | ||||
| func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { | ||||
| 	return fileDescriptor_f75ac0a12d075f21, []int{7} | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { | ||||
| 	return m.Unmarshal(b) | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { | ||||
| 	if deterministic { | ||||
| 		return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) | ||||
| 	} else { | ||||
| 		b = b[:cap(b)] | ||||
| 		n, err := m.MarshalToSizedBuffer(b) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		return b[:n], nil | ||||
| 	} | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { | ||||
| 	xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) XXX_Size() int { | ||||
| 	return m.Size() | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { | ||||
| 	xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) | ||||
| } | ||||
| 
 | ||||
| var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo | ||||
| 
 | ||||
| func init() { | ||||
| 	proto.RegisterType((*MsgEthereumTx)(nil), "ethermint.evm.v1.MsgEthereumTx") | ||||
| 	proto.RegisterType((*LegacyTx)(nil), "ethermint.evm.v1.LegacyTx") | ||||
| @ -352,66 +447,76 @@ func init() { | ||||
| 	proto.RegisterType((*DynamicFeeTx)(nil), "ethermint.evm.v1.DynamicFeeTx") | ||||
| 	proto.RegisterType((*ExtensionOptionsEthereumTx)(nil), "ethermint.evm.v1.ExtensionOptionsEthereumTx") | ||||
| 	proto.RegisterType((*MsgEthereumTxResponse)(nil), "ethermint.evm.v1.MsgEthereumTxResponse") | ||||
| 	proto.RegisterType((*MsgUpdateParams)(nil), "ethermint.evm.v1.MsgUpdateParams") | ||||
| 	proto.RegisterType((*MsgUpdateParamsResponse)(nil), "ethermint.evm.v1.MsgUpdateParamsResponse") | ||||
| } | ||||
| 
 | ||||
| func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } | ||||
| 
 | ||||
| var fileDescriptor_f75ac0a12d075f21 = []byte{ | ||||
| 	// 853 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x31, 0x8f, 0xe3, 0x44, | ||||
| 	0x14, 0xce, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0xe9, 0x64, 0xed, 0x49, 0x4e, 0xc4, 0xc5, 0x91, 0x25, | ||||
| 	0x20, 0x20, 0xc5, 0xd6, 0x2d, 0x54, 0x5b, 0xdd, 0xe6, 0x76, 0xef, 0x74, 0xa7, 0x9c, 0x40, 0x56, | ||||
| 	0x68, 0xb8, 0x22, 0x9a, 0x75, 0x66, 0x1d, 0x8b, 0xd8, 0x63, 0x79, 0x26, 0x96, 0x83, 0x44, 0x83, | ||||
| 	0x28, 0xe8, 0x40, 0xe2, 0x0f, 0x50, 0x50, 0xd1, 0xc2, 0x0f, 0xa0, 0x3c, 0x51, 0x9d, 0x44, 0x83, | ||||
| 	0x28, 0x0c, 0xca, 0x52, 0x6d, 0x07, 0xbf, 0x00, 0xcd, 0x8c, 0xb3, 0xd9, 0x10, 0x65, 0x81, 0x65, | ||||
| 	0xd1, 0x55, 0x99, 0xe7, 0xf7, 0xde, 0x37, 0x6f, 0xde, 0xf7, 0xe5, 0x3d, 0xd8, 0xc2, 0x6c, 0x8a, | ||||
| 	0x93, 0x30, 0x88, 0x98, 0x83, 0xd3, 0xd0, 0x49, 0xef, 0x39, 0x2c, 0xb3, 0xe3, 0x84, 0x30, 0xa2, | ||||
| 	0xdf, 0xbe, 0x70, 0xd9, 0x38, 0x0d, 0xed, 0xf4, 0x5e, 0xbb, 0xe5, 0x11, 0x1a, 0x12, 0x3a, 0x16, | ||||
| 	0x7e, 0x47, 0x1a, 0x32, 0xb8, 0xdd, 0xde, 0xc2, 0xe1, 0x39, 0xd2, 0xb7, 0xe7, 0x13, 0x9f, 0xc8, | ||||
| 	0x1c, 0x7e, 0x2a, 0xbe, 0xbe, 0xea, 0x13, 0xe2, 0xcf, 0xb0, 0x83, 0xe2, 0xc0, 0x41, 0x51, 0x44, | ||||
| 	0x18, 0x62, 0x01, 0x89, 0x56, 0x78, 0xad, 0xc2, 0x2b, 0xac, 0x93, 0xf9, 0xa9, 0x83, 0xa2, 0x85, | ||||
| 	0x74, 0x59, 0x9f, 0x03, 0xf8, 0xca, 0x53, 0xea, 0x1f, 0xf3, 0x0b, 0xf1, 0x3c, 0x1c, 0x65, 0x7a, | ||||
| 	0x0f, 0x2a, 0x13, 0xc4, 0x90, 0x01, 0xba, 0xa0, 0xd7, 0xd8, 0xdf, 0xb3, 0x65, 0xae, 0xbd, 0xca, | ||||
| 	0xb5, 0x0f, 0xa3, 0x85, 0x2b, 0x22, 0xf4, 0x16, 0x54, 0x68, 0xf0, 0x11, 0x36, 0xca, 0x5d, 0xd0, | ||||
| 	0x03, 0x83, 0xea, 0x79, 0x6e, 0x82, 0xbe, 0x2b, 0x3e, 0xe9, 0x26, 0x54, 0xa6, 0x88, 0x4e, 0x8d, | ||||
| 	0x4a, 0x17, 0xf4, 0xea, 0x83, 0xc6, 0x1f, 0xb9, 0xa9, 0x26, 0xb3, 0xf8, 0xc0, 0xea, 0x5b, 0xae, | ||||
| 	0x70, 0xe8, 0x3a, 0x54, 0x4e, 0x13, 0x12, 0x1a, 0x0a, 0x0f, 0x70, 0xc5, 0xf9, 0x40, 0xf9, 0xec, | ||||
| 	0x2b, 0xb3, 0x64, 0x7d, 0x5b, 0x86, 0xda, 0x10, 0xfb, 0xc8, 0x5b, 0x8c, 0x32, 0x7d, 0x0f, 0x56, | ||||
| 	0x23, 0x12, 0x79, 0x58, 0x54, 0xa3, 0xb8, 0xd2, 0xd0, 0x1f, 0xc1, 0xba, 0x8f, 0x78, 0xe7, 0x02, | ||||
| 	0x4f, 0xde, 0x5e, 0x1f, 0xbc, 0xf5, 0x73, 0x6e, 0xbe, 0xee, 0x07, 0x6c, 0x3a, 0x3f, 0xb1, 0x3d, | ||||
| 	0x12, 0x16, 0xfd, 0x2c, 0x7e, 0xfa, 0x74, 0xf2, 0xa1, 0xc3, 0x16, 0x31, 0xa6, 0xf6, 0xe3, 0x88, | ||||
| 	0xb9, 0x9a, 0x8f, 0xe8, 0x7b, 0x3c, 0x57, 0xef, 0xc0, 0x8a, 0x8f, 0xa8, 0xa8, 0x52, 0x19, 0x34, | ||||
| 	0x97, 0xb9, 0xa9, 0x3d, 0x42, 0x74, 0x18, 0x84, 0x01, 0x73, 0xb9, 0x43, 0xbf, 0x05, 0xcb, 0x8c, | ||||
| 	0x14, 0x35, 0x96, 0x19, 0xd1, 0x9f, 0xc0, 0x6a, 0x8a, 0x66, 0x73, 0x6c, 0x54, 0xc5, 0xa5, 0xef, | ||||
| 	0xfc, 0xf3, 0x4b, 0x97, 0xb9, 0x59, 0x3b, 0x0c, 0xc9, 0x3c, 0x62, 0xae, 0x84, 0xe0, 0x1d, 0x10, | ||||
| 	0x7d, 0xae, 0x75, 0x41, 0xaf, 0x59, 0x74, 0xb4, 0x09, 0x41, 0x6a, 0xa8, 0xe2, 0x03, 0x48, 0xb9, | ||||
| 	0x95, 0x18, 0x9a, 0xb4, 0x12, 0x6e, 0x51, 0xa3, 0x2e, 0x2d, 0x7a, 0x70, 0x8b, 0xf7, 0xea, 0x87, | ||||
| 	0xef, 0xfa, 0xb5, 0x51, 0x76, 0x84, 0x18, 0xb2, 0x7e, 0xaf, 0xc0, 0xe6, 0xa1, 0xe7, 0x61, 0x4a, | ||||
| 	0x87, 0x01, 0x65, 0xa3, 0x4c, 0x7f, 0x06, 0x35, 0x6f, 0x8a, 0x82, 0x68, 0x1c, 0x4c, 0x44, 0xf3, | ||||
| 	0xea, 0x83, 0xfb, 0xff, 0xaa, 0x5a, 0xf5, 0x01, 0xcf, 0x7e, 0x7c, 0x74, 0x9e, 0x9b, 0xaa, 0x27, | ||||
| 	0x8f, 0x6e, 0x71, 0x98, 0xac, 0x69, 0x29, 0xef, 0xa4, 0xa5, 0xf2, 0xdf, 0x69, 0x51, 0xae, 0xa6, | ||||
| 	0xa5, 0xba, 0x4d, 0x4b, 0xed, 0xe6, 0x68, 0x51, 0x2f, 0xd1, 0xf2, 0x0c, 0x6a, 0x48, 0xf4, 0x16, | ||||
| 	0x53, 0x43, 0xeb, 0x56, 0x7a, 0x8d, 0xfd, 0xbb, 0xf6, 0x5f, 0xff, 0xcf, 0xb6, 0xec, 0xfe, 0x68, | ||||
| 	0x1e, 0xcf, 0xf0, 0xa0, 0xfb, 0x3c, 0x37, 0x4b, 0xe7, 0xb9, 0x09, 0xd1, 0x05, 0x25, 0xdf, 0xfc, | ||||
| 	0x62, 0xc2, 0x35, 0x41, 0xee, 0x05, 0xa0, 0xe4, 0xbc, 0xbe, 0xc1, 0x39, 0xdc, 0xe0, 0xbc, 0xb1, | ||||
| 	0x8b, 0xf3, 0xef, 0x15, 0xd8, 0x3c, 0x5a, 0x44, 0x28, 0x0c, 0xbc, 0x87, 0x18, 0xbf, 0x1c, 0xce, | ||||
| 	0x9f, 0xc0, 0x06, 0xe7, 0x9c, 0x05, 0xf1, 0xd8, 0x43, 0xf1, 0x35, 0x58, 0xe7, 0x92, 0x19, 0x05, | ||||
| 	0xf1, 0x03, 0x14, 0xaf, 0xb0, 0x4e, 0x31, 0x16, 0x58, 0xca, 0xb5, 0xb0, 0x1e, 0x62, 0xcc, 0xb1, | ||||
| 	0x0a, 0x09, 0x55, 0xaf, 0x96, 0x50, 0x6d, 0x5b, 0x42, 0xea, 0xcd, 0x49, 0x48, 0xdb, 0x21, 0xa1, | ||||
| 	0xfa, 0xff, 0x22, 0x21, 0xb8, 0x21, 0xa1, 0xc6, 0x86, 0x84, 0x9a, 0xbb, 0x24, 0x64, 0xc1, 0xf6, | ||||
| 	0x71, 0xc6, 0x70, 0x44, 0x03, 0x12, 0xbd, 0x1b, 0x8b, 0x9d, 0xb1, 0x5e, 0x05, 0xc5, 0x40, 0xfe, | ||||
| 	0x1a, 0xc0, 0x3b, 0x1b, 0x2b, 0xc2, 0xc5, 0x34, 0x26, 0x11, 0x15, 0x0f, 0x15, 0x53, 0x1e, 0xc8, | ||||
| 	0x21, 0x2e, 0x06, 0xfb, 0x9b, 0x50, 0x99, 0x11, 0x9f, 0x1a, 0x65, 0xf1, 0xc8, 0x3b, 0xdb, 0x8f, | ||||
| 	0x1c, 0x12, 0xdf, 0x15, 0x21, 0xfa, 0x6d, 0x58, 0x49, 0x30, 0x13, 0x9a, 0x69, 0xba, 0xfc, 0xa8, | ||||
| 	0xb7, 0xa0, 0x96, 0x86, 0x63, 0x9c, 0x24, 0x24, 0x29, 0xa6, 0xae, 0x9a, 0x86, 0xc7, 0xdc, 0xe4, | ||||
| 	0x2e, 0x2e, 0x8e, 0x39, 0xc5, 0x13, 0xc9, 0xaa, 0xab, 0xfa, 0x88, 0xbe, 0x4f, 0xf1, 0x44, 0x96, | ||||
| 	0xb9, 0xff, 0x29, 0x80, 0x95, 0xa7, 0xd4, 0xd7, 0x3f, 0x86, 0xf0, 0xd2, 0x36, 0x33, 0xb7, 0x0b, | ||||
| 	0xd8, 0x78, 0x4b, 0xfb, 0x8d, 0xbf, 0x09, 0x58, 0x3d, 0xd6, 0x7a, 0xed, 0x93, 0x1f, 0x7f, 0xfb, | ||||
| 	0xb2, 0x6c, 0x5a, 0x77, 0x9d, 0xed, 0xed, 0x5c, 0x44, 0x8f, 0x59, 0x36, 0xb8, 0xff, 0x7c, 0xd9, | ||||
| 	0x01, 0x2f, 0x96, 0x1d, 0xf0, 0xeb, 0xb2, 0x03, 0xbe, 0x38, 0xeb, 0x94, 0x5e, 0x9c, 0x75, 0x4a, | ||||
| 	0x3f, 0x9d, 0x75, 0x4a, 0x1f, 0x5c, 0xd6, 0x13, 0x4e, 0xb9, 0x9c, 0xd6, 0x40, 0x99, 0x80, 0x12, | ||||
| 	0x9a, 0x3a, 0xa9, 0x89, 0x55, 0xfb, 0xf6, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xce, 0x14, | ||||
| 	0xcb, 0x4e, 0x08, 0x00, 0x00, | ||||
| 	// 990 bytes of a gzipped FileDescriptorProto
 | ||||
| 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, | ||||
| 	0x14, 0x5f, 0x27, 0xce, 0xbf, 0x49, 0x58, 0xaa, 0xd1, 0x56, 0x75, 0x22, 0x1a, 0xa7, 0x96, 0xa0, | ||||
| 	0x69, 0xa5, 0xd8, 0xea, 0x82, 0x7a, 0xd8, 0x53, 0x37, 0xdd, 0x6d, 0xd5, 0x6a, 0x57, 0x54, 0x26, | ||||
| 	0xbd, 0xd0, 0x43, 0x34, 0xeb, 0xcc, 0x4e, 0x2c, 0x62, 0x8f, 0xe5, 0x19, 0x5b, 0x09, 0x12, 0x97, | ||||
| 	0x4a, 0x48, 0x1c, 0x90, 0x00, 0xf1, 0x05, 0x38, 0x70, 0xe2, 0x84, 0x44, 0x3f, 0x00, 0xc7, 0x8a, | ||||
| 	0x53, 0x05, 0x17, 0xc4, 0x21, 0xa0, 0x2c, 0x12, 0xd2, 0xde, 0xe0, 0x13, 0xa0, 0x99, 0x71, 0x36, | ||||
| 	0x9b, 0x86, 0x6d, 0xa1, 0x14, 0x71, 0xf2, 0xbc, 0x79, 0x6f, 0xde, 0x7b, 0xf3, 0xfb, 0xfd, 0x66, | ||||
| 	0xc6, 0xa0, 0x8e, 0xf9, 0x10, 0xc7, 0x81, 0x1f, 0x72, 0x07, 0xa7, 0x81, 0x93, 0x5e, 0x73, 0xf8, | ||||
| 	0xd8, 0x8e, 0x62, 0xca, 0x29, 0x3c, 0x77, 0xe2, 0xb2, 0x71, 0x1a, 0xd8, 0xe9, 0xb5, 0xc6, 0x05, | ||||
| 	0x8f, 0xb2, 0x80, 0x32, 0x27, 0x60, 0x44, 0x44, 0x06, 0x8c, 0xa8, 0xd0, 0x46, 0x5d, 0x39, 0xfa, | ||||
| 	0xd2, 0x72, 0x94, 0x91, 0xb9, 0x1a, 0x2b, 0x05, 0x44, 0x32, 0xe5, 0xdb, 0x20, 0x94, 0x50, 0xb5, | ||||
| 	0x46, 0x8c, 0xb2, 0xd9, 0xd7, 0x08, 0xa5, 0x64, 0x84, 0x1d, 0x14, 0xf9, 0x0e, 0x0a, 0x43, 0xca, | ||||
| 	0x11, 0xf7, 0x69, 0x38, 0xcf, 0x57, 0xcf, 0xbc, 0xd2, 0x3a, 0x48, 0x0e, 0x1d, 0x14, 0x4e, 0x94, | ||||
| 	0xcb, 0xfa, 0x44, 0x03, 0xaf, 0xec, 0x33, 0xb2, 0x2b, 0x0a, 0xe2, 0x24, 0xe8, 0x8d, 0x61, 0x1b, | ||||
| 	0xe8, 0x03, 0xc4, 0x91, 0xa1, 0xb5, 0xb4, 0x76, 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e, 0x28, 0xf9, 0xea, 0x67, | ||||
| 	0x13, 0x2c, 0x08, 0x72, 0x4f, 0x12, 0x2a, 0xce, 0x2b, 0x4b, 0x9c, 0x83, 0x25, 0xce, 0xab, 0x67, | ||||
| 	0x71, 0xfe, 0xad, 0x0e, 0x6a, 0x3b, 0x93, 0x10, 0x05, 0xbe, 0x77, 0x0b, 0xe3, 0xff, 0x87, 0xf3, | ||||
| 	0xbb, 0xa0, 0x2a, 0x38, 0xe7, 0x7e, 0xd4, 0xf7, 0x50, 0xf4, 0x02, 0xac, 0x0b, 0xc9, 0xf4, 0xfc, | ||||
| 	0xe8, 0x26, 0x8a, 0xe6, 0xb9, 0x0e, 0x31, 0x96, 0xb9, 0xf4, 0x17, 0xca, 0x75, 0x0b, 0x63, 0x91, | ||||
| 	0x2b, 0x93, 0x50, 0xe1, 0xd9, 0x12, 0x2a, 0xae, 0x4a, 0xa8, 0xf4, 0xf2, 0x24, 0x54, 0x3e, 0x43, | ||||
| 	0x42, 0x95, 0xff, 0x44, 0x42, 0x60, 0x49, 0x42, 0xd5, 0x25, 0x09, 0xd5, 0xce, 0x92, 0x90, 0x05, | ||||
| 	0x1a, 0xbb, 0x63, 0x8e, 0x43, 0xe6, 0xd3, 0xf0, 0xed, 0x48, 0xbe, 0x19, 0x8b, 0xa7, 0x20, 0xbb, | ||||
| 	0x90, 0xbf, 0xd4, 0xc0, 0xf9, 0xa5, 0x27, 0xc2, 0xc5, 0x2c, 0xa2, 0x21, 0x93, 0x1b, 0x95, 0xb7, | ||||
| 	0xbc, 0xa6, 0x2e, 0x71, 0x79, 0xb1, 0x5f, 0x01, 0xfa, 0x88, 0x12, 0x66, 0xe4, 0xe4, 0x26, 0xcf, | ||||
| 	0xaf, 0x6e, 0x72, 0x8f, 0x12, 0x57, 0x86, 0xc0, 0x73, 0x20, 0x1f, 0x63, 0x2e, 0x35, 0x53, 0x73, | ||||
| 	0xc5, 0x10, 0xd6, 0x41, 0x39, 0x0d, 0xfa, 0x38, 0x8e, 0x69, 0x9c, 0xdd, 0xba, 0xa5, 0x34, 0xd8, | ||||
| 	0x15, 0xa6, 0x70, 0x09, 0x71, 0x24, 0x0c, 0x0f, 0x14, 0xab, 0x6e, 0x89, 0x20, 0x76, 0x9f, 0xe1, | ||||
| 	0x41, 0xd6, 0xe6, 0x67, 0x1a, 0x78, 0x75, 0x9f, 0x91, 0xfb, 0xd1, 0x00, 0x71, 0x7c, 0x0f, 0xc5, | ||||
| 	0x28, 0x60, 0xf0, 0x3a, 0xa8, 0xa0, 0x84, 0x0f, 0x69, 0xec, 0xf3, 0x49, 0x76, 0x22, 0x8c, 0xef, | ||||
| 	0x1f, 0x75, 0x36, 0xb2, 0xd7, 0x76, 0x7b, 0x30, 0x88, 0x31, 0x63, 0xef, 0xf0, 0xd8, 0x0f, 0x89, | ||||
| 	0xbb, 0x08, 0x85, 0xd7, 0x41, 0x31, 0x92, 0x19, 0xa4, 0xd8, 0xab, 0x9b, 0xc6, 0xea, 0x36, 0x54, | ||||
| 	0x85, 0xae, 0x2e, 0x68, 0x72, 0xb3, 0xe8, 0xad, 0xf5, 0x87, 0xbf, 0x7d, 0x7d, 0x75, 0x91, 0xc7, | ||||
| 	0xaa, 0x83, 0x0b, 0x4f, 0xb5, 0x34, 0xc7, 0x6e, 0xf3, 0xe3, 0x1c, 0xc8, 0xef, 0x33, 0x02, 0x3f, | ||||
| 	0x00, 0xe0, 0xd4, 0xe3, 0x6b, 0xae, 0x16, 0x5a, 0x82, 0xbe, 0x71, 0xf9, 0x39, 0x01, 0xf3, 0xfc, | ||||
| 	0xd6, 0xeb, 0x0f, 0x7f, 0xf8, 0xf5, 0xf3, 0x9c, 0x69, 0x5d, 0x74, 0x56, 0x7f, 0x26, 0xb2, 0xe8, | ||||
| 	0x3e, 0x1f, 0xc3, 0x0f, 0x35, 0x50, 0x5b, 0x82, 0xec, 0xd2, 0x5f, 0x16, 0x38, 0x1d, 0xd2, 0xb8, | ||||
| 	0xf2, 0xdc, 0x90, 0x93, 0x2e, 0x2e, 0xcb, 0x2e, 0x2e, 0x59, 0xe6, 0x6a, 0x17, 0x89, 0x8c, 0xef, | ||||
| 	0x2b, 0xe4, 0xba, 0x37, 0x1e, 0xcf, 0x9a, 0xda, 0x93, 0x59, 0x53, 0xfb, 0x65, 0xd6, 0xd4, 0x3e, | ||||
| 	0x3d, 0x6a, 0xae, 0x3d, 0x39, 0x6a, 0xae, 0xfd, 0x78, 0xd4, 0x5c, 0x7b, 0xf7, 0xf4, 0x31, 0xc4, | ||||
| 	0xa9, 0x38, 0x85, 0x8b, 0x54, 0x63, 0x99, 0x4c, 0x1e, 0xc5, 0x83, 0xa2, 0xfc, 0x43, 0x79, 0xf3, | ||||
| 	0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x20, 0xbe, 0xf3, 0x9e, 0x09, 0x00, 0x00, | ||||
| } | ||||
| 
 | ||||
| // Reference imports to suppress errors if they are not otherwise used.
 | ||||
| @ -428,6 +533,9 @@ const _ = grpc.SupportPackageIsVersion4 | ||||
| type MsgClient interface { | ||||
| 	// EthereumTx defines a method submitting Ethereum transactions.
 | ||||
| 	EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) | ||||
| 	// UpdateParams defined a governance operation for updating the x/evm module parameters.
 | ||||
| 	// The authority is hard-coded to the Cosmos SDK x/gov module account
 | ||||
| 	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) | ||||
| } | ||||
| 
 | ||||
| type msgClient struct { | ||||
| @ -447,10 +555,22 @@ func (c *msgClient) EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...g | ||||
| 	return out, nil | ||||
| } | ||||
| 
 | ||||
| func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { | ||||
| 	out := new(MsgUpdateParamsResponse) | ||||
| 	err := c.cc.Invoke(ctx, "/ethermint.evm.v1.Msg/UpdateParams", in, out, opts...) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return out, nil | ||||
| } | ||||
| 
 | ||||
| // MsgServer is the server API for Msg service.
 | ||||
| type MsgServer interface { | ||||
| 	// EthereumTx defines a method submitting Ethereum transactions.
 | ||||
| 	EthereumTx(context.Context, *MsgEthereumTx) (*MsgEthereumTxResponse, error) | ||||
| 	// UpdateParams defined a governance operation for updating the x/evm module parameters.
 | ||||
| 	// The authority is hard-coded to the Cosmos SDK x/gov module account
 | ||||
| 	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) | ||||
| } | ||||
| 
 | ||||
| // UnimplementedMsgServer can be embedded to have forward compatible implementations.
 | ||||
| @ -460,6 +580,9 @@ type UnimplementedMsgServer struct { | ||||
| func (*UnimplementedMsgServer) EthereumTx(ctx context.Context, req *MsgEthereumTx) (*MsgEthereumTxResponse, error) { | ||||
| 	return nil, status.Errorf(codes.Unimplemented, "method EthereumTx not implemented") | ||||
| } | ||||
| func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { | ||||
| 	return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") | ||||
| } | ||||
| 
 | ||||
| func RegisterMsgServer(s grpc1.Server, srv MsgServer) { | ||||
| 	s.RegisterService(&_Msg_serviceDesc, srv) | ||||
| @ -483,6 +606,24 @@ func _Msg_EthereumTx_Handler(srv interface{}, ctx context.Context, dec func(inte | ||||
| 	return interceptor(ctx, in, info, handler) | ||||
| } | ||||
| 
 | ||||
| func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | ||||
| 	in := new(MsgUpdateParams) | ||||
| 	if err := dec(in); err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	if interceptor == nil { | ||||
| 		return srv.(MsgServer).UpdateParams(ctx, in) | ||||
| 	} | ||||
| 	info := &grpc.UnaryServerInfo{ | ||||
| 		Server:     srv, | ||||
| 		FullMethod: "/ethermint.evm.v1.Msg/UpdateParams", | ||||
| 	} | ||||
| 	handler := func(ctx context.Context, req interface{}) (interface{}, error) { | ||||
| 		return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) | ||||
| 	} | ||||
| 	return interceptor(ctx, in, info, handler) | ||||
| } | ||||
| 
 | ||||
| var _Msg_serviceDesc = grpc.ServiceDesc{ | ||||
| 	ServiceName: "ethermint.evm.v1.Msg", | ||||
| 	HandlerType: (*MsgServer)(nil), | ||||
| @ -491,6 +632,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ | ||||
| 			MethodName: "EthereumTx", | ||||
| 			Handler:    _Msg_EthereumTx_Handler, | ||||
| 		}, | ||||
| 		{ | ||||
| 			MethodName: "UpdateParams", | ||||
| 			Handler:    _Msg_UpdateParams_Handler, | ||||
| 		}, | ||||
| 	}, | ||||
| 	Streams:  []grpc.StreamDesc{}, | ||||
| 	Metadata: "ethermint/evm/v1/tx.proto", | ||||
| @ -977,6 +1122,69 @@ func (m *MsgEthereumTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	return len(dAtA) - i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	size := m.Size() | ||||
| 	return m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	i := len(dAtA) | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	{ | ||||
| 		size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) | ||||
| 		if err != nil { | ||||
| 			return 0, err | ||||
| 		} | ||||
| 		i -= size | ||||
| 		i = encodeVarintTx(dAtA, i, uint64(size)) | ||||
| 	} | ||||
| 	i-- | ||||
| 	dAtA[i] = 0x12 | ||||
| 	if len(m.Authority) > 0 { | ||||
| 		i -= len(m.Authority) | ||||
| 		copy(dAtA[i:], m.Authority) | ||||
| 		i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) | ||||
| 		i-- | ||||
| 		dAtA[i] = 0xa | ||||
| 	} | ||||
| 	return len(dAtA) - i, nil | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { | ||||
| 	size := m.Size() | ||||
| 	dAtA = make([]byte, size) | ||||
| 	n, err := m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	return dAtA[:n], nil | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { | ||||
| 	size := m.Size() | ||||
| 	return m.MarshalToSizedBuffer(dAtA[:size]) | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { | ||||
| 	i := len(dAtA) | ||||
| 	_ = i | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	return len(dAtA) - i, nil | ||||
| } | ||||
| 
 | ||||
| func encodeVarintTx(dAtA []byte, offset int, v uint64) int { | ||||
| 	offset -= sovTx(v) | ||||
| 	base := offset | ||||
| @ -1204,6 +1412,30 @@ func (m *MsgEthereumTxResponse) Size() (n int) { | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParams) Size() (n int) { | ||||
| 	if m == nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	l = len(m.Authority) | ||||
| 	if l > 0 { | ||||
| 		n += 1 + l + sovTx(uint64(l)) | ||||
| 	} | ||||
| 	l = m.Params.Size() | ||||
| 	n += 1 + l + sovTx(uint64(l)) | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func (m *MsgUpdateParamsResponse) Size() (n int) { | ||||
| 	if m == nil { | ||||
| 		return 0 | ||||
| 	} | ||||
| 	var l int | ||||
| 	_ = l | ||||
| 	return n | ||||
| } | ||||
| 
 | ||||
| func sovTx(x uint64) (n int) { | ||||
| 	return (math_bits.Len64(x|1) + 6) / 7 | ||||
| } | ||||
| @ -2782,6 +3014,171 @@ func (m *MsgEthereumTxResponse) Unmarshal(dAtA []byte) error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowTx | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= uint64(b&0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		case 1: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) | ||||
| 			} | ||||
| 			var stringLen uint64 | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowTx | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				stringLen |= uint64(b&0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			intStringLen := int(stringLen) | ||||
| 			if intStringLen < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			postIndex := iNdEx + intStringLen | ||||
| 			if postIndex < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			m.Authority = string(dAtA[iNdEx:postIndex]) | ||||
| 			iNdEx = postIndex | ||||
| 		case 2: | ||||
| 			if wireType != 2 { | ||||
| 				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) | ||||
| 			} | ||||
| 			var msglen int | ||||
| 			for shift := uint(0); ; shift += 7 { | ||||
| 				if shift >= 64 { | ||||
| 					return ErrIntOverflowTx | ||||
| 				} | ||||
| 				if iNdEx >= l { | ||||
| 					return io.ErrUnexpectedEOF | ||||
| 				} | ||||
| 				b := dAtA[iNdEx] | ||||
| 				iNdEx++ | ||||
| 				msglen |= int(b&0x7F) << shift | ||||
| 				if b < 0x80 { | ||||
| 					break | ||||
| 				} | ||||
| 			} | ||||
| 			if msglen < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			postIndex := iNdEx + msglen | ||||
| 			if postIndex < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			if postIndex > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			iNdEx = postIndex | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipTx(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if (skippy < 0) || (iNdEx+skippy) < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
| 	for iNdEx < l { | ||||
| 		preIndex := iNdEx | ||||
| 		var wire uint64 | ||||
| 		for shift := uint(0); ; shift += 7 { | ||||
| 			if shift >= 64 { | ||||
| 				return ErrIntOverflowTx | ||||
| 			} | ||||
| 			if iNdEx >= l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			b := dAtA[iNdEx] | ||||
| 			iNdEx++ | ||||
| 			wire |= uint64(b&0x7F) << shift | ||||
| 			if b < 0x80 { | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		fieldNum := int32(wire >> 3) | ||||
| 		wireType := int(wire & 0x7) | ||||
| 		if wireType == 4 { | ||||
| 			return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") | ||||
| 		} | ||||
| 		if fieldNum <= 0 { | ||||
| 			return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) | ||||
| 		} | ||||
| 		switch fieldNum { | ||||
| 		default: | ||||
| 			iNdEx = preIndex | ||||
| 			skippy, err := skipTx(dAtA[iNdEx:]) | ||||
| 			if err != nil { | ||||
| 				return err | ||||
| 			} | ||||
| 			if (skippy < 0) || (iNdEx+skippy) < 0 { | ||||
| 				return ErrInvalidLengthTx | ||||
| 			} | ||||
| 			if (iNdEx + skippy) > l { | ||||
| 				return io.ErrUnexpectedEOF | ||||
| 			} | ||||
| 			iNdEx += skippy | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if iNdEx > l { | ||||
| 		return io.ErrUnexpectedEOF | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func skipTx(dAtA []byte) (n int, err error) { | ||||
| 	l := len(dAtA) | ||||
| 	iNdEx := 0 | ||||
|  | ||||
							
								
								
									
										83
									
								
								x/evm/types/tx.pb.gw.go
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										83
									
								
								x/evm/types/tx.pb.gw.go
									
									
									
										generated
									
									
									
								
							| @ -69,6 +69,42 @@ func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marsh | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| var ( | ||||
| 	filter_Msg_UpdateParams_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} | ||||
| ) | ||||
| 
 | ||||
| func request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | ||||
| 	var protoReq MsgUpdateParams | ||||
| 	var metadata runtime.ServerMetadata | ||||
| 
 | ||||
| 	if err := req.ParseForm(); err != nil { | ||||
| 		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | ||||
| 	} | ||||
| 	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UpdateParams_0); err != nil { | ||||
| 		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | ||||
| 	} | ||||
| 
 | ||||
| 	msg, err := client.UpdateParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) | ||||
| 	return msg, metadata, err | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| func local_request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { | ||||
| 	var protoReq MsgUpdateParams | ||||
| 	var metadata runtime.ServerMetadata | ||||
| 
 | ||||
| 	if err := req.ParseForm(); err != nil { | ||||
| 		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | ||||
| 	} | ||||
| 	if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UpdateParams_0); err != nil { | ||||
| 		return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) | ||||
| 	} | ||||
| 
 | ||||
| 	msg, err := server.UpdateParams(ctx, &protoReq) | ||||
| 	return msg, metadata, err | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| // RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
 | ||||
| // UnaryRPC     :call MsgServer directly.
 | ||||
| // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
 | ||||
| @ -98,6 +134,29 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server | ||||
| 
 | ||||
| 	}) | ||||
| 
 | ||||
| 	mux.Handle("POST", pattern_Msg_UpdateParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | ||||
| 		ctx, cancel := context.WithCancel(req.Context()) | ||||
| 		defer cancel() | ||||
| 		var stream runtime.ServerTransportStream | ||||
| 		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) | ||||
| 		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | ||||
| 		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) | ||||
| 		if err != nil { | ||||
| 			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | ||||
| 			return | ||||
| 		} | ||||
| 		resp, md, err := local_request_Msg_UpdateParams_0(rctx, inboundMarshaler, server, req, pathParams) | ||||
| 		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) | ||||
| 		ctx = runtime.NewServerMetadataContext(ctx, md) | ||||
| 		if err != nil { | ||||
| 			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | ||||
| 			return | ||||
| 		} | ||||
| 
 | ||||
| 		forward_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | ||||
| 
 | ||||
| 	}) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| @ -159,13 +218,37 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client | ||||
| 
 | ||||
| 	}) | ||||
| 
 | ||||
| 	mux.Handle("POST", pattern_Msg_UpdateParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { | ||||
| 		ctx, cancel := context.WithCancel(req.Context()) | ||||
| 		defer cancel() | ||||
| 		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) | ||||
| 		rctx, err := runtime.AnnotateContext(ctx, mux, req) | ||||
| 		if err != nil { | ||||
| 			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | ||||
| 			return | ||||
| 		} | ||||
| 		resp, md, err := request_Msg_UpdateParams_0(rctx, inboundMarshaler, client, req, pathParams) | ||||
| 		ctx = runtime.NewServerMetadataContext(ctx, md) | ||||
| 		if err != nil { | ||||
| 			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) | ||||
| 			return | ||||
| 		} | ||||
| 
 | ||||
| 		forward_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) | ||||
| 
 | ||||
| 	}) | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
| 
 | ||||
| var ( | ||||
| 	pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false))) | ||||
| 
 | ||||
| 	pattern_Msg_UpdateParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "update_params"}, "", runtime.AssumeColonVerbOpt(false))) | ||||
| ) | ||||
| 
 | ||||
| var ( | ||||
| 	forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage | ||||
| 
 | ||||
| 	forward_Msg_UpdateParams_0 = runtime.ForwardResponseMessage | ||||
| ) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user