From abe3a24ed54f70318204972b4953a2a8756a0ec0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 01:35:33 +0900 Subject: [PATCH] feat(x/fbridge): set target denom as module parameters (#1366) (#1368) * set fbridge target denom through params * add UpdateParams * add event and unittest * use sdk denom checker (cherry picked from commit a9be0cbf7712abe979d6e9d510c60b335c3adf27) Co-authored-by: Jaeseung Lee <41176085+tkxkd0159@users.noreply.github.com> --- CHANGELOG.md | 1 + docs/core/proto-docs.md | 48 +++ proto/lbm/fbridge/v1/event.proto | 4 + proto/lbm/fbridge/v1/fbridge.proto | 2 + proto/lbm/fbridge/v1/tx.proto | 15 + simapp/app.go | 2 +- x/fbridge/keeper/auth_test.go | 4 +- x/fbridge/keeper/genesis.go | 5 +- x/fbridge/keeper/keeper.go | 18 +- x/fbridge/keeper/keeper_test.go | 8 +- x/fbridge/keeper/msg_server.go | 23 ++ x/fbridge/keeper/params.go | 7 +- x/fbridge/keeper/params_test.go | 119 +++++++ x/fbridge/keeper/transfer.go | 2 +- x/fbridge/keeper/transfer_test.go | 6 +- x/fbridge/types/codec.go | 2 + x/fbridge/types/event.pb.go | 240 +++++++++++-- x/fbridge/types/fbridge.pb.go | 177 ++++++---- x/fbridge/types/genesis.go | 2 +- x/fbridge/types/msgs.go | 11 + x/fbridge/types/params.go | 18 +- x/fbridge/types/tx.pb.go | 525 +++++++++++++++++++++++++---- 22 files changed, 1047 insertions(+), 192 deletions(-) create mode 100644 x/fbridge/keeper/params_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1b3857fb..9f5d86d346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * (types) [\#1314](https://github.com/Finschia/finschia-sdk/pull/1314) replace IsEqual with Equal * (x/fswap) [\#1363](https://github.com/Finschia/finschia-sdk/pull/1363) introduce new event for MakeSwapProposal +* (x/fbridge) [\#1366](https://github.com/Finschia/finschia-sdk/pull/1366) Set target denom as module parameters ### Bug Fixes * (x/auth) [#1281](https://github.com/Finschia/finschia-sdk/pull/1281) `ModuleAccount.Validate` now reports a nil `.BaseAccount` instead of panicking. (backport #1274) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 07f82058d3..64ea89222a 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -799,6 +799,7 @@ - [EventProvision](#lbm.fbridge.v1.EventProvision) - [EventSuggestRole](#lbm.fbridge.v1.EventSuggestRole) - [EventTransfer](#lbm.fbridge.v1.EventTransfer) + - [EventUpdateParams](#lbm.fbridge.v1.EventUpdateParams) - [lbm/fbridge/v1/genesis.proto](#lbm/fbridge/v1/genesis.proto) - [BlockSeqInfo](#lbm.fbridge.v1.BlockSeqInfo) @@ -868,6 +869,8 @@ - [MsgSuggestRoleResponse](#lbm.fbridge.v1.MsgSuggestRoleResponse) - [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) - [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) + - [MsgUpdateParams](#lbm.fbridge.v1.MsgUpdateParams) + - [MsgUpdateParamsResponse](#lbm.fbridge.v1.MsgUpdateParamsResponse) - [Msg](#lbm.fbridge.v1.Msg) @@ -11812,6 +11815,7 @@ supports positive values. | `judge_trust_level` | [Fraction](#lbm.fbridge.v1.Fraction) | | ratio of how many judges' confirmations are needed to be valid. | | `timelock_period` | [uint64](#uint64) | | default timelock period for each provision (unix timestamp) | | `proposal_period` | [uint64](#uint64) | | default period of the proposal to update the role | +| `target_denom` | [string](#string) | | target denom of the bridge module. This is the base denom of Finschia normally. | @@ -12080,6 +12084,21 @@ VoteOption enumerates the valid vote options for a given role proposal. + + + +### EventUpdateParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#lbm.fbridge.v1.Params) | | | + + + + + @@ -13043,6 +13062,34 @@ MsgTransfer is input values required for bridge transfer + + + +### MsgUpdateParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `authority` | [string](#string) | | the authority address | +| `params` | [Params](#lbm.fbridge.v1.Params) | | params defines the x/fbridge parameters to update. + +NOTE: All parameters must be supplied. | + + + + + + + + +### MsgUpdateParamsResponse + + + + + + @@ -13057,6 +13104,7 @@ MsgTransfer is input values required for bridge transfer | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `UpdateParams` | [MsgUpdateParams](#lbm.fbridge.v1.MsgUpdateParams) | [MsgUpdateParamsResponse](#lbm.fbridge.v1.MsgUpdateParamsResponse) | UpdateParams updates the x/fbridge parameters. | | | `Transfer` | [MsgTransfer](#lbm.fbridge.v1.MsgTransfer) | [MsgTransferResponse](#lbm.fbridge.v1.MsgTransferResponse) | Submit a transfer request to the bridge module. | | | `Provision` | [MsgProvision](#lbm.fbridge.v1.MsgProvision) | [MsgProvisionResponse](#lbm.fbridge.v1.MsgProvisionResponse) | Submit a provision to the bridge module. | | | `HoldTransfer` | [MsgHoldTransfer](#lbm.fbridge.v1.MsgHoldTransfer) | [MsgHoldTransferResponse](#lbm.fbridge.v1.MsgHoldTransferResponse) | Set the time lock value from default value to uint64.max for specific confirmed provision. | | diff --git a/proto/lbm/fbridge/v1/event.proto b/proto/lbm/fbridge/v1/event.proto index 324a2db2a2..610039eb5b 100644 --- a/proto/lbm/fbridge/v1/event.proto +++ b/proto/lbm/fbridge/v1/event.proto @@ -6,6 +6,10 @@ option go_package = "github.com/Finschia/finschia-sdk/x/fbridge/types"; import "gogoproto/gogo.proto"; import "lbm/fbridge/v1/fbridge.proto"; +message EventUpdateParams { + Params params = 1 [(gogoproto.nullable) = false]; +} + message EventTransfer { // the sequence number of the bridge request uint64 seq = 1; diff --git a/proto/lbm/fbridge/v1/fbridge.proto b/proto/lbm/fbridge/v1/fbridge.proto index c3c4d5b6c7..d4bc9aa311 100644 --- a/proto/lbm/fbridge/v1/fbridge.proto +++ b/proto/lbm/fbridge/v1/fbridge.proto @@ -17,6 +17,8 @@ message Params { uint64 timelock_period = 4; // default period of the proposal to update the role uint64 proposal_period = 5; + // target denom of the bridge module. This is the base denom of Finschia normally. + string target_denom = 6; } // Provision is a struct that represents a provision internally. diff --git a/proto/lbm/fbridge/v1/tx.proto b/proto/lbm/fbridge/v1/tx.proto index e1186ec588..6b63af8a5a 100644 --- a/proto/lbm/fbridge/v1/tx.proto +++ b/proto/lbm/fbridge/v1/tx.proto @@ -7,6 +7,9 @@ import "gogoproto/gogo.proto"; import "lbm/fbridge/v1/fbridge.proto"; service Msg { + // UpdateParams updates the x/fbridge parameters. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // Submit a transfer request to the bridge module. rpc Transfer(MsgTransfer) returns (MsgTransferResponse); @@ -41,6 +44,18 @@ service Msg { rpc SetBridgeStatus(MsgSetBridgeStatus) returns (MsgSetBridgeStatusResponse); } +message MsgUpdateParams { + // the authority address + string authority = 1; + + // params defines the x/fbridge parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +message MsgUpdateParamsResponse {} + // MsgTransfer is input values required for bridge transfer message MsgTransfer { // the sender address on the source chain diff --git a/simapp/app.go b/simapp/app.go index 7c9d8c98d3..4f615af767 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -378,7 +378,7 @@ func NewSimApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper - app.FbridgeKeeper = fbridgekeeper.NewKeeper(appCodec, keys[fbridgetypes.StoreKey], memKeys[fbridgetypes.MemStoreKey], app.AccountKeeper, app.BankKeeper, "stake", fbridgetypes.DefaultAuthority().String()) + app.FbridgeKeeper = fbridgekeeper.NewKeeper(appCodec, keys[fbridgetypes.StoreKey], memKeys[fbridgetypes.MemStoreKey], app.AccountKeeper, app.BankKeeper, fbridgetypes.DefaultAuthority().String()) /**** Module Options ****/ diff --git a/x/fbridge/keeper/auth_test.go b/x/fbridge/keeper/auth_test.go index fb773014e3..de6d33001b 100644 --- a/x/fbridge/keeper/auth_test.go +++ b/x/fbridge/keeper/auth_test.go @@ -12,7 +12,7 @@ import ( func TestAssignRole(t *testing.T) { key, memKey, ctx, encCfg, authKeeper, bankKeeper, addrs := testutil.PrepareFbridgeTest(t, 3) auth := types.DefaultAuthority() - k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", auth.String()) + k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, auth.String()) err := k.InitGenesis(ctx, types.DefaultGenesisState()) require.NoError(t, err) @@ -61,7 +61,7 @@ func TestAssignRole(t *testing.T) { func TestBridgeHaltAndResume(t *testing.T) { key, memKey, ctx, encCfg, authKeeper, bankKeeper, addrs := testutil.PrepareFbridgeTest(t, 3) auth := types.DefaultAuthority() - k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", auth.String()) + k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, auth.String()) err := k.InitGenesis(ctx, types.DefaultGenesisState()) require.NoError(t, err) for _, addr := range addrs { diff --git a/x/fbridge/keeper/genesis.go b/x/fbridge/keeper/genesis.go index 486f35ea68..479abedd8d 100644 --- a/x/fbridge/keeper/genesis.go +++ b/x/fbridge/keeper/genesis.go @@ -8,7 +8,10 @@ import ( ) func (k Keeper) InitGenesis(ctx sdk.Context, gs *types.GenesisState) error { - k.SetParams(ctx, gs.Params) + if err := k.SetParams(ctx, gs.Params); err != nil { + return err + } + k.setNextSequence(ctx, gs.SendingState.NextSeq) for _, info := range gs.SendingState.SeqToBlocknum { k.setSeqToBlocknum(ctx, info.Seq, info.Blocknum) diff --git a/x/fbridge/keeper/keeper.go b/x/fbridge/keeper/keeper.go index 2cd5967f5a..0667bc8a93 100644 --- a/x/fbridge/keeper/keeper.go +++ b/x/fbridge/keeper/keeper.go @@ -19,9 +19,6 @@ type Keeper struct { authKeeper types.AccountKeeper bankKeeper types.BankKeeper - // the target denom for the bridge - targetDenom string - // authority can give a role to a specific address like guardian authority string } @@ -31,7 +28,7 @@ func NewKeeper( key, memKey sdk.StoreKey, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, - targetDenom, authority string, + authority string, ) Keeper { if addr := authKeeper.GetModuleAddress(types.ModuleName); addr == nil { panic(errors.New("fbridge module account has not been set")) @@ -50,13 +47,12 @@ func NewKeeper( } return Keeper{ - storeKey: key, - memKey: memKey, - cdc: cdc, - authKeeper: authKeeper, - bankKeeper: bankKeeper, - targetDenom: targetDenom, - authority: authority, + storeKey: key, + memKey: memKey, + cdc: cdc, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + authority: authority, } } diff --git a/x/fbridge/keeper/keeper_test.go b/x/fbridge/keeper/keeper_test.go index f1e5891058..dbdfb65969 100644 --- a/x/fbridge/keeper/keeper_test.go +++ b/x/fbridge/keeper/keeper_test.go @@ -25,28 +25,28 @@ func TestNewKeeper(t *testing.T) { "fbridge module account has not been set": { malleate: func() { authKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(nil).Times(1) - keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", types.DefaultAuthority().String()) + keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, types.DefaultAuthority().String()) }, isPanic: true, }, "fbridge authority must be the gov or foundation module account": { malleate: func() { authKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authtypes.NewModuleAddress(types.ModuleName)).Times(1) - keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", authtypes.NewModuleAddress("invalid").String()) + keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, authtypes.NewModuleAddress("invalid").String()) }, isPanic: true, }, "success - gov authority": { malleate: func() { authKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authtypes.NewModuleAddress(types.ModuleName)).Times(1) - keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", authtypes.NewModuleAddress(govtypes.ModuleName).String()) + keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String()) }, isPanic: false, }, "success - foundation authority": { malleate: func() { authKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(authtypes.NewModuleAddress(types.ModuleName)).Times(1) - keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, "stake", authtypes.NewModuleAddress(foundation.ModuleName).String()) + keeper.NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, authtypes.NewModuleAddress(foundation.ModuleName).String()) }, isPanic: false, }, diff --git a/x/fbridge/keeper/msg_server.go b/x/fbridge/keeper/msg_server.go index 5f6775f4bc..72fc696a00 100644 --- a/x/fbridge/keeper/msg_server.go +++ b/x/fbridge/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" sdk "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" @@ -18,6 +19,28 @@ func NewMsgServer(k Keeper) types.MsgServer { return &msgServer{k} } +func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if msg.Authority != m.Keeper.GetAuthority() { + return nil, fmt.Errorf( + "invalid authority; expected %s, got %s", + m.Keeper.GetAuthority(), msg.Authority) + } + + if err := m.Keeper.SetParams(ctx, msg.Params); err != nil { + return nil, err + } + + if err := ctx.EventManager().EmitTypedEvent(&types.EventUpdateParams{ + Params: msg.Params, + }); err != nil { + panic(err) + } + + return &types.MsgUpdateParamsResponse{}, nil +} + func (m msgServer) Transfer(goCtx context.Context, msg *types.MsgTransfer) (*types.MsgTransferResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/fbridge/keeper/params.go b/x/fbridge/keeper/params.go index dcbfc093d7..41ecca2eef 100644 --- a/x/fbridge/keeper/params.go +++ b/x/fbridge/keeper/params.go @@ -5,10 +5,15 @@ import ( "github.com/Finschia/finschia-sdk/x/fbridge/types" ) -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { + if err := params.ValidateParams(); err != nil { + return err + } + store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) store.Set(types.KeyParams, bz) + return nil } func (k Keeper) GetParams(ctx sdk.Context) types.Params { diff --git a/x/fbridge/keeper/params_test.go b/x/fbridge/keeper/params_test.go new file mode 100644 index 0000000000..73be6d2d01 --- /dev/null +++ b/x/fbridge/keeper/params_test.go @@ -0,0 +1,119 @@ +package keeper + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/Finschia/finschia-sdk/x/fbridge/testutil" + "github.com/Finschia/finschia-sdk/x/fbridge/types" +) + +func TestSetParams(t *testing.T) { + key, memKey, ctx, encCfg, authKeeper, bankKeeper, _ := testutil.PrepareFbridgeTest(t, 0) + keeper := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, types.DefaultAuthority().String()) + + tcs := map[string]struct { + malleate func() types.Params + isErr bool + }{ + "invalid guardian trust level": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 4, Denominator: 3} + return params + }, + isErr: true, + }, + "invalid operator trust level": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 4, Denominator: 3} + return params + }, + isErr: true, + }, + "invalid judge trust level": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 4, Denominator: 3} + return params + }, + isErr: true, + }, + "invalid proposal period": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.ProposalPeriod = 0 + return params + }, + isErr: true, + }, + "invalid timelock period": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.ProposalPeriod = 10 + params.TimelockPeriod = 0 + return params + }, + isErr: true, + }, + "invalid target denom": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.ProposalPeriod = 10 + params.TimelockPeriod = 20 + params.TargetDenom = "" + return params + }, + isErr: true, + }, + "missing some fields": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.TimelockPeriod = 20 + return params + }, + isErr: true, + }, + "valid": { + malleate: func() types.Params { + params := types.Params{} + params.GuardianTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.OperatorTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.JudgeTrustLevel = types.Fraction{Numerator: 2, Denominator: 3} + params.ProposalPeriod = 10 + params.TimelockPeriod = 20 + params.TargetDenom = "stake" + return params + }, + isErr: false, + }, + } + + for name, tc := range tcs { + t.Run(name, func(t *testing.T) { + params := tc.malleate() + if tc.isErr { + require.Error(t, keeper.SetParams(ctx, params)) + } else { + require.NoError(t, keeper.SetParams(ctx, params)) + } + }) + } +} diff --git a/x/fbridge/keeper/transfer.go b/x/fbridge/keeper/transfer.go index 8e63588366..8dd492c499 100644 --- a/x/fbridge/keeper/transfer.go +++ b/x/fbridge/keeper/transfer.go @@ -17,7 +17,7 @@ import ( ) func (k Keeper) handleBridgeTransfer(ctx sdk.Context, sender sdk.AccAddress, amount sdk.Int) (uint64, error) { - token := sdk.Coins{sdk.Coin{Denom: k.targetDenom, Amount: amount}} + token := sdk.Coins{sdk.Coin{Denom: k.GetParams(ctx).TargetDenom, Amount: amount}} if err := k.bankKeeper.IsSendEnabledCoins(ctx, token...); err != nil { return 0, err } diff --git a/x/fbridge/keeper/transfer_test.go b/x/fbridge/keeper/transfer_test.go index 4466e3d06c..8d4fc4986d 100644 --- a/x/fbridge/keeper/transfer_test.go +++ b/x/fbridge/keeper/transfer_test.go @@ -23,7 +23,11 @@ func TestHandleBridgeTransfer(t *testing.T) { bankKeeper.EXPECT().SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, token).Return(nil) bankKeeper.EXPECT().BurnCoins(ctx, types.ModuleName, token).Return(nil) - k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, denom, types.DefaultAuthority().String()) + k := NewKeeper(encCfg.Codec, key, memKey, authKeeper, bankKeeper, types.DefaultAuthority().String()) + params := types.DefaultParams() + params.TargetDenom = denom + err := k.SetParams(ctx, params) + require.NoError(t, err) targetSeq := uint64(2) bz := make([]byte, 8) binary.BigEndian.PutUint64(bz, targetSeq) diff --git a/x/fbridge/types/codec.go b/x/fbridge/types/codec.go index 745a212112..9dd9374b4d 100644 --- a/x/fbridge/types/codec.go +++ b/x/fbridge/types/codec.go @@ -13,6 +13,7 @@ import ( ) func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "lbm-sdk/fbridge/MsgUpdateParams") legacy.RegisterAminoMsg(cdc, &MsgTransfer{}, "lbm-sdk/MsgTransfer") legacy.RegisterAminoMsg(cdc, &MsgProvision{}, "lbm-sdk/MsgProvision") legacy.RegisterAminoMsg(cdc, &MsgHoldTransfer{}, "lbm-sdk/MsgHoldTransfer") @@ -28,6 +29,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registrar types.InterfaceRegistry) { registrar.RegisterImplementations( (*sdk.Msg)(nil), + &MsgUpdateParams{}, &MsgTransfer{}, &MsgProvision{}, &MsgHoldTransfer{}, diff --git a/x/fbridge/types/event.pb.go b/x/fbridge/types/event.pb.go index e82390f62a..4acb26aa67 100644 --- a/x/fbridge/types/event.pb.go +++ b/x/fbridge/types/event.pb.go @@ -23,6 +23,50 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type EventUpdateParams struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *EventUpdateParams) Reset() { *m = EventUpdateParams{} } +func (m *EventUpdateParams) String() string { return proto.CompactTextString(m) } +func (*EventUpdateParams) ProtoMessage() {} +func (*EventUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_a36aa6e56f2275b8, []int{0} +} +func (m *EventUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventUpdateParams.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 *EventUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventUpdateParams.Merge(m, src) +} +func (m *EventUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *EventUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_EventUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_EventUpdateParams proto.InternalMessageInfo + +func (m *EventUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + type EventTransfer struct { // the sequence number of the bridge request Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` @@ -38,7 +82,7 @@ func (m *EventTransfer) Reset() { *m = EventTransfer{} } func (m *EventTransfer) String() string { return proto.CompactTextString(m) } func (*EventTransfer) ProtoMessage() {} func (*EventTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{0} + return fileDescriptor_a36aa6e56f2275b8, []int{1} } func (m *EventTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -103,7 +147,7 @@ func (m *EventSuggestRole) Reset() { *m = EventSuggestRole{} } func (m *EventSuggestRole) String() string { return proto.CompactTextString(m) } func (*EventSuggestRole) ProtoMessage() {} func (*EventSuggestRole) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{1} + return fileDescriptor_a36aa6e56f2275b8, []int{2} } func (m *EventSuggestRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -152,7 +196,7 @@ func (m *EventAddVoteForRole) Reset() { *m = EventAddVoteForRole{} } func (m *EventAddVoteForRole) String() string { return proto.CompactTextString(m) } func (*EventAddVoteForRole) ProtoMessage() {} func (*EventAddVoteForRole) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{2} + return fileDescriptor_a36aa6e56f2275b8, []int{3} } func (m *EventAddVoteForRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +263,7 @@ func (m *EventProvision) Reset() { *m = EventProvision{} } func (m *EventProvision) String() string { return proto.CompactTextString(m) } func (*EventProvision) ProtoMessage() {} func (*EventProvision) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{3} + return fileDescriptor_a36aa6e56f2275b8, []int{4} } func (m *EventProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -292,7 +336,7 @@ func (m *EventConfirmProvision) Reset() { *m = EventConfirmProvision{} } func (m *EventConfirmProvision) String() string { return proto.CompactTextString(m) } func (*EventConfirmProvision) ProtoMessage() {} func (*EventConfirmProvision) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{4} + return fileDescriptor_a36aa6e56f2275b8, []int{5} } func (m *EventConfirmProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,7 +387,7 @@ func (m *EventClaim) Reset() { *m = EventClaim{} } func (m *EventClaim) String() string { return proto.CompactTextString(m) } func (*EventClaim) ProtoMessage() {} func (*EventClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_a36aa6e56f2275b8, []int{5} + return fileDescriptor_a36aa6e56f2275b8, []int{6} } func (m *EventClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,6 +445,7 @@ func (m *EventClaim) GetAmount() string { } func init() { + proto.RegisterType((*EventUpdateParams)(nil), "lbm.fbridge.v1.EventUpdateParams") proto.RegisterType((*EventTransfer)(nil), "lbm.fbridge.v1.EventTransfer") proto.RegisterType((*EventSuggestRole)(nil), "lbm.fbridge.v1.EventSuggestRole") proto.RegisterType((*EventAddVoteForRole)(nil), "lbm.fbridge.v1.EventAddVoteForRole") @@ -412,33 +457,68 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/event.proto", fileDescriptor_a36aa6e56f2275b8) } var fileDescriptor_a36aa6e56f2275b8 = []byte{ - // 408 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0x3d, 0x6f, 0xd4, 0x40, - 0x10, 0xf5, 0x12, 0xe7, 0x94, 0x4c, 0xc4, 0x29, 0x32, 0x01, 0x59, 0x56, 0xe4, 0x44, 0xae, 0x42, - 0x81, 0x4d, 0x8e, 0x1e, 0x89, 0x20, 0x22, 0x41, 0x43, 0xb4, 0x20, 0x0a, 0x1a, 0x64, 0x9f, 0xc7, - 0xce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, 0x03, 0x1b, 0xfa, 0x22, 0xcf, 0x3f, 0x90, 0xc1, 0x4b, - 0x52, 0x36, 0xf7, 0x08, 0x76, 0x5b, 0x32, 0xa8, 0x6c, 0xe8, 0x3e, 0xef, 0x81, 0x77, 0x02, 0x07, - 0xa3, 0xf3, 0x93, 0xc8, 0xed, 0x49, 0x2e, 0x87, 0xf1, 0xd3, 0xeb, 0xdc, 0x9b, 0xc1, 0x84, 0x1a, - 0x23, 0x48, 0xda, 0xa3, 0xa6, 0xb3, 0x60, 0xb3, 0x4c, 0xb7, 0xe3, 0xad, 0x55, 0xf0, 0x41, 0x19, - 0xfd, 0x64, 0x30, 0xb5, 0x15, 0xae, 0x14, 0xb5, 0x42, 0x0b, 0x92, 0xdb, 0xfd, 0x8f, 0x9d, 0x87, - 0x1a, 0x54, 0xa9, 0x21, 0xe5, 0xef, 0xf6, 0x9e, 0x11, 0x47, 0x8f, 0xe1, 0xa1, 0xed, 0xf2, 0x92, - 0x64, 0x21, 0x54, 0x7d, 0x47, 0xa5, 0xe8, 0x33, 0x40, 0x2f, 0xad, 0x52, 0x51, 0x6f, 0xb7, 0xf2, - 0xc5, 0x9b, 0x9b, 0x65, 0xc8, 0x6e, 0x97, 0x21, 0xfb, 0xbb, 0x0c, 0xd9, 0xaf, 0x55, 0xe8, 0xdc, - 0xae, 0x42, 0xe7, 0xf7, 0x2a, 0x74, 0x3e, 0x3e, 0x2d, 0x85, 0xb9, 0x5e, 0x64, 0xf1, 0x9c, 0xea, - 0xe4, 0x52, 0x48, 0x3d, 0xbf, 0x16, 0x69, 0x52, 0x0c, 0xc3, 0x13, 0x9d, 0x7f, 0x49, 0xbe, 0xad, - 0x1f, 0xb0, 0xf9, 0xde, 0xa0, 0xce, 0x26, 0xf6, 0xf1, 0x3e, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, - 0x96, 0x66, 0x6c, 0xc3, 0x1e, 0x03, 0x00, 0x00, + // 439 bytes of a gzipped FileDescriptorProto + 0x1f, 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9, 0xfc, 0xd5, + 0xf5, 0x32, 0x70, 0x6e, 0x96, 0x81, 0xf3, 0x67, 0x19, 0x38, 0x3f, 0x57, 0xc1, 0xe0, 0x66, 0x15, + 0x0c, 0x7e, 0xad, 0x82, 0xc1, 0x87, 0xc7, 0xb9, 0x34, 0x57, 0x8b, 0x34, 0x9a, 0x51, 0x19, 0x5f, + 0xc8, 0x4a, 0xcf, 0xae, 0xa4, 0x88, 0xe7, 0x76, 0x78, 0xa4, 0xb3, 0xcf, 0xf1, 0xd7, 0xf5, 0x5b, + 0x30, 0xdf, 0x6a, 0xd4, 0xe9, 0x88, 0xdf, 0xc1, 0x93, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5d, + 0xc0, 0xfc, 0xbf, 0x69, 0x03, 0x00, 0x00, +} + +func (m *EventUpdateParams) 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 *EventUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventUpdateParams) 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 = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *EventTransfer) Marshal() (dAtA []byte, err error) { @@ -707,6 +787,17 @@ func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *EventUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovEvent(uint64(l)) + return n +} + func (m *EventTransfer) Size() (n int) { if m == nil { return 0 @@ -831,6 +922,89 @@ func sovEvent(x uint64) (n int) { func sozEvent(x uint64) (n int) { return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *EventUpdateParams) 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 ErrIntOverflowEvent + } + 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: EventUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + 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 := skipEvent(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EventTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/fbridge/types/fbridge.pb.go b/x/fbridge/types/fbridge.pb.go index e81d70a81b..e6d25ce279 100644 --- a/x/fbridge/types/fbridge.pb.go +++ b/x/fbridge/types/fbridge.pb.go @@ -134,6 +134,8 @@ type Params struct { TimelockPeriod uint64 `protobuf:"varint,4,opt,name=timelock_period,json=timelockPeriod,proto3" json:"timelock_period,omitempty"` // default period of the proposal to update the role ProposalPeriod uint64 `protobuf:"varint,5,opt,name=proposal_period,json=proposalPeriod,proto3" json:"proposal_period,omitempty"` + // target denom of the bridge module. This is the base denom of Finschia normally. + TargetDenom string `protobuf:"bytes,6,opt,name=target_denom,json=targetDenom,proto3" json:"target_denom,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -204,6 +206,13 @@ func (m *Params) GetProposalPeriod() uint64 { return 0 } +func (m *Params) GetTargetDenom() string { + if m != nil { + return m.TargetDenom + } + return "" +} + // Provision is a struct that represents a provision internally. type ProvisionData struct { // the sequence number of the bridge request @@ -723,68 +732,69 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/fbridge.proto", fileDescriptor_62374d75fc6aa1ba) } var fileDescriptor_62374d75fc6aa1ba = []byte{ - // 973 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0xb3, 0x6e, 0x49, 0x5e, 0xda, 0x34, 0x8c, 0xa2, 0xa5, 0x58, 0x4b, 0x12, 0x22, 0x21, - 0xaa, 0x0a, 0x1c, 0x36, 0xdc, 0xb8, 0x25, 0xad, 0x5b, 0x39, 0x82, 0x24, 0x72, 0xd3, 0x4a, 0x8b, - 0x90, 0x22, 0x27, 0x9e, 0x66, 0x87, 0xb5, 0x3d, 0x66, 0x3c, 0x09, 0xbb, 0x7c, 0x00, 0x84, 0x7a, - 0xda, 0x2f, 0x50, 0x69, 0x11, 0x9f, 0x84, 0xdb, 0x8a, 0xd3, 0x1e, 0x11, 0x87, 0x05, 0xb5, 0x17, - 0x3e, 0x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x23, - 0xe5, 0x68, 0x0f, 0xa0, 0xa4, 0x87, 0x82, 0x1e, 0x40, 0x39, 0x5e, 0x46, 0x6a, 0x65, 0xb2, 0x8c, - 0x77, 0x0e, 0xd4, 0x82, 0x4a, 0x80, 0x63, 0x1a, 0x91, 0x58, 0xde, 0x17, 0x95, 0xa2, 0x35, 0x57, - 0x7b, 0x08, 0x25, 0x8f, 0x86, 0x78, 0xec, 0x13, 0x86, 0xf6, 0xe1, 0x3d, 0x3f, 0x08, 0x18, 0x4e, - 0x53, 0xc9, 0x54, 0xf6, 0xb4, 0x89, 0x0e, 0xc0, 0x64, 0x34, 0xc4, 0x92, 0xa0, 0xda, 0xad, 0xbf, - 0xb9, 0x22, 0x82, 0xc1, 0x93, 0x88, 0xf6, 0xef, 0x06, 0xec, 0x48, 0xc2, 0x6c, 0xa4, 0xa8, 0x0a, - 0x45, 0xa2, 0x7b, 0x51, 0x24, 0x81, 0x68, 0xaa, 0x1a, 0x37, 0x56, 0x7a, 0xca, 0x5e, 0x6e, 0x8b, - 0x41, 0x70, 0x9f, 0x2d, 0x30, 0xd7, 0x83, 0x50, 0x56, 0x9e, 0xde, 0x7c, 0x5b, 0x7a, 0x74, 0x04, - 0x80, 0x9f, 0x26, 0x84, 0xe1, 0x60, 0xea, 0x73, 0xb9, 0x5e, 0x95, 0xae, 0x65, 0xab, 0x37, 0x6d, - 0xeb, 0x37, 0x6d, 0x4f, 0xf4, 0x9b, 0xee, 0x97, 0xc4, 0xda, 0x3c, 0xff, 0xbb, 0x69, 0x78, 0xe5, - 0x2c, 0xae, 0xc7, 0xdb, 0x3f, 0x82, 0x79, 0x41, 0x39, 0x46, 0x4d, 0xa8, 0xe4, 0x0b, 0x9b, 0xd7, - 0x00, 0xda, 0xe5, 0x06, 0xa8, 0x0e, 0x5b, 0x2b, 0xca, 0xf3, 0x42, 0x94, 0x81, 0xba, 0xb0, 0x4d, - 0x13, 0x31, 0x1c, 0x59, 0x45, 0xb5, 0x6b, 0xbd, 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 0xda, 0xde, 0xd5, - 0x75, 0xab, 0xa2, 0x80, 0x4a, 0x5c, 0x1b, 0xf6, 0xd6, 0xd1, 0x8f, 0x9c, 0xb3, 0x9a, 0xa1, 0xd2, - 0x28, 0xd4, 0x23, 0x9c, 0xa2, 0x16, 0x54, 0xd7, 0x31, 0xc3, 0x51, 0xad, 0x68, 0xed, 0x5c, 0x5d, - 0xb7, 0x4a, 0x0a, 0x32, 0xa4, 0x99, 0x90, 0x17, 0x06, 0xec, 0xac, 0xb7, 0x17, 0xd9, 0xf0, 0x61, - 0xdf, 0x73, 0x8f, 0x4f, 0x9d, 0xe9, 0xd9, 0xa4, 0x37, 0x39, 0x3f, 0xfb, 0x3f, 0x31, 0x0a, 0xaa, - 0xc4, 0x1c, 0x42, 0x7d, 0x13, 0xdf, 0x3b, 0x9a, 0xb8, 0x17, 0x8e, 0xee, 0x9a, 0x82, 0xf6, 0xd4, - 0x58, 0x6c, 0xb8, 0xbf, 0x89, 0x75, 0x87, 0x19, 0xba, 0x68, 0xa1, 0xab, 0xeb, 0x56, 0x55, 0xa1, - 0xdd, 0x6c, 0x8c, 0x4a, 0x62, 0x7f, 0xf0, 0xf2, 0xa6, 0x61, 0xbc, 0xba, 0x69, 0x18, 0xff, 0xdc, - 0x34, 0x8c, 0xe7, 0xb7, 0x8d, 0xc2, 0xab, 0xdb, 0x46, 0xe1, 0xcf, 0xdb, 0x46, 0xe1, 0xdb, 0x2f, - 0xde, 0xfa, 0xd5, 0x7c, 0x9a, 0xff, 0x42, 0xe5, 0xf7, 0x73, 0xb6, 0x2d, 0x1f, 0xd3, 0x97, 0xff, - 0x05, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x2c, 0x09, 0x1f, 0x5e, 0x07, 0x00, 0x00, + // 990 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x8f, 0x22, 0x45, + 0x14, 0xa7,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, 0x78, 0x8c, 0x5a, 0x62, 0xbb, 0xff, 0xf2, 0xa6, 0x62, 0xbd, 0xba, 0xa9, 0x58, 0x7f, + 0xdf, 0x54, 0xac, 0xe7, 0xb7, 0x95, 0xd4, 0xab, 0xdb, 0x4a, 0xea, 0x8f, 0xdb, 0x4a, 0xea, 0xdb, + 0x2f, 0xde, 0xfa, 0xd5, 0x7c, 0x9a, 0xfc, 0x65, 0xd5, 0xf7, 0x73, 0x9a, 0x51, 0x8f, 0xe9, 0xcb, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x54, 0x04, 0x35, 0x81, 0x07, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -807,6 +817,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TargetDenom) > 0 { + i -= len(m.TargetDenom) + copy(dAtA[i:], m.TargetDenom) + i = encodeVarintFbridge(dAtA, i, uint64(len(m.TargetDenom))) + i-- + dAtA[i] = 0x32 + } if m.ProposalPeriod != 0 { i = encodeVarintFbridge(dAtA, i, uint64(m.ProposalPeriod)) i-- @@ -1208,6 +1225,10 @@ func (m *Params) Size() (n int) { if m.ProposalPeriod != 0 { n += 1 + sovFbridge(uint64(m.ProposalPeriod)) } + l = len(m.TargetDenom) + if l > 0 { + n += 1 + l + sovFbridge(uint64(l)) + } return n } @@ -1531,6 +1552,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFbridge + } + 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 ErrInvalidLengthFbridge + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFbridge + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFbridge(dAtA[iNdEx:]) diff --git a/x/fbridge/types/genesis.go b/x/fbridge/types/genesis.go index 358f64b2fa..add124e461 100644 --- a/x/fbridge/types/genesis.go +++ b/x/fbridge/types/genesis.go @@ -32,7 +32,7 @@ func AuthorityCandiates() []sdk.AccAddress { } func ValidateGenesis(data GenesisState) error { - if err := ValidateParams(data.Params); err != nil { + if err := data.Params.ValidateParams(); err != nil { return err } diff --git a/x/fbridge/types/msgs.go b/x/fbridge/types/msgs.go index 979176c073..12b0af12bc 100644 --- a/x/fbridge/types/msgs.go +++ b/x/fbridge/types/msgs.go @@ -3,6 +3,7 @@ package types import sdk "github.com/Finschia/finschia-sdk/types" var ( + _ sdk.Msg = &MsgUpdateParams{} _ sdk.Msg = &MsgTransfer{} _ sdk.Msg = &MsgProvision{} _ sdk.Msg = &MsgHoldTransfer{} @@ -15,6 +16,16 @@ var ( _ sdk.Msg = &MsgSetBridgeStatus{} ) +func (m MsgUpdateParams) ValidateBasic() error { return nil } + +func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{sdk.MustAccAddressFromBech32(m.Authority)} +} + +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + func (m MsgTransfer) ValidateBasic() error { return nil } func (m MsgTransfer) GetSigners() []sdk.AccAddress { diff --git a/x/fbridge/types/params.go b/x/fbridge/types/params.go index 3ef148d1e8..d70df18bb8 100644 --- a/x/fbridge/types/params.go +++ b/x/fbridge/types/params.go @@ -3,6 +3,7 @@ package types import ( "time" + sdktypes "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) @@ -13,30 +14,35 @@ func DefaultParams() Params { JudgeTrustLevel: Fraction{Numerator: 1, Denominator: 1}, ProposalPeriod: uint64(time.Minute * 60), TimelockPeriod: uint64(time.Hour * 24), + TargetDenom: sdktypes.DefaultBondDenom, } } -func ValidateParams(params Params) error { - if err := ValidateTrustLevel(params.GuardianTrustLevel); err != nil { +func (p Params) ValidateParams() error { + if err := ValidateTrustLevel(p.GuardianTrustLevel); err != nil { return sdkerrors.ErrInvalidRequest.Wrap("guardian trust level: " + err.Error()) } - if err := ValidateTrustLevel(params.OperatorTrustLevel); err != nil { + if err := ValidateTrustLevel(p.OperatorTrustLevel); err != nil { return sdkerrors.ErrInvalidRequest.Wrap("operator trust level: " + err.Error()) } - if err := ValidateTrustLevel(params.JudgeTrustLevel); err != nil { + if err := ValidateTrustLevel(p.JudgeTrustLevel); err != nil { return sdkerrors.ErrInvalidRequest.Wrap("judge trust level: " + err.Error()) } - if params.ProposalPeriod == 0 { + if p.ProposalPeriod == 0 { return sdkerrors.ErrInvalidRequest.Wrap("proposal period cannot be 0") } - if params.TimelockPeriod == 0 { + if p.TimelockPeriod == 0 { return sdkerrors.ErrInvalidRequest.Wrap("timelock period cannot be 0") } + if err := sdktypes.ValidateDenom(p.TargetDenom); err != nil { + return err + } + return nil } diff --git a/x/fbridge/types/tx.pb.go b/x/fbridge/types/tx.pb.go index 150c4f9476..7e392c1392 100644 --- a/x/fbridge/types/tx.pb.go +++ b/x/fbridge/types/tx.pb.go @@ -29,6 +29,98 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type MsgUpdateParams struct { + // the authority address + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/fbridge 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_54a336bc5ea063bb, []int{0} +} +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{} +} + +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_54a336bc5ea063bb, []int{1} +} +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 + // MsgTransfer is input values required for bridge transfer type MsgTransfer struct { // the sender address on the source chain @@ -43,7 +135,7 @@ func (m *MsgTransfer) Reset() { *m = MsgTransfer{} } func (m *MsgTransfer) String() string { return proto.CompactTextString(m) } func (*MsgTransfer) ProtoMessage() {} func (*MsgTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{0} + return fileDescriptor_54a336bc5ea063bb, []int{2} } func (m *MsgTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +185,7 @@ func (m *MsgTransferResponse) Reset() { *m = MsgTransferResponse{} } func (m *MsgTransferResponse) String() string { return proto.CompactTextString(m) } func (*MsgTransferResponse) ProtoMessage() {} func (*MsgTransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{1} + return fileDescriptor_54a336bc5ea063bb, []int{3} } func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -140,7 +232,7 @@ func (m *MsgProvision) Reset() { *m = MsgProvision{} } func (m *MsgProvision) String() string { return proto.CompactTextString(m) } func (*MsgProvision) ProtoMessage() {} func (*MsgProvision) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{2} + return fileDescriptor_54a336bc5ea063bb, []int{4} } func (m *MsgProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -204,7 +296,7 @@ func (m *MsgProvisionResponse) Reset() { *m = MsgProvisionResponse{} } func (m *MsgProvisionResponse) String() string { return proto.CompactTextString(m) } func (*MsgProvisionResponse) ProtoMessage() {} func (*MsgProvisionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{3} + return fileDescriptor_54a336bc5ea063bb, []int{5} } func (m *MsgProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -245,7 +337,7 @@ func (m *MsgHoldTransfer) Reset() { *m = MsgHoldTransfer{} } func (m *MsgHoldTransfer) String() string { return proto.CompactTextString(m) } func (*MsgHoldTransfer) ProtoMessage() {} func (*MsgHoldTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{4} + return fileDescriptor_54a336bc5ea063bb, []int{6} } func (m *MsgHoldTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -295,7 +387,7 @@ func (m *MsgHoldTransferResponse) Reset() { *m = MsgHoldTransferResponse func (m *MsgHoldTransferResponse) String() string { return proto.CompactTextString(m) } func (*MsgHoldTransferResponse) ProtoMessage() {} func (*MsgHoldTransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{5} + return fileDescriptor_54a336bc5ea063bb, []int{7} } func (m *MsgHoldTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -336,7 +428,7 @@ func (m *MsgReleaseTransfer) Reset() { *m = MsgReleaseTransfer{} } func (m *MsgReleaseTransfer) String() string { return proto.CompactTextString(m) } func (*MsgReleaseTransfer) ProtoMessage() {} func (*MsgReleaseTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{6} + return fileDescriptor_54a336bc5ea063bb, []int{8} } func (m *MsgReleaseTransfer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +478,7 @@ func (m *MsgReleaseTransferResponse) Reset() { *m = MsgReleaseTransferRe func (m *MsgReleaseTransferResponse) String() string { return proto.CompactTextString(m) } func (*MsgReleaseTransferResponse) ProtoMessage() {} func (*MsgReleaseTransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{7} + return fileDescriptor_54a336bc5ea063bb, []int{9} } func (m *MsgReleaseTransferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -427,7 +519,7 @@ func (m *MsgRemoveProvision) Reset() { *m = MsgRemoveProvision{} } func (m *MsgRemoveProvision) String() string { return proto.CompactTextString(m) } func (*MsgRemoveProvision) ProtoMessage() {} func (*MsgRemoveProvision) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{8} + return fileDescriptor_54a336bc5ea063bb, []int{10} } func (m *MsgRemoveProvision) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -477,7 +569,7 @@ func (m *MsgRemoveProvisionResponse) Reset() { *m = MsgRemoveProvisionRe func (m *MsgRemoveProvisionResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveProvisionResponse) ProtoMessage() {} func (*MsgRemoveProvisionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{9} + return fileDescriptor_54a336bc5ea063bb, []int{11} } func (m *MsgRemoveProvisionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -518,7 +610,7 @@ func (m *MsgClaimBatch) Reset() { *m = MsgClaimBatch{} } func (m *MsgClaimBatch) String() string { return proto.CompactTextString(m) } func (*MsgClaimBatch) ProtoMessage() {} func (*MsgClaimBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{10} + return fileDescriptor_54a336bc5ea063bb, []int{12} } func (m *MsgClaimBatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -568,7 +660,7 @@ func (m *MsgClaimBatchResponse) Reset() { *m = MsgClaimBatchResponse{} } func (m *MsgClaimBatchResponse) String() string { return proto.CompactTextString(m) } func (*MsgClaimBatchResponse) ProtoMessage() {} func (*MsgClaimBatchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{11} + return fileDescriptor_54a336bc5ea063bb, []int{13} } func (m *MsgClaimBatchResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -609,7 +701,7 @@ func (m *MsgClaim) Reset() { *m = MsgClaim{} } func (m *MsgClaim) String() string { return proto.CompactTextString(m) } func (*MsgClaim) ProtoMessage() {} func (*MsgClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{12} + return fileDescriptor_54a336bc5ea063bb, []int{14} } func (m *MsgClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -659,7 +751,7 @@ func (m *MsgClaimResponse) Reset() { *m = MsgClaimResponse{} } func (m *MsgClaimResponse) String() string { return proto.CompactTextString(m) } func (*MsgClaimResponse) ProtoMessage() {} func (*MsgClaimResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{13} + return fileDescriptor_54a336bc5ea063bb, []int{15} } func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -706,7 +798,7 @@ func (m *MsgSuggestRole) Reset() { *m = MsgSuggestRole{} } func (m *MsgSuggestRole) String() string { return proto.CompactTextString(m) } func (*MsgSuggestRole) ProtoMessage() {} func (*MsgSuggestRole) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{14} + return fileDescriptor_54a336bc5ea063bb, []int{16} } func (m *MsgSuggestRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -763,7 +855,7 @@ func (m *MsgSuggestRoleResponse) Reset() { *m = MsgSuggestRoleResponse{} func (m *MsgSuggestRoleResponse) String() string { return proto.CompactTextString(m) } func (*MsgSuggestRoleResponse) ProtoMessage() {} func (*MsgSuggestRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{15} + return fileDescriptor_54a336bc5ea063bb, []int{17} } func (m *MsgSuggestRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -805,7 +897,7 @@ func (m *MsgAddVoteForRole) Reset() { *m = MsgAddVoteForRole{} } func (m *MsgAddVoteForRole) String() string { return proto.CompactTextString(m) } func (*MsgAddVoteForRole) ProtoMessage() {} func (*MsgAddVoteForRole) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{16} + return fileDescriptor_54a336bc5ea063bb, []int{18} } func (m *MsgAddVoteForRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,7 +954,7 @@ func (m *MsgAddVoteForRoleResponse) Reset() { *m = MsgAddVoteForRoleResp func (m *MsgAddVoteForRoleResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddVoteForRoleResponse) ProtoMessage() {} func (*MsgAddVoteForRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{17} + return fileDescriptor_54a336bc5ea063bb, []int{19} } func (m *MsgAddVoteForRoleResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -902,7 +994,7 @@ func (m *MsgSetBridgeStatus) Reset() { *m = MsgSetBridgeStatus{} } func (m *MsgSetBridgeStatus) String() string { return proto.CompactTextString(m) } func (*MsgSetBridgeStatus) ProtoMessage() {} func (*MsgSetBridgeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{18} + return fileDescriptor_54a336bc5ea063bb, []int{20} } func (m *MsgSetBridgeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -952,7 +1044,7 @@ func (m *MsgSetBridgeStatusResponse) Reset() { *m = MsgSetBridgeStatusRe func (m *MsgSetBridgeStatusResponse) String() string { return proto.CompactTextString(m) } func (*MsgSetBridgeStatusResponse) ProtoMessage() {} func (*MsgSetBridgeStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_54a336bc5ea063bb, []int{19} + return fileDescriptor_54a336bc5ea063bb, []int{21} } func (m *MsgSetBridgeStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -982,6 +1074,8 @@ func (m *MsgSetBridgeStatusResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetBridgeStatusResponse proto.InternalMessageInfo func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "lbm.fbridge.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lbm.fbridge.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgTransfer)(nil), "lbm.fbridge.v1.MsgTransfer") proto.RegisterType((*MsgTransferResponse)(nil), "lbm.fbridge.v1.MsgTransferResponse") proto.RegisterType((*MsgProvision)(nil), "lbm.fbridge.v1.MsgProvision") @@ -1007,54 +1101,59 @@ func init() { func init() { proto.RegisterFile("lbm/fbridge/v1/tx.proto", fileDescriptor_54a336bc5ea063bb) } var fileDescriptor_54a336bc5ea063bb = []byte{ - // 752 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x4e, 0x6e, 0x42, 0x04, 0x07, 0x6e, 0xe0, 0xce, 0x85, 0x10, 0x4c, 0x48, 0xb8, 0xbe, 0xfd, - 0xa1, 0x48, 0x4d, 0x20, 0xad, 0x54, 0xa9, 0xbb, 0x06, 0x09, 0x15, 0x54, 0x8b, 0xca, 0xb4, 0x55, - 0xd5, 0x45, 0x91, 0x13, 0x4f, 0x06, 0xab, 0xb6, 0x27, 0xf5, 0x4c, 0xa2, 0x54, 0xea, 0x2b, 0x54, - 0xea, 0xc3, 0xf4, 0x21, 0x58, 0xb2, 0xac, 0xba, 0x40, 0x15, 0x3c, 0x44, 0xb7, 0x95, 0xcd, 0x64, - 0xb0, 0x8d, 0x9d, 0x80, 0xba, 0x9b, 0xc9, 0xf7, 0x73, 0xbe, 0x93, 0x99, 0x33, 0x09, 0x2c, 0xdb, - 0x6d, 0xa7, 0xd1, 0x6d, 0x7b, 0x96, 0x49, 0x70, 0x63, 0xb0, 0xdd, 0xe0, 0xc3, 0x7a, 0xcf, 0xa3, - 0x9c, 0xa2, 0xa2, 0xdd, 0x76, 0xea, 0x02, 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0xf1, 0x2b, 0x1c, 0x04, 0x0c, 0x5d, 0x30, 0xd5, 0x55, 0x58, 0xb9, - 0x56, 0x3d, 0xf4, 0xe5, 0xf8, 0x37, 0xe3, 0x10, 0xf3, 0x56, 0x60, 0x71, 0xc8, 0x0d, 0xde, 0x67, - 0xfe, 0x74, 0x91, 0xbe, 0xe1, 0x99, 0x96, 0xe1, 0x8a, 0x7c, 0x72, 0x8f, 0x1e, 0x43, 0x81, 0x05, - 0xac, 0x20, 0x5e, 0xb1, 0x59, 0x89, 0x47, 0x08, 0x3b, 0xe9, 0x82, 0x2b, 0x6e, 0x51, 0xac, 0xce, - 0x28, 0x45, 0xf3, 0x57, 0x01, 0x72, 0x1a, 0x23, 0xe8, 0x05, 0x4c, 0xcb, 0x7b, 0xbf, 0x1a, 0xf7, - 0x0d, 0xbd, 0x2a, 0xca, 0xff, 0x63, 0xc0, 0x91, 0x2b, 0x3a, 0x80, 0x99, 0xab, 0xcb, 0x5e, 0x49, - 0x50, 0x48, 0x54, 0xb9, 0x33, 0x0e, 0x95, 0x86, 0x6f, 0x61, 0x2e, 0x32, 0xf1, 0xb5, 0x04, 0x55, - 0x98, 0xa0, 0xdc, 0x9f, 0x40, 0x90, 0xce, 0x06, 0xcc, 0xc7, 0xe7, 0x5e, 0x4d, 0xd0, 0xc6, 0x38, - 0xca, 0xe6, 0x64, 0x4e, 0xb4, 0x44, 0xf4, 0x01, 0x48, 0x2e, 0x11, 0xe1, 0xa4, 0x94, 0x48, 0x7c, - 0x0c, 0x90, 0x0e, 0x10, 0x7a, 0x09, 0xd6, 0x12, 0x94, 0x57, 0xb0, 0x72, 0x77, 0x2c, 0x2c, 0x3d, - 0x77, 0x60, 0xea, 0xf2, 0x01, 0x28, 0xa7, 0xf1, 0x95, 0xf5, 0x34, 0x44, 0x9a, 0xbc, 0x86, 0xd9, - 0xf0, 0xfc, 0x57, 0x13, 0x04, 0x21, 0x5c, 0xb9, 0x37, 0x1e, 0x97, 0xb6, 0xef, 0xa1, 0x18, 0x1b, - 0xea, 0xff, 0x12, 0x94, 0x51, 0x8a, 0xf2, 0x60, 0x22, 0x25, 0x7c, 0x64, 0xf1, 0xc9, 0x4c, 0x3a, - 0xb2, 0x18, 0x27, 0xf1, 0xc8, 0x52, 0x26, 0xaf, 0xb5, 0x7f, 0x72, 0x5e, 0xcd, 0x9e, 0x9e, 0x57, - 0xb3, 0x3f, 0xcf, 0xab, 0xd9, 0xaf, 0x17, 0xd5, 0xcc, 0xe9, 0x45, 0x35, 0xf3, 0xfd, 0xa2, 0x9a, - 0x79, 0xb7, 0x35, 0xf1, 0xd7, 0x72, 0x28, 0xff, 0x94, 0x04, 0xbf, 0x9b, 0xed, 0x42, 0xf0, 0x87, - 0xe4, 0xd1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xb2, 0x5f, 0xea, 0xef, 0x08, 0x00, 0x00, + // 823 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x8e, 0xdb, 0x44, + 0x14, 0x8e, 0x49, 0x1a, 0x36, 0x27, 0x4b, 0x5a, 0x86, 0x6d, 0x36, 0x75, 0xd3, 0x64, 0x31, 0x7f, + 0x4b, 0x25, 0x92, 0x36, 0x20, 0x21, 0x71, 0x47, 0x2a, 0x55, 0xb4, 0xc2, 0x6a, 0xe5, 0xa5, 0xa8, + 0xe2, 0x82, 0x6a, 0x12, 0x4f, 0x26, 0x16, 0xb6, 0xc7, 0xcc, 0x4c, 0xa2, 0x54, 0xe2, 0x15, 0x90, + 0x78, 0x18, 0x1e, 0xa2, 0x97, 0xe5, 0x0e, 0x71, 0x51, 0xa1, 0xdd, 0x17, 0x41, 0x9e, 0x9d, 0xcc, + 0xda, 0x5e, 0x27, 0xe9, 0x8a, 0xbb, 0x19, 0x7f, 0xdf, 0xf9, 0xce, 0x77, 0x3c, 0x73, 0x8e, 0x0d, + 0x87, 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, 0x11, 0x06, 0xb5, 0x3f, 0xde, 0x86, 0x1a, 0xc1, 0xe7, 0xb0, + 0x9f, 0x9b, 0x25, 0x65, 0x85, 0x67, 0x09, 0xa5, 0x85, 0x97, 0x0d, 0x15, 0x84, 0xe1, 0x7a, 0x71, + 0xa2, 0x38, 0x25, 0xb1, 0x05, 0x8e, 0x7d, 0x77, 0x37, 0x27, 0x9f, 0x22, 0x3f, 0x5a, 0xca, 0x53, + 0xe4, 0x38, 0x1b, 0x52, 0x94, 0x8e, 0x19, 0xe4, 0x01, 0x64, 0x66, 0xcc, 0x9d, 0x92, 0xc8, 0x0b, + 0xd8, 0xfe, 0x64, 0x2b, 0x6c, 0x34, 0x1f, 0xc0, 0xb5, 0xf3, 0xd1, 0xd2, 0xd9, 0xc4, 0xb7, 0x8f, + 0x36, 0x21, 0x46, 0xe4, 0x19, 0x34, 0xb3, 0x93, 0xa5, 0x57, 0x12, 0x90, 0xc1, 0xed, 0x4f, 0xb7, + 0xe3, 0x46, 0xf6, 0x67, 0x68, 0x15, 0xc6, 0xc5, 0x87, 0x25, 0x91, 0x79, 0x8a, 0xfd, 0xf9, 0x4e, + 0x4a, 0xf6, 0xc8, 0x8a, 0x3d, 0x5f, 0x76, 0x64, 0x05, 0x4e, 0xe9, 0x91, 0x6d, 0xe8, 0xe9, 0xf1, + 0xe3, 0x57, 0xa7, 0x3d, 0xeb, 0xf5, 0x69, 0xcf, 0xfa, 0xf7, 0xb4, 0x67, 0xfd, 0x71, 0xd6, 0xab, + 0xbc, 0x3e, 0xeb, 0x55, 0xfe, 0x3e, 0xeb, 0x55, 0x7e, 0xba, 0xb7, 0xf3, 0x3b, 0xbc, 0x32, 0x3f, + 0x5c, 0xea, 0x8b, 0x3c, 0xa9, 0xab, 0x9f, 0xad, 0x2f, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x99, + 0x66, 0xc5, 0x96, 0xcb, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1069,6 +1168,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + // UpdateParams updates the x/fbridge parameters. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // Submit a transfer request to the bridge module. Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) // Submit a provision to the bridge module. @@ -1102,6 +1203,15 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) { out := new(MsgTransferResponse) err := c.cc.Invoke(ctx, "/lbm.fbridge.v1.Msg/Transfer", in, out, opts...) @@ -1194,6 +1304,8 @@ func (c *msgClient) SetBridgeStatus(ctx context.Context, in *MsgSetBridgeStatus, // MsgServer is the server API for Msg service. type MsgServer interface { + // UpdateParams updates the x/fbridge parameters. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // Submit a transfer request to the bridge module. Transfer(context.Context, *MsgTransfer) (*MsgTransferResponse, error) // Submit a provision to the bridge module. @@ -1223,6 +1335,9 @@ type MsgServer interface { type UnimplementedMsgServer struct { } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *MsgTransfer) (*MsgTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") } @@ -1258,6 +1373,24 @@ func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } +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: "/lbm.fbridge.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) +} + func _Msg_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgTransfer) if err := dec(in); err != nil { @@ -1442,6 +1575,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "lbm.fbridge.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, { MethodName: "Transfer", Handler: _Msg_Transfer_Handler, @@ -1487,6 +1624,69 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Metadata: "lbm/fbridge/v1/tx.proto", } +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 (m *MsgTransfer) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2126,6 +2326,30 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +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 (m *MsgTransfer) Size() (n int) { if m == nil { return 0 @@ -2402,6 +2626,171 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +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 (m *MsgTransfer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0