From 0382bbcc95d439168a3b4686f92aa1834e5385fe Mon Sep 17 00:00:00 2001 From: zale144 Date: Mon, 21 Oct 2024 18:39:47 +0200 Subject: [PATCH] feat(group): add group module (#1329) --- app/keepers/keepers.go | 17 +++ app/keepers/keys.go | 5 +- app/keepers/modules.go | 8 + proto/dymensionxyz/dymension/eibc/tx.proto | 12 +- x/eibc/client/cli/authz.go | 10 +- x/eibc/client/cli/tx.go | 24 +-- x/eibc/types/tx.go | 2 - x/eibc/types/tx.pb.go | 165 +++++++-------------- 8 files changed, 105 insertions(+), 138 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 086775402..5d494e6c5 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -27,6 +27,8 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + grouptypes "github.com/cosmos/cosmos-sdk/x/group" + groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/params" @@ -147,6 +149,7 @@ type AppKeepers struct { StreamerKeeper streamermodulekeeper.Keeper EIBCKeeper eibckeeper.Keeper LightClientKeeper lightclientmodulekeeper.Keeper + GroupKeeper groupkeeper.Keeper DelayedAckKeeper delayedackkeeper.Keeper DenomMetadataKeeper *denommetadatamodulekeeper.Keeper @@ -376,6 +379,19 @@ func (a *AppKeepers) InitKeepers( a.RollappKeeper, ) + groupConfig := grouptypes.Config{ + MaxExecutionPeriod: 0, + MaxMetadataLen: 0, + } + + a.GroupKeeper = groupkeeper.NewKeeper( + a.keys[grouptypes.StoreKey], + appCodec, + bApp.MsgServiceRouter(), + a.AccountKeeper, + groupConfig, + ) + a.RollappKeeper.SetSequencerKeeper(a.SequencerKeeper) a.RollappKeeper.SetCanonicalClientKeeper(a.LightClientKeeper) @@ -648,6 +664,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(delayedacktypes.ModuleName) paramsKeeper.Subspace(eibcmoduletypes.ModuleName) paramsKeeper.Subspace(dymnstypes.ModuleName) + paramsKeeper.Subspace(grouptypes.ModuleName) // ethermint subspaces paramsKeeper.Subspace(evmtypes.ModuleName) diff --git a/app/keepers/keys.go b/app/keepers/keys.go index e9fb83436..945bc2d1b 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -13,6 +13,7 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" "github.com/cosmos/cosmos-sdk/x/feegrant" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + grouptypes "github.com/cosmos/cosmos-sdk/x/group" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -21,7 +22,6 @@ import ( packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - irotypes "github.com/dymensionxyz/dymension/v3/x/iro/types" evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" epochstypes "github.com/osmosis-labs/osmosis/v15/x/epochs/types" @@ -29,6 +29,8 @@ import ( poolmanagertypes "github.com/osmosis-labs/osmosis/v15/x/poolmanager/types" txfeestypes "github.com/osmosis-labs/osmosis/v15/x/txfees/types" + irotypes "github.com/dymensionxyz/dymension/v3/x/iro/types" + dymnstypes "github.com/dymensionxyz/dymension/v3/x/dymns/types" delayedacktypes "github.com/dymensionxyz/dymension/v3/x/delayedack/types" @@ -135,4 +137,5 @@ var KVStoreKeys = sdk.NewKVStoreKeys( incentivestypes.StoreKey, txfeestypes.StoreKey, lightcliendmoduletypes.StoreKey, + grouptypes.StoreKey, ) diff --git a/app/keepers/modules.go b/app/keepers/modules.go index 16c6a8eb1..43ce2f1c8 100644 --- a/app/keepers/modules.go +++ b/app/keepers/modules.go @@ -30,6 +30,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov" "github.com/cosmos/cosmos-sdk/x/gov/client" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + grouptypes "github.com/cosmos/cosmos-sdk/x/group" + groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" "github.com/cosmos/cosmos-sdk/x/mint" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/cosmos/cosmos-sdk/x/params" @@ -156,6 +158,7 @@ var ModuleBasics = module.NewBasicManager( eibc.AppModuleBasic{}, dymnsmodule.AppModuleBasic{}, lightclientmodule.AppModuleBasic{}, + groupmodule.AppModuleBasic{}, // Ethermint modules evm.AppModuleBasic{}, @@ -210,6 +213,7 @@ func (a *AppKeepers) SetupModules( eibcmodule.NewAppModule(appCodec, a.EIBCKeeper, a.AccountKeeper, a.BankKeeper), dymnsmodule.NewAppModule(appCodec, a.DymNSKeeper), lightclientmodule.NewAppModule(appCodec, a.LightClientKeeper), + groupmodule.NewAppModule(appCodec, a.GroupKeeper, a.AccountKeeper, a.BankKeeper, encodingConfig.InterfaceRegistry), // Ethermint app modules evm.NewAppModule(a.EvmKeeper, a.AccountKeeper, a.BankKeeper, a.GetSubspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable())), @@ -254,6 +258,7 @@ var maccPerms = map[string][]string{ streamermoduletypes.ModuleName: nil, evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, // used for secure addition and subtraction of balance using module account. evmtypes.ModuleVirtualFrontierContractDeployerName: nil, // used for deploying virtual frontier bank contract. + grouptypes.ModuleName: nil, gammtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, lockuptypes.ModuleName: {authtypes.Minter, authtypes.Burner}, incentivestypes.ModuleName: {authtypes.Minter, authtypes.Burner}, @@ -301,6 +306,7 @@ var BeginBlockers = []string{ consensusparamtypes.ModuleName, irotypes.ModuleName, lightclientmoduletypes.ModuleName, + grouptypes.ModuleName, } var EndBlockers = []string{ @@ -342,6 +348,7 @@ var EndBlockers = []string{ irotypes.ModuleName, lightclientmoduletypes.ModuleName, crisistypes.ModuleName, + grouptypes.ModuleName, } var InitGenesis = []string{ @@ -383,4 +390,5 @@ var InitGenesis = []string{ irotypes.ModuleName, lightclientmoduletypes.ModuleName, crisistypes.ModuleName, + grouptypes.ModuleName, } diff --git a/proto/dymensionxyz/dymension/eibc/tx.proto b/proto/dymensionxyz/dymension/eibc/tx.proto index 12a3e944a..9b1faa619 100644 --- a/proto/dymensionxyz/dymension/eibc/tx.proto +++ b/proto/dymensionxyz/dymension/eibc/tx.proto @@ -41,24 +41,22 @@ message MsgFulfillOrderAuthorized { (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - // operator_address is the bech32-encoded address of the account which is authorized to fulfill the demand order. - string operator_address = 4; // lp_address is the bech32-encoded address of the account which the authorization was granted from. // This account will receive the price amount at the finalization phase. - string lp_address = 5; + string lp_address = 4; // operator_fee_address is an optional bech32-encoded address of an account that would collect the operator_fee_part // if it's empty, the operator_fee_part will go to the operator_address - string operator_fee_address = 6; + string operator_fee_address = 5; // expected_fee is the nominal fee set in the order. - string expected_fee = 7; + string expected_fee = 6; // operator_fee_share is the share of the fee earnings that goes to the operator // it will be deduced from the fee of the demand order and paid out immediately - cosmos.base.v1beta1.DecProto operator_fee_share = 8 [ + cosmos.base.v1beta1.DecProto operator_fee_share = 7 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecProto" ]; // settlement_validated signals if the block behind the demand order needs to be "settlement validated" or not - bool settlement_validated = 9; + bool settlement_validated = 8; } message MsgFulfillOrderAuthorizedResponse {} diff --git a/x/eibc/client/cli/authz.go b/x/eibc/client/cli/authz.go index 93d666c01..943cb083d 100644 --- a/x/eibc/client/cli/authz.go +++ b/x/eibc/client/cli/authz.go @@ -23,7 +23,7 @@ const ( FlagDenoms = "denoms" FlagMinLPFeePercentage = "min-lp-fee-percentage" FlagMaxPrice = "max-price" - FlagOperatorFeePart = "operator-fee-part" + FlagOperatorFeeShare = "operator-fee-share" FlagSettlementValidated = "settlement-validated" ) @@ -80,7 +80,7 @@ Examples: return fmt.Errorf("failed to parse max price: %w", err) } - fulfillerFeePartStr, err := cmd.Flags().GetString(FlagOperatorFeePart) + fulfillerFeePartStr, err := cmd.Flags().GetString(FlagOperatorFeeShare) if err != nil { return fmt.Errorf("failed to get fulfiller fee part: %w", err) } @@ -107,6 +107,10 @@ Examples: if err != nil { return fmt.Errorf("failed to parse spend limit: %w", err) } + spendLimit, err := sdk.ParseCoinsNormalized(limit) + if err != nil { + return fmt.Errorf("failed to parse spend limit: %w", err) + } if !spendLimit.IsAllPositive() { return fmt.Errorf("spend-limit should be greater than zero") @@ -144,7 +148,7 @@ Examples: cmd.Flags().Bool(FlagSettlementValidated, false, "Settlement validated flag") cmd.Flags().String(FlagMinLPFeePercentage, "", "Minimum fee") cmd.Flags().String(FlagMaxPrice, "", "Maximum price") - cmd.Flags().String(FlagOperatorFeePart, "", "Fulfiller fee part") + cmd.Flags().String(FlagOperatorFeeShare, "", "Fulfiller fee part") cmd.Flags().Int64(FlagExpiration, 0, "Expire time as Unix timestamp. Set zero (0) for no expiry. Default is 0.") return cmd } diff --git a/x/eibc/client/cli/tx.go b/x/eibc/client/cli/tx.go index a5c62f7b8..831c90704 100644 --- a/x/eibc/client/cli/tx.go +++ b/x/eibc/client/cli/tx.go @@ -67,7 +67,6 @@ func NewFulfillOrderTxCmd() *cobra.Command { } const ( - FlagOperatorAddress = "operator-address" FlagOperatorFeeAddress = "operator-fee-address" FlagRollappId = "rollapp-id" FlagPrice = "price" @@ -95,14 +94,9 @@ func NewFulfillOrderAuthorizedTxCmd() *cobra.Command { return fmt.Errorf("rollapp ID is required") } - fulfillerAddress, err := cmd.Flags().GetString(FlagOperatorAddress) + operatorFeeAddress, err := cmd.Flags().GetString(FlagOperatorFeeAddress) if err != nil { - return fmt.Errorf("fulfiller address is required") - } - - operatorAddress, err := cmd.Flags().GetString(FlagOperatorFeeAddress) - if err != nil { - return fmt.Errorf("operator address is required") + return fmt.Errorf("operator fee address is required") } priceStr, err := cmd.Flags().GetString(FlagPrice) @@ -115,15 +109,15 @@ func NewFulfillOrderAuthorizedTxCmd() *cobra.Command { return fmt.Errorf("invalid price: %w", err) } - fulfillerFeePartStr, err := cmd.Flags().GetString(FlagOperatorFeePart) + oepratorFeeShareStr, err := cmd.Flags().GetString(FlagOperatorFeeShare) if err != nil { return fmt.Errorf("fulfiller fee part is required") } - fulfillerFeePartDec, err := sdk.NewDecFromStr(fulfillerFeePartStr) + operatorFeeShareDec, err := sdk.NewDecFromStr(oepratorFeeShareStr) if err != nil { return fmt.Errorf("invalid fulfiller fee part: %w", err) } - fulfillerFeePart := sdk.DecProto{Dec: fulfillerFeePartDec} + operatorFeeShare := sdk.DecProto{Dec: operatorFeeShareDec} settlementValidated, err := cmd.Flags().GetBool(FlagSettlementValidated) if err != nil { @@ -134,11 +128,10 @@ func NewFulfillOrderAuthorizedTxCmd() *cobra.Command { orderId, rollappId, clientCtx.GetFromAddress().String(), - fulfillerAddress, - operatorAddress, + operatorFeeAddress, fee, price, - fulfillerFeePart, + operatorFeeShare, settlementValidated, ) @@ -153,8 +146,7 @@ func NewFulfillOrderAuthorizedTxCmd() *cobra.Command { cmd.Flags().Bool(FlagSettlementValidated, false, "Settlement validated flag") cmd.Flags().String(FlagRollappId, "", "Rollapp ID") cmd.Flags().String(FlagPrice, "", "Maximum price") - cmd.Flags().String(FlagOperatorFeePart, "", "Operator fee part") - cmd.Flags().String(FlagOperatorAddress, "", "Operator address") + cmd.Flags().String(FlagOperatorFeeShare, "", "Operator fee share") cmd.Flags().String(FlagOperatorFeeAddress, "", "Operator fee address") return cmd } diff --git a/x/eibc/types/tx.go b/x/eibc/types/tx.go index 52e3b9c76..d2e0f841a 100644 --- a/x/eibc/types/tx.go +++ b/x/eibc/types/tx.go @@ -60,7 +60,6 @@ func NewMsgFulfillOrderAuthorized( orderId, rollappId, granterAddress, - operatorAddress, operatorFeeAddress, expectedFee string, price sdk.Coins, @@ -70,7 +69,6 @@ func NewMsgFulfillOrderAuthorized( return &MsgFulfillOrderAuthorized{ OrderId: orderId, RollappId: rollappId, - OperatorAddress: operatorAddress, LpAddress: granterAddress, OperatorFeeAddress: operatorFeeAddress, ExpectedFee: expectedFee, diff --git a/x/eibc/types/tx.pb.go b/x/eibc/types/tx.pb.go index 8651e8cc1..e7a8e7700 100644 --- a/x/eibc/types/tx.pb.go +++ b/x/eibc/types/tx.pb.go @@ -141,21 +141,19 @@ type MsgFulfillOrderAuthorized struct { RollappId string `protobuf:"bytes,2,opt,name=rollapp_id,json=rollappId,proto3" json:"rollapp_id,omitempty"` // price is the price of the demand order Price github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=price,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"price"` - // operator_address is the bech32-encoded address of the account which is authorized to fulfill the demand order. - OperatorAddress string `protobuf:"bytes,4,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` // lp_address is the bech32-encoded address of the account which the authorization was granted from. // This account will receive the price amount at the finalization phase. - LpAddress string `protobuf:"bytes,5,opt,name=lp_address,json=lpAddress,proto3" json:"lp_address,omitempty"` + LpAddress string `protobuf:"bytes,4,opt,name=lp_address,json=lpAddress,proto3" json:"lp_address,omitempty"` // operator_fee_address is an optional bech32-encoded address of an account that would collect the operator_fee_part // if it's empty, the operator_fee_part will go to the operator_address - OperatorFeeAddress string `protobuf:"bytes,6,opt,name=operator_fee_address,json=operatorFeeAddress,proto3" json:"operator_fee_address,omitempty"` + OperatorFeeAddress string `protobuf:"bytes,5,opt,name=operator_fee_address,json=operatorFeeAddress,proto3" json:"operator_fee_address,omitempty"` // expected_fee is the nominal fee set in the order. - ExpectedFee string `protobuf:"bytes,7,opt,name=expected_fee,json=expectedFee,proto3" json:"expected_fee,omitempty"` + ExpectedFee string `protobuf:"bytes,6,opt,name=expected_fee,json=expectedFee,proto3" json:"expected_fee,omitempty"` // operator_fee_share is the share of the fee earnings that goes to the operator // it will be deduced from the fee of the demand order and paid out immediately - OperatorFeeShare types.DecProto `protobuf:"bytes,8,opt,name=operator_fee_share,json=operatorFeeShare,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecProto" json:"operator_fee_share"` + OperatorFeeShare types.DecProto `protobuf:"bytes,7,opt,name=operator_fee_share,json=operatorFeeShare,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecProto" json:"operator_fee_share"` // settlement_validated signals if the block behind the demand order needs to be "settlement validated" or not - SettlementValidated bool `protobuf:"varint,9,opt,name=settlement_validated,json=settlementValidated,proto3" json:"settlement_validated,omitempty"` + SettlementValidated bool `protobuf:"varint,8,opt,name=settlement_validated,json=settlementValidated,proto3" json:"settlement_validated,omitempty"` } func (m *MsgFulfillOrderAuthorized) Reset() { *m = MsgFulfillOrderAuthorized{} } @@ -212,13 +210,6 @@ func (m *MsgFulfillOrderAuthorized) GetPrice() github_com_cosmos_cosmos_sdk_type return nil } -func (m *MsgFulfillOrderAuthorized) GetOperatorAddress() string { - if m != nil { - return m.OperatorAddress - } - return "" -} - func (m *MsgFulfillOrderAuthorized) GetLpAddress() string { if m != nil { return m.LpAddress @@ -404,50 +395,49 @@ func init() { } var fileDescriptor_47537f11f512b254 = []byte{ - // 673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x4f, 0x13, 0x5d, - 0x14, 0xee, 0x7d, 0xcb, 0xe7, 0x81, 0x37, 0xc0, 0x7d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, 0x78, 0xef, 0x26, 0xd5, 0xa9, - 0x42, 0x19, 0xfa, 0x8e, 0xc0, 0xec, 0x15, 0x6b, 0x76, 0xff, 0x26, 0x23, 0x3b, 0x7d, 0xc5, 0x87, - 0x7f, 0xd6, 0xd7, 0x45, 0xea, 0x84, 0xc0, 0xcc, 0xe0, 0xa9, 0x55, 0x7e, 0x37, 0x77, 0xa0, 0xa5, - 0xf8, 0xe0, 0xc6, 0x2d, 0x1d, 0x16, 0x5b, 0x8f, 0x4f, 0xcf, 0x35, 0x72, 0x76, 0xae, 0x91, 0xef, - 0xe7, 0x1a, 0x79, 0x7b, 0xa1, 0x65, 0xce, 0x2e, 0xb4, 0xcc, 0x97, 0x0b, 0x2d, 0xf3, 0xb2, 0xd2, - 0xb5, 0x00, 0x57, 0x5c, 0x04, 0xad, 0x75, 0xa3, 0x1d, 0xdf, 0x06, 0x6a, 0x1f, 0xea, 0x23, 0xe1, - 0xa7, 0x78, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x19, 0xaf, 0x5d, 0x39, 0x06, 0x00, - 0x00, + // 658 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xee, 0xfc, 0xfa, 0xe3, 0xdf, 0x80, 0x01, 0xc6, 0x06, 0xda, 0x2a, 0x0b, 0x14, 0x0f, 0x8d, + 0xe8, 0x2e, 0x0b, 0xc6, 0x44, 0x0e, 0x26, 0x20, 0x21, 0x21, 0x86, 0x68, 0x6a, 0xf4, 0xe0, 0xa5, + 0xd9, 0xee, 0xbc, 0x2c, 0x1b, 0x77, 0x77, 0x36, 0x3b, 0x43, 0x29, 0x9c, 0x8c, 0x7c, 0x01, 0x63, + 0x8c, 0x1f, 0xc2, 0x93, 0x1f, 0x83, 0x23, 0x47, 0x4f, 0x6a, 0xe8, 0xc1, 0x0f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0xb9, 0xd7, + 0x7a, 0xe6, 0x02, 0x0c, 0x78, 0xdd, 0x9b, 0x1b, 0x5a, 0x2b, 0x7e, 0xe2, 0xe5, 0x7d, 0x68, 0x8c, + 0x86, 0xef, 0xeb, 0xc6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x66, 0x9d, 0x25, 0x0e, 0x06, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -697,7 +687,7 @@ func (m *MsgFulfillOrderAuthorized) MarshalToSizedBuffer(dAtA []byte) (int, erro dAtA[i] = 0 } i-- - dAtA[i] = 0x48 + dAtA[i] = 0x40 } { size, err := m.OperatorFeeShare.MarshalToSizedBuffer(dAtA[:i]) @@ -708,33 +698,26 @@ func (m *MsgFulfillOrderAuthorized) MarshalToSizedBuffer(dAtA []byte) (int, erro i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 + dAtA[i] = 0x3a if len(m.ExpectedFee) > 0 { i -= len(m.ExpectedFee) copy(dAtA[i:], m.ExpectedFee) i = encodeVarintTx(dAtA, i, uint64(len(m.ExpectedFee))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.OperatorFeeAddress) > 0 { i -= len(m.OperatorFeeAddress) copy(dAtA[i:], m.OperatorFeeAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorFeeAddress))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(m.LpAddress) > 0 { i -= len(m.LpAddress) copy(dAtA[i:], m.LpAddress) i = encodeVarintTx(dAtA, i, uint64(len(m.LpAddress))) i-- - dAtA[i] = 0x2a - } - if len(m.OperatorAddress) > 0 { - i -= len(m.OperatorAddress) - copy(dAtA[i:], m.OperatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.OperatorAddress))) - i-- dAtA[i] = 0x22 } if len(m.Price) > 0 { @@ -919,10 +902,6 @@ func (m *MsgFulfillOrderAuthorized) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - l = len(m.OperatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } l = len(m.LpAddress) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1312,38 +1291,6 @@ func (m *MsgFulfillOrderAuthorized) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperatorAddress", 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.OperatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LpAddress", wireType) } @@ -1375,7 +1322,7 @@ func (m *MsgFulfillOrderAuthorized) Unmarshal(dAtA []byte) error { } m.LpAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OperatorFeeAddress", wireType) } @@ -1407,7 +1354,7 @@ func (m *MsgFulfillOrderAuthorized) Unmarshal(dAtA []byte) error { } m.OperatorFeeAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExpectedFee", wireType) } @@ -1439,7 +1386,7 @@ func (m *MsgFulfillOrderAuthorized) Unmarshal(dAtA []byte) error { } m.ExpectedFee = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OperatorFeeShare", wireType) } @@ -1472,7 +1419,7 @@ func (m *MsgFulfillOrderAuthorized) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 9: + case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SettlementValidated", wireType) }