Sync from fork #74

Merged
0xmuralik merged 232 commits from murali/update-fork into main 2023-01-10 04:50:57 +00:00
3 changed files with 23 additions and 16 deletions
Showing only changes of commit ea3c16ed7a - Show all commits

View File

@ -15,6 +15,7 @@ import (
"github.com/tharsis/ethermint/app"
feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper"
v010 "github.com/tharsis/ethermint/x/feemarket/migrations/v010"
v09types "github.com/tharsis/ethermint/x/feemarket/migrations/v09/types"
"github.com/tharsis/ethermint/x/feemarket/types"
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"
)
@ -44,3 +45,25 @@ func TestMigrateStore(t *testing.T) {
require.Equal(t, baseFee.Int64(), params.BaseFee.Int64())
}
func TestMigrateJSON(t *testing.T) {
rawJson := `{
"base_fee": "669921875",
"block_gas": "0",
"params": {
"base_fee_change_denominator": 8,
"elasticity_multiplier": 2,
"enable_height": "0",
"initial_base_fee": "1000000000",
"no_base_fee": false
}
}`
encCfg := encoding.MakeConfig(app.ModuleBasics)
var genState v09types.GenesisState
err := encCfg.Marshaler.UnmarshalJSON([]byte(rawJson), &genState)
require.NoError(t, err)
migratedGenState := v010.MigrateJSON(genState)
require.Equal(t, int64(669921875), migratedGenState.Params.BaseFee.Int64())
}

View File

@ -106,14 +106,6 @@ func (m *Params) GetEnableHeight() int64 {
return 0
}
func init() {
proto.RegisterType((*Params)(nil), "ethermint.feemarket.v1.Params")
}
func init() {
proto.RegisterFile("ethermint/feemarket/v1/feemarket.proto", fileDescriptor_4feb8b20cf98e6e1)
}
var fileDescriptor_4feb8b20cf98e6e1 = []byte{
// 286 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xc1, 0x4a, 0x03, 0x31,

View File

@ -83,14 +83,6 @@ func (m *GenesisState) GetBlockGas() uint64 {
return 0
}
func init() {
proto.RegisterType((*GenesisState)(nil), "ethermint.feemarket.v1.GenesisState")
}
func init() {
proto.RegisterFile("ethermint/feemarket/v1/genesis.proto", fileDescriptor_6241c21661288629)
}
var fileDescriptor_6241c21661288629 = []byte{
// 286 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4b, 0xc3, 0x40,