From 15630f86570e641b89a3f6c93d9b2b930c8ea2ae Mon Sep 17 00:00:00 2001 From: KIMURA Yu <33382781+KimuraYu45z@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:04:34 +0800 Subject: [PATCH 01/59] feat: ya genesis --- x/yieldaggregator/genesis.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/x/yieldaggregator/genesis.go b/x/yieldaggregator/genesis.go index 0861d3f77..31ed79d80 100644 --- a/x/yieldaggregator/genesis.go +++ b/x/yieldaggregator/genesis.go @@ -12,12 +12,24 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) // this line is used by starport scaffolding # genesis/module/init k.SetParams(ctx, &genState.Params) + strategyCountMap := make(map[string]uint64) + vaultCount := uint64(0) + for _, strategy := range genState.Strategies { - k.AppendStrategy(ctx, strategy.Denom, strategy) + k.SetStrategy(ctx, strategy.Denom, strategy) + + if strategy.Id+1 > strategyCountMap[strategy.Denom] { + strategyCountMap[strategy.Denom] = strategy.Id + 1 + } } for _, vault := range genState.Vaults { - k.AppendVault(ctx, vault) + k.SetVault(ctx, vault) + + if vault.Id+1 > vaultCount { + vaultCount = vault.Id + 1 + } } + } // ExportGenesis returns the module's exported genesis From 3d7c59818b4cfc72b280963fa8d7aa209c0c1fd0 Mon Sep 17 00:00:00 2001 From: KIMURA Yu <33382781+KimuraYu45z@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:06:41 +0800 Subject: [PATCH 02/59] feat: fix genesis --- x/yieldaggregator/genesis.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/yieldaggregator/genesis.go b/x/yieldaggregator/genesis.go index 31ed79d80..14422211b 100644 --- a/x/yieldaggregator/genesis.go +++ b/x/yieldaggregator/genesis.go @@ -29,7 +29,10 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) vaultCount = vault.Id + 1 } } - + for denom, count := range strategyCountMap { + k.SetStrategyCount(ctx, denom, count) + } + k.SetVaultCount(ctx, vaultCount) } // ExportGenesis returns the module's exported genesis From 9aa1ce56e257ad12dd765caa9fbb944324afb1c7 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 1 Sep 2023 17:17:04 +0800 Subject: [PATCH 03/59] resolve create vault cli command, msg server and msg validation --- .../client/cli/tx_create_vault.go | 20 +++++++++++-------- .../keeper/msg_server_create_vault.go | 1 + x/yieldaggregator/types/errors.go | 2 ++ .../types/message_create_vault.go | 12 ++++++++++- .../types/message_register_strategy.go | 3 +++ 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/x/yieldaggregator/client/cli/tx_create_vault.go b/x/yieldaggregator/client/cli/tx_create_vault.go index 600542587..807eaab5f 100644 --- a/x/yieldaggregator/client/cli/tx_create_vault.go +++ b/x/yieldaggregator/client/cli/tx_create_vault.go @@ -17,12 +17,12 @@ import ( func CmdTxCreateVault() *cobra.Command { cmd := &cobra.Command{ - Use: "create-vault [denom] [commission-rate] [withdraw-reserve-rate] [fee] [deposit] [strategy-weights] [fee-collector]", + Use: "create-vault [denom] [name] [description] [commission-rate] [withdraw-reserve-rate] [fee] [deposit] [strategy-weights] [fee-collector]", Short: "create a new vault", Long: `create a new vault ununifid tx yieldaggregator create-vault uguu 0.001 1000uguu 1000000uguu 1:0.1,2:0.9 `, - Args: cobra.ExactArgs(7), + Args: cobra.ExactArgs(9), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -30,24 +30,26 @@ func CmdTxCreateVault() *cobra.Command { } denom := args[0] - commissionRate, err := sdk.NewDecFromStr(args[1]) + name := args[1] + description := args[2] + commissionRate, err := sdk.NewDecFromStr(args[3]) if err != nil { return err } - withdrawReserveRate, err := sdk.NewDecFromStr(args[2]) + withdrawReserveRate, err := sdk.NewDecFromStr(args[4]) if err != nil { return err } - fee, err := sdk.ParseCoinNormalized(args[3]) + fee, err := sdk.ParseCoinNormalized(args[5]) if err != nil { return err } - deposit, err := sdk.ParseCoinNormalized(args[4]) + deposit, err := sdk.ParseCoinNormalized(args[6]) if err != nil { return err } - strategyWeightStrs := strings.Split(args[5], ",") + strategyWeightStrs := strings.Split(args[7], ",") strategyWeights := make([]types.StrategyWeight, 0) for _, strategyWeightStr := range strategyWeightStrs { @@ -73,12 +75,14 @@ func CmdTxCreateVault() *cobra.Command { msg := types.NewMsgCreateVault( clientCtx.GetFromAddress().String(), denom, + name, + description, commissionRate, withdrawReserveRate, strategyWeights, fee, deposit, - args[6], + args[8], ) if err := msg.ValidateBasic(); err != nil { return err diff --git a/x/yieldaggregator/keeper/msg_server_create_vault.go b/x/yieldaggregator/keeper/msg_server_create_vault.go index 426b2b4fe..b00ef813f 100644 --- a/x/yieldaggregator/keeper/msg_server_create_vault.go +++ b/x/yieldaggregator/keeper/msg_server_create_vault.go @@ -67,6 +67,7 @@ func (k msgServer) CreateVault(goCtx context.Context, msg *types.MsgCreateVault) WithdrawCommissionRate: msg.CommissionRate, WithdrawReserveRate: msg.WithdrawReserveRate, StrategyWeights: msg.StrategyWeights, + FeeCollectorAddress: msg.FeeCollectorAddress, } id := k.Keeper.AppendVault(ctx, vault) diff --git a/x/yieldaggregator/types/errors.go b/x/yieldaggregator/types/errors.go index 440ab1cef..47cda2d2a 100644 --- a/x/yieldaggregator/types/errors.go +++ b/x/yieldaggregator/types/errors.go @@ -22,4 +22,6 @@ var ( ErrInvalidAmount = errors.Register(ModuleName, 14, "invalid amount") ErrStrategyNotFound = errors.Register(ModuleName, 15, "strategy not found") ErrVaultNotFound = errors.Register(ModuleName, 16, "vault not found") + ErrInvalidVaultName = errors.Register(ModuleName, 17, "invalid vault name") + ErrInvalidVaultDescription = errors.Register(ModuleName, 18, "invalid vault description") ) diff --git a/x/yieldaggregator/types/message_create_vault.go b/x/yieldaggregator/types/message_create_vault.go index dc6e4e242..941ca1ac1 100644 --- a/x/yieldaggregator/types/message_create_vault.go +++ b/x/yieldaggregator/types/message_create_vault.go @@ -10,10 +10,12 @@ import ( var _ sdk.Msg = &MsgCreateVault{} -func NewMsgCreateVault(sender string, denom string, commissionRate sdk.Dec, withdrawReserveRate sdk.Dec, strategyWeights []StrategyWeight, fee types.Coin, deposit types.Coin, feeCollectorAddress string) *MsgCreateVault { +func NewMsgCreateVault(sender string, denom string, name, description string, commissionRate sdk.Dec, withdrawReserveRate sdk.Dec, strategyWeights []StrategyWeight, fee types.Coin, deposit types.Coin, feeCollectorAddress string) *MsgCreateVault { return &MsgCreateVault{ Sender: sender, Denom: denom, + Name: name, + Description: description, CommissionRate: commissionRate, StrategyWeights: strategyWeights, Fee: fee, @@ -32,6 +34,14 @@ func (msg MsgCreateVault) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid fee collector address: %s", err) } + if msg.Name == "" { + return ErrInvalidVaultName + } + + if msg.Description == "" { + return ErrInvalidVaultDescription + } + if err := sdk.ValidateDenom(msg.Denom); err != nil { return err } diff --git a/x/yieldaggregator/types/message_register_strategy.go b/x/yieldaggregator/types/message_register_strategy.go index 1c80b60cc..8b642a6fd 100644 --- a/x/yieldaggregator/types/message_register_strategy.go +++ b/x/yieldaggregator/types/message_register_strategy.go @@ -27,6 +27,9 @@ func (msg MsgRegisterStrategy) ValidateBasic() error { if msg.Name == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "empty strategy name") } + if msg.Description == "" { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "empty strategy description") + } if msg.ContractAddress == "" { return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "empty strategy contract address") } From ba89c0121fe2cdbb12989ab605d082446cd71156 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 1 Sep 2023 20:24:42 +0800 Subject: [PATCH 04/59] basic update for iya strategy v1 --- app/keepers/keepers.go | 2 + proto/ununifi/yieldaggregator/tx.proto | 13 + wasmbinding/bindings/msg.go | 14 +- wasmbinding/message_plugin.go | 6 + x/yieldaggregator/client/cli/tx.go | 1 + .../cli/tx_withdraw_with_unbonding_time.go | 48 ++ x/yieldaggregator/keeper/hooks.go | 10 +- ...withdraw_from_vault_with_unbonding_time.go | 26 + x/yieldaggregator/keeper/strategy.go | 125 +++- .../interchainquery/keeper/keeper.go | 11 +- .../interchainquery/keeper/msg_server.go | 62 +- .../submodules/interchainquery/types/sudo.go | 14 +- .../records/keeper/callback_transfer.go | 24 +- .../submodules/records/keeper/keeper.go | 4 + x/yieldaggregator/types/codec.go | 1 + ...withdraw_from_vault_with_unbonding_time.go | 34 + x/yieldaggregator/types/tx.pb.go | 580 +++++++++++++++--- 17 files changed, 846 insertions(+), 129 deletions(-) create mode 100644 x/yieldaggregator/client/cli/tx_withdraw_with_unbonding_time.go create mode 100644 x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go create mode 100644 x/yieldaggregator/types/message_withdraw_from_vault_with_unbonding_time.go diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index c86461566..73aa9842d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -527,6 +527,7 @@ func NewAppKeeper( appKeepers.keys[interchainquerytypes.StoreKey], appKeepers.IBCKeeper, &appKeepers.WasmKeeper, + appKeepers.WasmKeeper, ) scopedRecordsKeeper := appKeepers.CapabilityKeeper.ScopeToModule(recordstypes.ModuleName) @@ -542,6 +543,7 @@ func NewAppKeeper( *appKeepers.IBCKeeper, appKeepers.IcacallbacksKeeper, &appKeepers.WasmKeeper, + appKeepers.WasmKeeper, ) scopedStakeibcKeeper := appKeepers.CapabilityKeeper.ScopeToModule(stakeibctypes.ModuleName) diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index cbd25e13a..d5bf61e56 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -17,6 +17,8 @@ service Msg { // this line is used by starport scaffolding # proto/tx/rpc rpc DepositToVault(MsgDepositToVault) returns (MsgDepositToVaultResponse); rpc WithdrawFromVault(MsgWithdrawFromVault) returns (MsgWithdrawFromVaultResponse); + rpc WithdrawFromVaultWithUnbondingTime(MsgWithdrawFromVaultWithUnbondingTime) + returns (MsgWithdrawFromVaultWithUnbondingTimeResponse); rpc CreateVault(MsgCreateVault) returns (MsgCreateVaultResponse); rpc TransferVaultOwnership(MsgTransferVaultOwnership) returns (MsgTransferVaultOwnershipResponse); rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); @@ -57,6 +59,17 @@ message MsgWithdrawFromVault { message MsgWithdrawFromVaultResponse {} +message MsgWithdrawFromVaultWithUnbondingTime { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 vault_id = 2; + string lp_token_amount = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; +} +message MsgWithdrawFromVaultWithUnbondingTimeResponse {} + message MsgCreateVault { option (cosmos.msg.v1.signer) = "sender"; diff --git a/wasmbinding/bindings/msg.go b/wasmbinding/bindings/msg.go index bb9f1a78e..9332f10e5 100644 --- a/wasmbinding/bindings/msg.go +++ b/wasmbinding/bindings/msg.go @@ -5,8 +5,12 @@ import ( ) type UnunifiMsg struct { - SubmitICQRequest *SubmitICQRequest `json:"submit_i_c_q_request,omitempty"` - IBCTransfer *wasmvmtypes.TransferMsg `json:"ibc_transfer,omitempty"` + // v0 messages + SubmitICQRequest *SubmitICQRequest `json:"submit_i_c_q_request,omitempty"` + // v1 messages + IBCTransfer *wasmvmtypes.TransferMsg `json:"ibc_transfer,omitempty"` + RequestKvIcq *SubmitICQRequest `json:"request_kv_icq,omitempty"` + DeputyDepositToVault *DeputyDepositToVault `json:"deputy_deposit_to_vault,omitempty"` } type SubmitICQRequest struct { @@ -15,3 +19,9 @@ type SubmitICQRequest struct { QueryPrefix string `json:"query_prefix"` QueryKey []byte `json:"query_key"` } + +type DeputyDepositToVault struct { + Depositor string `json:"depositor"` + VaultId uint64 `json:"vault_id"` + Amount wasmvmtypes.Coin `json:"amount"` +} diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index 37c3de09b..d6e0a4845 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -49,9 +49,15 @@ func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddre if contractMsg.SubmitICQRequest != nil { return m.submitICQRequest(ctx, contractAddr, contractMsg.SubmitICQRequest) } + if contractMsg.RequestKvIcq != nil { + return m.submitICQRequest(ctx, contractAddr, contractMsg.RequestKvIcq) + } if contractMsg.IBCTransfer != nil { return m.ibcTransfer(ctx, contractAddr, contractMsg.IBCTransfer) } + if contractMsg.DeputyDepositToVault != nil { + // TODO: + } } return m.wrapped.DispatchMsg(ctx, contractAddr, contractIBCPortID, msg) } diff --git a/x/yieldaggregator/client/cli/tx.go b/x/yieldaggregator/client/cli/tx.go index db2303fbb..3fdbf3e80 100644 --- a/x/yieldaggregator/client/cli/tx.go +++ b/x/yieldaggregator/client/cli/tx.go @@ -23,6 +23,7 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand( CmdTxDepositToVault(), CmdTxWithdrawFromVault(), + CmdTxWithdrawFromVaultWithUnbondingTime(), CmdTxCreateVault(), CmdTxTransferVaultOwnership(), CmdTxDeleteVault(), diff --git a/x/yieldaggregator/client/cli/tx_withdraw_with_unbonding_time.go b/x/yieldaggregator/client/cli/tx_withdraw_with_unbonding_time.go new file mode 100644 index 000000000..706fb7ffe --- /dev/null +++ b/x/yieldaggregator/client/cli/tx_withdraw_with_unbonding_time.go @@ -0,0 +1,48 @@ +package cli + +import ( + "strconv" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cobra" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func CmdTxWithdrawFromVaultWithUnbondingTime() *cobra.Command { + cmd := &cobra.Command{ + Use: "withdraw-from-vault-with-unbonding-time [id] [lp-token-amount]", + Short: "withdraw from the vault with unbonding time", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + id, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + lpAmount, err := sdk.ParseCoinNormalized(args[1]) + if err != nil { + return err + } + + msg := types.NewMsgWithdrawFromVaultWithUnbondingTime(clientCtx.GetFromAddress().String(), id, lpAmount.Amount) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/yieldaggregator/keeper/hooks.go b/x/yieldaggregator/keeper/hooks.go index b83a89c99..9e8bc3c41 100644 --- a/x/yieldaggregator/keeper/hooks.go +++ b/x/yieldaggregator/keeper/hooks.go @@ -51,8 +51,16 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInf if err != nil { continue } + if epochIdentifier == epochstypes.BASE_EPOCH { - wasmMsg := `{"execute_epoch":{}}` + version := k.GetStrategyVersion(ctx, strategy) + wasmMsg := "" + switch version { + case 0: + wasmMsg = `{"execute_epoch":{}}` + default: // case 1+ + wasmMsg = `{"epoch":{}}` + } _, err := k.wasmKeeper.Execute(ctx, contractAddr, contractAddr, []byte(wasmMsg), sdk.Coins{}) if err != nil { continue diff --git a/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go b/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go new file mode 100644 index 000000000..762361c76 --- /dev/null +++ b/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go @@ -0,0 +1,26 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k msgServer) WithdrawFromVaultWithUnbondingTime(ctx context.Context, msg *types.MsgWithdrawFromVaultWithUnbondingTime) (*types.MsgWithdrawFromVaultWithUnbondingTimeResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + + err = k.Keeper.BurnLPTokenAndRedeem(sdkCtx, sender, msg.VaultId, msg.LpTokenAmount) + if err != nil { + return nil, err + } + + // TODO: if bonded amount < withdraw with unbonding time - execute, otherwise fail + + return &types.MsgWithdrawFromVaultWithUnbondingTimeResponse{}, nil +} diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 77a81dce2..fef4a9cb4 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -2,7 +2,9 @@ package keeper import ( "encoding/binary" + "encoding/json" "fmt" + "strconv" "strings" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -12,6 +14,20 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) +func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategy types.Strategy) uint8 { + wasmQuery := fmt.Sprintf(`{"version":{}}`) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return 0 + } + version, err := strconv.Atoi(string(resp)) + if err != nil { + return 0 + } + return uint8(version) +} + // GetStrategyCount get the total number of Strategy func (k Keeper) GetStrategyCount(ctx sdk.Context, vaultDenom string) uint64 { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) @@ -141,6 +157,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) stakeCoin := sdk.NewCoin(vault.Denom, amount) + switch strategy.ContractAddress { case "x/ibc-staking": return k.stakeibcKeeper.LiquidStake( @@ -149,6 +166,8 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ stakeCoin, ) default: + version := k.GetStrategyVersion(ctx, strategy) + _ = version wasmMsg := `{"stake":{}}` contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{stakeCoin}) @@ -176,13 +195,27 @@ func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy return nil } default: - wasmMsg := fmt.Sprintf(`{"unstake":{"amount":"%s"}}`, amount.String()) + version := k.GetStrategyVersion(ctx, strategy) + wasmMsg := "" + switch version { + case 0: + wasmMsg = fmt.Sprintf(`{"unstake":{"amount":"%s"}}`, amount.String()) + default: // case 1+ + wasmMsg = fmt.Sprintf(`{"unstake":{"share_amount":"%s", "recipient": "%s"}}`, amount.String(), vaultModAddr.String()) + } contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{}) return err } } +type AmountsResp struct { + TotalDeposited string `json:"total_deposited"` + BondingStandby string `json:"bonding_standby"` + Bonded string `json:"bonded"` + Unbonding string `json:"unbonding"` +} + func (k Keeper) GetAmountFromStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy) (sdk.Coin, error) { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) @@ -191,18 +224,41 @@ func (k Keeper) GetAmountFromStrategy(ctx sdk.Context, vault types.Vault, strate updatedAmount := k.stakeibcKeeper.GetUpdatedBalance(ctx, vaultModAddr, vault.Denom) return sdk.NewCoin(vault.Denom, updatedAmount), nil default: - wasmQuery := fmt.Sprintf(`{"bonded":{"addr": "%s"}}`, vaultModAddr.String()) - contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) - resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) - if err != nil { - return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err - } - amountStr := strings.ReplaceAll(string(resp), "\"", "") - amount, ok := sdk.NewIntFromString(amountStr) - if !ok { - return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + version := k.GetStrategyVersion(ctx, strategy) + switch version { + case 0: + wasmQuery := fmt.Sprintf(`{"bonded":{"addr": "%s"}}`, vaultModAddr.String()) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + amountStr := strings.ReplaceAll(string(resp), "\"", "") + amount, ok := sdk.NewIntFromString(amountStr) + if !ok { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + } + return sdk.NewCoin(strategy.Denom, amount), err + default: // case 1+ + wasmQuery := fmt.Sprintf(`{"amounts":{"addr": "%s"}}`, vaultModAddr.String()) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + + parsedAmounts := AmountsResp{} + err = json.Unmarshal(resp, &parsedAmounts) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + + amount, ok := sdk.NewIntFromString(parsedAmounts.Bonded) + if !ok { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + } + return sdk.NewCoin(strategy.Denom, amount), err } - return sdk.NewCoin(strategy.Denom, amount), err } } @@ -218,17 +274,40 @@ func (k Keeper) GetUnbondingAmountFromStrategy(ctx sdk.Context, vault types.Vaul unbondingAmount := k.recordsKeeper.GetUserRedemptionRecordBySenderAndHostZone(ctx, vaultModAddr, zone.ChainId) return sdk.NewCoin(vault.Denom, unbondingAmount), nil default: - wasmQuery := fmt.Sprintf(`{"unbonding":{"addr": "%s"}}`, vaultModAddr.String()) - contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) - resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) - if err != nil { - return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err - } - amountStr := strings.ReplaceAll(string(resp), "\"", "") - amount, ok := sdk.NewIntFromString(amountStr) - if !ok { - return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + version := k.GetStrategyVersion(ctx, strategy) + switch version { + case 0: + wasmQuery := fmt.Sprintf(`{"unbonding":{"addr": "%s"}}`, vaultModAddr.String()) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + amountStr := strings.ReplaceAll(string(resp), "\"", "") + amount, ok := sdk.NewIntFromString(amountStr) + if !ok { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + } + return sdk.NewCoin(strategy.Denom, amount), err + default: // case 1+ + wasmQuery := fmt.Sprintf(`{"amounts":{"addr": "%s"}}`, vaultModAddr.String()) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + + parsedAmounts := AmountsResp{} + err = json.Unmarshal(resp, &parsedAmounts) + if err != nil { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), err + } + + amount, ok := sdk.NewIntFromString(parsedAmounts.Unbonding) + if !ok { + return sdk.NewCoin(strategy.Denom, sdk.ZeroInt()), nil + } + return sdk.NewCoin(strategy.Denom, amount), err } - return sdk.NewCoin(strategy.Denom, amount), err } } diff --git a/x/yieldaggregator/submodules/interchainquery/keeper/keeper.go b/x/yieldaggregator/submodules/interchainquery/keeper/keeper.go index 7c0f4fbd6..767e11842 100644 --- a/x/yieldaggregator/submodules/interchainquery/keeper/keeper.go +++ b/x/yieldaggregator/submodules/interchainquery/keeper/keeper.go @@ -11,6 +11,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/types" @@ -23,16 +24,24 @@ type Keeper struct { callbacks map[string]types.QueryCallbacks IBCKeeper *ibckeeper.Keeper wasmKeeper types.WasmKeeper + wasmReader wasmkeeper.Keeper } // NewKeeper returns a new instance of zones Keeper -func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, ibckeeper *ibckeeper.Keeper, wasmKeeper types.WasmKeeper) Keeper { +func NewKeeper( + cdc codec.Codec, + storeKey storetypes.StoreKey, + ibckeeper *ibckeeper.Keeper, + wasmKeeper types.WasmKeeper, + wasmReader wasmkeeper.Keeper, +) Keeper { return Keeper{ cdc: cdc, storeKey: storeKey, callbacks: make(map[string]types.QueryCallbacks), IBCKeeper: ibckeeper, wasmKeeper: wasmKeeper, + wasmReader: wasmReader, } } diff --git a/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go b/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go index edadbbb15..d026e8ead 100644 --- a/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go +++ b/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go @@ -6,6 +6,7 @@ import ( "fmt" "net/url" "sort" + "strconv" "strings" errorsmod "cosmossdk.io/errors" @@ -106,6 +107,19 @@ func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryRespons return nil } +func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategyAddr sdk.AccAddress) uint8 { + wasmQuery := fmt.Sprintf(`{"version":{}}`) + resp, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) + if err != nil { + return 0 + } + version, err := strconv.Atoi(string(resp)) + if err != nil { + return 0 + } + return uint8(version) +} + // call the query's associated callback function func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, q types.Query) error { // get all the stored queries and sort them for determinism @@ -120,24 +134,44 @@ func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryRespons if err == nil { k.Logger(ctx).Info(fmt.Sprintf("ICQ debug: Q: %+v, result: %+v", q, msg.Result)) - x := types.MessageKVQueryResult{} - x.KVQueryResult.ConnectionId = q.ConnectionId - x.KVQueryResult.ChainId = q.ChainId - x.KVQueryResult.QueryPrefix = q.QueryType - x.KVQueryResult.QueryKey = q.Request - x.KVQueryResult.Data = msg.Result - if x.KVQueryResult.Data == nil { - x.KVQueryResult.Data = []byte{} - } + version := k.GetStrategyVersion(ctx, contractAddress) + var callbackBytes []byte + switch version { + case 0: + x := types.MessageKVQueryResult{} + x.KVQueryResult.ConnectionId = q.ConnectionId + x.KVQueryResult.ChainId = q.ChainId + x.KVQueryResult.QueryPrefix = q.QueryType + x.KVQueryResult.QueryKey = q.Request + x.KVQueryResult.Data = msg.Result + if x.KVQueryResult.Data == nil { + x.KVQueryResult.Data = []byte{} + } - m, err := json.Marshal(x) - if err != nil { - return fmt.Errorf("failed to marshal MessageKVQueryResult: %v", err) + callbackBytes, err = json.Marshal(x) + if err != nil { + return fmt.Errorf("failed to marshal MessageKVQueryResult: %v", err) + } + default: // case 1+ + x := types.MessageKvIcqCallback{} + x.KvIcqCallback.ConnectionId = q.ConnectionId + x.KvIcqCallback.ChainId = q.ChainId + x.KvIcqCallback.QueryPrefix = q.QueryType + x.KvIcqCallback.QueryKey = q.Request + x.KvIcqCallback.Data = msg.Result + if x.KvIcqCallback.Data == nil { + x.KvIcqCallback.Data = []byte{} + } + + callbackBytes, err = json.Marshal(x) + if err != nil { + return fmt.Errorf("failed to marshal MessageKvIcqCallback: %v", err) + } } - _, err = k.wasmKeeper.Sudo(ctx, contractAddress, m) + _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) if err != nil { - k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(m), "error", err, "contract_address", contractAddress) + k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) return fmt.Errorf("failed to Sudo: %v", err) } return nil diff --git a/x/yieldaggregator/submodules/interchainquery/types/sudo.go b/x/yieldaggregator/submodules/interchainquery/types/sudo.go index c7661a571..5644459a5 100644 --- a/x/yieldaggregator/submodules/interchainquery/types/sudo.go +++ b/x/yieldaggregator/submodules/interchainquery/types/sudo.go @@ -1,7 +1,7 @@ package types // MessageKVQueryResult is passed to a contract's sudo() entrypoint when a result -// was submitted for a kv-query. +// was submitted for a kv-query - v0. type MessageKVQueryResult struct { KVQueryResult struct { ConnectionId string `json:"connection_id"` @@ -11,3 +11,15 @@ type MessageKVQueryResult struct { Data []byte `json:"data"` } `json:"kv_query_result"` } + +// MessageKvIcqCallback is passed to a contract's sudo() entrypoint when a result +// was submitted for a kv-query - v1 msg. +type MessageKvIcqCallback struct { + KvIcqCallback struct { + ConnectionId string `json:"connection_id"` + ChainId string `json:"chain_id"` + QueryPrefix string `json:"query_prefix"` + QueryKey []byte `json:"query_key"` + Data []byte `json:"data"` + } `json:"kv_icq_callback"` +} diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index 7008c807b..34068c775 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -3,6 +3,7 @@ package keeper import ( "encoding/json" "fmt" + "strconv" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -68,6 +69,19 @@ func TransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack return nil } +func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategyAddr sdk.AccAddress) uint8 { + wasmQuery := fmt.Sprintf(`{"version":{}}`) + resp, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) + if err != nil { + return 0 + } + version, err := strconv.Atoi(string(resp)) + if err != nil { + return 0 + } + return uint8(version) +} + func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { k.Logger(ctx).Info("TransferCallback executing", "packet", packet) if ack.GetError() != "" { @@ -92,8 +106,10 @@ func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Pac return sdkerrors.Wrapf(types.ErrUnmarshalFailure, "cannot retrieve contract address: %s", err.Error()) } - x := types.MessageTransferCallback{} + version := k.GetStrategyVersion(ctx, contractAddress) + _ = version + x := types.MessageTransferCallback{} x.TransferCallback.Denom = data.Denom x.TransferCallback.Amount = data.Amount x.TransferCallback.Sender = data.Sender @@ -101,14 +117,14 @@ func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Pac x.TransferCallback.Memo = data.Memo x.TransferCallback.Success = true - m, err := json.Marshal(x) + callbackBytes, err := json.Marshal(x) if err != nil { return fmt.Errorf("failed to marshal MessageTransferCallback: %v", err) } - _, err = k.wasmKeeper.Sudo(ctx, contractAddress, m) + _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) if err != nil { - k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(m), "error", err, "contract_address", contractAddress) + k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) return fmt.Errorf("failed to Sudo: %v", err) } return nil diff --git a/x/yieldaggregator/submodules/records/keeper/keeper.go b/x/yieldaggregator/submodules/records/keeper/keeper.go index ca1f0997a..ea5e9d211 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper.go @@ -20,6 +20,7 @@ import ( icacallbackskeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/icacallbacks/keeper" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" storetypes "github.com/cosmos/cosmos-sdk/store/types" icqtypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/types" @@ -39,6 +40,7 @@ type ( IBCKeeper ibckeeper.Keeper ICACallbacksKeeper icacallbackskeeper.Keeper wasmKeeper icqtypes.WasmKeeper + wasmReader wasmkeeper.Keeper } ) @@ -53,6 +55,7 @@ func NewKeeper( ibcKeeper ibckeeper.Keeper, ICACallbacksKeeper icacallbackskeeper.Keeper, WasmKeeper icqtypes.WasmKeeper, + wasmReader wasmkeeper.Keeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -70,6 +73,7 @@ func NewKeeper( IBCKeeper: ibcKeeper, ICACallbacksKeeper: ICACallbacksKeeper, wasmKeeper: WasmKeeper, + wasmReader: wasmReader, } } diff --git a/x/yieldaggregator/types/codec.go b/x/yieldaggregator/types/codec.go index 4bd6482b2..8e10afbaa 100644 --- a/x/yieldaggregator/types/codec.go +++ b/x/yieldaggregator/types/codec.go @@ -18,6 +18,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgDepositToVault{}, &MsgWithdrawFromVault{}, + &MsgWithdrawFromVaultWithUnbondingTime{}, &MsgCreateVault{}, &MsgTransferVaultOwnership{}, &MsgUpdateParams{}, diff --git a/x/yieldaggregator/types/message_withdraw_from_vault_with_unbonding_time.go b/x/yieldaggregator/types/message_withdraw_from_vault_with_unbonding_time.go new file mode 100644 index 000000000..a8fdf4bda --- /dev/null +++ b/x/yieldaggregator/types/message_withdraw_from_vault_with_unbonding_time.go @@ -0,0 +1,34 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgWithdrawFromVaultWithUnbondingTime{} + +func NewMsgWithdrawFromVaultWithUnbondingTime(sender string, vaultId uint64, lpTokenAmount sdk.Int) *MsgWithdrawFromVaultWithUnbondingTime { + return &MsgWithdrawFromVaultWithUnbondingTime{ + Sender: sender, + VaultId: vaultId, + LpTokenAmount: lpTokenAmount, + } +} + +func (msg MsgWithdrawFromVaultWithUnbondingTime) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + if !msg.LpTokenAmount.IsPositive() { + return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, msg.LpTokenAmount.String()) + } + + return nil +} + +func (msg MsgWithdrawFromVaultWithUnbondingTime) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 06d80631e..9f95e58b5 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -183,6 +183,99 @@ func (m *MsgWithdrawFromVaultResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawFromVaultResponse proto.InternalMessageInfo +type MsgWithdrawFromVaultWithUnbondingTime struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + VaultId uint64 `protobuf:"varint,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` + LpTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=lp_token_amount,json=lpTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"lp_token_amount"` +} + +func (m *MsgWithdrawFromVaultWithUnbondingTime) Reset() { *m = MsgWithdrawFromVaultWithUnbondingTime{} } +func (m *MsgWithdrawFromVaultWithUnbondingTime) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawFromVaultWithUnbondingTime) ProtoMessage() {} +func (*MsgWithdrawFromVaultWithUnbondingTime) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{4} +} +func (m *MsgWithdrawFromVaultWithUnbondingTime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawFromVaultWithUnbondingTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTime.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 *MsgWithdrawFromVaultWithUnbondingTime) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTime.Merge(m, src) +} +func (m *MsgWithdrawFromVaultWithUnbondingTime) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawFromVaultWithUnbondingTime) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTime.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTime proto.InternalMessageInfo + +func (m *MsgWithdrawFromVaultWithUnbondingTime) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgWithdrawFromVaultWithUnbondingTime) GetVaultId() uint64 { + if m != nil { + return m.VaultId + } + return 0 +} + +type MsgWithdrawFromVaultWithUnbondingTimeResponse struct { +} + +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) Reset() { + *m = MsgWithdrawFromVaultWithUnbondingTimeResponse{} +} +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgWithdrawFromVaultWithUnbondingTimeResponse) ProtoMessage() {} +func (*MsgWithdrawFromVaultWithUnbondingTimeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{5} +} +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTimeResponse.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 *MsgWithdrawFromVaultWithUnbondingTimeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTimeResponse.Merge(m, src) +} +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTimeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTimeResponse proto.InternalMessageInfo + type MsgCreateVault struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` @@ -200,7 +293,7 @@ func (m *MsgCreateVault) Reset() { *m = MsgCreateVault{} } func (m *MsgCreateVault) String() string { return proto.CompactTextString(m) } func (*MsgCreateVault) ProtoMessage() {} func (*MsgCreateVault) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{4} + return fileDescriptor_a6f503b1413abc44, []int{6} } func (m *MsgCreateVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -237,7 +330,7 @@ func (m *MsgCreateVaultResponse) Reset() { *m = MsgCreateVaultResponse{} func (m *MsgCreateVaultResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateVaultResponse) ProtoMessage() {} func (*MsgCreateVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{5} + return fileDescriptor_a6f503b1413abc44, []int{7} } func (m *MsgCreateVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -285,7 +378,7 @@ func (m *MsgUpdateVault) Reset() { *m = MsgUpdateVault{} } func (m *MsgUpdateVault) String() string { return proto.CompactTextString(m) } func (*MsgUpdateVault) ProtoMessage() {} func (*MsgUpdateVault) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{6} + return fileDescriptor_a6f503b1413abc44, []int{8} } func (m *MsgUpdateVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -321,7 +414,7 @@ func (m *MsgUpdateVaultResponse) Reset() { *m = MsgUpdateVaultResponse{} func (m *MsgUpdateVaultResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateVaultResponse) ProtoMessage() {} func (*MsgUpdateVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{7} + return fileDescriptor_a6f503b1413abc44, []int{9} } func (m *MsgUpdateVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -360,7 +453,7 @@ func (m *MsgTransferVaultOwnership) Reset() { *m = MsgTransferVaultOwner func (m *MsgTransferVaultOwnership) String() string { return proto.CompactTextString(m) } func (*MsgTransferVaultOwnership) ProtoMessage() {} func (*MsgTransferVaultOwnership) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{8} + return fileDescriptor_a6f503b1413abc44, []int{10} } func (m *MsgTransferVaultOwnership) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -396,7 +489,7 @@ func (m *MsgTransferVaultOwnershipResponse) Reset() { *m = MsgTransferVa func (m *MsgTransferVaultOwnershipResponse) String() string { return proto.CompactTextString(m) } func (*MsgTransferVaultOwnershipResponse) ProtoMessage() {} func (*MsgTransferVaultOwnershipResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{9} + return fileDescriptor_a6f503b1413abc44, []int{11} } func (m *MsgTransferVaultOwnershipResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -434,7 +527,7 @@ 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_a6f503b1413abc44, []int{10} + return fileDescriptor_a6f503b1413abc44, []int{12} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +563,7 @@ 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_a6f503b1413abc44, []int{11} + return fileDescriptor_a6f503b1413abc44, []int{13} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,7 +605,7 @@ func (m *MsgRegisterStrategy) Reset() { *m = MsgRegisterStrategy{} } func (m *MsgRegisterStrategy) String() string { return proto.CompactTextString(m) } func (*MsgRegisterStrategy) ProtoMessage() {} func (*MsgRegisterStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{12} + return fileDescriptor_a6f503b1413abc44, []int{14} } func (m *MsgRegisterStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -548,7 +641,7 @@ func (m *MsgRegisterStrategyResponse) Reset() { *m = MsgRegisterStrategy func (m *MsgRegisterStrategyResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterStrategyResponse) ProtoMessage() {} func (*MsgRegisterStrategyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{13} + return fileDescriptor_a6f503b1413abc44, []int{15} } func (m *MsgRegisterStrategyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -590,7 +683,7 @@ func (m *MsgUpdateStrategy) Reset() { *m = MsgUpdateStrategy{} } func (m *MsgUpdateStrategy) String() string { return proto.CompactTextString(m) } func (*MsgUpdateStrategy) ProtoMessage() {} func (*MsgUpdateStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{14} + return fileDescriptor_a6f503b1413abc44, []int{16} } func (m *MsgUpdateStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -626,7 +719,7 @@ func (m *MsgUpdateStrategyResponse) Reset() { *m = MsgUpdateStrategyResp func (m *MsgUpdateStrategyResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateStrategyResponse) ProtoMessage() {} func (*MsgUpdateStrategyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{15} + return fileDescriptor_a6f503b1413abc44, []int{17} } func (m *MsgUpdateStrategyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,7 +757,7 @@ func (m *MsgDeleteVault) Reset() { *m = MsgDeleteVault{} } func (m *MsgDeleteVault) String() string { return proto.CompactTextString(m) } func (*MsgDeleteVault) ProtoMessage() {} func (*MsgDeleteVault) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{16} + return fileDescriptor_a6f503b1413abc44, []int{18} } func (m *MsgDeleteVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -700,7 +793,7 @@ func (m *MsgDeleteVaultResponse) Reset() { *m = MsgDeleteVaultResponse{} func (m *MsgDeleteVaultResponse) String() string { return proto.CompactTextString(m) } func (*MsgDeleteVaultResponse) ProtoMessage() {} func (*MsgDeleteVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a6f503b1413abc44, []int{17} + return fileDescriptor_a6f503b1413abc44, []int{19} } func (m *MsgDeleteVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -734,6 +827,8 @@ func init() { proto.RegisterType((*MsgDepositToVaultResponse)(nil), "ununifi.yieldaggregator.MsgDepositToVaultResponse") proto.RegisterType((*MsgWithdrawFromVault)(nil), "ununifi.yieldaggregator.MsgWithdrawFromVault") proto.RegisterType((*MsgWithdrawFromVaultResponse)(nil), "ununifi.yieldaggregator.MsgWithdrawFromVaultResponse") + proto.RegisterType((*MsgWithdrawFromVaultWithUnbondingTime)(nil), "ununifi.yieldaggregator.MsgWithdrawFromVaultWithUnbondingTime") + proto.RegisterType((*MsgWithdrawFromVaultWithUnbondingTimeResponse)(nil), "ununifi.yieldaggregator.MsgWithdrawFromVaultWithUnbondingTimeResponse") proto.RegisterType((*MsgCreateVault)(nil), "ununifi.yieldaggregator.MsgCreateVault") proto.RegisterType((*MsgCreateVaultResponse)(nil), "ununifi.yieldaggregator.MsgCreateVaultResponse") proto.RegisterType((*MsgUpdateVault)(nil), "ununifi.yieldaggregator.MsgUpdateVault") @@ -753,75 +848,78 @@ func init() { func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1083 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x4f, 0x1b, 0x47, - 0x14, 0xf7, 0x82, 0x31, 0x30, 0xb4, 0x40, 0x16, 0x08, 0x8b, 0x69, 0x8d, 0x4b, 0x2b, 0xe1, 0xd2, - 0xe2, 0x05, 0xf7, 0x9f, 0x1a, 0xa9, 0x87, 0x00, 0x8a, 0x44, 0x55, 0xd4, 0x6a, 0x81, 0xa6, 0xca, - 0xc5, 0x5a, 0x76, 0x1f, 0xe3, 0x69, 0xb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, 0x5c, 0x09, 0x57, 0x65, 0x3a, 0x8b, 0x46, 0x7c, 0xa0, 0x2c, 0x88, 0x68, 0x8e, 0x3b, - 0xea, 0xc1, 0x34, 0x51, 0x9e, 0xba, 0x01, 0x28, 0x66, 0x4e, 0xf4, 0xdf, 0x2c, 0xa3, 0x09, 0x1f, - 0x84, 0xc7, 0x49, 0x28, 0x09, 0xa3, 0x56, 0x3e, 0x5a, 0x4a, 0xbf, 0x32, 0xef, 0xa1, 0x29, 0x8f, - 0x05, 0x01, 0x11, 0x82, 0x30, 0x5a, 0xe7, 0xae, 0x04, 0x6b, 0x24, 0x4a, 0x63, 0x43, 0x97, 0x66, - 0xb1, 0xbb, 0x34, 0x5f, 0x00, 0x76, 0xbd, 0xd3, 0x6d, 0xf0, 0x52, 0x05, 0xda, 0x06, 0xcf, 0x99, - 0x7c, 0xe1, 0xc9, 0x71, 0x25, 0x98, 0x80, 0xe6, 0x4e, 0x74, 0x25, 0xea, 0x1c, 0x04, 0xf0, 0x63, - 0x50, 0x11, 0x0a, 0x57, 0x8d, 0x30, 0x13, 0xfb, 0x73, 0x94, 0xbb, 0x28, 0xcc, 0x37, 0x68, 0x5a, - 0xc8, 0xb6, 0x5f, 0x7c, 0x5a, 0x3f, 0x01, 0x82, 0x1b, 0x52, 0x58, 0xa3, 0xe5, 0xe1, 0xca, 0x44, - 0x6d, 0xa5, 0x9a, 0x31, 0x04, 0xaa, 0x7b, 0xda, 0xe0, 0x6e, 0x84, 0xd7, 0x32, 0x9e, 0x12, 0x17, - 0xde, 0x0a, 0x73, 0x03, 0x0d, 0x1f, 0x01, 0x58, 0x63, 0x83, 0x75, 0x41, 0x1b, 0x6b, 0x7e, 0x8a, - 0x46, 0x7d, 0x25, 0x75, 0x6b, 0x7c, 0x30, 0xb3, 0x18, 0x6f, 0xd6, 0xd0, 0xdc, 0x11, 0x40, 0xdd, - 0x63, 0xcd, 0x26, 0x78, 0x92, 0xf1, 0xba, 0xab, 0x76, 0xdf, 0x42,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5f, 0xd3, 0x7d, 0xb5, 0xd2, 0x5f, 0x95, 0x09, 0xb0, 0xff, - 0xbe, 0xf6, 0xe8, 0x9a, 0x76, 0xa0, 0xf4, 0xe5, 0x61, 0xe5, 0xe5, 0x15, 0x1a, 0x20, 0x50, 0x8f, - 0xb3, 0xbb, 0xdd, 0x96, 0x1d, 0x73, 0x71, 0xf5, 0xe5, 0x2e, 0x92, 0x2a, 0xd6, 0x06, 0xc7, 0xc6, - 0x11, 0x37, 0x3f, 0x7f, 0x72, 0x56, 0x32, 0x9e, 0x9e, 0x95, 0x8c, 0xbf, 0xce, 0x4a, 0xc6, 0x0f, - 0xe7, 0xa5, 0xdc, 0xd3, 0xf3, 0x52, 0xee, 0x8f, 0xf3, 0x52, 0xee, 0xde, 0x3a, 0x26, 0xb2, 0xd1, - 0x3a, 0xac, 0x7a, 0x2c, 0xb0, 0x0f, 0xe8, 0x01, 0x25, 0x77, 0x88, 0xed, 0x35, 0x5c, 0x42, 0xed, - 0x07, 0xdd, 0xdf, 0xa3, 0xa7, 0x21, 0x88, 0xc3, 0x42, 0xf4, 0xed, 0xf6, 0xc1, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xaa, 0xe2, 0xec, 0x58, 0xb7, 0x0e, 0x00, 0x00, + // 1135 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0x55, + 0x10, 0xf6, 0x26, 0x8e, 0x53, 0x4f, 0x20, 0x69, 0x37, 0x49, 0xb3, 0x71, 0xc0, 0x31, 0x06, 0x14, + 0x13, 0x88, 0x37, 0x31, 0xbf, 0x44, 0x25, 0x90, 0x9a, 0x44, 0x91, 0x82, 0x88, 0x40, 0x9b, 0x84, + 0xa2, 0x5e, 0xac, 0xcd, 0xee, 0x64, 0xfd, 0xa8, 0xf7, 0xbd, 0xd5, 0x7b, 0xcf, 0x49, 0x73,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, 0xd1, 0xf7, 0x86, + 0x7b, 0xdb, 0x14, 0x6e, 0x5c, 0xdc, 0x26, 0x0e, 0xe5, 0x6b, 0x78, 0xe9, 0xdc, 0x4c, 0xaf, 0xf4, + 0xe3, 0x4a, 0x22, 0x0b, 0xab, 0x83, 0x22, 0x63, 0x5f, 0x47, 0x70, 0xb5, 0x6b, 0x14, 0xbf, 0xd3, + 0x8f, 0xa5, 0x13, 0x5d, 0x78, 0xef, 0x22, 0xe8, 0xe4, 0xbd, 0x26, 0xc7, 0xc0, 0x52, 0xff, 0x26, + 0x8a, 0x81, 0xfd, 0xef, 0xb5, 0x47, 0x93, 0xfb, 0x8e, 0x92, 0xbb, 0xce, 0xd2, 0xb3, 0x33, 0x34, + 0x80, 0xa3, 0x1e, 0xab, 0x86, 0x3f, 0x45, 0x3a, 0xc6, 0xf8, 0xf2, 0xb3, 0x29, 0xe2, 0x2c, 0xd6, + 0x06, 0xc7, 0xb6, 0x3d, 0xae, 0x7f, 0xfa, 0xf0, 0xb4, 0xa8, 0x3c, 0x3a, 0x2d, 0x2a, 0x7f, 0x9d, + 0x16, 0x95, 0x6f, 0xcf, 0x8a, 0x99, 0x47, 0x67, 0xc5, 0xcc, 0x1f, 0x67, 0xc5, 0xcc, 0xed, 0x55, + 0x87, 0xc8, 0x46, 0xeb, 0xa0, 0x6a, 0x31, 0x57, 0xdf, 0xa7, 0xfb, 0x94, 0x6c, 0x11, 0xdd, 0x6a, + 0x98, 0x84, 0xea, 0x77, 0xbb, 0xff, 0x76, 0x70, 0xe2, 0xa1, 0x38, 0xc8, 0x05, 0xff, 0xcf, 0x7e, + 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x04, 0x75, 0x04, 0x63, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -839,6 +937,7 @@ type MsgClient interface { // this line is used by starport scaffolding # proto/tx/rpc DepositToVault(ctx context.Context, in *MsgDepositToVault, opts ...grpc.CallOption) (*MsgDepositToVaultResponse, error) WithdrawFromVault(ctx context.Context, in *MsgWithdrawFromVault, opts ...grpc.CallOption) (*MsgWithdrawFromVaultResponse, error) + WithdrawFromVaultWithUnbondingTime(ctx context.Context, in *MsgWithdrawFromVaultWithUnbondingTime, opts ...grpc.CallOption) (*MsgWithdrawFromVaultWithUnbondingTimeResponse, error) CreateVault(ctx context.Context, in *MsgCreateVault, opts ...grpc.CallOption) (*MsgCreateVaultResponse, error) TransferVaultOwnership(ctx context.Context, in *MsgTransferVaultOwnership, opts ...grpc.CallOption) (*MsgTransferVaultOwnershipResponse, error) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) @@ -874,6 +973,15 @@ func (c *msgClient) WithdrawFromVault(ctx context.Context, in *MsgWithdrawFromVa return out, nil } +func (c *msgClient) WithdrawFromVaultWithUnbondingTime(ctx context.Context, in *MsgWithdrawFromVaultWithUnbondingTime, opts ...grpc.CallOption) (*MsgWithdrawFromVaultWithUnbondingTimeResponse, error) { + out := new(MsgWithdrawFromVaultWithUnbondingTimeResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/WithdrawFromVaultWithUnbondingTime", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) CreateVault(ctx context.Context, in *MsgCreateVault, opts ...grpc.CallOption) (*MsgCreateVaultResponse, error) { out := new(MsgCreateVaultResponse) err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/CreateVault", in, out, opts...) @@ -942,6 +1050,7 @@ type MsgServer interface { // this line is used by starport scaffolding # proto/tx/rpc DepositToVault(context.Context, *MsgDepositToVault) (*MsgDepositToVaultResponse, error) WithdrawFromVault(context.Context, *MsgWithdrawFromVault) (*MsgWithdrawFromVaultResponse, error) + WithdrawFromVaultWithUnbondingTime(context.Context, *MsgWithdrawFromVaultWithUnbondingTime) (*MsgWithdrawFromVaultWithUnbondingTimeResponse, error) CreateVault(context.Context, *MsgCreateVault) (*MsgCreateVaultResponse, error) TransferVaultOwnership(context.Context, *MsgTransferVaultOwnership) (*MsgTransferVaultOwnershipResponse, error) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) @@ -961,6 +1070,9 @@ func (*UnimplementedMsgServer) DepositToVault(ctx context.Context, req *MsgDepos func (*UnimplementedMsgServer) WithdrawFromVault(ctx context.Context, req *MsgWithdrawFromVault) (*MsgWithdrawFromVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromVault not implemented") } +func (*UnimplementedMsgServer) WithdrawFromVaultWithUnbondingTime(ctx context.Context, req *MsgWithdrawFromVaultWithUnbondingTime) (*MsgWithdrawFromVaultWithUnbondingTimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromVaultWithUnbondingTime not implemented") +} func (*UnimplementedMsgServer) CreateVault(ctx context.Context, req *MsgCreateVault) (*MsgCreateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateVault not implemented") } @@ -1023,6 +1135,24 @@ func _Msg_WithdrawFromVault_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_WithdrawFromVaultWithUnbondingTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawFromVaultWithUnbondingTime) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).WithdrawFromVaultWithUnbondingTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Msg/WithdrawFromVaultWithUnbondingTime", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).WithdrawFromVaultWithUnbondingTime(ctx, req.(*MsgWithdrawFromVaultWithUnbondingTime)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_CreateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreateVault) if err := dec(in); err != nil { @@ -1161,6 +1291,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "WithdrawFromVault", Handler: _Msg_WithdrawFromVault_Handler, }, + { + MethodName: "WithdrawFromVaultWithUnbondingTime", + Handler: _Msg_WithdrawFromVaultWithUnbondingTime_Handler, + }, { MethodName: "CreateVault", Handler: _Msg_CreateVault_Handler, @@ -1330,6 +1464,74 @@ func (m *MsgWithdrawFromVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *MsgWithdrawFromVaultWithUnbondingTime) 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 *MsgWithdrawFromVaultWithUnbondingTime) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawFromVaultWithUnbondingTime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.LpTokenAmount.Size() + i -= size + if _, err := m.LpTokenAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.VaultId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.VaultId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) 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 *MsgWithdrawFromVaultWithUnbondingTimeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgCreateVault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1974,6 +2176,33 @@ func (m *MsgWithdrawFromVaultResponse) Size() (n int) { return n } +func (m *MsgWithdrawFromVaultWithUnbondingTime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.VaultId != 0 { + n += 1 + sovTx(uint64(m.VaultId)) + } + l = m.LpTokenAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgWithdrawFromVaultWithUnbondingTimeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgCreateVault) Size() (n int) { if m == nil { return 0 @@ -2602,6 +2831,191 @@ func (m *MsgWithdrawFromVaultResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgWithdrawFromVaultWithUnbondingTime) 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: MsgWithdrawFromVaultWithUnbondingTime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawFromVaultWithUnbondingTime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) + } + m.VaultId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VaultId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LpTokenAmount", 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 + } + if err := m.LpTokenAmount.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 *MsgWithdrawFromVaultWithUnbondingTimeResponse) 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: MsgWithdrawFromVaultWithUnbondingTimeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawFromVaultWithUnbondingTimeResponse: 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 *MsgCreateVault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From fe2d644719091efb5eb8f5b542e67ed93b0fdf38 Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 5 Sep 2023 08:29:10 +0800 Subject: [PATCH 05/59] Implement BurnLPTokenAndBeginUnbonding to begin unbonding without any fee and directly giving funds to unbonded user --- x/yieldaggregator/keeper/hooks.go | 4 +- x/yieldaggregator/keeper/lp.go | 40 ++++++++++++++++++- x/yieldaggregator/keeper/lp_test.go | 4 +- ...withdraw_from_vault_with_unbonding_time.go | 4 +- x/yieldaggregator/keeper/strategy.go | 9 +++-- x/yieldaggregator/keeper/strategy_test.go | 4 +- 6 files changed, 52 insertions(+), 13 deletions(-) diff --git a/x/yieldaggregator/keeper/hooks.go b/x/yieldaggregator/keeper/hooks.go index 9e8bc3c41..eab3db6f5 100644 --- a/x/yieldaggregator/keeper/hooks.go +++ b/x/yieldaggregator/keeper/hooks.go @@ -32,11 +32,11 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInf } strategyAmount := sdk.NewDecFromInt(amountToUnbond).Mul(strategyWeight.Weight).RoundInt() cacheCtx, _ := ctx.CacheContext() - err := k.UnstakeFromStrategy(cacheCtx, vault, strategy, strategyAmount) + err := k.UnstakeFromStrategy(cacheCtx, vault, strategy, strategyAmount, "") if err != nil { fmt.Println("Epoch unstaking error", err.Error()) } else { - err = k.UnstakeFromStrategy(ctx, vault, strategy, strategyAmount) + err = k.UnstakeFromStrategy(ctx, vault, strategy, strategyAmount, "") if err != nil { panic(fmt.Sprintln("Epoch unstaking error", err)) } diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index 932576923..e261aa895 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -179,7 +179,7 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va return err } - // Unstake funds from Strategy + // Unstake funds from the vault amountToUnbond := principal.Amount // implement fees on withdrawal @@ -240,3 +240,41 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va return nil } + +func (k Keeper) BurnLPTokenAndBeginUnbonding(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, lpAmount sdkmath.Int) error { + vault, found := k.GetVault(ctx, vaultId) + if !found { + return types.ErrInvalidVaultId + } + + principal := k.EstimateRedeemAmountInternal(ctx, vault.Denom, vaultId, lpAmount) + + // burn lp tokens after calculating withdrawal amount + lpDenom := types.GetLPTokenDenom(vaultId) + lp := sdk.NewCoin(lpDenom, lpAmount) + err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, address, types.ModuleName, sdk.NewCoins(lp)) + if err != nil { + return err + } + err = k.bankKeeper.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(lp)) + if err != nil { + return err + } + + // Unstake funds from Strategy + amountToUnbond := principal.Amount + for _, strategyWeight := range vault.StrategyWeights { + strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + if !found { + continue + } + strategyAmount := sdk.NewDecFromInt(amountToUnbond).Mul(strategyWeight.Weight).RoundInt() + + err = k.UnstakeFromStrategy(ctx, vault, strategy, strategyAmount, address.String()) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 928307e5b..1f91451cd 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -64,7 +64,7 @@ func (suite *KeeperTestSuite) TestVaultAmountUnbondingAmountInStrategies() { suite.Require().Equal(amount.String(), "0") // unstake from strategy - calls redeem stake - err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000)) + err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000), "") suite.Require().NoError(err) // check amounts after unstake @@ -161,7 +161,7 @@ func (suite *KeeperTestSuite) TestVaultAmountTotal() { suite.Require().Equal(amount.String(), "10000000") // unstake from strategy - calls redeem stake - err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000)) + err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000), "") suite.Require().NoError(err) // check amounts after unstake diff --git a/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go b/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go index 762361c76..e40a444fc 100644 --- a/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go +++ b/x/yieldaggregator/keeper/msg_server_withdraw_from_vault_with_unbonding_time.go @@ -15,12 +15,10 @@ func (k msgServer) WithdrawFromVaultWithUnbondingTime(ctx context.Context, msg * return nil, err } - err = k.Keeper.BurnLPTokenAndRedeem(sdkCtx, sender, msg.VaultId, msg.LpTokenAmount) + err = k.Keeper.BurnLPTokenAndBeginUnbonding(sdkCtx, sender, msg.VaultId, msg.LpTokenAmount) if err != nil { return nil, err } - // TODO: if bonded amount < withdraw with unbonding time - execute, otherwise fail - return &types.MsgWithdrawFromVaultWithUnbondingTimeResponse{}, nil } diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index fef4a9cb4..88ca95e6b 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -176,9 +176,12 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ } // unstake worth of withdrawal amount from the strategy -func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy, amount sdk.Int) error { +func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy, amount sdk.Int, recipient string) error { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) + if recipient == "" { + recipient = vaultModAddr.String() + } switch strategy.ContractAddress { case "x/ibc-staking": { @@ -186,7 +189,7 @@ func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy ctx, vaultModAddr, sdk.NewCoin(vault.Denom, amount), - vaultModAddr.String(), + recipient, ) if err != nil { return err @@ -201,7 +204,7 @@ func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy case 0: wasmMsg = fmt.Sprintf(`{"unstake":{"amount":"%s"}}`, amount.String()) default: // case 1+ - wasmMsg = fmt.Sprintf(`{"unstake":{"share_amount":"%s", "recipient": "%s"}}`, amount.String(), vaultModAddr.String()) + wasmMsg = fmt.Sprintf(`{"unstake":{"share_amount":"%s", "recipient": "%s"}}`, amount.String(), recipient) } contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{}) diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 3a41760d4..afe2570d0 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -239,7 +239,7 @@ func (suite *KeeperTestSuite) TestUnstakeFromStrategy() { suite.Require().NoError(err) // unstake from strategy - calls redeem stake - err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000)) + err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000), "") suite.Require().NoError(err) // check the changes @@ -309,7 +309,7 @@ func (suite *KeeperTestSuite) TestGetAmountAndUnbondingAmountFromStrategy() { suite.Require().Equal(amount.String(), "0"+atomIbcDenom) // unstake from strategy - calls redeem stake - err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000)) + err = suite.app.YieldaggregatorKeeper.UnstakeFromStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000), "") suite.Require().NoError(err) // check amounts after unstake From a574d7065720aa4d68f63e722460e03cc00fe62e Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 5 Sep 2023 10:08:12 +0800 Subject: [PATCH 06/59] implement wasmbinding for DeputyDepositToVault --- wasmbinding/message_plugin.go | 65 +++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index d6e0a4845..732dd39f3 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -13,28 +13,31 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/UnUniFi/chain/wasmbinding/bindings" + yieldaggregatorkeeper "github.com/UnUniFi/chain/x/yieldaggregator/keeper" icqkeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/keeper" interchainquerytypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/types" recordskeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/keeper" ) // CustomMessageDecorator returns decorator for custom CosmWasm bindings messages -func CustomMessageDecorator(bank *bankkeeper.BaseKeeper, icqKeeper *icqkeeper.Keeper, recordsKeeper *recordskeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger { +func CustomMessageDecorator(bankKeeper *bankkeeper.BaseKeeper, icqKeeper *icqkeeper.Keeper, recordsKeeper *recordskeeper.Keeper, yieldaggregatorKeeper *yieldaggregatorkeeper.Keeper) func(wasmkeeper.Messenger) wasmkeeper.Messenger { return func(old wasmkeeper.Messenger) wasmkeeper.Messenger { return &CustomMessenger{ - wrapped: old, - bank: bank, - icqKeeper: icqKeeper, - recordsKeeper: recordsKeeper, + wrapped: old, + bankKeeper: bankKeeper, + icqKeeper: icqKeeper, + recordsKeeper: recordsKeeper, + yieldaggregatorKeeper: yieldaggregatorKeeper, } } } type CustomMessenger struct { - wrapped wasmkeeper.Messenger - bank *bankkeeper.BaseKeeper - icqKeeper *icqkeeper.Keeper - recordsKeeper *recordskeeper.Keeper + wrapped wasmkeeper.Messenger + bankKeeper *bankkeeper.BaseKeeper + icqKeeper *icqkeeper.Keeper + recordsKeeper *recordskeeper.Keeper + yieldaggregatorKeeper *yieldaggregatorkeeper.Keeper } var _ wasmkeeper.Messenger = (*CustomMessenger)(nil) @@ -56,14 +59,14 @@ func (m *CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddre return m.ibcTransfer(ctx, contractAddr, contractMsg.IBCTransfer) } if contractMsg.DeputyDepositToVault != nil { - // TODO: + return m.deputyDepositToVault(ctx, contractAddr, contractMsg.DeputyDepositToVault) } } return m.wrapped.DispatchMsg(ctx, contractAddr, contractIBCPortID, msg) } func (m *CustomMessenger) submitICQRequest(ctx sdk.Context, contractAddr sdk.AccAddress, submitICQRequest *bindings.SubmitICQRequest) ([]sdk.Event, [][]byte, error) { - err := PerformSubmitICQRequest(m.icqKeeper, m.bank, ctx, contractAddr, submitICQRequest) + err := PerformSubmitICQRequest(m.icqKeeper, m.bankKeeper, ctx, contractAddr, submitICQRequest) if err != nil { return nil, nil, sdkerrors.Wrap(err, "perform icq request submission") } @@ -128,3 +131,43 @@ func PerformIBCTransfer(f *recordskeeper.Keeper, ctx sdk.Context, contractAddr s } return nil } + +func (m *CustomMessenger) deputyDepositToVault(ctx sdk.Context, contractAddr sdk.AccAddress, deputyDepositToVault *bindings.DeputyDepositToVault) ([]sdk.Event, [][]byte, error) { + err := PerformDeputyDepositToVault(m.bankKeeper, m.yieldaggregatorKeeper, ctx, contractAddr, deputyDepositToVault) + if err != nil { + return nil, nil, sdkerrors.Wrap(err, "perform ibc transfer") + } + return nil, nil, nil +} + +func PerformDeputyDepositToVault(bk *bankkeeper.BaseKeeper, iyaKeeper *yieldaggregatorkeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, deputyDepositToVault *bindings.DeputyDepositToVault) error { + if deputyDepositToVault == nil { + return wasmvmtypes.InvalidRequest{Err: "icq request empty"} + } + + amount, err := wasmkeeper.ConvertWasmCoinToSdkCoin(deputyDepositToVault.Amount) + if err != nil { + return err + } + + depositor, err := sdk.AccAddressFromBech32(deputyDepositToVault.Depositor) + if err != nil { + return err + } + + err = bk.SendCoins(ctx, contractAddr, depositor, sdk.Coins{amount}) + if err != nil { + return sdkerrors.Wrap(err, "sending coins from contract to depositor account") + } + + err = iyaKeeper.DepositAndMintLPToken( + ctx, + depositor, + deputyDepositToVault.VaultId, + amount.Amount, + ) + if err != nil { + return sdkerrors.Wrap(err, "depositing to vault") + } + return nil +} From 30de00d3c12504a1aab1b6c55eb3ba7f3afeeca3 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 6 Sep 2023 20:47:00 +0800 Subject: [PATCH 07/59] Resolve build issue on wasmbinding for additional keeper requirement --- app/keepers/keepers.go | 8 +++++++- wasmbinding/wasm.go | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 73aa9842d..147c73d24 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -422,7 +422,13 @@ func NewAppKeeper( // if we want to allow any custom callbacks availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2" - wasmOpts = append(wasmbinding.RegisterCustomPlugins(&appKeepers.BankKeeper, &appKeepers.InterchainqueryKeeper, &appKeepers.RecordsKeeper), wasmOpts...) + wasmOpts = append( + wasmbinding.RegisterCustomPlugins( + &appKeepers.BankKeeper, + &appKeepers.InterchainqueryKeeper, + &appKeepers.RecordsKeeper, + &appKeepers.YieldaggregatorKeeper), + wasmOpts...) appKeepers.WasmKeeper = wasm.NewKeeper( appCodec, diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index f8fbce59e..315f2d437 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -6,6 +6,7 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + yieldaggregatorkeeper "github.com/UnUniFi/chain/x/yieldaggregator/keeper" interchainquerykeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/keeper" recordskeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/keeper" ) @@ -14,6 +15,7 @@ func RegisterCustomPlugins( bank *bankkeeper.BaseKeeper, icqKeeper *interchainquerykeeper.Keeper, recordsKeeper *recordskeeper.Keeper, + yieldaggregatorKeeper *yieldaggregatorkeeper.Keeper, ) []wasmkeeper.Option { wasmQueryPlugin := NewQueryPlugin() @@ -21,7 +23,7 @@ func RegisterCustomPlugins( Custom: CustomQuerier(wasmQueryPlugin), }) messengerDecoratorOpt := wasmkeeper.WithMessageHandlerDecorator( - CustomMessageDecorator(bank, icqKeeper, recordsKeeper), + CustomMessageDecorator(bank, icqKeeper, recordsKeeper, yieldaggregatorKeeper), ) return []wasm.Option{ From 6406b6208559ffe34d2f212cff2dc218ae3a5aa3 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 6 Sep 2023 22:55:48 +0800 Subject: [PATCH 08/59] Resolve strategy version querier on chain side & strategy query issue on v1 contract --- .../keeper/grpc_query_strategy.go | 75 ++++++++++++++----- x/yieldaggregator/keeper/strategy.go | 10 ++- .../interchainquery/keeper/msg_server.go | 10 ++- .../records/keeper/callback_transfer.go | 10 ++- 4 files changed, 73 insertions(+), 32 deletions(-) diff --git a/x/yieldaggregator/keeper/grpc_query_strategy.go b/x/yieldaggregator/keeper/grpc_query_strategy.go index 498899680..063c939e7 100644 --- a/x/yieldaggregator/keeper/grpc_query_strategy.go +++ b/x/yieldaggregator/keeper/grpc_query_strategy.go @@ -62,33 +62,68 @@ func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) ( wasmQuery := `{"fee":{}}` result, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) if err != nil { - return types.StrategyContainer{}, err + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: math.LegacyZeroDec(), + WithdrawFeeRate: math.LegacyZeroDec(), + PerformanceFeeRate: math.LegacyZeroDec(), + }, nil } jsonMap := make(map[string]string) err = json.Unmarshal(result, &jsonMap) if err != nil { - return types.StrategyContainer{}, err - } - depositFeeRate, err := math.LegacyNewDecFromStr(jsonMap["deposit_fee_rate"]) - if err != nil { - return types.StrategyContainer{}, err - } - withdrawFeeRate, err := math.LegacyNewDecFromStr(jsonMap["withdraw_fee_rate"]) - if err != nil { - return types.StrategyContainer{}, err - } - performanceFeeRate, err := math.LegacyNewDecFromStr(jsonMap["interest_fee_rate"]) - if err != nil { - return types.StrategyContainer{}, err + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: math.LegacyZeroDec(), + WithdrawFeeRate: math.LegacyZeroDec(), + PerformanceFeeRate: math.LegacyZeroDec(), + }, nil } - return types.StrategyContainer{ - Strategy: strategy, - DepositFeeRate: depositFeeRate, - WithdrawFeeRate: withdrawFeeRate, - PerformanceFeeRate: performanceFeeRate, - }, nil + version := k.GetStrategyVersion(ctx, strategy) + + switch version { + case 0: + depositFeeRate, err := math.LegacyNewDecFromStr(jsonMap["deposit_fee_rate"]) + if err != nil { + depositFeeRate = math.LegacyZeroDec() + } + withdrawFeeRate, err := math.LegacyNewDecFromStr(jsonMap["withdraw_fee_rate"]) + if err != nil { + withdrawFeeRate = math.LegacyZeroDec() + } + performanceFeeRate, err := math.LegacyNewDecFromStr(jsonMap["interest_fee_rate"]) + if err != nil { + performanceFeeRate = math.LegacyZeroDec() + } + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: depositFeeRate, + WithdrawFeeRate: withdrawFeeRate, + PerformanceFeeRate: performanceFeeRate, + }, nil + default: // case 1+ + depositFeeRate, err := math.LegacyNewDecFromStr(jsonMap["deposit_fee_rate"]) + if err != nil { + depositFeeRate = math.LegacyZeroDec() + } + withdrawFeeRate, err := math.LegacyNewDecFromStr(jsonMap["withdraw_fee_rate"]) + if err != nil { + withdrawFeeRate = math.LegacyZeroDec() + } + performanceFeeRate, err := math.LegacyNewDecFromStr(jsonMap["performance_fee_rate"]) + if err != nil { + performanceFeeRate = math.LegacyZeroDec() + } + + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: depositFeeRate, + WithdrawFeeRate: withdrawFeeRate, + PerformanceFeeRate: performanceFeeRate, + }, nil + } } func (k Keeper) Strategy(c context.Context, req *types.QueryGetStrategyRequest) (*types.QueryGetStrategyResponse, error) { diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 88ca95e6b..92612dbae 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -4,7 +4,6 @@ import ( "encoding/binary" "encoding/json" "fmt" - "strconv" "strings" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -17,15 +16,18 @@ import ( func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategy types.Strategy) uint8 { wasmQuery := fmt.Sprintf(`{"version":{}}`) contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) - resp, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + result, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) if err != nil { return 0 } - version, err := strconv.Atoi(string(resp)) + + jsonMap := make(map[string]uint8) + err = json.Unmarshal(result, &jsonMap) if err != nil { return 0 } - return uint8(version) + + return jsonMap["version"] } // GetStrategyCount get the total number of Strategy diff --git a/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go b/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go index d026e8ead..7ed755ac5 100644 --- a/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go +++ b/x/yieldaggregator/submodules/interchainquery/keeper/msg_server.go @@ -6,7 +6,6 @@ import ( "fmt" "net/url" "sort" - "strconv" "strings" errorsmod "cosmossdk.io/errors" @@ -109,15 +108,18 @@ func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryRespons func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategyAddr sdk.AccAddress) uint8 { wasmQuery := fmt.Sprintf(`{"version":{}}`) - resp, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) + result, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) if err != nil { return 0 } - version, err := strconv.Atoi(string(resp)) + + jsonMap := make(map[string]uint8) + err = json.Unmarshal(result, &jsonMap) if err != nil { return 0 } - return uint8(version) + + return jsonMap["version"] } // call the query's associated callback function diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index 34068c775..83f84d047 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -3,7 +3,6 @@ package keeper import ( "encoding/json" "fmt" - "strconv" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -71,15 +70,18 @@ func TransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategyAddr sdk.AccAddress) uint8 { wasmQuery := fmt.Sprintf(`{"version":{}}`) - resp, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) + result, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) if err != nil { return 0 } - version, err := strconv.Atoi(string(resp)) + + jsonMap := make(map[string]uint8) + err = json.Unmarshal(result, &jsonMap) if err != nil { return 0 } - return uint8(version) + + return jsonMap["version"] } func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { From 6f16d06ff797cb4c68d65d598f4b06d858f2243d Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 8 Sep 2023 20:39:39 +0800 Subject: [PATCH 09/59] pending changes for supporting multiple denoms on vault --- proto/ununifi/yieldaggregator/query.proto | 19 + proto/ununifi/yieldaggregator/tx.proto | 14 + .../yieldaggregator/yieldaggregator.proto | 7 +- x/yieldaggregator/keeper/denom_symbol_map.go | 42 + .../keeper/grpc_query_denom_symbol.go | 24 + .../keeper/grpc_query_symbol_swap_contract.go | 22 + .../msg_server_register_denom_symbol_map.go | 23 + ...erver_register_symbol_swap_contract_map.go | 23 + .../keeper/symbol_contract_map.go | 42 + x/yieldaggregator/types/keys.go | 10 +- x/yieldaggregator/types/query.pb.go | 839 ++++++++++++-- x/yieldaggregator/types/query.pb.gw.go | 130 +++ x/yieldaggregator/types/tx.pb.go | 1029 +++++++++++++++-- x/yieldaggregator/types/yieldaggregator.pb.go | 338 +++++- 14 files changed, 2297 insertions(+), 265 deletions(-) create mode 100644 x/yieldaggregator/keeper/denom_symbol_map.go create mode 100644 x/yieldaggregator/keeper/grpc_query_denom_symbol.go create mode 100644 x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go create mode 100644 x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go create mode 100644 x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go create mode 100644 x/yieldaggregator/keeper/symbol_contract_map.go diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index f58c15024..aeefd6d11 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -46,6 +46,14 @@ service Query { rpc EstimateRedeemAmount(QueryEstimateRedeemAmountRequest) returns (QueryEstimateRedeemAmountResponse) { option (google.api.http).get = "/ununifi/yieldaggregator/vaults/{id}/estimate-redeem-amount"; } + + rpc DenomSymbolMap(QueryDenomSymbolMapRequest) returns (QueryDenomSymbolMapResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/denom-symbol-map"; + } + + rpc SymbolSwapContractMap(QuerySymbolSwapContractMapRequest) returns (QuerySymbolSwapContractMapResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/symbol-swap-contract-map"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -177,3 +185,14 @@ message QueryEstimateRedeemAmountResponse { cosmos.base.v1beta1.Coin redeem_amount = 3 [(gogoproto.nullable) = false]; cosmos.base.v1beta1.Coin total_amount = 4 [(gogoproto.nullable) = false]; } + +message QueryDenomSymbolMapRequest {} + +message QueryDenomSymbolMapResponse { + repeated Mapping mappings = 1 [(gogoproto.nullable) = false]; +} + +message QuerySymbolSwapContractMapRequest {} +message QuerySymbolSwapContractMapResponse { + repeated Mapping mappings = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index d5bf61e56..63bb83eae 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -26,6 +26,8 @@ service Msg { rpc DeleteVault(MsgDeleteVault) returns (MsgDeleteVaultResponse); rpc UpdateVault(MsgUpdateVault) returns (MsgUpdateVaultResponse); rpc UpdateStrategy(MsgUpdateStrategy) returns (MsgUpdateStrategyResponse); + rpc RegisterDenomSymbolMap(MsgRegisterDenomSymbolMap) returns (MsgRegisterDenomSymbolMapResponse); + rpc RegisterSymbolSwapContractMap(MsgSymbolSwapContractMap) returns (MsgSymbolSwapContractMapResponse); } // this line is used by starport scaffolding # proto/tx/message @@ -183,3 +185,15 @@ message MsgDeleteVault { } message MsgDeleteVaultResponse {} + +message MsgRegisterDenomSymbolMap { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated Mapping mappings = 2 [(gogoproto.nullable) = false]; +} +message MsgRegisterDenomSymbolMapResponse {} + +message MsgSymbolSwapContractMap { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated Mapping mappings = 2 [(gogoproto.nullable) = false]; +} +message MsgSymbolSwapContractMapResponse {} diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 6eb2f9516..152ae2970 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -18,7 +18,7 @@ message StrategyWeight { message Vault { uint64 id = 1; - string denom = 2; + string symbol = 2; // deposit token symbol string name = 3; string description = 4; string owner = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -46,6 +46,11 @@ message Strategy { string git_url = 6; } +message Mapping { + string key = 1; + string value = 2; +} + // Deprecated: Just for v3.2.2 upgrade handler message LegacyVault { uint64 id = 1; diff --git a/x/yieldaggregator/keeper/denom_symbol_map.go b/x/yieldaggregator/keeper/denom_symbol_map.go new file mode 100644 index 000000000..b0379477d --- /dev/null +++ b/x/yieldaggregator/keeper/denom_symbol_map.go @@ -0,0 +1,42 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +// SetDenomSymbolMap set a specific DenomSymbolMap in the store +func (k Keeper) SetDenomSymbolMap(ctx sdk.Context, denom string, symbol string) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) + store.Set([]byte(denom), []byte(symbol)) +} + +// GetDenomSymbolMap returns a DenomSymbolMap from its id +func (k Keeper) GetDenomSymbolMap(ctx sdk.Context, denom string) string { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) + bz := store.Get([]byte(denom)) + if bz == nil { + return "" + } + return string(bz) +} + +// GetAllDenomSymbolMap returns a DenomSymbolMap +func (k Keeper) GetAllDenomSymbolMap(ctx sdk.Context) []types.Mapping { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) + + iterator := sdk.KVStorePrefixIterator(store, nil) + defer iterator.Close() + + mappings := []types.Mapping{} + + for ; iterator.Valid(); iterator.Next() { + mappings = append(mappings, types.Mapping{ + Key: string(iterator.Key()), + Value: string(iterator.Value()), + }) + } + return mappings +} diff --git a/x/yieldaggregator/keeper/grpc_query_denom_symbol.go b/x/yieldaggregator/keeper/grpc_query_denom_symbol.go new file mode 100644 index 000000000..53b21fd2b --- /dev/null +++ b/x/yieldaggregator/keeper/grpc_query_denom_symbol.go @@ -0,0 +1,24 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k Keeper) DenomSymbolMap(c context.Context, req *types.QueryDenomSymbolMapRequest) (*types.QueryDenomSymbolMapResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + return &types.QueryDenomSymbolMapResponse{ + Mappings: k.GetAllDenomSymbolMap(ctx), + }, nil +} + +// rpc RegisterDenomSymbolMap(MsgRegisterDenomSymbolMap) returns (MsgRegisterDenomSymbolMapResponse); diff --git a/x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go b/x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go new file mode 100644 index 000000000..b46bf3f5d --- /dev/null +++ b/x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go @@ -0,0 +1,22 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k Keeper) SymbolSwapContractMap(c context.Context, req *types.QuerySymbolSwapContractMapRequest) (*types.QuerySymbolSwapContractMapResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + return &types.QuerySymbolSwapContractMapResponse{ + Mappings: k.GetAllSymbolSwapContractMap(ctx), + }, nil +} diff --git a/x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go b/x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go new file mode 100644 index 000000000..78e9a52eb --- /dev/null +++ b/x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k msgServer) RegisterDenomSymbolMap(ctx context.Context, msg *types.MsgRegisterDenomSymbolMap) (*types.MsgRegisterDenomSymbolMapResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if k.authority != msg.Sender { + return nil, sdkerrors.ErrUnauthorized + } + + for _, dsm := range msg.Mappings { + k.SetDenomSymbolMap(sdkCtx, dsm.Key, dsm.Value) + } + + return &types.MsgRegisterDenomSymbolMapResponse{}, nil +} diff --git a/x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go b/x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go new file mode 100644 index 000000000..1bcd98b3a --- /dev/null +++ b/x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go @@ -0,0 +1,23 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k msgServer) RegisterSymbolSwapContractMap(ctx context.Context, msg *types.MsgSymbolSwapContractMap) (*types.MsgSymbolSwapContractMapResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if k.authority != msg.Sender { + return nil, sdkerrors.ErrUnauthorized + } + + for _, dsm := range msg.Mappings { + k.SetSymbolSwapContractMap(sdkCtx, dsm.Key, dsm.Value) + } + + return &types.MsgSymbolSwapContractMapResponse{}, nil +} diff --git a/x/yieldaggregator/keeper/symbol_contract_map.go b/x/yieldaggregator/keeper/symbol_contract_map.go new file mode 100644 index 000000000..97dbddf7e --- /dev/null +++ b/x/yieldaggregator/keeper/symbol_contract_map.go @@ -0,0 +1,42 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +// SetSymbolSwapContractMap set a specific SymbolSwapContractMap in the store +func (k Keeper) SetSymbolSwapContractMap(ctx sdk.Context, symbol string, contract string) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) + store.Set([]byte(symbol), []byte(contract)) +} + +// GetSymbolSwapContractMap returns a SymbolSwapContractMap from its id +func (k Keeper) GetSymbolSwapContractMap(ctx sdk.Context, symbol string) string { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) + bz := store.Get([]byte(symbol)) + if bz == nil { + return "" + } + return string(bz) +} + +// GetAllSymbolSwapContractMap returns a SymbolSwapContractMap +func (k Keeper) GetAllSymbolSwapContractMap(ctx sdk.Context) []types.Mapping { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) + + iterator := sdk.KVStorePrefixIterator(store, nil) + defer iterator.Close() + + mappings := []types.Mapping{} + + for ; iterator.Valid(); iterator.Next() { + mappings = append(mappings, types.Mapping{ + Key: string(iterator.Key()), + Value: string(iterator.Value()), + }) + } + return mappings +} diff --git a/x/yieldaggregator/types/keys.go b/x/yieldaggregator/types/keys.go index f32964e07..f2dc1f2ac 100644 --- a/x/yieldaggregator/types/keys.go +++ b/x/yieldaggregator/types/keys.go @@ -25,10 +25,12 @@ var ( ) const ( - VaultKey = "Vault/value/" - VaultCountKey = "Vault/count/" - StrategyKey = "Strategy/value/" - StrategyCountKey = "Strategy/count/" + VaultKey = "Vault/value/" + VaultCountKey = "Vault/count/" + StrategyKey = "Strategy/value/" + StrategyCountKey = "Strategy/count/" + DenomSymbolMapKey = "Denom/symbol/" + SymbolContractMapKey = "Symbol/contract/" ) func KeyPrefixStrategy(vaultDenom string) []byte { diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index d8623152a..8b701f389 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -909,6 +909,166 @@ func (m *QueryEstimateRedeemAmountResponse) GetTotalAmount() types.Coin { return types.Coin{} } +type QueryDenomSymbolMapRequest struct { +} + +func (m *QueryDenomSymbolMapRequest) Reset() { *m = QueryDenomSymbolMapRequest{} } +func (m *QueryDenomSymbolMapRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomSymbolMapRequest) ProtoMessage() {} +func (*QueryDenomSymbolMapRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{18} +} +func (m *QueryDenomSymbolMapRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomSymbolMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomSymbolMapRequest.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 *QueryDenomSymbolMapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomSymbolMapRequest.Merge(m, src) +} +func (m *QueryDenomSymbolMapRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomSymbolMapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomSymbolMapRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomSymbolMapRequest proto.InternalMessageInfo + +type QueryDenomSymbolMapResponse struct { + Mappings []Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"` +} + +func (m *QueryDenomSymbolMapResponse) Reset() { *m = QueryDenomSymbolMapResponse{} } +func (m *QueryDenomSymbolMapResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomSymbolMapResponse) ProtoMessage() {} +func (*QueryDenomSymbolMapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{19} +} +func (m *QueryDenomSymbolMapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryDenomSymbolMapResponse.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 *QueryDenomSymbolMapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomSymbolMapResponse.Merge(m, src) +} +func (m *QueryDenomSymbolMapResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryDenomSymbolMapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomSymbolMapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryDenomSymbolMapResponse proto.InternalMessageInfo + +func (m *QueryDenomSymbolMapResponse) GetMappings() []Mapping { + if m != nil { + return m.Mappings + } + return nil +} + +type QuerySymbolSwapContractMapRequest struct { +} + +func (m *QuerySymbolSwapContractMapRequest) Reset() { *m = QuerySymbolSwapContractMapRequest{} } +func (m *QuerySymbolSwapContractMapRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySymbolSwapContractMapRequest) ProtoMessage() {} +func (*QuerySymbolSwapContractMapRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{20} +} +func (m *QuerySymbolSwapContractMapRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySymbolSwapContractMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySymbolSwapContractMapRequest.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 *QuerySymbolSwapContractMapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySymbolSwapContractMapRequest.Merge(m, src) +} +func (m *QuerySymbolSwapContractMapRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySymbolSwapContractMapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySymbolSwapContractMapRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySymbolSwapContractMapRequest proto.InternalMessageInfo + +type QuerySymbolSwapContractMapResponse struct { + Mappings []Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"` +} + +func (m *QuerySymbolSwapContractMapResponse) Reset() { *m = QuerySymbolSwapContractMapResponse{} } +func (m *QuerySymbolSwapContractMapResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySymbolSwapContractMapResponse) ProtoMessage() {} +func (*QuerySymbolSwapContractMapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{21} +} +func (m *QuerySymbolSwapContractMapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySymbolSwapContractMapResponse.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 *QuerySymbolSwapContractMapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySymbolSwapContractMapResponse.Merge(m, src) +} +func (m *QuerySymbolSwapContractMapResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySymbolSwapContractMapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySymbolSwapContractMapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySymbolSwapContractMapResponse proto.InternalMessageInfo + +func (m *QuerySymbolSwapContractMapResponse) GetMappings() []Mapping { + if m != nil { + return m.Mappings + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.yieldaggregator.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.yieldaggregator.QueryParamsResponse") @@ -928,6 +1088,10 @@ func init() { proto.RegisterType((*QueryEstimateMintAmountResponse)(nil), "ununifi.yieldaggregator.QueryEstimateMintAmountResponse") proto.RegisterType((*QueryEstimateRedeemAmountRequest)(nil), "ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest") proto.RegisterType((*QueryEstimateRedeemAmountResponse)(nil), "ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse") + proto.RegisterType((*QueryDenomSymbolMapRequest)(nil), "ununifi.yieldaggregator.QueryDenomSymbolMapRequest") + proto.RegisterType((*QueryDenomSymbolMapResponse)(nil), "ununifi.yieldaggregator.QueryDenomSymbolMapResponse") + proto.RegisterType((*QuerySymbolSwapContractMapRequest)(nil), "ununifi.yieldaggregator.QuerySymbolSwapContractMapRequest") + proto.RegisterType((*QuerySymbolSwapContractMapResponse)(nil), "ununifi.yieldaggregator.QuerySymbolSwapContractMapResponse") } func init() { @@ -935,85 +1099,94 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1247 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x3a, 0x7f, 0xd4, 0x3e, 0xb7, 0xa5, 0x9d, 0x3a, 0x34, 0x35, 0xc8, 0x4e, 0xb6, 0x6d, - 0x12, 0x25, 0xb5, 0x37, 0x09, 0x07, 0x68, 0x42, 0x81, 0x38, 0x69, 0x42, 0x51, 0x91, 0x82, 0x43, - 0x8a, 0x44, 0x05, 0xd6, 0xd8, 0x3b, 0x59, 0x8f, 0x6a, 0xcf, 0xb8, 0xbb, 0xe3, 0x04, 0xab, 0xea, - 0x05, 0xae, 0x1c, 0x10, 0x70, 0x47, 0x48, 0x48, 0x7c, 0x81, 0xf2, 0x1d, 0x2a, 0x4e, 0x55, 0x91, - 0x10, 0xe2, 0x50, 0xa1, 0xa4, 0x5f, 0x82, 0x1b, 0xda, 0x99, 0x59, 0xc7, 0x6b, 0xc7, 0xf6, 0x3a, - 0xca, 0x91, 0x5b, 0x3c, 0xfb, 0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d, 0xbe, - 0xe0, 0x50, 0x51, 0xae, 0x17, 0xb3, 0x25, 0x5e, 0xb5, 0x76, 0xd8, 0x0e, 0xa3, 0x1b, 0xd4, 0x2a, - 0x95, 0x31, 0x65, 0xd6, 0x57, 0x1d, 0x81, 0x44, 0xa3, 0x46, 0xbc, 0xe2, 0x98, 0xfc, 0xdf, 0xc6, - 0x5b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x8a, 0x58, 0xfc, 0x0b, 0x12, 0x00, 0x00, + // 1389 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x6f, 0x13, 0x57, + 0x14, 0xce, 0x38, 0x0f, 0x85, 0x13, 0x48, 0xe1, 0xe2, 0x94, 0x60, 0x90, 0x93, 0x0c, 0xaf, 0x94, + 0x60, 0x0f, 0x86, 0x4a, 0x2d, 0x50, 0xda, 0xe6, 0x41, 0x28, 0x15, 0x48, 0xd4, 0x29, 0x54, 0x2a, + 0x6a, 0xad, 0x6b, 0xfb, 0x66, 0x7c, 0x85, 0xe7, 0xde, 0x61, 0xe6, 0x9a, 0xd4, 0x42, 0x6c, 0x58, + 0x77, 0x51, 0xb5, 0xdd, 0x57, 0x95, 0x2a, 0x75, 0xd7, 0x15, 0xfd, 0x0f, 0xa8, 0xdd, 0x20, 0x2a, + 0x55, 0x55, 0x17, 0xa8, 0x22, 0xfc, 0x89, 0xee, 0xaa, 0xb9, 0x0f, 0xc7, 0xaf, 0xf1, 0x23, 0xca, + 0xb2, 0xbb, 0x78, 0xe6, 0x9c, 0xef, 0x7c, 0xe7, 0x9c, 0xef, 0xde, 0x73, 0x26, 0x70, 0xa2, 0xc6, + 0x6a, 0x8c, 0x6e, 0x52, 0xa7, 0x4e, 0x49, 0xb5, 0x8c, 0x5d, 0x37, 0x20, 0x2e, 0x16, 0x3c, 0x70, + 0x1e, 0xd4, 0x48, 0x50,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0x0e, 0x96, 0x89, 0xcf, 0x43, 0x2a, 0x0a, + 0x9b, 0x84, 0x14, 0xa2, 0xa7, 0xfa, 0xa8, 0xe4, 0xb4, 0xda, 0x8e, 0x75, 0xaa, 0xed, 0x26, 0x71, + 0x71, 0xa9, 0xbe, 0x46, 0x4a, 0x4d, 0x9a, 0x5b, 0x23, 0xa5, 0xfc, 0xb4, 0x86, 0x5a, 0x27, 0x24, + 0x8f, 0x05, 0x41, 0x5f, 0xc0, 0xa1, 0x86, 0x94, 0x1b, 0xe8, 0xa3, 0xbb, 0x45, 0x6f, 0x28, 0xda, + 0xc0, 0x97, 0x20, 0xe9, 0x93, 0x60, 0x93, 0x07, 0x1e, 0x66, 0x25, 0xb2, 0x13, 0x61, 0x6c, 0xb7, + 0x11, 0x50, 0x13, 0x9c, 0x0e, 0x62, 0x57, 0xb4, 0xe6, 0x5a, 0x9a, 0xa7, 0x35, 0x77, 0xb3, 0xa3, + 0x03, 0xc3, 0x2b, 0xae, 0x81, 0x60, 0x7f, 0x06, 0x69, 0x19, 0xe9, 0x5a, 0x28, 0xa8, 0x87, 0x05, + 0xb9, 0x45, 0x99, 0x50, 0x77, 0x42, 0xcc, 0x05, 0x8a, 0x4e, 0x81, 0xa9, 0x78, 0xcb, 0x2d, 0x97, + 0x3f, 0xa0, 0x9f, 0x2a, 0x6f, 0xbb, 0x04, 0x73, 0xb1, 0xc0, 0x3a, 0x93, 0x0f, 0x61, 0xca, 0xa3, + 0xac, 0x01, 0xa3, 0x92, 0x39, 0xda, 0x22, 0x76, 0x23, 0xf3, 0x55, 0x4e, 0x99, 0x39, 0x2d, 0x5e, + 0x03, 0xc9, 0xde, 0x80, 0xf9, 0x96, 0x20, 0x79, 0x52, 0x26, 0xc4, 0xeb, 0xcd, 0x7f, 0x0e, 0xa6, + 0x8a, 0xb5, 0x80, 0xb5, 0x92, 0x87, 0xe8, 0x91, 0x06, 0xfd, 0x29, 0xa1, 0xe7, 0x5f, 0x77, 0x54, + 0x4d,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0x75, 0x4a, 0xab, 0x32, 0xa5, + 0xab, 0xe8, 0xca, 0x70, 0x29, 0xa9, 0xc1, 0x66, 0x92, 0xfa, 0xc5, 0x82, 0xe9, 0xd6, 0x99, 0x83, + 0x2e, 0xf6, 0xe6, 0xd4, 0x75, 0x7e, 0xa5, 0xde, 0x1e, 0xce, 0x49, 0xa7, 0x90, 0x93, 0x29, 0x2c, + 0xa1, 0xb7, 0x62, 0x53, 0x90, 0xbb, 0x76, 0x26, 0x94, 0x9e, 0x19, 0x0f, 0xfb, 0xe8, 0x77, 0x0b, + 0x66, 0xba, 0x0e, 0xa7, 0x7e, 0x17, 0x61, 0xaf, 0xb1, 0xd7, 0xef, 0x22, 0xec, 0x39, 0x0d, 0xed, + 0x4b, 0x32, 0x8b, 0x8b, 0x28, 0x17, 0x7f, 0x2e, 0x14, 0xff, 0x70, 0x0b, 0xfb, 0x99, 0x92, 0x46, + 0x88, 0xb2, 0x59, 0xf9, 0xf8, 0xd9, 0xab, 0xb4, 0xf5, 0xfc, 0x55, 0xda, 0xfa, 0xe7, 0x55, 0xda, + 0xfa, 0x66, 0x3b, 0x3d, 0xf2, 0x7c, 0x3b, 0x3d, 0xf2, 0xd7, 0x76, 0x7a, 0xe4, 0xf3, 0xf3, 0x2e, + 0x15, 0x95, 0x5a, 0x31, 0x5b, 0xe2, 0x9e, 0x73, 0x87, 0xdd, 0x61, 0x74, 0x9d, 0x3a, 0xa5, 0x0a, + 0xa6, 0xcc, 0xf9, 0xaa, 0x03, 0x5e, 0xd4, 0x7d, 0x12, 0x16, 0x27, 0xe4, 0xbf, 0xda, 0x2e, 0xfe, + 0x17, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x52, 0xf7, 0x70, 0x9a, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1038,6 +1211,8 @@ type QueryClient interface { Strategy(ctx context.Context, in *QueryGetStrategyRequest, opts ...grpc.CallOption) (*QueryGetStrategyResponse, error) EstimateMintAmount(ctx context.Context, in *QueryEstimateMintAmountRequest, opts ...grpc.CallOption) (*QueryEstimateMintAmountResponse, error) EstimateRedeemAmount(ctx context.Context, in *QueryEstimateRedeemAmountRequest, opts ...grpc.CallOption) (*QueryEstimateRedeemAmountResponse, error) + DenomSymbolMap(ctx context.Context, in *QueryDenomSymbolMapRequest, opts ...grpc.CallOption) (*QueryDenomSymbolMapResponse, error) + SymbolSwapContractMap(ctx context.Context, in *QuerySymbolSwapContractMapRequest, opts ...grpc.CallOption) (*QuerySymbolSwapContractMapResponse, error) } type queryClient struct { @@ -1120,6 +1295,24 @@ func (c *queryClient) EstimateRedeemAmount(ctx context.Context, in *QueryEstimat return out, nil } +func (c *queryClient) DenomSymbolMap(ctx context.Context, in *QueryDenomSymbolMapRequest, opts ...grpc.CallOption) (*QueryDenomSymbolMapResponse, error) { + out := new(QueryDenomSymbolMapResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/DenomSymbolMap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SymbolSwapContractMap(ctx context.Context, in *QuerySymbolSwapContractMapRequest, opts ...grpc.CallOption) (*QuerySymbolSwapContractMapResponse, error) { + out := new(QuerySymbolSwapContractMapResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/SymbolSwapContractMap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1132,6 +1325,8 @@ type QueryServer interface { Strategy(context.Context, *QueryGetStrategyRequest) (*QueryGetStrategyResponse, error) EstimateMintAmount(context.Context, *QueryEstimateMintAmountRequest) (*QueryEstimateMintAmountResponse, error) EstimateRedeemAmount(context.Context, *QueryEstimateRedeemAmountRequest) (*QueryEstimateRedeemAmountResponse, error) + DenomSymbolMap(context.Context, *QueryDenomSymbolMapRequest) (*QueryDenomSymbolMapResponse, error) + SymbolSwapContractMap(context.Context, *QuerySymbolSwapContractMapRequest) (*QuerySymbolSwapContractMapResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1162,6 +1357,12 @@ func (*UnimplementedQueryServer) EstimateMintAmount(ctx context.Context, req *Qu func (*UnimplementedQueryServer) EstimateRedeemAmount(ctx context.Context, req *QueryEstimateRedeemAmountRequest) (*QueryEstimateRedeemAmountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EstimateRedeemAmount not implemented") } +func (*UnimplementedQueryServer) DenomSymbolMap(ctx context.Context, req *QueryDenomSymbolMapRequest) (*QueryDenomSymbolMapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomSymbolMap not implemented") +} +func (*UnimplementedQueryServer) SymbolSwapContractMap(ctx context.Context, req *QuerySymbolSwapContractMapRequest) (*QuerySymbolSwapContractMapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SymbolSwapContractMap not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1311,6 +1512,42 @@ func _Query_EstimateRedeemAmount_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Query_DenomSymbolMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomSymbolMapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).DenomSymbolMap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Query/DenomSymbolMap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).DenomSymbolMap(ctx, req.(*QueryDenomSymbolMapRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SymbolSwapContractMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySymbolSwapContractMapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SymbolSwapContractMap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Query/SymbolSwapContractMap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SymbolSwapContractMap(ctx, req.(*QuerySymbolSwapContractMapRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.yieldaggregator.Query", HandlerType: (*QueryServer)(nil), @@ -1347,6 +1584,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "EstimateRedeemAmount", Handler: _Query_EstimateRedeemAmount_Handler, }, + { + MethodName: "DenomSymbolMap", + Handler: _Query_DenomSymbolMap_Handler, + }, + { + MethodName: "SymbolSwapContractMap", + Handler: _Query_SymbolSwapContractMap_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/yieldaggregator/query.proto", @@ -2115,6 +2360,126 @@ func (m *QueryEstimateRedeemAmountResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } +func (m *QueryDenomSymbolMapRequest) 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 *QueryDenomSymbolMapRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomSymbolMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryDenomSymbolMapResponse) 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 *QueryDenomSymbolMapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Mappings) > 0 { + for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QuerySymbolSwapContractMapRequest) 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 *QuerySymbolSwapContractMapRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySymbolSwapContractMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySymbolSwapContractMapResponse) 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 *QuerySymbolSwapContractMapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySymbolSwapContractMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Mappings) > 0 { + for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2398,6 +2763,54 @@ func (m *QueryEstimateRedeemAmountResponse) Size() (n int) { return n } +func (m *QueryDenomSymbolMapRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryDenomSymbolMapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Mappings) > 0 { + for _, e := range m.Mappings { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySymbolSwapContractMapRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySymbolSwapContractMapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Mappings) > 0 { + for _, e := range m.Mappings { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4456,6 +4869,274 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryDenomSymbolMapRequest) 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 ErrIntOverflowQuery + } + 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: QueryDenomSymbolMapRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomSymbolMapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryDenomSymbolMapResponse) 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 ErrIntOverflowQuery + } + 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: QueryDenomSymbolMapResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryDenomSymbolMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mappings = append(m.Mappings, Mapping{}) + if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySymbolSwapContractMapRequest) 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 ErrIntOverflowQuery + } + 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: QuerySymbolSwapContractMapRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySymbolSwapContractMapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySymbolSwapContractMapResponse) 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 ErrIntOverflowQuery + } + 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: QuerySymbolSwapContractMapResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySymbolSwapContractMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mappings = append(m.Mappings, Mapping{}) + if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/types/query.pb.gw.go b/x/yieldaggregator/types/query.pb.gw.go index 3f5d05880..035bb80f6 100644 --- a/x/yieldaggregator/types/query.pb.gw.go +++ b/x/yieldaggregator/types/query.pb.gw.go @@ -447,6 +447,42 @@ func local_request_Query_EstimateRedeemAmount_0(ctx context.Context, marshaler r } +func request_Query_DenomSymbolMap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomSymbolMapRequest + var metadata runtime.ServerMetadata + + msg, err := client.DenomSymbolMap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_DenomSymbolMap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomSymbolMapRequest + var metadata runtime.ServerMetadata + + msg, err := server.DenomSymbolMap(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_SymbolSwapContractMap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySymbolSwapContractMapRequest + var metadata runtime.ServerMetadata + + msg, err := client.SymbolSwapContractMap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SymbolSwapContractMap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySymbolSwapContractMapRequest + var metadata runtime.ServerMetadata + + msg, err := server.SymbolSwapContractMap(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -637,6 +673,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_DenomSymbolMap_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_Query_DenomSymbolMap_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_Query_DenomSymbolMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SymbolSwapContractMap_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_Query_SymbolSwapContractMap_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_Query_SymbolSwapContractMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -838,6 +920,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_DenomSymbolMap_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_Query_DenomSymbolMap_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_DenomSymbolMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_SymbolSwapContractMap_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_Query_SymbolSwapContractMap_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SymbolSwapContractMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -857,6 +979,10 @@ var ( pattern_Query_EstimateMintAmount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"ununifi", "yieldaggregator", "vaults", "id", "estimate-mint-amount"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_EstimateRedeemAmount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"ununifi", "yieldaggregator", "vaults", "id", "estimate-redeem-amount"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_DenomSymbolMap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "denom-symbol-map"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_SymbolSwapContractMap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "symbol-swap-contract-map"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -875,4 +1001,8 @@ var ( forward_Query_EstimateMintAmount_0 = runtime.ForwardResponseMessage forward_Query_EstimateRedeemAmount_0 = runtime.ForwardResponseMessage + + forward_Query_DenomSymbolMap_0 = runtime.ForwardResponseMessage + + forward_Query_SymbolSwapContractMap_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 9f95e58b5..83c117889 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -822,6 +822,182 @@ func (m *MsgDeleteVaultResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeleteVaultResponse proto.InternalMessageInfo +type MsgRegisterDenomSymbolMap struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Mappings []Mapping `protobuf:"bytes,2,rep,name=mappings,proto3" json:"mappings"` +} + +func (m *MsgRegisterDenomSymbolMap) Reset() { *m = MsgRegisterDenomSymbolMap{} } +func (m *MsgRegisterDenomSymbolMap) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterDenomSymbolMap) ProtoMessage() {} +func (*MsgRegisterDenomSymbolMap) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{20} +} +func (m *MsgRegisterDenomSymbolMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterDenomSymbolMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterDenomSymbolMap.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 *MsgRegisterDenomSymbolMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterDenomSymbolMap.Merge(m, src) +} +func (m *MsgRegisterDenomSymbolMap) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterDenomSymbolMap) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterDenomSymbolMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterDenomSymbolMap proto.InternalMessageInfo + +func (m *MsgRegisterDenomSymbolMap) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgRegisterDenomSymbolMap) GetMappings() []Mapping { + if m != nil { + return m.Mappings + } + return nil +} + +type MsgRegisterDenomSymbolMapResponse struct { +} + +func (m *MsgRegisterDenomSymbolMapResponse) Reset() { *m = MsgRegisterDenomSymbolMapResponse{} } +func (m *MsgRegisterDenomSymbolMapResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterDenomSymbolMapResponse) ProtoMessage() {} +func (*MsgRegisterDenomSymbolMapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{21} +} +func (m *MsgRegisterDenomSymbolMapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.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 *MsgRegisterDenomSymbolMapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.Merge(m, src) +} +func (m *MsgRegisterDenomSymbolMapResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterDenomSymbolMapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterDenomSymbolMapResponse proto.InternalMessageInfo + +type MsgSymbolSwapContractMap struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Mappings []Mapping `protobuf:"bytes,2,rep,name=mappings,proto3" json:"mappings"` +} + +func (m *MsgSymbolSwapContractMap) Reset() { *m = MsgSymbolSwapContractMap{} } +func (m *MsgSymbolSwapContractMap) String() string { return proto.CompactTextString(m) } +func (*MsgSymbolSwapContractMap) ProtoMessage() {} +func (*MsgSymbolSwapContractMap) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{22} +} +func (m *MsgSymbolSwapContractMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSymbolSwapContractMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSymbolSwapContractMap.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 *MsgSymbolSwapContractMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSymbolSwapContractMap.Merge(m, src) +} +func (m *MsgSymbolSwapContractMap) XXX_Size() int { + return m.Size() +} +func (m *MsgSymbolSwapContractMap) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSymbolSwapContractMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSymbolSwapContractMap proto.InternalMessageInfo + +func (m *MsgSymbolSwapContractMap) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgSymbolSwapContractMap) GetMappings() []Mapping { + if m != nil { + return m.Mappings + } + return nil +} + +type MsgSymbolSwapContractMapResponse struct { +} + +func (m *MsgSymbolSwapContractMapResponse) Reset() { *m = MsgSymbolSwapContractMapResponse{} } +func (m *MsgSymbolSwapContractMapResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSymbolSwapContractMapResponse) ProtoMessage() {} +func (*MsgSymbolSwapContractMapResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{23} +} +func (m *MsgSymbolSwapContractMapResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSymbolSwapContractMapResponse.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 *MsgSymbolSwapContractMapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSymbolSwapContractMapResponse.Merge(m, src) +} +func (m *MsgSymbolSwapContractMapResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSymbolSwapContractMapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSymbolSwapContractMapResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSymbolSwapContractMapResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgDepositToVault)(nil), "ununifi.yieldaggregator.MsgDepositToVault") proto.RegisterType((*MsgDepositToVaultResponse)(nil), "ununifi.yieldaggregator.MsgDepositToVaultResponse") @@ -843,83 +1019,94 @@ func init() { proto.RegisterType((*MsgUpdateStrategyResponse)(nil), "ununifi.yieldaggregator.MsgUpdateStrategyResponse") proto.RegisterType((*MsgDeleteVault)(nil), "ununifi.yieldaggregator.MsgDeleteVault") proto.RegisterType((*MsgDeleteVaultResponse)(nil), "ununifi.yieldaggregator.MsgDeleteVaultResponse") + proto.RegisterType((*MsgRegisterDenomSymbolMap)(nil), "ununifi.yieldaggregator.MsgRegisterDenomSymbolMap") + proto.RegisterType((*MsgRegisterDenomSymbolMapResponse)(nil), "ununifi.yieldaggregator.MsgRegisterDenomSymbolMapResponse") + proto.RegisterType((*MsgSymbolSwapContractMap)(nil), "ununifi.yieldaggregator.MsgSymbolSwapContractMap") + proto.RegisterType((*MsgSymbolSwapContractMapResponse)(nil), "ununifi.yieldaggregator.MsgSymbolSwapContractMapResponse") } func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1135 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0x55, - 0x10, 0xf6, 0x26, 0x8e, 0x53, 0x4f, 0x20, 0x69, 0x37, 0x49, 0xb3, 0x71, 0xc0, 0x31, 0x06, 0x14, - 0x13, 0x88, 0x37, 0x31, 0xbf, 0x44, 0x25, 0x90, 0x9a, 0x44, 0x91, 0x82, 0x88, 0x40, 0x9b, 0x84, - 0xa2, 0x5e, 0xac, 0xcd, 0xee, 0x64, 0xfd, 0xa8, 0xf7, 0xbd, 0xd5, 0x7b, 0xcf, 0x49, 0x73, 0xe5, - 0xd4, 0x23, 0x37, 0xae, 0xfd, 0x03, 0x10, 0xe2, 0x50, 0x8e, 0xdc, 0xcb, 0x01, 0x51, 0x7a, 0x42, - 0x1c, 0x2a, 0x94, 0x1c, 0xe0, 0xc0, 0x1f, 0x81, 0xf6, 0x87, 0xb7, 0x1b, 0xdb, 0xeb, 0x3a, 0x6e, - 0x2a, 0x71, 0xaa, 0x77, 0xdf, 0x37, 0xdf, 0xcc, 0x37, 0x6f, 0x66, 0x76, 0x1a, 0x28, 0xb5, 0x68, - 0x8b, 0x92, 0x43, 0xa2, 0x9f, 0x10, 0x6c, 0xda, 0xa6, 0xe3, 0x70, 0x74, 0x4c, 0xc9, 0xb8, 0x2e, - 0xef, 0x56, 0x3d, 0xce, 0x24, 0x53, 0xe7, 0x22, 0x44, 0xb5, 0x03, 0x51, 0x98, 0x71, 0x98, 0xc3, - 0x02, 0x8c, 0xee, 0xff, 0x0a, 0xe1, 0x85, 0x39, 0x8b, 0x09, 0x97, 0x09, 0xdd, 0x15, 0x8e, 0x7e, - 0xb4, 0xe6, 0xff, 0x13, 0x1d, 0xcc, 0x87, 0x07, 0xf5, 0xd0, 0x22, 0x7c, 0x88, 0x8e, 0x8a, 0x91, - 0xcd, 0x81, 0x29, 0x50, 0x3f, 0x5a, 0x3b, 0x40, 0x69, 0xae, 0xe9, 0x16, 0x23, 0x34, 0x3a, 0x5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, 0x94, 0x6c, 0x11, 0xdd, 0x6a, - 0x98, 0x84, 0xea, 0x77, 0xbb, 0xff, 0x76, 0x70, 0xe2, 0xa1, 0x38, 0xc8, 0x05, 0xff, 0xcf, 0x7e, - 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x61, 0x04, 0x75, 0x04, 0x63, 0x10, 0x00, 0x00, + // 1240 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xf6, 0x26, 0x8e, 0xd3, 0x8c, 0x21, 0x69, 0x37, 0x69, 0xb3, 0x71, 0xa9, 0x63, 0x0c, 0x28, + 0xa6, 0x10, 0x6f, 0x6c, 0xbe, 0xd4, 0x4a, 0x20, 0x35, 0x89, 0x22, 0x05, 0x61, 0x81, 0x36, 0x09, + 0x45, 0xbd, 0x58, 0xeb, 0xdd, 0xc9, 0x7a, 0xa8, 0x77, 0x66, 0x35, 0x33, 0x4e, 0xea, 0x2b, 0xa7, + 0x5e, 0x90, 0xca, 0x89, 0x6b, 0x7f, 0x00, 0x42, 0x1c, 0xca, 0x7f, 0x28, 0x07, 0x44, 0xe9, 0xa9, + 0xe2, 0x50, 0xa1, 0xe4, 0x00, 0x07, 0x7e, 0x04, 0xda, 0x9d, 0xf5, 0xd4, 0x1f, 0xbb, 0x5b, 0xdb, + 0x4d, 0x05, 0x27, 0x7b, 0x77, 0x9e, 0xf7, 0xe3, 0x79, 0xe7, 0xfd, 0xd2, 0x82, 0x42, 0x1b, 0xb7, + 0x31, 0x3a, 0x44, 0x7a, 0x07, 0xc1, 0x96, 0x6d, 0x3a, 0x0e, 0x85, 0x8e, 0xc9, 0x09, 0xd5, 0xf9, + 0x9d, 0xb2, 0x47, 0x09, 0x27, 0xea, 0x72, 0x88, 0x28, 0x0f, 0x20, 0x72, 0x4b, 0x0e, 0x71, 0x48, + 0x80,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0x70, 0xa3, 0x12, 0x86, + 0xe5, 0xf2, 0x70, 0x58, 0x3e, 0x83, 0x8e, 0x69, 0x75, 0xb6, 0xa1, 0xd5, 0x13, 0x9c, 0x6d, 0x68, + 0x19, 0xf3, 0xcf, 0x34, 0x19, 0x26, 0x87, 0x2a, 0x04, 0x17, 0x8f, 0xc3, 0xd0, 0xd4, 0x29, 0x64, + 0x90, 0x1e, 0x41, 0x61, 0x21, 0x33, 0xa9, 0x85, 0xc5, 0xae, 0x3e, 0x43, 0xa8, 0x0b, 0xcc, 0x7c, + 0x05, 0xce, 0x33, 0xee, 0xeb, 0x75, 0x3a, 0xf5, 0x63, 0x88, 0x9c, 0x26, 0x67, 0xda, 0x6c, 0x61, + 0xba, 0x94, 0xad, 0xae, 0x95, 0x63, 0x3a, 0x60, 0x79, 0x2f, 0x14, 0xb8, 0x19, 0xe0, 0xc3, 0x1a, + 0x5e, 0x60, 0x7d, 0x6f, 0x99, 0x5a, 0x01, 0xd3, 0x87, 0x10, 0x6a, 0xe7, 0x46, 0x6b, 0x01, 0x3e, + 0x56, 0xbd, 0x06, 0x66, 0x6d, 0x51, 0xe7, 0xda, 0xdc, 0x68, 0x62, 0x5d, 0xbc, 0x5a, 0x05, 0x17, + 0x0f, 0x21, 0xac, 0x5b, 0xa4, 0xd5, 0x82, 0x16, 0x27, 0xb4, 0x6e, 0x8a, 0xdb, 0xd7, 0x40, 0x70, + 0x6d, 0x8b, 0x87, 0x10, 0x6e, 0x75, 0xcf, 0xc2, 0xc4, 0x88, 0xae, 0xc0, 0x12, 0xb8, 0xd4, 0x9f, + 0x63, 0xdd, 0xf4, 0x53, 0xe7, 0xc1, 0x14, 0xb2, 0x83, 0x3c, 0x4b, 0x1b, 0x53, 0xc8, 0x2e, 0xfe, + 0xae, 0x04, 0xe9, 0x78, 0xe0, 0xd9, 0x2f, 0x90, 0x8e, 0x42, 0xe9, 0x54, 0x57, 0xe9, 0x84, 0x89, + 0x18, 0xcb, 0x7e, 0x66, 0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ference imports to suppress errors if they are not otherwise used. @@ -945,6 +1132,8 @@ type MsgClient interface { DeleteVault(ctx context.Context, in *MsgDeleteVault, opts ...grpc.CallOption) (*MsgDeleteVaultResponse, error) UpdateVault(ctx context.Context, in *MsgUpdateVault, opts ...grpc.CallOption) (*MsgUpdateVaultResponse, error) UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, opts ...grpc.CallOption) (*MsgUpdateStrategyResponse, error) + RegisterDenomSymbolMap(ctx context.Context, in *MsgRegisterDenomSymbolMap, opts ...grpc.CallOption) (*MsgRegisterDenomSymbolMapResponse, error) + RegisterSymbolSwapContractMap(ctx context.Context, in *MsgSymbolSwapContractMap, opts ...grpc.CallOption) (*MsgSymbolSwapContractMapResponse, error) } type msgClient struct { @@ -1045,6 +1234,24 @@ func (c *msgClient) UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, o return out, nil } +func (c *msgClient) RegisterDenomSymbolMap(ctx context.Context, in *MsgRegisterDenomSymbolMap, opts ...grpc.CallOption) (*MsgRegisterDenomSymbolMapResponse, error) { + out := new(MsgRegisterDenomSymbolMapResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterDenomSymbolMap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterSymbolSwapContractMap(ctx context.Context, in *MsgSymbolSwapContractMap, opts ...grpc.CallOption) (*MsgSymbolSwapContractMapResponse, error) { + out := new(MsgSymbolSwapContractMapResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterSymbolSwapContractMap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // this line is used by starport scaffolding # proto/tx/rpc @@ -1058,6 +1265,8 @@ type MsgServer interface { DeleteVault(context.Context, *MsgDeleteVault) (*MsgDeleteVaultResponse, error) UpdateVault(context.Context, *MsgUpdateVault) (*MsgUpdateVaultResponse, error) UpdateStrategy(context.Context, *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) + RegisterDenomSymbolMap(context.Context, *MsgRegisterDenomSymbolMap) (*MsgRegisterDenomSymbolMapResponse, error) + RegisterSymbolSwapContractMap(context.Context, *MsgSymbolSwapContractMap) (*MsgSymbolSwapContractMapResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1094,6 +1303,12 @@ func (*UnimplementedMsgServer) UpdateVault(ctx context.Context, req *MsgUpdateVa func (*UnimplementedMsgServer) UpdateStrategy(ctx context.Context, req *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStrategy not implemented") } +func (*UnimplementedMsgServer) RegisterDenomSymbolMap(ctx context.Context, req *MsgRegisterDenomSymbolMap) (*MsgRegisterDenomSymbolMapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterDenomSymbolMap not implemented") +} +func (*UnimplementedMsgServer) RegisterSymbolSwapContractMap(ctx context.Context, req *MsgSymbolSwapContractMap) (*MsgSymbolSwapContractMapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterSymbolSwapContractMap not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1279,6 +1494,42 @@ func _Msg_UpdateStrategy_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Msg_RegisterDenomSymbolMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterDenomSymbolMap) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterDenomSymbolMap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Msg/RegisterDenomSymbolMap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterDenomSymbolMap(ctx, req.(*MsgRegisterDenomSymbolMap)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterSymbolSwapContractMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSymbolSwapContractMap) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterSymbolSwapContractMap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Msg/RegisterSymbolSwapContractMap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterSymbolSwapContractMap(ctx, req.(*MsgSymbolSwapContractMap)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.yieldaggregator.Msg", HandlerType: (*MsgServer)(nil), @@ -1323,6 +1574,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateStrategy", Handler: _Msg_UpdateStrategy_Handler, }, + { + MethodName: "RegisterDenomSymbolMap", + Handler: _Msg_RegisterDenomSymbolMap_Handler, + }, + { + MethodName: "RegisterSymbolSwapContractMap", + Handler: _Msg_RegisterSymbolSwapContractMap_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/yieldaggregator/tx.proto", @@ -2111,78 +2370,212 @@ func (m *MsgDeleteVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *MsgRegisterDenomSymbolMap) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *MsgDepositToVault) Size() (n int) { - if m == nil { - return 0 - } + +func (m *MsgRegisterDenomSymbolMap) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterDenomSymbolMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Mappings) > 0 { + for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if m.VaultId != 0 { - n += 1 + sovTx(uint64(m.VaultId)) + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *MsgDepositToVaultResponse) Size() (n int) { - if m == nil { - return 0 +func (m *MsgRegisterDenomSymbolMapResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *MsgWithdrawFromVault) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.VaultId != 0 { - n += 1 + sovTx(uint64(m.VaultId)) - } - l = m.LpTokenAmount.Size() - n += 1 + l + sovTx(uint64(l)) - return n +func (m *MsgRegisterDenomSymbolMapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawFromVaultResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *MsgRegisterDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - return n + return len(dAtA) - i, nil } -func (m *MsgWithdrawFromVaultWithUnbondingTime) Size() (n int) { - if m == nil { - return 0 +func (m *MsgSymbolSwapContractMap) 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 *MsgSymbolSwapContractMap) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSymbolSwapContractMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Sender) + if len(m.Mappings) > 0 { + for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSymbolSwapContractMapResponse) 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 *MsgSymbolSwapContractMapResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSymbolSwapContractMapResponse) 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgDepositToVault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.VaultId != 0 { + n += 1 + sovTx(uint64(m.VaultId)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgDepositToVaultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawFromVault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.VaultId != 0 { + n += 1 + sovTx(uint64(m.VaultId)) + } + l = m.LpTokenAmount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgWithdrawFromVaultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgWithdrawFromVaultWithUnbondingTime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2456,6 +2849,62 @@ func (m *MsgDeleteVaultResponse) Size() (n int) { return n } +func (m *MsgRegisterDenomSymbolMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Mappings) > 0 { + for _, e := range m.Mappings { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgRegisterDenomSymbolMapResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSymbolSwapContractMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Mappings) > 0 { + for _, e := range m.Mappings { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgSymbolSwapContractMapResponse) 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 } @@ -4780,6 +5229,338 @@ func (m *MsgDeleteVaultResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgRegisterDenomSymbolMap) 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: MsgRegisterDenomSymbolMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterDenomSymbolMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mappings", 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 + } + m.Mappings = append(m.Mappings, Mapping{}) + if err := m.Mappings[len(m.Mappings)-1].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 *MsgRegisterDenomSymbolMapResponse) 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: MsgRegisterDenomSymbolMapResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterDenomSymbolMapResponse: 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 *MsgSymbolSwapContractMap) 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: MsgSymbolSwapContractMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSymbolSwapContractMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mappings", 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 + } + m.Mappings = append(m.Mappings, Mapping{}) + if err := m.Mappings[len(m.Mappings)-1].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 *MsgSymbolSwapContractMapResponse) 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: MsgSymbolSwapContractMapResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSymbolSwapContractMapResponse: 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 diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index 528567aad..fbfd42564 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -73,7 +73,7 @@ func (m *StrategyWeight) GetStrategyId() uint64 { type Vault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` @@ -124,9 +124,9 @@ func (m *Vault) GetId() uint64 { return 0 } -func (m *Vault) GetDenom() string { +func (m *Vault) GetSymbol() string { if m != nil { - return m.Denom + return m.Symbol } return "" } @@ -257,6 +257,58 @@ func (m *Strategy) GetGitUrl() string { return "" } +type Mapping struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *Mapping) Reset() { *m = Mapping{} } +func (m *Mapping) String() string { return proto.CompactTextString(m) } +func (*Mapping) ProtoMessage() {} +func (*Mapping) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{3} +} +func (m *Mapping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mapping.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 *Mapping) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mapping.Merge(m, src) +} +func (m *Mapping) XXX_Size() int { + return m.Size() +} +func (m *Mapping) XXX_DiscardUnknown() { + xxx_messageInfo_Mapping.DiscardUnknown(m) +} + +var xxx_messageInfo_Mapping proto.InternalMessageInfo + +func (m *Mapping) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Mapping) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + // Deprecated: Just for v3.2.2 upgrade handler type LegacyVault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -272,7 +324,7 @@ func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{3} + return fileDescriptor_7877bd9c4573997d, []int{4} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -349,7 +401,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{4} + return fileDescriptor_7877bd9c4573997d, []int{5} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -427,7 +479,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{5} + return fileDescriptor_7877bd9c4573997d, []int{6} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -502,6 +554,7 @@ func init() { proto.RegisterType((*StrategyWeight)(nil), "ununifi.yieldaggregator.StrategyWeight") proto.RegisterType((*Vault)(nil), "ununifi.yieldaggregator.Vault") proto.RegisterType((*Strategy)(nil), "ununifi.yieldaggregator.Strategy") + proto.RegisterType((*Mapping)(nil), "ununifi.yieldaggregator.Mapping") proto.RegisterType((*LegacyVault)(nil), "ununifi.yieldaggregator.LegacyVault") proto.RegisterType((*LegacyStrategy)(nil), "ununifi.yieldaggregator.LegacyStrategy") proto.RegisterType((*ProposalAddStrategy)(nil), "ununifi.yieldaggregator.ProposalAddStrategy") @@ -512,50 +565,53 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 681 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcd, 0x4e, 0xdb, 0x40, - 0x10, 0xc7, 0xe3, 0xc4, 0x0e, 0xb0, 0x69, 0x01, 0x19, 0x28, 0x86, 0x4a, 0x26, 0xca, 0xa5, 0xe9, - 0x01, 0xbb, 0xd0, 0x27, 0x00, 0xa2, 0x4a, 0x54, 0x3d, 0x54, 0x46, 0xb4, 0x55, 0x2f, 0xd6, 0xc6, - 0x1e, 0x9c, 0x15, 0xf6, 0x6e, 0xb4, 0xbb, 0x21, 0x8d, 0xd4, 0x67, 0xa8, 0xfa, 0x1c, 0x3d, 0x73, - 0xe3, 0x05, 0x38, 0x22, 0x2e, 0xad, 0x7a, 0x40, 0x15, 0xbc, 0x48, 0x15, 0xaf, 0xed, 0x26, 0x7c, - 0x54, 0x6a, 0x44, 0xb9, 0xed, 0x7c, 0xec, 0xcc, 0xdf, 0x33, 0x3f, 0x6b, 0xd1, 0x7a, 0x8f, 0xf6, - 0x28, 0x39, 0x20, 0xee, 0x80, 0x40, 0x1c, 0xe2, 0x28, 0xe2, 0x10, 0x61, 0xc9, 0xf8, 0x75, 0xdb, - 0xe9, 0x72, 0x26, 0x99, 0xb9, 0x9c, 0xa5, 0x3b, 0xd7, 0xc2, 0xab, 0x8b, 0x11, 0x8b, 0x58, 0x9a, - 0xe3, 0x0e, 0x4f, 0x2a, 0x7d, 0x75, 0x25, 0x60, 0x22, 0x61, 0xc2, 0x57, 0x01, 0x65, 0x64, 0x21, - 0x5b, 0x59, 0x6e, 0x1b, 0x0b, 0x70, 0x8f, 0x36, 0xda, 0x20, 0xf1, 0x86, 0x1b, 0x30, 0x42, 0x55, - 0xbc, 0xf1, 0x19, 0xcd, 0xee, 0x49, 0x8e, 0x25, 0x44, 0x83, 0xf7, 0x40, 0xa2, 0x8e, 0x34, 0xd7, - 0x50, 0x4d, 0x64, 0x1e, 0x9f, 0x84, 0x96, 0x56, 0xd7, 0x9a, 0xba, 0x87, 0x72, 0xd7, 0x6e, 0x68, - 0xee, 0xa2, 0x6a, 0x3f, 0x4d, 0xb5, 0xca, 0x75, 0xad, 0x39, 0xb3, 0xbd, 0x71, 0x7a, 0xb1, 0x56, - 0xfa, 0x79, 0xb1, 0xf6, 0x54, 0xb5, 0x12, 0xe1, 0xa1, 0x43, 0x98, 0x9b, 0x60, 0xd9, 0x71, 0xde, - 0x40, 0x84, 0x83, 0x41, 0x0b, 0x82, 0xf3, 0xe3, 0x75, 0x94, 0xe9, 0x6a, 0x41, 0xe0, 0x65, 0x05, - 0x1a, 0x27, 0x3a, 0x32, 0xde, 0xe1, 0x5e, 0x2c, 0xcd, 0x59, 0x54, 0x2e, 0x9a, 0x95, 0x49, 0x68, - 0x2e, 0x22, 0x23, 0x04, 0xca, 0x12, 0xd5, 0xc3, 0x53, 0x86, 0x69, 0x22, 0x9d, 0xe2, 0x04, 0xac, - 0x4a, 0xea, 0x4c, 0xcf, 0x66, 0x1d, 0xd5, 0x42, 0x10, 0x01, 0x27, 0x5d, 0x49, 0x18, 0xb5, 0xf4, - 0x34, 0x34, 0xea, 0x32, 0x1d, 0x64, 0xb0, 0x3e, 0x05, 0x6e, 0x19, 0xa9, 0x5e, 0xeb, 0xfc, 0x78, - 0x7d, 0x31, 0x13, 0xb3, 0x15, 0x86, 0x1c, 0x84, 0xd8, 0x93, 0x9c, 0xd0, 0xc8, 0x53, 0x69, 0x66, - 0x0b, 0x3d, 0x4e, 0x0f, 0x7e, 0x08, 0x5d, 0x26, 0x88, 0xb4, 0xaa, 0x75, 0xad, 0x59, 0xdb, 0x5c, - 0x71, 0xb2, 0x4b, 0xc3, 0x59, 0x3a, 0xd9, 0x2c, 0x9d, 0x1d, 0x46, 0xe8, 0xb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0x00, 0x5f, 0xa0, 0x5b, 0x99, 0x10, 0x5d, 0xfd, 0xbe, 0xd1, 0x35, 0x1e, 0x0c, - 0xdd, 0xea, 0x7f, 0x47, 0x77, 0xea, 0x3e, 0xd0, 0x6d, 0x7c, 0xd1, 0xd0, 0xac, 0x92, 0xf2, 0xb0, - 0x30, 0x8e, 0xa0, 0x66, 0x8c, 0xa1, 0x76, 0xa2, 0xa1, 0x85, 0xb7, 0x9c, 0x75, 0x99, 0xc0, 0xf1, - 0x56, 0x18, 0x8e, 0xaa, 0x92, 0x44, 0xc6, 0x90, 0xab, 0x4a, 0x8d, 0xeb, 0x4c, 0x97, 0x6f, 0x32, - 0x5d, 0x7c, 0x4d, 0x65, 0xf4, 0x6b, 0x6e, 0x53, 0xaf, 0xff, 0x5d, 0xbd, 0x71, 0xbb, 0xfa, 0xb1, - 0x1f, 0x65, 0xfb, 0xf5, 0xe9, 0xa5, 0xad, 0x9d, 0x5d, 0xda, 0xda, 0xaf, 0x4b, 0x5b, 0xfb, 0x7a, - 0x65, 0x97, 0xce, 0xae, 0xec, 0xd2, 0x8f, 0x2b, 0xbb, 0xf4, 0xf1, 0x45, 0x44, 0x64, 0xa7, 0xd7, - 0x76, 0x02, 0x96, 0xb8, 0xfb, 0x74, 0x9f, 0x92, 0x57, 0xc4, 0x0d, 0x3a, 0x98, 0x50, 0xf7, 0xd3, - 0x8d, 0x77, 0x55, 0x0e, 0xba, 0x20, 0xda, 0xd5, 0xf4, 0x91, 0x7b, 0xf9, 0x3b, 0x00, 0x00, 0xff, - 0xff, 0x5b, 0xb3, 0x46, 0x89, 0x7f, 0x07, 0x00, 0x00, + // 723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0x9b, 0x36, 0x69, 0x57, 0x17, 0xb6, 0xc9, 0x7b, 0xcb, 0x86, 0xd4, 0x55, 0xbd, 0x50, + 0x0e, 0x4b, 0xe8, 0xf8, 0x04, 0xdb, 0x2a, 0xa4, 0x21, 0x90, 0x50, 0xa6, 0x01, 0xe2, 0x12, 0xb9, + 0x89, 0x97, 0x5a, 0x4b, 0xec, 0xca, 0x76, 0x57, 0x2a, 0xf1, 0x19, 0x10, 0x9f, 0x83, 0xf3, 0x6e, + 0x88, 0xfb, 0x8e, 0xd3, 0x2e, 0x20, 0x0e, 0x13, 0xda, 0xbe, 0x08, 0x6a, 0xec, 0x44, 0xed, 0x5e, + 0x38, 0x4c, 0x63, 0x37, 0x3f, 0x2f, 0x79, 0x9e, 0xbf, 0x9f, 0xe7, 0x67, 0x05, 0x6c, 0x0c, 0xe8, + 0x80, 0x92, 0x03, 0xe2, 0x8e, 0x08, 0x8e, 0x43, 0x14, 0x45, 0x1c, 0x47, 0x48, 0x32, 0x7e, 0xd5, + 0x76, 0xfa, 0x9c, 0x49, 0x06, 0x57, 0x74, 0xba, 0x73, 0x25, 0xbc, 0xb6, 0x18, 0xb1, 0x88, 0xa5, + 0x39, 0xee, 0xf8, 0xa4, 0xd2, 0xd7, 0x56, 0x03, 0x26, 0x12, 0x26, 0x7c, 0x15, 0x50, 0x86, 0x0e, + 0xd5, 0x95, 0xe5, 0x76, 0x91, 0xc0, 0xee, 0x51, 0xbb, 0x8b, 0x25, 0x6a, 0xbb, 0x01, 0x23, 0x54, + 0xc5, 0x9b, 0x9f, 0xc1, 0xec, 0x9e, 0xe4, 0x48, 0xe2, 0x68, 0xf4, 0x1e, 0x93, 0xa8, 0x27, 0xe1, + 0x3a, 0xa8, 0x09, 0xed, 0xf1, 0x49, 0x68, 0x1b, 0x0d, 0xa3, 0x65, 0x7a, 0x20, 0x73, 0xed, 0x86, + 0x70, 0x17, 0x94, 0x87, 0x69, 0xaa, 0x5d, 0x6c, 0x18, 0xad, 0xea, 0x76, 0xfb, 0xe4, 0x7c, 0xbd, + 0xf0, 0xfb, 0x7c, 0xfd, 0x89, 0x6a, 0x25, 0xc2, 0x43, 0x87, 0x30, 0x37, 0x41, 0xb2, 0xe7, 0xbc, + 0xc6, 0x11, 0x0a, 0x46, 0x1d, 0x1c, 0x9c, 0x1d, 0x6f, 0x00, 0xad, 0xab, 0x83, 0x03, 0x4f, 0x17, + 0x68, 0xfe, 0x30, 0x81, 0xf5, 0x0e, 0x0d, 0x62, 0x09, 0x67, 0x41, 0x31, 0x6f, 0x56, 0x24, 0x21, + 0x5c, 0x06, 0x65, 0x31, 0x4a, 0xba, 0x2c, 0x56, 0x4d, 0x3c, 0x6d, 0x41, 0x08, 0x4c, 0x8a, 0x12, + 0x6c, 0x97, 0x52, 0x6f, 0x7a, 0x86, 0x0d, 0x50, 0x0b, 0xb1, 0x08, 0x38, 0xe9, 0x4b, 0xc2, 0xa8, + 0x6d, 0xa6, 0xa1, 0x49, 0x17, 0x74, 0x80, 0xc5, 0x86, 0x14, 0x73, 0xdb, 0x4a, 0x15, 0xdb, 0x67, + 0xc7, 0x1b, 0x8b, 0x5a, 0xce, 0x56, 0x18, 0x72, 0x2c, 0xc4, 0x9e, 0xe4, 0x84, 0x46, 0x9e, 0x4a, + 0x83, 0x1d, 0xf0, 0x38, 0x3d, 0xf8, 0x21, 0xee, 0x33, 0x41, 0xa4, 0x5d, 0x6e, 0x18, 0xad, 0xda, + 0xe6, 0xaa, 0xa3, 0x3f, 0x1a, 0x4f, 0xd3, 0xd1, 0xd3, 0x74, 0x76, 0x18, 0xa1, 0xdb, 0xe6, 0x78, + 0x08, 0xde, 0xa3, 0xf4, 0xab, 0x8e, 0xfa, 0x08, 0x1e, 0x02, 0x7b, 0x48, 0x64, 0x2f, 0xe4, 0x68, + 0xe8, 0x07, 0x2c, 0x49, 0x88, 0x10, 0x84, 0x51, 0x7f, 0x3c, 0x48, 0xbb, 0x72, 0xd7, 0xd1, 0x2d, + 0x67, 0x25, 0x77, 0xf2, 0x8a, 0x1e, 0x92, 0x18, 0x62, 0xb0, 0x94, 0x37, 0xe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xfb, 0xa6, 0xdd, 0x7a, 0x30, 0xda, 0xcb, 0xff, 0x9d, 0xf6, 0xca, 0x7d, 0xd0, + 0xde, 0xfc, 0x62, 0x80, 0x59, 0x25, 0xe5, 0x61, 0xf9, 0x9d, 0xa0, 0xd3, 0x9a, 0xa2, 0xf3, 0xbb, + 0x01, 0x16, 0xde, 0x72, 0xd6, 0x67, 0x02, 0xc5, 0x5b, 0x61, 0x38, 0xa9, 0x4a, 0x12, 0x19, 0xe3, + 0x4c, 0x55, 0x6a, 0x5c, 0x7d, 0x06, 0xc5, 0xeb, 0xcf, 0x20, 0xbf, 0x4d, 0x69, 0xf2, 0x36, 0x37, + 0xa9, 0x37, 0xff, 0xad, 0xde, 0xba, 0x59, 0xfd, 0xd4, 0xdb, 0xda, 0x7e, 0x75, 0x72, 0x51, 0x37, + 0x4e, 0x2f, 0xea, 0xc6, 0x9f, 0x8b, 0xba, 0xf1, 0xf5, 0xb2, 0x5e, 0x38, 0xbd, 0xac, 0x17, 0x7e, + 0x5d, 0xd6, 0x0b, 0x1f, 0x9f, 0x47, 0x44, 0xf6, 0x06, 0x5d, 0x27, 0x60, 0x89, 0xbb, 0x4f, 0xf7, + 0x29, 0x79, 0x49, 0xdc, 0xa0, 0x87, 0x08, 0x75, 0x3f, 0x5d, 0xfb, 0x19, 0xcb, 0x51, 0x1f, 0x8b, + 0x6e, 0x39, 0xfd, 0x33, 0xbe, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x98, 0xb1, 0xfe, 0x58, 0xb4, + 0x07, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -688,10 +744,10 @@ func (m *Vault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Denom))) + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Symbol))) i-- dAtA[i] = 0x12 } @@ -766,6 +822,43 @@ func (m *Strategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Mapping) 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 *Mapping) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *LegacyVault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1007,7 +1100,7 @@ func (m *Vault) Size() (n int) { if m.Id != 0 { n += 1 + sovYieldaggregator(uint64(m.Id)) } - l = len(m.Denom) + l = len(m.Symbol) if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) } @@ -1074,6 +1167,23 @@ func (m *Strategy) Size() (n int) { return n } +func (m *Mapping) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + return n +} + func (m *LegacyVault) Size() (n int) { if m == nil { return 0 @@ -1326,7 +1436,7 @@ func (m *Vault) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1354,7 +1464,7 @@ func (m *Vault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -1869,6 +1979,120 @@ func (m *Strategy) Unmarshal(dAtA []byte) error { } return nil } +func (m *Mapping) 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 ErrIntOverflowYieldaggregator + } + 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: Mapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LegacyVault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 7adc51000d16b5ef3865987e07c878347b064e7e Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:53:55 +0900 Subject: [PATCH 10/59] feta: ics20 wasm hooks --- app/keepers/keepers.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index dadd41617..a7ad40dec 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -72,6 +72,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + ibchooks "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7" ibchookskeeper "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/keeper" ibchookstypes "github.com/cosmos/ibc-apps/modules/ibc-hooks/v7/types" @@ -376,13 +377,18 @@ func NewAppKeeper( appKeepers.IBCHooksKeeper = ibchookskeeper.NewKeeper( appKeepers.keys[ibchookstypes.StoreKey], ) + ics20WasmHooks := ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later + hooksICS4Wrapper := ibchooks.NewICS4Middleware( + appKeepers.IBCKeeper.ChannelKeeper, + ics20WasmHooks, + ) // Create Transfer Keepers appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, appKeepers.keys[ibctransfertypes.StoreKey], appKeepers.GetSubspace(ibctransfertypes.ModuleName), - appKeepers.IBCFeeKeeper, + hooksICS4Wrapper, appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, From d212a6d7c8627a0831e6dd6bd3ed946b05b45564 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Tue, 26 Sep 2023 21:02:42 +0900 Subject: [PATCH 11/59] fix: hooks middleware --- app/keepers/keepers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index a7ad40dec..6e6139da3 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -88,7 +88,7 @@ import ( icacallbackstypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/icacallbacks/types" interchainquerykeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/keeper" interchainquerytypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/interchainquery/types" - records "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records" + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records" recordskeeper "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/keeper" recordstypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" stakeibc "github.com/UnUniFi/chain/x/yieldaggregator/submodules/stakeibc" @@ -635,6 +635,8 @@ func NewAppKeeper( transferStack = transfer.NewIBCModule(appKeepers.TransferKeeper) transferStack = records.NewIBCModule(appKeepers.RecordsKeeper, transferStack) transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper) + // Hooks Middleware + transferStack = ibchooks.NewIBCMiddleware(transferStack, &hooksICS4Wrapper) // RecvPacket, message that originates from core IBC and goes down to app, the flow is: // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket From 827a57e7b7b86f8d0d8572cc5d80c7ca1b7e04bb Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:26:46 +0900 Subject: [PATCH 12/59] fix: permission --- app/keepers/keepers.go | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 6e6139da3..ff1e3f8b2 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -141,7 +141,11 @@ type AppKeepers struct { TransferKeeper ibctransferkeeper.Keeper WasmKeeper wasm.Keeper // IBC hooks - IBCHooksKeeper ibchookskeeper.Keeper + IBCHooksKeeper ibchookskeeper.Keeper + Ics20WasmHooks ibchooks.WasmHooks + ContractKeeper *wasmkeeper.PermissionedKeeper + HooksTransferIBCModule ibchooks.IBCMiddleware + HooksICS4Wrapper ibchooks.ICS4Middleware NftbackedloanKeeper nftbackedloankeeper.Keeper NftfactoryKeeper nftfactorykeeper.Keeper @@ -377,18 +381,14 @@ func NewAppKeeper( appKeepers.IBCHooksKeeper = ibchookskeeper.NewKeeper( appKeepers.keys[ibchookstypes.StoreKey], ) - ics20WasmHooks := ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later - hooksICS4Wrapper := ibchooks.NewICS4Middleware( - appKeepers.IBCKeeper.ChannelKeeper, - ics20WasmHooks, - ) + appKeepers.Ics20WasmHooks = ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later // Create Transfer Keepers appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, appKeepers.keys[ibctransfertypes.StoreKey], appKeepers.GetSubspace(ibctransfertypes.ModuleName), - hooksICS4Wrapper, + appKeepers.HooksICS4Wrapper, // essentially still app.IBCKeeper.ChannelKeeper under the hood because no hook overrides appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, @@ -451,6 +451,17 @@ func NewAppKeeper( wasmOpts..., ) + // Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it + appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper) + appKeepers.Ics20WasmHooks.ContractKeeper = &appKeepers.WasmKeeper + appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( + appKeepers.IBCKeeper.ChannelKeeper, + appKeepers.Ics20WasmHooks, + ) + // Hooks Middleware + transferIBCModule := transfer.NewIBCModule(appKeepers.TransferKeeper) + appKeepers.HooksTransferIBCModule = ibchooks.NewIBCMiddleware(&transferIBCModule, &appKeepers.HooksICS4Wrapper) + // Instantiate the builder keeper, store keys, and module manager appKeepers.BuilderKeeper = builderkeeper.NewKeeper( appCodec, @@ -635,8 +646,6 @@ func NewAppKeeper( transferStack = transfer.NewIBCModule(appKeepers.TransferKeeper) transferStack = records.NewIBCModule(appKeepers.RecordsKeeper, transferStack) transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper) - // Hooks Middleware - transferStack = ibchooks.NewIBCMiddleware(transferStack, &hooksICS4Wrapper) // RecvPacket, message that originates from core IBC and goes down to app, the flow is: // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket From abc31d156851df6ca048d646c784fbdc0e10a69c Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 28 Sep 2023 11:20:58 +0800 Subject: [PATCH 13/59] ibc router transfer + ibchooks middleware update --- app/keepers/keepers.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index ff1e3f8b2..0fa88cb21 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -458,9 +458,6 @@ func NewAppKeeper( appKeepers.IBCKeeper.ChannelKeeper, appKeepers.Ics20WasmHooks, ) - // Hooks Middleware - transferIBCModule := transfer.NewIBCModule(appKeepers.TransferKeeper) - appKeepers.HooksTransferIBCModule = ibchooks.NewIBCMiddleware(&transferIBCModule, &appKeepers.HooksICS4Wrapper) // Instantiate the builder keeper, store keys, and module manager appKeepers.BuilderKeeper = builderkeeper.NewKeeper( @@ -646,6 +643,8 @@ func NewAppKeeper( transferStack = transfer.NewIBCModule(appKeepers.TransferKeeper) transferStack = records.NewIBCModule(appKeepers.RecordsKeeper, transferStack) transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper) + appKeepers.HooksTransferIBCModule = ibchooks.NewIBCMiddleware(transferStack, &appKeepers.HooksICS4Wrapper) + transferStack = appKeepers.HooksTransferIBCModule // RecvPacket, message that originates from core IBC and goes down to app, the flow is: // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket From ad18fafd16e98a8d16b4f4e775fe750794a332f6 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Thu, 28 Sep 2023 22:30:10 +0900 Subject: [PATCH 14/59] feat: comment --- app/keepers/keepers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 0fa88cb21..a9c394b5c 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -643,6 +643,7 @@ func NewAppKeeper( transferStack = transfer.NewIBCModule(appKeepers.TransferKeeper) transferStack = records.NewIBCModule(appKeepers.RecordsKeeper, transferStack) transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper) + // Add Hooks Middleware appKeepers.HooksTransferIBCModule = ibchooks.NewIBCMiddleware(transferStack, &appKeepers.HooksICS4Wrapper) transferStack = appKeepers.HooksTransferIBCModule From 9bedad15ab58b229d1615485d58d84d81059afa9 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Tue, 3 Oct 2023 19:11:51 +0900 Subject: [PATCH 15/59] feat: add invalid deposit denom error --- wasmbinding/message_plugin.go | 2 +- .../keeper/grpc_query_estimate_mint_amount.go | 2 +- x/yieldaggregator/keeper/hooks_test.go | 10 ++++---- x/yieldaggregator/keeper/lp.go | 24 ++++++++++--------- x/yieldaggregator/keeper/lp_test.go | 14 +++++------ .../keeper/msg_server_deposit_to_vault.go | 2 +- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index 732dd39f3..de75f3657 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -164,7 +164,7 @@ func PerformDeputyDepositToVault(bk *bankkeeper.BaseKeeper, iyaKeeper *yieldaggr ctx, depositor, deputyDepositToVault.VaultId, - amount.Amount, + amount, ) if err != nil { return sdkerrors.Wrap(err, "depositing to vault") diff --git a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go index 341e96e02..cd6b6e2b8 100644 --- a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go +++ b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go @@ -27,7 +27,7 @@ func (k Keeper) EstimateMintAmount(c context.Context, req *types.QueryEstimateMi if !ok { return nil, types.ErrInvalidAmount } - mintAmount := k.EstimateMintAmountInternal(ctx, vault.Denom, vault.Id, depositAmount) + mintAmount := k.EstimateMintAmountInternal(ctx, vault.Denom, vault.Id, sdk.NewCoin(vault.Denom, depositAmount)) return &types.QueryEstimateMintAmountResponse{ MintAmount: mintAmount, diff --git a/x/yieldaggregator/keeper/hooks_test.go b/x/yieldaggregator/keeper/hooks_test.go index db6b07c11..2ac300059 100644 --- a/x/yieldaggregator/keeper/hooks_test.go +++ b/x/yieldaggregator/keeper/hooks_test.go @@ -11,18 +11,18 @@ import ( ) func (suite *KeeperTestSuite) TestBeforeEpochStart() { + atomHostDenom := "uatom" + prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) + atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() // try execution with invalid vault id addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) - err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().Error(err) // try execution with invalid vault id err = suite.app.YieldaggregatorKeeper.BurnLPTokenAndRedeem(suite.ctx, addr1, 1, sdk.NewInt(100000)) suite.Require().Error(err) - atomHostDenom := "uatom" - prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) - atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() lpDenom := types.GetLPTokenDenom(1) _ = suite.SetupZoneAndEpoch(atomHostDenom, atomIbcDenom) @@ -55,7 +55,7 @@ func (suite *KeeperTestSuite) TestBeforeEpochStart() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) // burn execution diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index e261aa895..ffcee8e87 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -64,7 +64,7 @@ func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { // lpAmount = lpSupply * (principalAmountToMint / principalAmountInVault) // If principalAmountInVault is zero, lpAmount = principalAmountToMint -func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultDenom string, vaultId uint64, principalAmount sdkmath.Int) sdk.Coin { +func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultDenom string, vaultId uint64, principalCoin sdk.Coin) sdk.Coin { lpDenom := types.GetLPTokenDenom(vaultId) vault, found := k.GetVault(ctx, vaultId) if !found { @@ -74,10 +74,10 @@ func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultDenom string, v totalVaultAmount := k.VaultAmountTotal(ctx, vault) lpSupply := k.bankKeeper.GetSupply(ctx, lpDenom).Amount if totalVaultAmount.IsZero() || lpSupply.IsZero() { - return sdk.NewCoin(lpDenom, principalAmount) + return sdk.NewCoin(lpDenom, principalCoin.Amount) } - lpAmount := lpSupply.Mul(principalAmount).Quo(totalVaultAmount) + lpAmount := lpSupply.Mul(principalCoin.Amount).Quo(totalVaultAmount) return sdk.NewCoin(lpDenom, lpAmount) } @@ -101,30 +101,32 @@ func (k Keeper) EstimateRedeemAmountInternal(ctx sdk.Context, vaultDenom string, return sdk.NewCoin(vaultDenom, principalAmount) } -func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, principalAmount sdk.Int) error { +func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, principalCoin sdk.Coin) error { vault, found := k.GetVault(ctx, vaultId) if !found { return types.ErrInvalidVaultId } + if vault.Denom != principalCoin.Denom { + return types.ErrInvalidDepositDenom + } - // calculate lp token amount - lp := k.EstimateMintAmountInternal(ctx, vault.Denom, vaultId, principalAmount) + // calculate lpCoin token amount + lpCoin := k.EstimateMintAmountInternal(ctx, vault.Denom, vaultId, principalCoin) // transfer coins after lp amount calculation vaultModName := types.GetVaultModuleAccountName(vaultId) vaultModAddr := authtypes.NewModuleAddress(vaultModName) - principal := sdk.NewCoin(vault.Denom, principalAmount) - err := k.bankKeeper.SendCoins(ctx, address, vaultModAddr, sdk.NewCoins(principal)) + err := k.bankKeeper.SendCoins(ctx, address, vaultModAddr, sdk.NewCoins(principalCoin)) if err != nil { return err } - // mint and trasnfer lp token - err = k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(lp)) + // mint and transfer lp token + err = k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(lpCoin)) if err != nil { return err } - err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, address, sdk.NewCoins(lp)) + err = k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, address, sdk.NewCoins(lpCoin)) if err != nil { return err } diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 1f91451cd..bc7881692 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -207,10 +207,10 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) - estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Denom, vault.Id, sdk.NewInt(100000)) + estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Denom, vault.Id, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().Equal(estMintAmount.String(), "100000"+lpDenom) estBurnAmount := suite.app.YieldaggregatorKeeper.EstimateRedeemAmountInternal(suite.ctx, vault.Denom, vault.Id, sdk.NewInt(100000)) @@ -218,18 +218,18 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { } func (suite *KeeperTestSuite) TestMintBurnLPToken() { + atomHostDenom := "uatom" + prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) + atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() // try execution with invalid vault id addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) - err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().Error(err) // try execution with invalid vault id err = suite.app.YieldaggregatorKeeper.BurnLPTokenAndRedeem(suite.ctx, addr1, 1, sdk.NewInt(100000)) suite.Require().Error(err) - atomHostDenom := "uatom" - prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) - atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() lpDenom := types.GetLPTokenDenom(1) _ = suite.SetupZoneAndEpoch(atomHostDenom, atomIbcDenom) @@ -262,7 +262,7 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) // check changes in user balance diff --git a/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go b/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go index ab3725b9a..1c9c4a979 100644 --- a/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go +++ b/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go @@ -15,7 +15,7 @@ func (k msgServer) DepositToVault(ctx context.Context, msg *types.MsgDepositToVa return nil, err } - err = k.Keeper.DepositAndMintLPToken(sdkCtx, sender, msg.VaultId, msg.Amount.Amount) + err = k.Keeper.DepositAndMintLPToken(sdkCtx, sender, msg.VaultId, msg.Amount) if err != nil { return nil, err } From 1a28734b0665495564aca738f077c7e8aa2a31ac Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 3 Oct 2023 20:39:00 +0800 Subject: [PATCH 16/59] Add denom info and symbol info for transfer channels management --- proto/ununifi/yieldaggregator/query.proto | 20 +- proto/ununifi/yieldaggregator/tx.proto | 20 +- .../yieldaggregator/yieldaggregator.proto | 17 +- x/yieldaggregator/keeper/denom_info.go | 44 + x/yieldaggregator/keeper/denom_symbol_map.go | 42 - ..._contract.go => grpc_query_denom_infos.go} | 6 +- ...om_symbol.go => grpc_query_symbol_info.go} | 8 +- ...p.go => msg_server_register_denom_info.go} | 8 +- ....go => msg_server_register_symbol_info.go} | 8 +- .../keeper/symbol_contract_map.go | 42 - x/yieldaggregator/keeper/symbol_info.go | 45 ++ x/yieldaggregator/types/keys.go | 12 +- x/yieldaggregator/types/query.pb.go | 451 ++++++----- x/yieldaggregator/types/query.pb.gw.go | 56 +- x/yieldaggregator/types/tx.pb.go | 440 +++++----- x/yieldaggregator/types/yieldaggregator.pb.go | 755 +++++++++++++++--- 16 files changed, 1279 insertions(+), 695 deletions(-) create mode 100644 x/yieldaggregator/keeper/denom_info.go delete mode 100644 x/yieldaggregator/keeper/denom_symbol_map.go rename x/yieldaggregator/keeper/{grpc_query_symbol_swap_contract.go => grpc_query_denom_infos.go} (56%) rename x/yieldaggregator/keeper/{grpc_query_denom_symbol.go => grpc_query_symbol_info.go} (50%) rename x/yieldaggregator/keeper/{msg_server_register_denom_symbol_map.go => msg_server_register_denom_info.go} (51%) rename x/yieldaggregator/keeper/{msg_server_register_symbol_swap_contract_map.go => msg_server_register_symbol_info.go} (50%) delete mode 100644 x/yieldaggregator/keeper/symbol_contract_map.go create mode 100644 x/yieldaggregator/keeper/symbol_info.go diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index aeefd6d11..fbf8b94df 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -47,12 +47,12 @@ service Query { option (google.api.http).get = "/ununifi/yieldaggregator/vaults/{id}/estimate-redeem-amount"; } - rpc DenomSymbolMap(QueryDenomSymbolMapRequest) returns (QueryDenomSymbolMapResponse) { - option (google.api.http).get = "/ununifi/yieldaggregator/denom-symbol-map"; + rpc DenomInfos(QueryDenomInfosRequest) returns (QueryDenomInfosResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/denom-infos"; } - rpc SymbolSwapContractMap(QuerySymbolSwapContractMapRequest) returns (QuerySymbolSwapContractMapResponse) { - option (google.api.http).get = "/ununifi/yieldaggregator/symbol-swap-contract-map"; + rpc SymbolInfos(QuerySymbolInfosRequest) returns (QuerySymbolInfosResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/symbol-infos"; } } @@ -186,13 +186,13 @@ message QueryEstimateRedeemAmountResponse { cosmos.base.v1beta1.Coin total_amount = 4 [(gogoproto.nullable) = false]; } -message QueryDenomSymbolMapRequest {} +message QueryDenomInfosRequest {} -message QueryDenomSymbolMapResponse { - repeated Mapping mappings = 1 [(gogoproto.nullable) = false]; +message QueryDenomInfosResponse { + repeated DenomInfo info = 1 [(gogoproto.nullable) = false]; } -message QuerySymbolSwapContractMapRequest {} -message QuerySymbolSwapContractMapResponse { - repeated Mapping mappings = 1 [(gogoproto.nullable) = false]; +message QuerySymbolInfosRequest {} +message QuerySymbolInfosResponse { + repeated SymbolInfo info = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index 63bb83eae..716136013 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -26,8 +26,8 @@ service Msg { rpc DeleteVault(MsgDeleteVault) returns (MsgDeleteVaultResponse); rpc UpdateVault(MsgUpdateVault) returns (MsgUpdateVaultResponse); rpc UpdateStrategy(MsgUpdateStrategy) returns (MsgUpdateStrategyResponse); - rpc RegisterDenomSymbolMap(MsgRegisterDenomSymbolMap) returns (MsgRegisterDenomSymbolMapResponse); - rpc RegisterSymbolSwapContractMap(MsgSymbolSwapContractMap) returns (MsgSymbolSwapContractMapResponse); + rpc RegisterDenomInfos(MsgRegisterDenomInfos) returns (MsgRegisterDenomInfosResponse); + rpc RegisterSymbolInfos(MsgSymbolInfos) returns (MsgSymbolInfosResponse); } // this line is used by starport scaffolding # proto/tx/message @@ -186,14 +186,14 @@ message MsgDeleteVault { message MsgDeleteVaultResponse {} -message MsgRegisterDenomSymbolMap { - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated Mapping mappings = 2 [(gogoproto.nullable) = false]; +message MsgRegisterDenomInfos { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated DenomInfo info = 2 [(gogoproto.nullable) = false]; } -message MsgRegisterDenomSymbolMapResponse {} +message MsgRegisterDenomInfosResponse {} -message MsgSymbolSwapContractMap { - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated Mapping mappings = 2 [(gogoproto.nullable) = false]; +message MsgSymbolInfos { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated SymbolInfo info = 2 [(gogoproto.nullable) = false]; } -message MsgSymbolSwapContractMapResponse {} +message MsgSymbolInfosResponse {} diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 152ae2970..2968699e1 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -46,9 +46,20 @@ message Strategy { string git_url = 6; } -message Mapping { - string key = 1; - string value = 2; +message TransferChannel { + string chain_id = 1; + string channel_id = 2; +} +message SymbolInfo { + string symbol = 1; + string native_chain_id = 2; + repeated TransferChannel channels = 3; // channels to send to target chain for the symbol +} + +message DenomInfo { + string denom = 1; + string symbol = 2; + repeated TransferChannel channels = 3; // channels to transfer back to native chain from the denom } // Deprecated: Just for v3.2.2 upgrade handler diff --git a/x/yieldaggregator/keeper/denom_info.go b/x/yieldaggregator/keeper/denom_info.go new file mode 100644 index 000000000..66230155a --- /dev/null +++ b/x/yieldaggregator/keeper/denom_info.go @@ -0,0 +1,44 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +// SetDenomInfo set a specific DenomInfo in the store +func (k Keeper) SetDenomInfo(ctx sdk.Context, denomInfo types.DenomInfo) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomInfoKey)) + bz := k.cdc.MustMarshal(&denomInfo) + store.Set([]byte(denomInfo.Denom), bz) +} + +// GetDenomInfo returns a DenomInfo from its id +func (k Keeper) GetDenomInfo(ctx sdk.Context, denom string) types.DenomInfo { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomInfoKey)) + denomInfo := types.DenomInfo{} + bz := store.Get([]byte(denom)) + if bz == nil { + return denomInfo + } + k.cdc.MustUnmarshal(bz, &denomInfo) + return denomInfo +} + +// GetAllDenomInfo returns a DenomInfo +func (k Keeper) GetAllDenomInfo(ctx sdk.Context) []types.DenomInfo { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomInfoKey)) + + iterator := sdk.KVStorePrefixIterator(store, nil) + defer iterator.Close() + + infos := []types.DenomInfo{} + + for ; iterator.Valid(); iterator.Next() { + info := types.DenomInfo{} + k.cdc.MustUnmarshal(iterator.Value(), &info) + infos = append(infos, info) + } + return infos +} diff --git a/x/yieldaggregator/keeper/denom_symbol_map.go b/x/yieldaggregator/keeper/denom_symbol_map.go deleted file mode 100644 index b0379477d..000000000 --- a/x/yieldaggregator/keeper/denom_symbol_map.go +++ /dev/null @@ -1,42 +0,0 @@ -package keeper - -import ( - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/UnUniFi/chain/x/yieldaggregator/types" -) - -// SetDenomSymbolMap set a specific DenomSymbolMap in the store -func (k Keeper) SetDenomSymbolMap(ctx sdk.Context, denom string, symbol string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) - store.Set([]byte(denom), []byte(symbol)) -} - -// GetDenomSymbolMap returns a DenomSymbolMap from its id -func (k Keeper) GetDenomSymbolMap(ctx sdk.Context, denom string) string { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) - bz := store.Get([]byte(denom)) - if bz == nil { - return "" - } - return string(bz) -} - -// GetAllDenomSymbolMap returns a DenomSymbolMap -func (k Keeper) GetAllDenomSymbolMap(ctx sdk.Context) []types.Mapping { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.DenomSymbolMapKey)) - - iterator := sdk.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - mappings := []types.Mapping{} - - for ; iterator.Valid(); iterator.Next() { - mappings = append(mappings, types.Mapping{ - Key: string(iterator.Key()), - Value: string(iterator.Value()), - }) - } - return mappings -} diff --git a/x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go b/x/yieldaggregator/keeper/grpc_query_denom_infos.go similarity index 56% rename from x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go rename to x/yieldaggregator/keeper/grpc_query_denom_infos.go index b46bf3f5d..074d33794 100644 --- a/x/yieldaggregator/keeper/grpc_query_symbol_swap_contract.go +++ b/x/yieldaggregator/keeper/grpc_query_denom_infos.go @@ -10,13 +10,13 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k Keeper) SymbolSwapContractMap(c context.Context, req *types.QuerySymbolSwapContractMapRequest) (*types.QuerySymbolSwapContractMapResponse, error) { +func (k Keeper) DenomInfos(c context.Context, req *types.QueryDenomInfosRequest) (*types.QueryDenomInfosResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(c) - return &types.QuerySymbolSwapContractMapResponse{ - Mappings: k.GetAllSymbolSwapContractMap(ctx), + return &types.QueryDenomInfosResponse{ + Info: k.GetAllDenomInfo(ctx), }, nil } diff --git a/x/yieldaggregator/keeper/grpc_query_denom_symbol.go b/x/yieldaggregator/keeper/grpc_query_symbol_info.go similarity index 50% rename from x/yieldaggregator/keeper/grpc_query_denom_symbol.go rename to x/yieldaggregator/keeper/grpc_query_symbol_info.go index 53b21fd2b..895aa61b4 100644 --- a/x/yieldaggregator/keeper/grpc_query_denom_symbol.go +++ b/x/yieldaggregator/keeper/grpc_query_symbol_info.go @@ -10,15 +10,13 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k Keeper) DenomSymbolMap(c context.Context, req *types.QueryDenomSymbolMapRequest) (*types.QueryDenomSymbolMapResponse, error) { +func (k Keeper) SymbolInfo(c context.Context, req *types.QuerySymbolInfosRequest) (*types.QuerySymbolInfosResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(c) - return &types.QueryDenomSymbolMapResponse{ - Mappings: k.GetAllDenomSymbolMap(ctx), + return &types.QuerySymbolInfosResponse{ + Info: k.GetAllSymbolInfo(ctx), }, nil } - -// rpc RegisterDenomSymbolMap(MsgRegisterDenomSymbolMap) returns (MsgRegisterDenomSymbolMapResponse); diff --git a/x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go b/x/yieldaggregator/keeper/msg_server_register_denom_info.go similarity index 51% rename from x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go rename to x/yieldaggregator/keeper/msg_server_register_denom_info.go index 78e9a52eb..2d1c8ba01 100644 --- a/x/yieldaggregator/keeper/msg_server_register_denom_symbol_map.go +++ b/x/yieldaggregator/keeper/msg_server_register_denom_info.go @@ -9,15 +9,15 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k msgServer) RegisterDenomSymbolMap(ctx context.Context, msg *types.MsgRegisterDenomSymbolMap) (*types.MsgRegisterDenomSymbolMapResponse, error) { +func (k msgServer) RegisterDenomInfos(ctx context.Context, msg *types.MsgRegisterDenomInfos) (*types.MsgRegisterDenomInfosResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) if k.authority != msg.Sender { return nil, sdkerrors.ErrUnauthorized } - for _, dsm := range msg.Mappings { - k.SetDenomSymbolMap(sdkCtx, dsm.Key, dsm.Value) + for _, dsm := range msg.Info { + k.SetDenomInfo(sdkCtx, dsm) } - return &types.MsgRegisterDenomSymbolMapResponse{}, nil + return &types.MsgRegisterDenomInfosResponse{}, nil } diff --git a/x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go similarity index 50% rename from x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go rename to x/yieldaggregator/keeper/msg_server_register_symbol_info.go index 1bcd98b3a..91f0d2e41 100644 --- a/x/yieldaggregator/keeper/msg_server_register_symbol_swap_contract_map.go +++ b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go @@ -9,15 +9,15 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k msgServer) RegisterSymbolSwapContractMap(ctx context.Context, msg *types.MsgSymbolSwapContractMap) (*types.MsgSymbolSwapContractMapResponse, error) { +func (k msgServer) RegisterSymbolInfo(ctx context.Context, msg *types.MsgSymbolInfos) (*types.MsgSymbolInfosResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) if k.authority != msg.Sender { return nil, sdkerrors.ErrUnauthorized } - for _, dsm := range msg.Mappings { - k.SetSymbolSwapContractMap(sdkCtx, dsm.Key, dsm.Value) + for _, dsm := range msg.Info { + k.SetSymbolInfo(sdkCtx, dsm) } - return &types.MsgSymbolSwapContractMapResponse{}, nil + return &types.MsgSymbolInfosResponse{}, nil } diff --git a/x/yieldaggregator/keeper/symbol_contract_map.go b/x/yieldaggregator/keeper/symbol_contract_map.go deleted file mode 100644 index 97dbddf7e..000000000 --- a/x/yieldaggregator/keeper/symbol_contract_map.go +++ /dev/null @@ -1,42 +0,0 @@ -package keeper - -import ( - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/UnUniFi/chain/x/yieldaggregator/types" -) - -// SetSymbolSwapContractMap set a specific SymbolSwapContractMap in the store -func (k Keeper) SetSymbolSwapContractMap(ctx sdk.Context, symbol string, contract string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) - store.Set([]byte(symbol), []byte(contract)) -} - -// GetSymbolSwapContractMap returns a SymbolSwapContractMap from its id -func (k Keeper) GetSymbolSwapContractMap(ctx sdk.Context, symbol string) string { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) - bz := store.Get([]byte(symbol)) - if bz == nil { - return "" - } - return string(bz) -} - -// GetAllSymbolSwapContractMap returns a SymbolSwapContractMap -func (k Keeper) GetAllSymbolSwapContractMap(ctx sdk.Context) []types.Mapping { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolContractMapKey)) - - iterator := sdk.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - mappings := []types.Mapping{} - - for ; iterator.Valid(); iterator.Next() { - mappings = append(mappings, types.Mapping{ - Key: string(iterator.Key()), - Value: string(iterator.Value()), - }) - } - return mappings -} diff --git a/x/yieldaggregator/keeper/symbol_info.go b/x/yieldaggregator/keeper/symbol_info.go new file mode 100644 index 000000000..c8c365034 --- /dev/null +++ b/x/yieldaggregator/keeper/symbol_info.go @@ -0,0 +1,45 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +// SetSymbolInfo set a specific SymbolInfo in the store +func (k Keeper) SetSymbolInfo(ctx sdk.Context, symbolInfo types.SymbolInfo) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolInfoKey)) + bz := k.cdc.MustMarshal(&symbolInfo) + store.Set([]byte(symbolInfo.Symbol), bz) +} + +// GetSymbolInfo returns a SymbolInfo from its id +func (k Keeper) GetSymbolInfo(ctx sdk.Context, symbol string) types.SymbolInfo { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolInfoKey)) + bz := store.Get([]byte(symbol)) + symbolInfo := types.SymbolInfo{} + if bz == nil { + return symbolInfo + } + + k.cdc.MustUnmarshal(bz, &symbolInfo) + return symbolInfo +} + +// GetAllSymbolInfo returns a SymbolInfo +func (k Keeper) GetAllSymbolInfo(ctx sdk.Context) []types.SymbolInfo { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.SymbolInfoKey)) + + iterator := sdk.KVStorePrefixIterator(store, nil) + defer iterator.Close() + + infos := []types.SymbolInfo{} + + for ; iterator.Valid(); iterator.Next() { + info := types.SymbolInfo{} + k.cdc.MustUnmarshal(iterator.Value(), &info) + infos = append(infos, info) + } + return infos +} diff --git a/x/yieldaggregator/types/keys.go b/x/yieldaggregator/types/keys.go index f2dc1f2ac..6b47ad2be 100644 --- a/x/yieldaggregator/types/keys.go +++ b/x/yieldaggregator/types/keys.go @@ -25,12 +25,12 @@ var ( ) const ( - VaultKey = "Vault/value/" - VaultCountKey = "Vault/count/" - StrategyKey = "Strategy/value/" - StrategyCountKey = "Strategy/count/" - DenomSymbolMapKey = "Denom/symbol/" - SymbolContractMapKey = "Symbol/contract/" + VaultKey = "Vault/value/" + VaultCountKey = "Vault/count/" + StrategyKey = "Strategy/value/" + StrategyCountKey = "Strategy/count/" + DenomInfoKey = "Denom/info/" + SymbolInfoKey = "Symbol/info/" ) func KeyPrefixStrategy(vaultDenom string) []byte { diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 8b701f389..598c3effd 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -909,21 +909,21 @@ func (m *QueryEstimateRedeemAmountResponse) GetTotalAmount() types.Coin { return types.Coin{} } -type QueryDenomSymbolMapRequest struct { +type QueryDenomInfosRequest struct { } -func (m *QueryDenomSymbolMapRequest) Reset() { *m = QueryDenomSymbolMapRequest{} } -func (m *QueryDenomSymbolMapRequest) String() string { return proto.CompactTextString(m) } -func (*QueryDenomSymbolMapRequest) ProtoMessage() {} -func (*QueryDenomSymbolMapRequest) Descriptor() ([]byte, []int) { +func (m *QueryDenomInfosRequest) Reset() { *m = QueryDenomInfosRequest{} } +func (m *QueryDenomInfosRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDenomInfosRequest) ProtoMessage() {} +func (*QueryDenomInfosRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4dec8609c4c8573d, []int{18} } -func (m *QueryDenomSymbolMapRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryDenomInfosRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryDenomSymbolMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDenomInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryDenomSymbolMapRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDenomInfosRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -933,34 +933,34 @@ func (m *QueryDenomSymbolMapRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryDenomSymbolMapRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDenomSymbolMapRequest.Merge(m, src) +func (m *QueryDenomInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomInfosRequest.Merge(m, src) } -func (m *QueryDenomSymbolMapRequest) XXX_Size() int { +func (m *QueryDenomInfosRequest) XXX_Size() int { return m.Size() } -func (m *QueryDenomSymbolMapRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDenomSymbolMapRequest.DiscardUnknown(m) +func (m *QueryDenomInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomInfosRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryDenomSymbolMapRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryDenomInfosRequest proto.InternalMessageInfo -type QueryDenomSymbolMapResponse struct { - Mappings []Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"` +type QueryDenomInfosResponse struct { + Info []DenomInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` } -func (m *QueryDenomSymbolMapResponse) Reset() { *m = QueryDenomSymbolMapResponse{} } -func (m *QueryDenomSymbolMapResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDenomSymbolMapResponse) ProtoMessage() {} -func (*QueryDenomSymbolMapResponse) Descriptor() ([]byte, []int) { +func (m *QueryDenomInfosResponse) Reset() { *m = QueryDenomInfosResponse{} } +func (m *QueryDenomInfosResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDenomInfosResponse) ProtoMessage() {} +func (*QueryDenomInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4dec8609c4c8573d, []int{19} } -func (m *QueryDenomSymbolMapResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryDenomInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDenomInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryDenomSymbolMapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDenomInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -970,40 +970,40 @@ func (m *QueryDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryDenomSymbolMapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDenomSymbolMapResponse.Merge(m, src) +func (m *QueryDenomInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDenomInfosResponse.Merge(m, src) } -func (m *QueryDenomSymbolMapResponse) XXX_Size() int { +func (m *QueryDenomInfosResponse) XXX_Size() int { return m.Size() } -func (m *QueryDenomSymbolMapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDenomSymbolMapResponse.DiscardUnknown(m) +func (m *QueryDenomInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDenomInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryDenomSymbolMapResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryDenomInfosResponse proto.InternalMessageInfo -func (m *QueryDenomSymbolMapResponse) GetMappings() []Mapping { +func (m *QueryDenomInfosResponse) GetInfo() []DenomInfo { if m != nil { - return m.Mappings + return m.Info } return nil } -type QuerySymbolSwapContractMapRequest struct { +type QuerySymbolInfosRequest struct { } -func (m *QuerySymbolSwapContractMapRequest) Reset() { *m = QuerySymbolSwapContractMapRequest{} } -func (m *QuerySymbolSwapContractMapRequest) String() string { return proto.CompactTextString(m) } -func (*QuerySymbolSwapContractMapRequest) ProtoMessage() {} -func (*QuerySymbolSwapContractMapRequest) Descriptor() ([]byte, []int) { +func (m *QuerySymbolInfosRequest) Reset() { *m = QuerySymbolInfosRequest{} } +func (m *QuerySymbolInfosRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySymbolInfosRequest) ProtoMessage() {} +func (*QuerySymbolInfosRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4dec8609c4c8573d, []int{20} } -func (m *QuerySymbolSwapContractMapRequest) XXX_Unmarshal(b []byte) error { +func (m *QuerySymbolInfosRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QuerySymbolSwapContractMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySymbolInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QuerySymbolSwapContractMapRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySymbolInfosRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1013,34 +1013,34 @@ func (m *QuerySymbolSwapContractMapRequest) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QuerySymbolSwapContractMapRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySymbolSwapContractMapRequest.Merge(m, src) +func (m *QuerySymbolInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySymbolInfosRequest.Merge(m, src) } -func (m *QuerySymbolSwapContractMapRequest) XXX_Size() int { +func (m *QuerySymbolInfosRequest) XXX_Size() int { return m.Size() } -func (m *QuerySymbolSwapContractMapRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySymbolSwapContractMapRequest.DiscardUnknown(m) +func (m *QuerySymbolInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySymbolInfosRequest.DiscardUnknown(m) } -var xxx_messageInfo_QuerySymbolSwapContractMapRequest proto.InternalMessageInfo +var xxx_messageInfo_QuerySymbolInfosRequest proto.InternalMessageInfo -type QuerySymbolSwapContractMapResponse struct { - Mappings []Mapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"` +type QuerySymbolInfosResponse struct { + Info []SymbolInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info"` } -func (m *QuerySymbolSwapContractMapResponse) Reset() { *m = QuerySymbolSwapContractMapResponse{} } -func (m *QuerySymbolSwapContractMapResponse) String() string { return proto.CompactTextString(m) } -func (*QuerySymbolSwapContractMapResponse) ProtoMessage() {} -func (*QuerySymbolSwapContractMapResponse) Descriptor() ([]byte, []int) { +func (m *QuerySymbolInfosResponse) Reset() { *m = QuerySymbolInfosResponse{} } +func (m *QuerySymbolInfosResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySymbolInfosResponse) ProtoMessage() {} +func (*QuerySymbolInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4dec8609c4c8573d, []int{21} } -func (m *QuerySymbolSwapContractMapResponse) XXX_Unmarshal(b []byte) error { +func (m *QuerySymbolInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QuerySymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySymbolInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QuerySymbolSwapContractMapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySymbolInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1050,21 +1050,21 @@ func (m *QuerySymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QuerySymbolSwapContractMapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySymbolSwapContractMapResponse.Merge(m, src) +func (m *QuerySymbolInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySymbolInfosResponse.Merge(m, src) } -func (m *QuerySymbolSwapContractMapResponse) XXX_Size() int { +func (m *QuerySymbolInfosResponse) XXX_Size() int { return m.Size() } -func (m *QuerySymbolSwapContractMapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySymbolSwapContractMapResponse.DiscardUnknown(m) +func (m *QuerySymbolInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySymbolInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_QuerySymbolSwapContractMapResponse proto.InternalMessageInfo +var xxx_messageInfo_QuerySymbolInfosResponse proto.InternalMessageInfo -func (m *QuerySymbolSwapContractMapResponse) GetMappings() []Mapping { +func (m *QuerySymbolInfosResponse) GetInfo() []SymbolInfo { if m != nil { - return m.Mappings + return m.Info } return nil } @@ -1088,10 +1088,10 @@ func init() { proto.RegisterType((*QueryEstimateMintAmountResponse)(nil), "ununifi.yieldaggregator.QueryEstimateMintAmountResponse") proto.RegisterType((*QueryEstimateRedeemAmountRequest)(nil), "ununifi.yieldaggregator.QueryEstimateRedeemAmountRequest") proto.RegisterType((*QueryEstimateRedeemAmountResponse)(nil), "ununifi.yieldaggregator.QueryEstimateRedeemAmountResponse") - proto.RegisterType((*QueryDenomSymbolMapRequest)(nil), "ununifi.yieldaggregator.QueryDenomSymbolMapRequest") - proto.RegisterType((*QueryDenomSymbolMapResponse)(nil), "ununifi.yieldaggregator.QueryDenomSymbolMapResponse") - proto.RegisterType((*QuerySymbolSwapContractMapRequest)(nil), "ununifi.yieldaggregator.QuerySymbolSwapContractMapRequest") - proto.RegisterType((*QuerySymbolSwapContractMapResponse)(nil), "ununifi.yieldaggregator.QuerySymbolSwapContractMapResponse") + proto.RegisterType((*QueryDenomInfosRequest)(nil), "ununifi.yieldaggregator.QueryDenomInfosRequest") + proto.RegisterType((*QueryDenomInfosResponse)(nil), "ununifi.yieldaggregator.QueryDenomInfosResponse") + proto.RegisterType((*QuerySymbolInfosRequest)(nil), "ununifi.yieldaggregator.QuerySymbolInfosRequest") + proto.RegisterType((*QuerySymbolInfosResponse)(nil), "ununifi.yieldaggregator.QuerySymbolInfosResponse") } func init() { @@ -1099,94 +1099,93 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1389 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 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 0x1e, 0x66, 0x25, 0xb2, 0x13, 0x61, 0x6c, 0xb7, - 0x11, 0x50, 0x13, 0x9c, 0x0e, 0x62, 0x57, 0xb4, 0xe6, 0x5a, 0x9a, 0xa7, 0x35, 0x77, 0xb3, 0xa3, - 0x03, 0xc3, 0x2b, 0xae, 0x81, 0x60, 0x7f, 0x06, 0x69, 0x19, 0xe9, 0x5a, 0x28, 0xa8, 0x87, 0x05, - 0xb9, 0x45, 0x99, 0x50, 0x77, 0x42, 0xcc, 0x05, 0x8a, 0x4e, 0x81, 0xa9, 0x78, 0xcb, 0x2d, 0x97, - 0x3f, 0xa0, 0x9f, 0x2a, 0x6f, 0xbb, 0x04, 0x73, 0xb1, 0xc0, 0x3a, 0x93, 0x0f, 0x61, 0xca, 0xa3, - 0xac, 0x01, 0xa3, 0x92, 0x39, 0xda, 0x22, 0x76, 0x23, 0xf3, 0x55, 0x4e, 0x99, 0x39, 0x2d, 0x5e, - 0x03, 0xc9, 0xde, 0x80, 0xf9, 0x96, 0x20, 0x79, 0x52, 0x26, 0xc4, 0xeb, 0xcd, 0x7f, 0x0e, 0xa6, - 0x8a, 0xb5, 0x80, 0xb5, 0x92, 0x87, 0xe8, 0x91, 0x06, 0xfd, 0x29, 0xa1, 0xe7, 0x5f, 0x77, 0x54, - 0x4d, 0x7e, 0xc5, 0xcc, 0xbf, 0xe1, 0xd8, 0xab, 0x01, 0xa9, 0x6f, 0xdd, 0x1c, 0x8c, 0x6e, 0x12, - 0xa2, 0x4f, 0x79, 0x5f, 0xd7, 0xc8, 0x16, 0xad, 0xc1, 0x81, 0x40, 0xd2, 0x69, 0x1e, 0x01, 0x03, - 0x38, 0xef, 0x0f, 0x9a, 0x92, 0x88, 0xc8, 0xab, 0x89, 0xa2, 0x41, 0xc6, 0x06, 0x24, 0x2f, 0x9d, - 0x74, 0x99, 0x8e, 0x43, 0x4a, 0x56, 0x69, 0x2d, 0xba, 0x3d, 0x36, 0xea, 0x5e, 0x91, 0x57, 0x6f, -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xef, 0x22, 0xec, 0x39, 0x0d, 0xed, - 0x4b, 0x32, 0x8b, 0x8b, 0x28, 0x17, 0x7f, 0x2e, 0x14, 0xff, 0x70, 0x0b, 0xfb, 0x99, 0x92, 0x46, - 0x88, 0xb2, 0x59, 0xf9, 0xf8, 0xd9, 0xab, 0xb4, 0xf5, 0xfc, 0x55, 0xda, 0xfa, 0xe7, 0x55, 0xda, - 0xfa, 0x66, 0x3b, 0x3d, 0xf2, 0x7c, 0x3b, 0x3d, 0xf2, 0xd7, 0x76, 0x7a, 0xe4, 0xf3, 0xf3, 0x2e, - 0x15, 0x95, 0x5a, 0x31, 0x5b, 0xe2, 0x9e, 0x73, 0x87, 0xdd, 0x61, 0x74, 0x9d, 0x3a, 0xa5, 0x0a, - 0xa6, 0xcc, 0xf9, 0xaa, 0x03, 0x5e, 0xd4, 0x7d, 0x12, 0x16, 0x27, 0xe4, 0xbf, 0xda, 0x2e, 0xfe, - 0x17, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x52, 0xf7, 0x70, 0x9a, 0x14, 0x00, 0x00, + // 1368 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x13, 0x47, + 0x14, 0xcf, 0x3a, 0x1f, 0x82, 0x17, 0xa0, 0x30, 0x18, 0x08, 0x6e, 0xe5, 0x90, 0xe5, 0x23, 0x11, + 0x60, 0x6f, 0x42, 0x0f, 0x2d, 0x5f, 0x6d, 0xf3, 0x41, 0x28, 0x15, 0x95, 0xa8, 0x53, 0x40, 0x2d, + 0x6a, 0xad, 0xb5, 0x3d, 0x59, 0x8f, 0xb0, 0x67, 0xcc, 0xee, 0x18, 0x6a, 0x21, 0x2e, 0x3d, 0xf7, + 0x50, 0xb5, 0xbd, 0x56, 0x15, 0x52, 0xa5, 0xfe, 0x03, 0xf4, 0x6f, 0x28, 0xea, 0x09, 0x51, 0xa9, + 0xaa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, 0x00, 0xff, 0xff, + 0xd8, 0xcc, 0x97, 0xfd, 0x38, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1211,8 +1210,8 @@ type QueryClient interface { Strategy(ctx context.Context, in *QueryGetStrategyRequest, opts ...grpc.CallOption) (*QueryGetStrategyResponse, error) EstimateMintAmount(ctx context.Context, in *QueryEstimateMintAmountRequest, opts ...grpc.CallOption) (*QueryEstimateMintAmountResponse, error) EstimateRedeemAmount(ctx context.Context, in *QueryEstimateRedeemAmountRequest, opts ...grpc.CallOption) (*QueryEstimateRedeemAmountResponse, error) - DenomSymbolMap(ctx context.Context, in *QueryDenomSymbolMapRequest, opts ...grpc.CallOption) (*QueryDenomSymbolMapResponse, error) - SymbolSwapContractMap(ctx context.Context, in *QuerySymbolSwapContractMapRequest, opts ...grpc.CallOption) (*QuerySymbolSwapContractMapResponse, error) + DenomInfos(ctx context.Context, in *QueryDenomInfosRequest, opts ...grpc.CallOption) (*QueryDenomInfosResponse, error) + SymbolInfos(ctx context.Context, in *QuerySymbolInfosRequest, opts ...grpc.CallOption) (*QuerySymbolInfosResponse, error) } type queryClient struct { @@ -1295,18 +1294,18 @@ func (c *queryClient) EstimateRedeemAmount(ctx context.Context, in *QueryEstimat return out, nil } -func (c *queryClient) DenomSymbolMap(ctx context.Context, in *QueryDenomSymbolMapRequest, opts ...grpc.CallOption) (*QueryDenomSymbolMapResponse, error) { - out := new(QueryDenomSymbolMapResponse) - err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/DenomSymbolMap", in, out, opts...) +func (c *queryClient) DenomInfos(ctx context.Context, in *QueryDenomInfosRequest, opts ...grpc.CallOption) (*QueryDenomInfosResponse, error) { + out := new(QueryDenomInfosResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/DenomInfos", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) SymbolSwapContractMap(ctx context.Context, in *QuerySymbolSwapContractMapRequest, opts ...grpc.CallOption) (*QuerySymbolSwapContractMapResponse, error) { - out := new(QuerySymbolSwapContractMapResponse) - err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/SymbolSwapContractMap", in, out, opts...) +func (c *queryClient) SymbolInfos(ctx context.Context, in *QuerySymbolInfosRequest, opts ...grpc.CallOption) (*QuerySymbolInfosResponse, error) { + out := new(QuerySymbolInfosResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/SymbolInfos", in, out, opts...) if err != nil { return nil, err } @@ -1325,8 +1324,8 @@ type QueryServer interface { Strategy(context.Context, *QueryGetStrategyRequest) (*QueryGetStrategyResponse, error) EstimateMintAmount(context.Context, *QueryEstimateMintAmountRequest) (*QueryEstimateMintAmountResponse, error) EstimateRedeemAmount(context.Context, *QueryEstimateRedeemAmountRequest) (*QueryEstimateRedeemAmountResponse, error) - DenomSymbolMap(context.Context, *QueryDenomSymbolMapRequest) (*QueryDenomSymbolMapResponse, error) - SymbolSwapContractMap(context.Context, *QuerySymbolSwapContractMapRequest) (*QuerySymbolSwapContractMapResponse, error) + DenomInfos(context.Context, *QueryDenomInfosRequest) (*QueryDenomInfosResponse, error) + SymbolInfos(context.Context, *QuerySymbolInfosRequest) (*QuerySymbolInfosResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1357,11 +1356,11 @@ func (*UnimplementedQueryServer) EstimateMintAmount(ctx context.Context, req *Qu func (*UnimplementedQueryServer) EstimateRedeemAmount(ctx context.Context, req *QueryEstimateRedeemAmountRequest) (*QueryEstimateRedeemAmountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method EstimateRedeemAmount not implemented") } -func (*UnimplementedQueryServer) DenomSymbolMap(ctx context.Context, req *QueryDenomSymbolMapRequest) (*QueryDenomSymbolMapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DenomSymbolMap not implemented") +func (*UnimplementedQueryServer) DenomInfos(ctx context.Context, req *QueryDenomInfosRequest) (*QueryDenomInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DenomInfos not implemented") } -func (*UnimplementedQueryServer) SymbolSwapContractMap(ctx context.Context, req *QuerySymbolSwapContractMapRequest) (*QuerySymbolSwapContractMapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SymbolSwapContractMap not implemented") +func (*UnimplementedQueryServer) SymbolInfos(ctx context.Context, req *QuerySymbolInfosRequest) (*QuerySymbolInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SymbolInfos not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -1512,38 +1511,38 @@ func _Query_EstimateRedeemAmount_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _Query_DenomSymbolMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDenomSymbolMapRequest) +func _Query_DenomInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDenomInfosRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).DenomSymbolMap(ctx, in) + return srv.(QueryServer).DenomInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ununifi.yieldaggregator.Query/DenomSymbolMap", + FullMethod: "/ununifi.yieldaggregator.Query/DenomInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DenomSymbolMap(ctx, req.(*QueryDenomSymbolMapRequest)) + return srv.(QueryServer).DenomInfos(ctx, req.(*QueryDenomInfosRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_SymbolSwapContractMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySymbolSwapContractMapRequest) +func _Query_SymbolInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySymbolInfosRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).SymbolSwapContractMap(ctx, in) + return srv.(QueryServer).SymbolInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ununifi.yieldaggregator.Query/SymbolSwapContractMap", + FullMethod: "/ununifi.yieldaggregator.Query/SymbolInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SymbolSwapContractMap(ctx, req.(*QuerySymbolSwapContractMapRequest)) + return srv.(QueryServer).SymbolInfos(ctx, req.(*QuerySymbolInfosRequest)) } return interceptor(ctx, in, info, handler) } @@ -1585,12 +1584,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_EstimateRedeemAmount_Handler, }, { - MethodName: "DenomSymbolMap", - Handler: _Query_DenomSymbolMap_Handler, + MethodName: "DenomInfos", + Handler: _Query_DenomInfos_Handler, }, { - MethodName: "SymbolSwapContractMap", - Handler: _Query_SymbolSwapContractMap_Handler, + MethodName: "SymbolInfos", + Handler: _Query_SymbolInfos_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -2360,7 +2359,7 @@ func (m *QueryEstimateRedeemAmountResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryDenomSymbolMapRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDenomInfosRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2370,12 +2369,12 @@ func (m *QueryDenomSymbolMapRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryDenomSymbolMapRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDenomInfosRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDenomSymbolMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDenomInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2383,7 +2382,7 @@ func (m *QueryDenomSymbolMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryDenomSymbolMapResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDenomInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2393,20 +2392,20 @@ func (m *QueryDenomSymbolMapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryDenomSymbolMapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDenomInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDenomInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Mappings) > 0 { - for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Info) > 0 { + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2420,7 +2419,7 @@ func (m *QueryDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *QuerySymbolSwapContractMapRequest) Marshal() (dAtA []byte, err error) { +func (m *QuerySymbolInfosRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2430,12 +2429,12 @@ func (m *QuerySymbolSwapContractMapRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QuerySymbolSwapContractMapRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySymbolInfosRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QuerySymbolSwapContractMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySymbolInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2443,7 +2442,7 @@ func (m *QuerySymbolSwapContractMapRequest) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QuerySymbolSwapContractMapResponse) Marshal() (dAtA []byte, err error) { +func (m *QuerySymbolInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2453,20 +2452,20 @@ func (m *QuerySymbolSwapContractMapResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QuerySymbolSwapContractMapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySymbolInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QuerySymbolSwapContractMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Mappings) > 0 { - for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Info) > 0 { + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2763,7 +2762,7 @@ func (m *QueryEstimateRedeemAmountResponse) Size() (n int) { return n } -func (m *QueryDenomSymbolMapRequest) Size() (n int) { +func (m *QueryDenomInfosRequest) Size() (n int) { if m == nil { return 0 } @@ -2772,14 +2771,14 @@ func (m *QueryDenomSymbolMapRequest) Size() (n int) { return n } -func (m *QueryDenomSymbolMapResponse) Size() (n int) { +func (m *QueryDenomInfosResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Mappings) > 0 { - for _, e := range m.Mappings { + if len(m.Info) > 0 { + for _, e := range m.Info { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -2787,7 +2786,7 @@ func (m *QueryDenomSymbolMapResponse) Size() (n int) { return n } -func (m *QuerySymbolSwapContractMapRequest) Size() (n int) { +func (m *QuerySymbolInfosRequest) Size() (n int) { if m == nil { return 0 } @@ -2796,14 +2795,14 @@ func (m *QuerySymbolSwapContractMapRequest) Size() (n int) { return n } -func (m *QuerySymbolSwapContractMapResponse) Size() (n int) { +func (m *QuerySymbolInfosResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Mappings) > 0 { - for _, e := range m.Mappings { + if len(m.Info) > 0 { + for _, e := range m.Info { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -4869,7 +4868,7 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomSymbolMapRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDenomInfosRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4892,10 +4891,10 @@ func (m *QueryDenomSymbolMapRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomSymbolMapRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomInfosRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomSymbolMapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4919,7 +4918,7 @@ func (m *QueryDenomSymbolMapRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDenomInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4942,15 +4941,15 @@ func (m *QueryDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDenomSymbolMapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDenomInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDenomSymbolMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDenomInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4977,8 +4976,8 @@ func (m *QueryDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mappings = append(m.Mappings, Mapping{}) - if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Info = append(m.Info, DenomInfo{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5003,7 +5002,7 @@ func (m *QueryDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySymbolSwapContractMapRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySymbolInfosRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5026,10 +5025,10 @@ func (m *QuerySymbolSwapContractMapRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySymbolSwapContractMapRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySymbolInfosRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySymbolSwapContractMapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySymbolInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -5053,7 +5052,7 @@ func (m *QuerySymbolSwapContractMapRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QuerySymbolSwapContractMapResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySymbolInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5076,15 +5075,15 @@ func (m *QuerySymbolSwapContractMapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QuerySymbolSwapContractMapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySymbolInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QuerySymbolSwapContractMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySymbolInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5111,8 +5110,8 @@ func (m *QuerySymbolSwapContractMapResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mappings = append(m.Mappings, Mapping{}) - if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Info = append(m.Info, SymbolInfo{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/yieldaggregator/types/query.pb.gw.go b/x/yieldaggregator/types/query.pb.gw.go index 035bb80f6..3ad6019d6 100644 --- a/x/yieldaggregator/types/query.pb.gw.go +++ b/x/yieldaggregator/types/query.pb.gw.go @@ -447,38 +447,38 @@ func local_request_Query_EstimateRedeemAmount_0(ctx context.Context, marshaler r } -func request_Query_DenomSymbolMap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDenomSymbolMapRequest +func request_Query_DenomInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomInfosRequest var metadata runtime.ServerMetadata - msg, err := client.DenomSymbolMap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DenomInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_DenomSymbolMap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDenomSymbolMapRequest +func local_request_Query_DenomInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDenomInfosRequest var metadata runtime.ServerMetadata - msg, err := server.DenomSymbolMap(ctx, &protoReq) + msg, err := server.DenomInfos(ctx, &protoReq) return msg, metadata, err } -func request_Query_SymbolSwapContractMap_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QuerySymbolSwapContractMapRequest +func request_Query_SymbolInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySymbolInfosRequest var metadata runtime.ServerMetadata - msg, err := client.SymbolSwapContractMap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SymbolInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_SymbolSwapContractMap_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QuerySymbolSwapContractMapRequest +func local_request_Query_SymbolInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySymbolInfosRequest var metadata runtime.ServerMetadata - msg, err := server.SymbolSwapContractMap(ctx, &protoReq) + msg, err := server.SymbolInfos(ctx, &protoReq) return msg, metadata, err } @@ -673,7 +673,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_DenomSymbolMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DenomInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -684,7 +684,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_DenomSymbolMap_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_DenomInfos_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 { @@ -692,11 +692,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_DenomSymbolMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DenomInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SymbolSwapContractMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SymbolInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -707,7 +707,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_SymbolSwapContractMap_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_SymbolInfos_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 { @@ -715,7 +715,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_SymbolSwapContractMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SymbolInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -920,7 +920,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_DenomSymbolMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DenomInfos_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) @@ -929,18 +929,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_DenomSymbolMap_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_DenomInfos_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_DenomSymbolMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DenomInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_SymbolSwapContractMap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SymbolInfos_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) @@ -949,14 +949,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_SymbolSwapContractMap_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_SymbolInfos_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_SymbolSwapContractMap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SymbolInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -980,9 +980,9 @@ var ( pattern_Query_EstimateRedeemAmount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"ununifi", "yieldaggregator", "vaults", "id", "estimate-redeem-amount"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DenomSymbolMap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "denom-symbol-map"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "denom-infos"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_SymbolSwapContractMap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "symbol-swap-contract-map"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_SymbolInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "symbol-infos"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1002,7 +1002,7 @@ var ( forward_Query_EstimateRedeemAmount_0 = runtime.ForwardResponseMessage - forward_Query_DenomSymbolMap_0 = runtime.ForwardResponseMessage + forward_Query_DenomInfos_0 = runtime.ForwardResponseMessage - forward_Query_SymbolSwapContractMap_0 = runtime.ForwardResponseMessage + forward_Query_SymbolInfos_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 83c117889..a5cd2ce6c 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -822,23 +822,23 @@ func (m *MsgDeleteVaultResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeleteVaultResponse proto.InternalMessageInfo -type MsgRegisterDenomSymbolMap struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Mappings []Mapping `protobuf:"bytes,2,rep,name=mappings,proto3" json:"mappings"` +type MsgRegisterDenomInfos struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Info []DenomInfo `protobuf:"bytes,2,rep,name=info,proto3" json:"info"` } -func (m *MsgRegisterDenomSymbolMap) Reset() { *m = MsgRegisterDenomSymbolMap{} } -func (m *MsgRegisterDenomSymbolMap) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterDenomSymbolMap) ProtoMessage() {} -func (*MsgRegisterDenomSymbolMap) Descriptor() ([]byte, []int) { +func (m *MsgRegisterDenomInfos) Reset() { *m = MsgRegisterDenomInfos{} } +func (m *MsgRegisterDenomInfos) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterDenomInfos) ProtoMessage() {} +func (*MsgRegisterDenomInfos) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{20} } -func (m *MsgRegisterDenomSymbolMap) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterDenomInfos) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRegisterDenomSymbolMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterDenomInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRegisterDenomSymbolMap.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterDenomInfos.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -848,47 +848,47 @@ func (m *MsgRegisterDenomSymbolMap) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgRegisterDenomSymbolMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterDenomSymbolMap.Merge(m, src) +func (m *MsgRegisterDenomInfos) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterDenomInfos.Merge(m, src) } -func (m *MsgRegisterDenomSymbolMap) XXX_Size() int { +func (m *MsgRegisterDenomInfos) XXX_Size() int { return m.Size() } -func (m *MsgRegisterDenomSymbolMap) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterDenomSymbolMap.DiscardUnknown(m) +func (m *MsgRegisterDenomInfos) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterDenomInfos.DiscardUnknown(m) } -var xxx_messageInfo_MsgRegisterDenomSymbolMap proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterDenomInfos proto.InternalMessageInfo -func (m *MsgRegisterDenomSymbolMap) GetSender() string { +func (m *MsgRegisterDenomInfos) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *MsgRegisterDenomSymbolMap) GetMappings() []Mapping { +func (m *MsgRegisterDenomInfos) GetInfo() []DenomInfo { if m != nil { - return m.Mappings + return m.Info } return nil } -type MsgRegisterDenomSymbolMapResponse struct { +type MsgRegisterDenomInfosResponse struct { } -func (m *MsgRegisterDenomSymbolMapResponse) Reset() { *m = MsgRegisterDenomSymbolMapResponse{} } -func (m *MsgRegisterDenomSymbolMapResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterDenomSymbolMapResponse) ProtoMessage() {} -func (*MsgRegisterDenomSymbolMapResponse) Descriptor() ([]byte, []int) { +func (m *MsgRegisterDenomInfosResponse) Reset() { *m = MsgRegisterDenomInfosResponse{} } +func (m *MsgRegisterDenomInfosResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterDenomInfosResponse) ProtoMessage() {} +func (*MsgRegisterDenomInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{21} } -func (m *MsgRegisterDenomSymbolMapResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterDenomInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgRegisterDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterDenomInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterDenomInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -898,35 +898,35 @@ func (m *MsgRegisterDenomSymbolMapResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgRegisterDenomSymbolMapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.Merge(m, src) +func (m *MsgRegisterDenomInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterDenomInfosResponse.Merge(m, src) } -func (m *MsgRegisterDenomSymbolMapResponse) XXX_Size() int { +func (m *MsgRegisterDenomInfosResponse) XXX_Size() int { return m.Size() } -func (m *MsgRegisterDenomSymbolMapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterDenomSymbolMapResponse.DiscardUnknown(m) +func (m *MsgRegisterDenomInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterDenomInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgRegisterDenomSymbolMapResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterDenomInfosResponse proto.InternalMessageInfo -type MsgSymbolSwapContractMap struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Mappings []Mapping `protobuf:"bytes,2,rep,name=mappings,proto3" json:"mappings"` +type MsgSymbolInfos struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Info []SymbolInfo `protobuf:"bytes,2,rep,name=info,proto3" json:"info"` } -func (m *MsgSymbolSwapContractMap) Reset() { *m = MsgSymbolSwapContractMap{} } -func (m *MsgSymbolSwapContractMap) String() string { return proto.CompactTextString(m) } -func (*MsgSymbolSwapContractMap) ProtoMessage() {} -func (*MsgSymbolSwapContractMap) Descriptor() ([]byte, []int) { +func (m *MsgSymbolInfos) Reset() { *m = MsgSymbolInfos{} } +func (m *MsgSymbolInfos) String() string { return proto.CompactTextString(m) } +func (*MsgSymbolInfos) ProtoMessage() {} +func (*MsgSymbolInfos) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{22} } -func (m *MsgSymbolSwapContractMap) XXX_Unmarshal(b []byte) error { +func (m *MsgSymbolInfos) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSymbolSwapContractMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSymbolInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSymbolSwapContractMap.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSymbolInfos.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -936,47 +936,47 @@ func (m *MsgSymbolSwapContractMap) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgSymbolSwapContractMap) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSymbolSwapContractMap.Merge(m, src) +func (m *MsgSymbolInfos) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSymbolInfos.Merge(m, src) } -func (m *MsgSymbolSwapContractMap) XXX_Size() int { +func (m *MsgSymbolInfos) XXX_Size() int { return m.Size() } -func (m *MsgSymbolSwapContractMap) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSymbolSwapContractMap.DiscardUnknown(m) +func (m *MsgSymbolInfos) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSymbolInfos.DiscardUnknown(m) } -var xxx_messageInfo_MsgSymbolSwapContractMap proto.InternalMessageInfo +var xxx_messageInfo_MsgSymbolInfos proto.InternalMessageInfo -func (m *MsgSymbolSwapContractMap) GetSender() string { +func (m *MsgSymbolInfos) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *MsgSymbolSwapContractMap) GetMappings() []Mapping { +func (m *MsgSymbolInfos) GetInfo() []SymbolInfo { if m != nil { - return m.Mappings + return m.Info } return nil } -type MsgSymbolSwapContractMapResponse struct { +type MsgSymbolInfosResponse struct { } -func (m *MsgSymbolSwapContractMapResponse) Reset() { *m = MsgSymbolSwapContractMapResponse{} } -func (m *MsgSymbolSwapContractMapResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSymbolSwapContractMapResponse) ProtoMessage() {} -func (*MsgSymbolSwapContractMapResponse) Descriptor() ([]byte, []int) { +func (m *MsgSymbolInfosResponse) Reset() { *m = MsgSymbolInfosResponse{} } +func (m *MsgSymbolInfosResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSymbolInfosResponse) ProtoMessage() {} +func (*MsgSymbolInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{23} } -func (m *MsgSymbolSwapContractMapResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSymbolInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSymbolInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSymbolSwapContractMapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSymbolInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -986,17 +986,17 @@ func (m *MsgSymbolSwapContractMapResponse) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *MsgSymbolSwapContractMapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSymbolSwapContractMapResponse.Merge(m, src) +func (m *MsgSymbolInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSymbolInfosResponse.Merge(m, src) } -func (m *MsgSymbolSwapContractMapResponse) XXX_Size() int { +func (m *MsgSymbolInfosResponse) XXX_Size() int { return m.Size() } -func (m *MsgSymbolSwapContractMapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSymbolSwapContractMapResponse.DiscardUnknown(m) +func (m *MsgSymbolInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSymbolInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSymbolSwapContractMapResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSymbolInfosResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgDepositToVault)(nil), "ununifi.yieldaggregator.MsgDepositToVault") @@ -1019,94 +1019,94 @@ func init() { proto.RegisterType((*MsgUpdateStrategyResponse)(nil), "ununifi.yieldaggregator.MsgUpdateStrategyResponse") proto.RegisterType((*MsgDeleteVault)(nil), "ununifi.yieldaggregator.MsgDeleteVault") proto.RegisterType((*MsgDeleteVaultResponse)(nil), "ununifi.yieldaggregator.MsgDeleteVaultResponse") - proto.RegisterType((*MsgRegisterDenomSymbolMap)(nil), "ununifi.yieldaggregator.MsgRegisterDenomSymbolMap") - proto.RegisterType((*MsgRegisterDenomSymbolMapResponse)(nil), "ununifi.yieldaggregator.MsgRegisterDenomSymbolMapResponse") - proto.RegisterType((*MsgSymbolSwapContractMap)(nil), "ununifi.yieldaggregator.MsgSymbolSwapContractMap") - proto.RegisterType((*MsgSymbolSwapContractMapResponse)(nil), "ununifi.yieldaggregator.MsgSymbolSwapContractMapResponse") + proto.RegisterType((*MsgRegisterDenomInfos)(nil), "ununifi.yieldaggregator.MsgRegisterDenomInfos") + proto.RegisterType((*MsgRegisterDenomInfosResponse)(nil), "ununifi.yieldaggregator.MsgRegisterDenomInfosResponse") + proto.RegisterType((*MsgSymbolInfos)(nil), "ununifi.yieldaggregator.MsgSymbolInfos") + proto.RegisterType((*MsgSymbolInfosResponse)(nil), "ununifi.yieldaggregator.MsgSymbolInfosResponse") } func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1240 bytes of a gzipped FileDescriptorProto + // 1238 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0x26, 0x8e, 0xd3, 0x8c, 0x21, 0x69, 0x37, 0x69, 0xb3, 0x71, 0xa9, 0x63, 0x0c, 0x28, - 0xa6, 0x10, 0x6f, 0x6c, 0xbe, 0xd4, 0x4a, 0x20, 0x35, 0x89, 0x22, 0x05, 0x61, 0x81, 0x36, 0x09, - 0x45, 0xbd, 0x58, 0xeb, 0xdd, 0xc9, 0x7a, 0xa8, 0x77, 0x66, 0x35, 0x33, 0x4e, 0xea, 0x2b, 0xa7, - 0x5e, 0x90, 0xca, 0x89, 0x6b, 0x7f, 0x00, 0x42, 0x1c, 0xca, 0x7f, 0x28, 0x07, 0x44, 0xe9, 0xa9, - 0xe2, 0x50, 0xa1, 0xe4, 0x00, 0x07, 0x7e, 0x04, 0xda, 0x9d, 0xf5, 0xd4, 0x1f, 0xbb, 0x5b, 0xdb, - 0x4d, 0x05, 0x27, 0x7b, 0x77, 0x9e, 0xf7, 0xe3, 0x79, 0xe7, 0xfd, 0xd2, 0x82, 0x42, 0x1b, 0xb7, - 0x31, 0x3a, 0x44, 0x7a, 0x07, 0xc1, 0x96, 0x6d, 0x3a, 0x0e, 0x85, 0x8e, 0xc9, 0x09, 0xd5, 0xf9, - 0x9d, 0xb2, 0x47, 0x09, 0x27, 0xea, 0x72, 0x88, 0x28, 0x0f, 0x20, 0x72, 0x4b, 0x0e, 0x71, 0x48, - 0x80, 0xd1, 0xfd, 0x7f, 0x02, 0x9e, 0x5b, 0xb6, 0x08, 0x73, 0x09, 0xd3, 0x5d, 0xe6, 0xe8, 0x47, - 0x15, 0xff, 0x27, 0x3c, 0x58, 0x11, 0x07, 0x75, 0x21, 0x21, 0x1e, 0xc2, 0xa3, 0x7c, 0x28, 0xd3, - 0x30, 0x19, 0xd4, 0x8f, 0x2a,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xad, 0x53, 0x58, 0x92, 0xb7, 0x1b, + 0xeb, 0xef, 0x03, 0x03, 0x1c, 0x03, 0x0e, 0x0e, 0x70, 0x42, 0xbb, 0xde, 0xfa, 0xe4, 0xe1, 0x71, + 0x4e, 0x79, 0x74, 0x9c, 0x53, 0xfe, 0x3a, 0xce, 0x29, 0xdf, 0x3f, 0xcd, 0x4d, 0x3c, 0x7a, 0x9a, + 0x9b, 0xf8, 0xe3, 0x69, 0x6e, 0xe2, 0xd6, 0x25, 0x07, 0x8b, 0x46, 0xab, 0x56, 0xb6, 0xa8, 0xab, + 0x1f, 0x90, 0x03, 0x82, 0x6f, 0x60, 0xdd, 0x6a, 0x98, 0x98, 0xe8, 0x77, 0xfa, 0xbf, 0x39, 0xb5, + 0x3d, 0xc4, 0x6b, 0x33, 0xc1, 0xf7, 0x99, 0x77, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x74, + 0xdc, 0xc7, 0x9b, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1132,8 +1132,8 @@ type MsgClient interface { DeleteVault(ctx context.Context, in *MsgDeleteVault, opts ...grpc.CallOption) (*MsgDeleteVaultResponse, error) UpdateVault(ctx context.Context, in *MsgUpdateVault, opts ...grpc.CallOption) (*MsgUpdateVaultResponse, error) UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, opts ...grpc.CallOption) (*MsgUpdateStrategyResponse, error) - RegisterDenomSymbolMap(ctx context.Context, in *MsgRegisterDenomSymbolMap, opts ...grpc.CallOption) (*MsgRegisterDenomSymbolMapResponse, error) - RegisterSymbolSwapContractMap(ctx context.Context, in *MsgSymbolSwapContractMap, opts ...grpc.CallOption) (*MsgSymbolSwapContractMapResponse, error) + RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenomInfos, opts ...grpc.CallOption) (*MsgRegisterDenomInfosResponse, error) + RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, opts ...grpc.CallOption) (*MsgSymbolInfosResponse, error) } type msgClient struct { @@ -1234,18 +1234,18 @@ func (c *msgClient) UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, o return out, nil } -func (c *msgClient) RegisterDenomSymbolMap(ctx context.Context, in *MsgRegisterDenomSymbolMap, opts ...grpc.CallOption) (*MsgRegisterDenomSymbolMapResponse, error) { - out := new(MsgRegisterDenomSymbolMapResponse) - err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterDenomSymbolMap", in, out, opts...) +func (c *msgClient) RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenomInfos, opts ...grpc.CallOption) (*MsgRegisterDenomInfosResponse, error) { + out := new(MsgRegisterDenomInfosResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterDenomInfos", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) RegisterSymbolSwapContractMap(ctx context.Context, in *MsgSymbolSwapContractMap, opts ...grpc.CallOption) (*MsgSymbolSwapContractMapResponse, error) { - out := new(MsgSymbolSwapContractMapResponse) - err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterSymbolSwapContractMap", in, out, opts...) +func (c *msgClient) RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, opts ...grpc.CallOption) (*MsgSymbolInfosResponse, error) { + out := new(MsgSymbolInfosResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterSymbolInfos", in, out, opts...) if err != nil { return nil, err } @@ -1265,8 +1265,8 @@ type MsgServer interface { DeleteVault(context.Context, *MsgDeleteVault) (*MsgDeleteVaultResponse, error) UpdateVault(context.Context, *MsgUpdateVault) (*MsgUpdateVaultResponse, error) UpdateStrategy(context.Context, *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) - RegisterDenomSymbolMap(context.Context, *MsgRegisterDenomSymbolMap) (*MsgRegisterDenomSymbolMapResponse, error) - RegisterSymbolSwapContractMap(context.Context, *MsgSymbolSwapContractMap) (*MsgSymbolSwapContractMapResponse, error) + RegisterDenomInfos(context.Context, *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) + RegisterSymbolInfos(context.Context, *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1303,11 +1303,11 @@ func (*UnimplementedMsgServer) UpdateVault(ctx context.Context, req *MsgUpdateVa func (*UnimplementedMsgServer) UpdateStrategy(ctx context.Context, req *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStrategy not implemented") } -func (*UnimplementedMsgServer) RegisterDenomSymbolMap(ctx context.Context, req *MsgRegisterDenomSymbolMap) (*MsgRegisterDenomSymbolMapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterDenomSymbolMap not implemented") +func (*UnimplementedMsgServer) RegisterDenomInfos(ctx context.Context, req *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterDenomInfos not implemented") } -func (*UnimplementedMsgServer) RegisterSymbolSwapContractMap(ctx context.Context, req *MsgSymbolSwapContractMap) (*MsgSymbolSwapContractMapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterSymbolSwapContractMap not implemented") +func (*UnimplementedMsgServer) RegisterSymbolInfos(ctx context.Context, req *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterSymbolInfos not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -1494,38 +1494,38 @@ func _Msg_UpdateStrategy_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Msg_RegisterDenomSymbolMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterDenomSymbolMap) +func _Msg_RegisterDenomInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterDenomInfos) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RegisterDenomSymbolMap(ctx, in) + return srv.(MsgServer).RegisterDenomInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ununifi.yieldaggregator.Msg/RegisterDenomSymbolMap", + FullMethod: "/ununifi.yieldaggregator.Msg/RegisterDenomInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterDenomSymbolMap(ctx, req.(*MsgRegisterDenomSymbolMap)) + return srv.(MsgServer).RegisterDenomInfos(ctx, req.(*MsgRegisterDenomInfos)) } return interceptor(ctx, in, info, handler) } -func _Msg_RegisterSymbolSwapContractMap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSymbolSwapContractMap) +func _Msg_RegisterSymbolInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSymbolInfos) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RegisterSymbolSwapContractMap(ctx, in) + return srv.(MsgServer).RegisterSymbolInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ununifi.yieldaggregator.Msg/RegisterSymbolSwapContractMap", + FullMethod: "/ununifi.yieldaggregator.Msg/RegisterSymbolInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterSymbolSwapContractMap(ctx, req.(*MsgSymbolSwapContractMap)) + return srv.(MsgServer).RegisterSymbolInfos(ctx, req.(*MsgSymbolInfos)) } return interceptor(ctx, in, info, handler) } @@ -1575,12 +1575,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateStrategy_Handler, }, { - MethodName: "RegisterDenomSymbolMap", - Handler: _Msg_RegisterDenomSymbolMap_Handler, + MethodName: "RegisterDenomInfos", + Handler: _Msg_RegisterDenomInfos_Handler, }, { - MethodName: "RegisterSymbolSwapContractMap", - Handler: _Msg_RegisterSymbolSwapContractMap_Handler, + MethodName: "RegisterSymbolInfos", + Handler: _Msg_RegisterSymbolInfos_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -2370,7 +2370,7 @@ func (m *MsgDeleteVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgRegisterDenomSymbolMap) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterDenomInfos) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2380,20 +2380,20 @@ func (m *MsgRegisterDenomSymbolMap) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRegisterDenomSymbolMap) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterDenomInfos) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterDenomSymbolMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterDenomInfos) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Mappings) > 0 { - for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Info) > 0 { + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2414,7 +2414,7 @@ func (m *MsgRegisterDenomSymbolMap) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgRegisterDenomSymbolMapResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterDenomInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2424,12 +2424,12 @@ func (m *MsgRegisterDenomSymbolMapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgRegisterDenomSymbolMapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterDenomInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgRegisterDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterDenomInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2437,7 +2437,7 @@ func (m *MsgRegisterDenomSymbolMapResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *MsgSymbolSwapContractMap) Marshal() (dAtA []byte, err error) { +func (m *MsgSymbolInfos) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2447,20 +2447,20 @@ func (m *MsgSymbolSwapContractMap) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSymbolSwapContractMap) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSymbolInfos) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSymbolSwapContractMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSymbolInfos) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Mappings) > 0 { - for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Info) > 0 { + for iNdEx := len(m.Info) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Info[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2481,7 +2481,7 @@ func (m *MsgSymbolSwapContractMap) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgSymbolSwapContractMapResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSymbolInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2491,12 +2491,12 @@ func (m *MsgSymbolSwapContractMapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSymbolSwapContractMapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSymbolInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSymbolSwapContractMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2849,7 +2849,7 @@ func (m *MsgDeleteVaultResponse) Size() (n int) { return n } -func (m *MsgRegisterDenomSymbolMap) Size() (n int) { +func (m *MsgRegisterDenomInfos) Size() (n int) { if m == nil { return 0 } @@ -2859,8 +2859,8 @@ func (m *MsgRegisterDenomSymbolMap) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Mappings) > 0 { - for _, e := range m.Mappings { + if len(m.Info) > 0 { + for _, e := range m.Info { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -2868,7 +2868,7 @@ func (m *MsgRegisterDenomSymbolMap) Size() (n int) { return n } -func (m *MsgRegisterDenomSymbolMapResponse) Size() (n int) { +func (m *MsgRegisterDenomInfosResponse) Size() (n int) { if m == nil { return 0 } @@ -2877,7 +2877,7 @@ func (m *MsgRegisterDenomSymbolMapResponse) Size() (n int) { return n } -func (m *MsgSymbolSwapContractMap) Size() (n int) { +func (m *MsgSymbolInfos) Size() (n int) { if m == nil { return 0 } @@ -2887,8 +2887,8 @@ func (m *MsgSymbolSwapContractMap) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Mappings) > 0 { - for _, e := range m.Mappings { + if len(m.Info) > 0 { + for _, e := range m.Info { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -2896,7 +2896,7 @@ func (m *MsgSymbolSwapContractMap) Size() (n int) { return n } -func (m *MsgSymbolSwapContractMapResponse) Size() (n int) { +func (m *MsgSymbolInfosResponse) Size() (n int) { if m == nil { return 0 } @@ -5229,7 +5229,7 @@ func (m *MsgDeleteVaultResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRegisterDenomSymbolMap) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterDenomInfos) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5252,10 +5252,10 @@ func (m *MsgRegisterDenomSymbolMap) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterDenomSymbolMap: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterDenomInfos: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterDenomSymbolMap: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterDenomInfos: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5292,7 +5292,7 @@ func (m *MsgRegisterDenomSymbolMap) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5319,8 +5319,8 @@ func (m *MsgRegisterDenomSymbolMap) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mappings = append(m.Mappings, Mapping{}) - if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Info = append(m.Info, DenomInfo{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5345,7 +5345,7 @@ func (m *MsgRegisterDenomSymbolMap) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRegisterDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterDenomInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5368,10 +5368,10 @@ func (m *MsgRegisterDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterDenomSymbolMapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterDenomInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterDenomSymbolMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterDenomInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -5395,7 +5395,7 @@ func (m *MsgRegisterDenomSymbolMapResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSymbolSwapContractMap) Unmarshal(dAtA []byte) error { +func (m *MsgSymbolInfos) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5418,10 +5418,10 @@ func (m *MsgSymbolSwapContractMap) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSymbolSwapContractMap: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSymbolInfos: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSymbolSwapContractMap: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSymbolInfos: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5458,7 +5458,7 @@ func (m *MsgSymbolSwapContractMap) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5485,8 +5485,8 @@ func (m *MsgSymbolSwapContractMap) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mappings = append(m.Mappings, Mapping{}) - if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Info = append(m.Info, SymbolInfo{}) + if err := m.Info[len(m.Info)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5511,7 +5511,7 @@ func (m *MsgSymbolSwapContractMap) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSymbolSwapContractMapResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSymbolInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5534,10 +5534,10 @@ func (m *MsgSymbolSwapContractMapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSymbolSwapContractMapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSymbolInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSymbolSwapContractMapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSymbolInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index fbfd42564..a09290169 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -257,23 +257,23 @@ func (m *Strategy) GetGitUrl() string { return "" } -type Mapping struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +type TransferChannel struct { + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } -func (m *Mapping) Reset() { *m = Mapping{} } -func (m *Mapping) String() string { return proto.CompactTextString(m) } -func (*Mapping) ProtoMessage() {} -func (*Mapping) Descriptor() ([]byte, []int) { +func (m *TransferChannel) Reset() { *m = TransferChannel{} } +func (m *TransferChannel) String() string { return proto.CompactTextString(m) } +func (*TransferChannel) ProtoMessage() {} +func (*TransferChannel) Descriptor() ([]byte, []int) { return fileDescriptor_7877bd9c4573997d, []int{3} } -func (m *Mapping) XXX_Unmarshal(b []byte) error { +func (m *TransferChannel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TransferChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Mapping.Marshal(b, m, deterministic) + return xxx_messageInfo_TransferChannel.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -283,32 +283,152 @@ func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Mapping) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mapping.Merge(m, src) +func (m *TransferChannel) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferChannel.Merge(m, src) } -func (m *Mapping) XXX_Size() int { +func (m *TransferChannel) XXX_Size() int { return m.Size() } -func (m *Mapping) XXX_DiscardUnknown() { - xxx_messageInfo_Mapping.DiscardUnknown(m) +func (m *TransferChannel) XXX_DiscardUnknown() { + xxx_messageInfo_TransferChannel.DiscardUnknown(m) } -var xxx_messageInfo_Mapping proto.InternalMessageInfo +var xxx_messageInfo_TransferChannel proto.InternalMessageInfo -func (m *Mapping) GetKey() string { +func (m *TransferChannel) GetChainId() string { if m != nil { - return m.Key + return m.ChainId } return "" } -func (m *Mapping) GetValue() string { +func (m *TransferChannel) GetChannelId() string { if m != nil { - return m.Value + return m.ChannelId } return "" } +type SymbolInfo struct { + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + NativeChainId string `protobuf:"bytes,2,opt,name=native_chain_id,json=nativeChainId,proto3" json:"native_chain_id,omitempty"` + Channels []*TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty"` +} + +func (m *SymbolInfo) Reset() { *m = SymbolInfo{} } +func (m *SymbolInfo) String() string { return proto.CompactTextString(m) } +func (*SymbolInfo) ProtoMessage() {} +func (*SymbolInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{4} +} +func (m *SymbolInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SymbolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SymbolInfo.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 *SymbolInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SymbolInfo.Merge(m, src) +} +func (m *SymbolInfo) XXX_Size() int { + return m.Size() +} +func (m *SymbolInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SymbolInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SymbolInfo proto.InternalMessageInfo + +func (m *SymbolInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *SymbolInfo) GetNativeChainId() string { + if m != nil { + return m.NativeChainId + } + return "" +} + +func (m *SymbolInfo) GetChannels() []*TransferChannel { + if m != nil { + return m.Channels + } + return nil +} + +type DenomInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Channels []*TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty"` +} + +func (m *DenomInfo) Reset() { *m = DenomInfo{} } +func (m *DenomInfo) String() string { return proto.CompactTextString(m) } +func (*DenomInfo) ProtoMessage() {} +func (*DenomInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{5} +} +func (m *DenomInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DenomInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DenomInfo.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 *DenomInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DenomInfo.Merge(m, src) +} +func (m *DenomInfo) XXX_Size() int { + return m.Size() +} +func (m *DenomInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DenomInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_DenomInfo proto.InternalMessageInfo + +func (m *DenomInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *DenomInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *DenomInfo) GetChannels() []*TransferChannel { + if m != nil { + return m.Channels + } + return nil +} + // Deprecated: Just for v3.2.2 upgrade handler type LegacyVault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -324,7 +444,7 @@ func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{4} + return fileDescriptor_7877bd9c4573997d, []int{6} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,7 +521,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{5} + return fileDescriptor_7877bd9c4573997d, []int{7} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -479,7 +599,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{6} + return fileDescriptor_7877bd9c4573997d, []int{8} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +674,9 @@ func init() { proto.RegisterType((*StrategyWeight)(nil), "ununifi.yieldaggregator.StrategyWeight") proto.RegisterType((*Vault)(nil), "ununifi.yieldaggregator.Vault") proto.RegisterType((*Strategy)(nil), "ununifi.yieldaggregator.Strategy") - proto.RegisterType((*Mapping)(nil), "ununifi.yieldaggregator.Mapping") + proto.RegisterType((*TransferChannel)(nil), "ununifi.yieldaggregator.TransferChannel") + proto.RegisterType((*SymbolInfo)(nil), "ununifi.yieldaggregator.SymbolInfo") + proto.RegisterType((*DenomInfo)(nil), "ununifi.yieldaggregator.DenomInfo") proto.RegisterType((*LegacyVault)(nil), "ununifi.yieldaggregator.LegacyVault") proto.RegisterType((*LegacyStrategy)(nil), "ununifi.yieldaggregator.LegacyStrategy") proto.RegisterType((*ProposalAddStrategy)(nil), "ununifi.yieldaggregator.ProposalAddStrategy") @@ -565,53 +687,58 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 723 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0x36, 0x69, 0x57, 0x17, 0xb6, 0xc9, 0x7b, 0xcb, 0x86, 0xd4, 0x55, 0xbd, 0x50, - 0x0e, 0x4b, 0xe8, 0xf8, 0x04, 0xdb, 0x2a, 0xa4, 0x21, 0x90, 0x50, 0xa6, 0x01, 0xe2, 0x12, 0xb9, - 0x89, 0x97, 0x5a, 0x4b, 0xec, 0xca, 0x76, 0x57, 0x2a, 0xf1, 0x19, 0x10, 0x9f, 0x83, 0xf3, 0x6e, - 0x88, 0xfb, 0x8e, 0xd3, 0x2e, 0x20, 0x0e, 0x13, 0xda, 0xbe, 0x08, 0x6a, 0xec, 0x44, 0xed, 0x5e, - 0x38, 0x4c, 0x63, 0x37, 0x3f, 0x2f, 0x79, 0x9e, 0xbf, 0x9f, 0xe7, 0x67, 0x05, 0x6c, 0x0c, 0xe8, - 0x80, 0x92, 0x03, 0xe2, 0x8e, 0x08, 0x8e, 0x43, 0x14, 0x45, 0x1c, 0x47, 0x48, 0x32, 0x7e, 0xd5, - 0x76, 0xfa, 0x9c, 0x49, 0x06, 0x57, 0x74, 0xba, 0x73, 0x25, 0xbc, 0xb6, 0x18, 0xb1, 0x88, 0xa5, - 0x39, 0xee, 0xf8, 0xa4, 0xd2, 0xd7, 0x56, 0x03, 0x26, 0x12, 0x26, 0x7c, 0x15, 0x50, 0x86, 0x0e, - 0xd5, 0x95, 0xe5, 0x76, 0x91, 0xc0, 0xee, 0x51, 0xbb, 0x8b, 0x25, 0x6a, 0xbb, 0x01, 0x23, 0x54, - 0xc5, 0x9b, 0x9f, 0xc1, 0xec, 0x9e, 0x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0xe6, 0x78, - 0x08, 0xde, 0xa3, 0xf4, 0xab, 0x8e, 0xfa, 0x08, 0x1e, 0x02, 0x7b, 0x48, 0x64, 0x2f, 0xe4, 0x68, - 0xe8, 0x07, 0x2c, 0x49, 0x88, 0x10, 0x84, 0x51, 0x7f, 0x3c, 0x48, 0xbb, 0x72, 0xd7, 0xd1, 0x2d, - 0x67, 0x25, 0x77, 0xf2, 0x8a, 0x1e, 0x92, 0x18, 0x62, 0xb0, 0x94, 0x37, 0xe3, 0x58, 0x60, 0x7e, - 0x84, 0x55, 0xa7, 0x99, 0xbb, 0x76, 0x5a, 0xc8, 0xea, 0x79, 0xaa, 0x5c, 0xda, 0xe6, 0x03, 0x98, - 0xcf, 0xe9, 0x50, 0x4b, 0x14, 0x76, 0xb5, 0x51, 0x6a, 0xd5, 0x36, 0x9f, 0x3a, 0xb7, 0x40, 0xeb, - 0x4c, 0x03, 0xa6, 0x47, 0x35, 0x27, 0xa6, 0xbc, 0x02, 0x6e, 0x82, 0xa5, 0x03, 0x8c, 0xfd, 0x80, - 0xc5, 0x31, 0x0e, 0x24, 0xe3, 0x3e, 0x52, 0x9b, 0xb1, 0x41, 0xba, 0xcf, 0x85, 0x03, 0x8c, 0x77, - 0xb2, 0x98, 0x5e, 0x5a, 0xf3, 0x9b, 0x01, 0x66, 0xb2, 0xea, 0x70, 0x11, 0x58, 0x21, 0xa6, 0x2c, - 0x49, 0x29, 0xaa, 0x7a, 0xca, 0xd0, 0x60, 0x15, 0x73, 0xb0, 0x9e, 0x81, 0xf9, 0x80, 0x51, 0xc9, - 0x51, 0x20, 0xf3, 0x0e, 0x0a, 0xa6, 0xb9, 0xcc, 0xaf, 0xab, 0xe7, 0xac, 0x99, 0xb7, 0xb3, 0x66, - 0x5d, 0x67, 0x6d, 0x05, 0x54, 0x22, 0x22, 0xfd, 0x01, 0x8f, 0x53, 0x6a, 0xaa, 0x5e, 0x39, 0x22, - 0x72, 0x9f, 0xc7, 0xcd, 0x36, 0xa8, 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xb1, 0xfe, 0x58, 0xb4, - 0x07, 0x00, 0x00, + // 814 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0xf3, 0xaf, 0xf5, 0x0b, 0xdb, 0xae, 0xa6, 0xdd, 0x5d, 0x77, 0x11, 0x69, 0x94, 0x03, + 0x84, 0x43, 0x6d, 0x5a, 0x3e, 0xc1, 0x36, 0x11, 0x52, 0x80, 0x03, 0x72, 0x29, 0x20, 0x2e, 0xd6, + 0xc4, 0x9e, 0x38, 0xa3, 0xb5, 0x67, 0xa2, 0x99, 0x49, 0x4b, 0x24, 0x24, 0xbe, 0x01, 0x42, 0x7c, + 0x0c, 0xce, 0x7b, 0x43, 0xdc, 0xf7, 0xb8, 0xda, 0x0b, 0x88, 0xc3, 0x0a, 0xb5, 0x5f, 0x04, 0x79, + 0x66, 0x6c, 0x25, 0x6d, 0xc3, 0xa1, 0x2a, 0xbd, 0xf9, 0xbd, 0x79, 0xf3, 0xde, 0x6f, 0xde, 0xfb, + 0xbd, 0x9f, 0x0c, 0x87, 0x73, 0x36, 0x67, 0x74, 0x42, 0x83, 0x05, 0x25, 0x59, 0x82, 0xd3, 0x54, + 0x90, 0x14, 0x2b, 0x2e, 0xae, 0xdb, 0xfe, 0x4c, 0x70, 0xc5, 0xd1, 0x33, 0x1b, 0xee, 0x5f, 0x3b, + 0x7e, 0xbe, 0x97, 0xf2, 0x94, 0xeb, 0x98, 0xa0, 0xf8, 0x32, 0xe1, 0xcf, 0xf7, 0x63, 0x2e, 0x73, + 0x2e, 0x23, 0x73, 0x60, 0x0c, 0x7b, 0xd4, 0x31, 0x56, 0x30, 0xc6, 0x92, 0x04, 0xe7, 0x47, 0x63, + 0xa2, 0xf0, 0x51, 0x10, 0x73, 0xca, 0xcc, 0x79, 0xef, 0x47, 0xd8, 0x3e, 0x55, 0x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5, 0x9b, 0xb2, 0x51, 0xbd, 0xa6, 0xbe, 0xfc, 0x9a, 0xdb, 0xd0, 0x37, 0xfe, 0x1b, 0x7d, 0xf3, + 0x76, 0xf4, 0x2b, 0x5a, 0x74, 0xf2, 0xf9, 0xeb, 0xcb, 0x8e, 0xf3, 0xe6, 0xb2, 0xe3, 0xfc, 0x73, + 0xd9, 0x71, 0x7e, 0xb9, 0xea, 0x6c, 0xbc, 0xb9, 0xea, 0x6c, 0xfc, 0x75, 0xd5, 0xd9, 0xf8, 0xfe, + 0x93, 0x94, 0xaa, 0xe9, 0x7c, 0xec, 0xc7, 0x3c, 0x0f, 0xce, 0xd8, 0x19, 0xa3, 0x9f, 0xd1, 0x40, + 0x6b, 0x47, 0xf0, 0xc3, 0x8d, 0x9f, 0x17, 0xb5, 0x98, 0x11, 0x39, 0x6e, 0xe9, 0x3f, 0x89, 0x4f, + 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x81, 0xbe, 0x8e, 0xe4, 0x08, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -822,7 +949,7 @@ func (m *Strategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Mapping) Marshal() (dAtA []byte, err error) { +func (m *TransferChannel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -832,27 +959,129 @@ func (m *Mapping) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { +func (m *TransferChannel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TransferChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Value))) + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.ChannelId))) i-- dAtA[i] = 0x12 } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Key))) + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SymbolInfo) 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 *SymbolInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SymbolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Channels) > 0 { + for iNdEx := len(m.Channels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Channels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.NativeChainId) > 0 { + i -= len(m.NativeChainId) + copy(dAtA[i:], m.NativeChainId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.NativeChainId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DenomInfo) 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 *DenomInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DenomInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Channels) > 0 { + for iNdEx := len(m.Channels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Channels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Denom))) i-- dAtA[i] = 0xa } @@ -1167,23 +1396,69 @@ func (m *Strategy) Size() (n int) { return n } -func (m *Mapping) Size() (n int) { +func (m *TransferChannel) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Key) + l = len(m.ChainId) if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) } - l = len(m.Value) + l = len(m.ChannelId) if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) } return n } +func (m *SymbolInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.NativeChainId) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + if len(m.Channels) > 0 { + for _, e := range m.Channels { + l = e.Size() + n += 1 + l + sovYieldaggregator(uint64(l)) + } + } + return n +} + +func (m *DenomInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + if len(m.Channels) > 0 { + for _, e := range m.Channels { + l = e.Size() + n += 1 + l + sovYieldaggregator(uint64(l)) + } + } + return n +} + func (m *LegacyVault) Size() (n int) { if m == nil { return 0 @@ -1979,7 +2254,121 @@ func (m *Strategy) Unmarshal(dAtA []byte) error { } return nil } -func (m *Mapping) Unmarshal(dAtA []byte) error { +func (m *TransferChannel) 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 ErrIntOverflowYieldaggregator + } + 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: TransferChannel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferChannel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SymbolInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2002,15 +2391,15 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Mapping: wiretype end group for non-group") + return fmt.Errorf("proto: SymbolInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SymbolInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2038,11 +2427,11 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NativeChainId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2070,7 +2459,189 @@ func (m *Mapping) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) + m.NativeChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Channels = append(m.Channels, &TransferChannel{}) + if err := m.Channels[len(m.Channels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DenomInfo) 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 ErrIntOverflowYieldaggregator + } + 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: DenomInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DenomInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Channels = append(m.Channels, &TransferChannel{}) + if err := m.Channels[len(m.Channels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex From d3b1047ea6271ea2b3534fddcdc02b144eaa06ed Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Wed, 4 Oct 2023 23:32:14 +0900 Subject: [PATCH 17/59] fix: parse Number chain side --- wasmbinding/bindings/msg.go | 2 +- wasmbinding/message_plugin.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wasmbinding/bindings/msg.go b/wasmbinding/bindings/msg.go index 9332f10e5..1a8a608e9 100644 --- a/wasmbinding/bindings/msg.go +++ b/wasmbinding/bindings/msg.go @@ -22,6 +22,6 @@ type SubmitICQRequest struct { type DeputyDepositToVault struct { Depositor string `json:"depositor"` - VaultId uint64 `json:"vault_id"` + VaultId string `json:"vault_id"` Amount wasmvmtypes.Coin `json:"amount"` } diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index de75f3657..f69292454 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -2,6 +2,7 @@ package wasmbinding import ( "encoding/json" + "strconv" "time" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" @@ -160,10 +161,15 @@ func PerformDeputyDepositToVault(bk *bankkeeper.BaseKeeper, iyaKeeper *yieldaggr return sdkerrors.Wrap(err, "sending coins from contract to depositor account") } + vaultId, err := strconv.ParseUint(deputyDepositToVault.VaultId, 10, 64) + if err != nil { + return err + } + err = iyaKeeper.DepositAndMintLPToken( ctx, depositor, - deputyDepositToVault.VaultId, + vaultId, amount, ) if err != nil { From 4f8f2dac089198fbef1be0e3744d8836f840b20e Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 5 Oct 2023 21:14:02 +0800 Subject: [PATCH 18/59] add basic codebase to use packet forward middleware on aggregator --- x/yieldaggregator/keeper/forward.go | 116 +++++++++++++++++ x/yieldaggregator/keeper/strategy.go | 121 +++++++++++++++++- .../records/keeper/callback_transfer.go | 47 +++++++ .../submodules/records/keeper/callbacks.go | 5 +- .../submodules/records/keeper/keeper.go | 30 +++++ .../submodules/records/types/sudo.go | 11 ++ x/yieldaggregator/types/expected_keepers.go | 2 + 7 files changed, 328 insertions(+), 4 deletions(-) create mode 100644 x/yieldaggregator/keeper/forward.go diff --git a/x/yieldaggregator/keeper/forward.go b/x/yieldaggregator/keeper/forward.go new file mode 100644 index 000000000..624301cbd --- /dev/null +++ b/x/yieldaggregator/keeper/forward.go @@ -0,0 +1,116 @@ +package keeper + +import ( + "encoding/json" + "errors" + "fmt" + "time" + + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + "github.com/iancoleman/orderedmap" +) + +type PacketMetadata struct { + Forward *ForwardMetadata `json:"forward"` +} + +type ForwardMetadata struct { + Receiver string `json:"receiver,omitempty"` + Port string `json:"port,omitempty"` + Channel string `json:"channel,omitempty"` + Timeout Duration `json:"timeout,omitempty"` + Retries *uint8 `json:"retries,omitempty"` + + // Using JSONObject so that objects for next property will not be mutated by golang's lexicographic key sort on map keys during Marshal. + // Supports primitives for Unmarshal/Marshal so that an escaped JSON-marshaled string is also valid. + Next *JSONObject `json:"next,omitempty"` +} + +type Duration time.Duration + +func (m *ForwardMetadata) Validate() error { + if m.Receiver == "" { + return fmt.Errorf("failed to validate forward metadata. receiver cannot be empty") + } + if err := host.PortIdentifierValidator(m.Port); err != nil { + return fmt.Errorf("failed to validate forward metadata: %w", err) + } + if err := host.ChannelIdentifierValidator(m.Channel); err != nil { + return fmt.Errorf("failed to validate forward metadata: %w", err) + } + + return nil +} + +// JSONObject is a wrapper type to allow either a primitive type or a JSON object. +// In the case the value is a JSON object, OrderedMap type is used so that key order +// is retained across Unmarshal/Marshal. +type JSONObject struct { + obj bool + primitive []byte + orderedMap orderedmap.OrderedMap +} + +// NewJSONObject is a constructor used for tests. +// The usage of JSONObject in the middleware is only json Marshal/Unmarshal +func NewJSONObject(object bool, primitive []byte, orderedMap orderedmap.OrderedMap) *JSONObject { + return &JSONObject{ + obj: object, + primitive: primitive, + orderedMap: orderedMap, + } +} + +// UnmarshalJSON overrides the default json.Unmarshal behavior +func (o *JSONObject) UnmarshalJSON(b []byte) error { + if err := o.orderedMap.UnmarshalJSON(b); err != nil { + // If ordered map unmarshal fails, this is a primitive value + o.obj = false + // Attempt to unmarshal as string, this removes extra JSON escaping + var primitiveStr string + if err := json.Unmarshal(b, &primitiveStr); err != nil { + o.primitive = b + return nil + } + o.primitive = []byte(primitiveStr) + return nil + } + // This is a JSON object, now stored as an ordered map to retain key order. + o.obj = true + return nil +} + +// MarshalJSON overrides the default json.Marshal behavior +func (o JSONObject) MarshalJSON() ([]byte, error) { + if o.obj { + // non-primitive, return marshaled ordered map. + return o.orderedMap.MarshalJSON() + } + // primitive, return raw bytes. + return o.primitive, nil +} + +func (d Duration) MarshalJSON() ([]byte, error) { + return json.Marshal(time.Duration(d).Nanoseconds()) +} + +func (d *Duration) UnmarshalJSON(b []byte) error { + var v interface{} + if err := json.Unmarshal(b, &v); err != nil { + return err + } + switch value := v.(type) { + case float64: + *d = Duration(time.Duration(value)) + return nil + case string: + tmp, err := time.ParseDuration(value) + if err != nil { + return err + } + *d = Duration(tmp) + return nil + default: + return errors.New("invalid duration") + } +} diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 92612dbae..6b02ed9ed 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -9,6 +9,10 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibctypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/iancoleman/orderedmap" "github.com/UnUniFi/chain/x/yieldaggregator/types" ) @@ -30,6 +34,29 @@ func (k Keeper) GetStrategyVersion(ctx sdk.Context, strategy types.Strategy) uin return jsonMap["version"] } +type DenomInfo struct { + Denom string `json:"denom"` + TargetChainId string `json:"target_chain_id"` + TargetChainDenom string `json:"target_chain_denom"` + TargetChainAddr string `json:"target_chain_addr"` +} + +func (k Keeper) GetStrategyDepositInfo(ctx sdk.Context, strategy types.Strategy) (info DenomInfo) { + wasmQuery := fmt.Sprintf(`{"deposit_denom":{}}`) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + result, err := k.wasmReader.QuerySmart(ctx, contractAddr, []byte(wasmQuery)) + if err != nil { + return + } + + err = json.Unmarshal(result, &info) + if err != nil { + return DenomInfo{} + } + + return +} + // GetStrategyCount get the total number of Strategy func (k Keeper) GetStrategyCount(ctx sdk.Context, vaultDenom string) uint64 { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) @@ -154,6 +181,65 @@ func GetStrategyIDFromBytes(bz []byte) uint64 { return binary.BigEndian.Uint64(bz) } +func CalculateTransferRoute(currChannels, tarChannels []types.TransferChannel) []types.TransferChannel { + diffStartIndex := int(0) + for index, currChan := range currChannels { + if len(tarChannels) <= index { + diffStartIndex = index + } + tarChan := tarChannels[index] + if currChan.ChainId != tarChan.ChainId { + diffStartIndex = index + break + } + } + + route := []types.TransferChannel{} + for index := len(currChannels) - 1; index >= diffStartIndex; index-- { + route = append(route, currChannels[index]) + // TODO: Back route + } + for index := diffStartIndex; index < len(tarChannels); index++ { + route = append(route, tarChannels[index]) + // TODO: Forward route + } + return route +} + +func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.TransferChannel, finalReceiver string) (string, *PacketMetadata) { + if len(channels) == 0 { + return "", nil + } + + if len(channels) == 1 { + return finalReceiver, nil + } + + receiver, nextForward := k.ComposePacketForwardMetadata(ctx, channels[1:], finalReceiver) + nextForwardBz, err := json.Marshal(nextForward) + if err != nil { + return "", nil + } + intermediaryReceivers := make(map[string]string) + retries := uint8(2) + params, err := k.GetParams(ctx) + if err != nil { + return "", nil + } + ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos + timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos + return intermediaryReceivers[channels[0].ChainId], &PacketMetadata{ + Forward: &ForwardMetadata{ + Receiver: receiver, + Port: ibctransfertypes.PortID, + Channel: channels[0].ChannelId, + Timeout: timeoutTimestamp, + Retries: &retries, + Next: NewJSONObject(false, nextForwardBz, orderedmap.OrderedMap{}), + }, + } +} + // stake into strategy func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy, amount sdk.Int) error { vaultModName := types.GetVaultModuleAccountName(vault.Id) @@ -170,9 +256,38 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ default: version := k.GetStrategyVersion(ctx, strategy) _ = version - wasmMsg := `{"stake":{}}` - contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) - _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{stakeCoin}) + info := k.GetStrategyDepositInfo(ctx, strategy) + if info.Denom == stakeCoin.Denom { + wasmMsg := `{"stake":{}}` + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{stakeCoin}) + return err + } + + params, err := k.GetParams(ctx) + if err != nil { + return err + } + ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos + timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos + transferRoute := CalculateTransferRoute(_, _) + initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) + + m := &PacketMetadata{} + memo, err := json.Marshal(m) + + msg := ibctypes.NewMsgTransfer( + ibctransfertypes.PortID, + transferRoute[0].ChannelId, + stakeCoin, + vaultModAddr.String(), + initialReceiver, + clienttypes.Height{}, + timeoutTimestamp, + string(memo), + ) + err = k.recordsKeeper.YATransfer(ctx, msg) + // TODO: handle YATransfer callback handler for packet forwarding response return err } } diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index 83f84d047..17722e8df 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -131,3 +131,50 @@ func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Pac } return nil } + +func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { + k.Logger(ctx).Info("YATransferCallback executing", "packet", packet) + if ack.GetError() != "" { + k.Logger(ctx).Error(fmt.Sprintf("YATransferCallback does not handle errors %s", ack.GetError())) + return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "YATransferCallback does not handle errors: %s", ack.GetError()) + } + if ack == nil { + // timeout + k.Logger(ctx).Error(fmt.Sprintf("YATransferCallback timeout, ack is nil, packet %v", packet)) + return nil + } + + var data ibctransfertypes.FungibleTokenPacketData + if err := ibctransfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { + k.Logger(ctx).Error(fmt.Sprintf("Error unmarshalling packet %v", err.Error())) + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet data: %s", err.Error()) + } + k.Logger(ctx).Info(fmt.Sprintf("YATransferCallback unmarshalled FungibleTokenPacketData %v", data)) + + contractAddress, err := sdk.AccAddressFromBech32(data.Sender) + if err != nil { + return sdkerrors.Wrapf(types.ErrUnmarshalFailure, "cannot retrieve contract address: %s", err.Error()) + } + + version := k.GetStrategyVersion(ctx, contractAddress) + _ = version + + x := types.MessageDepositCallback{} + x.DepositCallback.Denom = data.Denom + x.DepositCallback.Amount = data.Amount + x.DepositCallback.Sender = data.Sender + x.DepositCallback.Receiver = data.Receiver + x.DepositCallback.Success = true + + callbackBytes, err := json.Marshal(x) + if err != nil { + return fmt.Errorf("failed to marshal MessageDepositCallback: %v", err) + } + + _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) + if err != nil { + k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) + return fmt.Errorf("failed to Sudo: %v", err) + } + return nil +} diff --git a/x/yieldaggregator/submodules/records/keeper/callbacks.go b/x/yieldaggregator/submodules/records/keeper/callbacks.go index 4992daf37..83beafd06 100644 --- a/x/yieldaggregator/submodules/records/keeper/callbacks.go +++ b/x/yieldaggregator/submodules/records/keeper/callbacks.go @@ -9,6 +9,7 @@ import ( const TRANSFER = "transfer" const CONTRACT_TRANSFER = "contract_transfer" +const YA_TRANSFER = "aggregator_transfer" // ICACallbacks wrapper struct for stakeibc keeper type ICACallback func(Keeper, sdk.Context, channeltypes.Packet, *channeltypes.Acknowledgement, []byte) error @@ -41,6 +42,8 @@ func (c ICACallbacks) AddICACallback(id string, fn interface{}) icacallbackstype func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandler { a := c. AddICACallback(TRANSFER, ICACallback(TransferCallback)). - AddICACallback(CONTRACT_TRANSFER, ICACallback(ContractTransferCallback)) + AddICACallback(CONTRACT_TRANSFER, ICACallback(ContractTransferCallback)). + AddICACallback(YA_TRANSFER, ICACallback(YATransferCallback)) + return a.(ICACallbacks) } diff --git a/x/yieldaggregator/submodules/records/keeper/keeper.go b/x/yieldaggregator/submodules/records/keeper/keeper.go index ea5e9d211..a87f76b5e 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper.go @@ -159,3 +159,33 @@ func (k Keeper) ContractTransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) err k.ICACallbacksKeeper.SetCallbackData(ctx, callback) return nil } + +func (k Keeper) YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error { + goCtx := sdk.WrapSDKContext(ctx) + sequence, found := k.IBCKeeper.ChannelKeeper.GetNextSequenceSend(ctx, msg.SourcePort, msg.SourceChannel) + if !found { + return sdkerrors.Wrapf( + channeltypes.ErrSequenceSendNotFound, + "source port: %s, source channel: %s", msg.SourcePort, msg.SourceChannel, + ) + } + + // trigger transfer + _, err := k.TransferKeeper.Transfer(goCtx, msg) + if err != nil { + return err + } + + // Store the callback data + callback := icacallbackstypes.CallbackData{ + CallbackKey: icacallbackstypes.PacketID(msg.SourcePort, msg.SourceChannel, sequence), + PortId: msg.SourcePort, + ChannelId: msg.SourceChannel, + Sequence: sequence, + CallbackId: CONTRACT_TRANSFER, + CallbackArgs: []byte{}, + } + k.Logger(ctx).Info(fmt.Sprintf("Storing callback data: %v", callback)) + k.ICACallbacksKeeper.SetCallbackData(ctx, callback) + return nil +} diff --git a/x/yieldaggregator/submodules/records/types/sudo.go b/x/yieldaggregator/submodules/records/types/sudo.go index 72240c741..700c20cc2 100644 --- a/x/yieldaggregator/submodules/records/types/sudo.go +++ b/x/yieldaggregator/submodules/records/types/sudo.go @@ -11,3 +11,14 @@ type MessageTransferCallback struct { Success bool `json:"success"` } `json:"transfer_callback"` } + +// MessageDepositCallback is passed to a contract's sudo() entrypoint for deposit to host chain callback. +type MessageDepositCallback struct { + DepositCallback struct { + Denom string `json:"denom"` + Amount string `json:"amount"` + Sender string `json:"sender"` + Receiver string `json:"receiver"` + Success bool `json:"success"` + } `json:"deposit_callback"` +} diff --git a/x/yieldaggregator/types/expected_keepers.go b/x/yieldaggregator/types/expected_keepers.go index f8d7fc2b6..a55741081 100644 --- a/x/yieldaggregator/types/expected_keepers.go +++ b/x/yieldaggregator/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" + ibctypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) @@ -30,4 +31,5 @@ type BankKeeper interface { type RecordsKeeper interface { GetUserRedemptionRecordBySenderAndHostZone(ctx sdk.Context, sender sdk.AccAddress, zoneId string) sdk.Int + YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error } From f1c800491f133bffc744237eac87d5588fe21f1f Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 6 Oct 2023 18:03:22 +0800 Subject: [PATCH 19/59] Add updates for the params passed on CalculateTransferRoute function --- proto/ununifi/yieldaggregator/params.proto | 11 +- .../yieldaggregator/yieldaggregator.proto | 6 +- x/yieldaggregator/keeper/strategy.go | 26 ++-- x/yieldaggregator/types/params.pb.go | 95 +++++++++----- x/yieldaggregator/types/yieldaggregator.pb.go | 121 +++++++++--------- 5 files changed, 155 insertions(+), 104 deletions(-) diff --git a/proto/ununifi/yieldaggregator/params.proto b/proto/ununifi/yieldaggregator/params.proto index 6e809e594..a8a2fe44b 100644 --- a/proto/ununifi/yieldaggregator/params.proto +++ b/proto/ununifi/yieldaggregator/params.proto @@ -12,11 +12,12 @@ message Params { // TODO: add reserve_annual_commission_rate // TODO: rename to withdraw_commission_rate string commission_rate = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", + (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin vault_creation_fee = 2 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin vault_creation_deposit = 3 [(gogoproto.nullable) = false]; - string fee_collector_address = 4; + cosmos.base.v1beta1.Coin vault_creation_fee = 2 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin vault_creation_deposit = 3 [(gogoproto.nullable) = false]; + string fee_collector_address = 4; + uint64 ibc_transfer_timeout_nanos = 5; } diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 2968699e1..4de61e61d 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -53,13 +53,15 @@ message TransferChannel { message SymbolInfo { string symbol = 1; string native_chain_id = 2; - repeated TransferChannel channels = 3; // channels to send to target chain for the symbol + repeated TransferChannel channels = 3 + [(gogoproto.nullable) = false]; // channels to send to target chain for the symbol } message DenomInfo { string denom = 1; string symbol = 2; - repeated TransferChannel channels = 3; // channels to transfer back to native chain from the denom + repeated TransferChannel channels = 3 + [(gogoproto.nullable) = false]; // channels to transfer back to native chain from the denom } // Deprecated: Just for v3.2.2 upgrade handler diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 6b02ed9ed..69adac0f2 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -206,6 +206,12 @@ func CalculateTransferRoute(currChannels, tarChannels []types.TransferChannel) [ return route } +// TODO: move this to params +func (k Keeper) GetIntermediaryReceiver(chainId string) string { + intermediaryReceivers := make(map[string]string) + return intermediaryReceivers[chainId] +} + func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.TransferChannel, finalReceiver string) (string, *PacketMetadata) { if len(channels) == 0 { return "", nil @@ -220,20 +226,18 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T if err != nil { return "", nil } - intermediaryReceivers := make(map[string]string) retries := uint8(2) params, err := k.GetParams(ctx) if err != nil { return "", nil } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos - timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - return intermediaryReceivers[channels[0].ChainId], &PacketMetadata{ + return k.GetIntermediaryReceiver(channels[0].ChainId), &PacketMetadata{ Forward: &ForwardMetadata{ Receiver: receiver, Port: ibctransfertypes.PortID, Channel: channels[0].ChannelId, - Timeout: timeoutTimestamp, + Timeout: Duration(ibcTransferTimeoutNanos), Retries: &retries, Next: NewJSONObject(false, nextForwardBz, orderedmap.OrderedMap{}), }, @@ -270,11 +274,17 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - transferRoute := CalculateTransferRoute(_, _) + denomInfo := k.GetDenomInfo(ctx, info.Denom) + symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) + tarChannel := types.TransferChannel{} + for _, channel := range symbolInfo.Channels { + if channel.ChainId == info.TargetChainId { + tarChannel = channel + } + } + transferRoute := CalculateTransferRoute(denomInfo.Channels, []types.TransferChannel{tarChannel}) initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) - - m := &PacketMetadata{} - memo, err := json.Marshal(m) + memo, err := json.Marshal(metadata) msg := ibctypes.NewMsgTransfer( ibctransfertypes.PortID, diff --git a/x/yieldaggregator/types/params.pb.go b/x/yieldaggregator/types/params.pb.go index 816a19d04..4695ac319 100644 --- a/x/yieldaggregator/types/params.pb.go +++ b/x/yieldaggregator/types/params.pb.go @@ -30,10 +30,11 @@ type Params struct { // TODO: add deposit_commission_rate // TODO: add reserve_annual_commission_rate // TODO: rename to withdraw_commission_rate - CommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=commission_rate,json=commissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"commission_rate"` - VaultCreationFee types.Coin `protobuf:"bytes,2,opt,name=vault_creation_fee,json=vaultCreationFee,proto3" json:"vault_creation_fee"` - VaultCreationDeposit types.Coin `protobuf:"bytes,3,opt,name=vault_creation_deposit,json=vaultCreationDeposit,proto3" json:"vault_creation_deposit"` - FeeCollectorAddress string `protobuf:"bytes,4,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` + CommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=commission_rate,json=commissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"commission_rate"` + VaultCreationFee types.Coin `protobuf:"bytes,2,opt,name=vault_creation_fee,json=vaultCreationFee,proto3" json:"vault_creation_fee"` + VaultCreationDeposit types.Coin `protobuf:"bytes,3,opt,name=vault_creation_deposit,json=vaultCreationDeposit,proto3" json:"vault_creation_deposit"` + FeeCollectorAddress string `protobuf:"bytes,4,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` + IbcTransferTimeoutNanos uint64 `protobuf:"varint,5,opt,name=ibc_transfer_timeout_nanos,json=ibcTransferTimeoutNanos,proto3" json:"ibc_transfer_timeout_nanos,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -90,6 +91,13 @@ func (m *Params) GetFeeCollectorAddress() string { return "" } +func (m *Params) GetIbcTransferTimeoutNanos() uint64 { + if m != nil { + return m.IbcTransferTimeoutNanos + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "ununifi.yieldaggregator.Params") } @@ -99,31 +107,33 @@ func init() { } var fileDescriptor_598607d39e276737 = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0xca, 0xd3, 0x40, - 0x14, 0x85, 0x93, 0xdf, 0x9f, 0x82,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, 0xe0, 0xd1, - 0xfd, 0x3f, 0xa4, 0x88, 0x19, 0xf0, 0xdf, 0x7b, 0xfe, 0x8e, 0xd5, 0x85, 0x89, 0xb9, 0x02, 0x66, - 0x1a, 0x7e, 0x06, 0x10, 0xdc, 0x8c, 0xdd, 0xc9, 0xbd, 0xd9, 0x80, 0x74, 0xc1, 0x66, 0x47, 0xd2, - 0xed, 0x48, 0x16, 0x28, 0xe4, 0xfc, 0xb6, 0x69, 0x8e, 0x1e, 0xb6, 0xd1, 0x45, 0x97, 0x5c, 0x01, - 0xf8, 0x6b, 0xef, 0xc9, 0x15, 0x2e, 0x85, 0x0a, 0xb5, 0x30, 0xc1, 0x9d, 0xff, 0x43, 0xf6, 0xff, - 0x42, 0x2e, 0x6d, 0xd8, 0x9f, 0x79, 0x8f, 0x33, 0x80, 0x98, 0x63, 0x51, 0x00, 0x37, 0xa8, 0x62, - 0x96, 0xa6, 0x0a, 0xb4, 0x0e, 0x6e, 0x9b, 0x7f, 0x88, 0x1e, 0x65, 0x00, 0x8b, 0xdf, 0xda, 0x1b, - 0x2b, 0xcd, 0xdf, 0x1e, 0xce, 0xa1, 0x7b, 0x3c, 0x87, 0xee, 0xcf, 0x73, 0xe8, 0x7e, 0xbe, 0x84, - 0xce, 0xf1, 0x12, 0x3a, 0xdf, 0x2f, 0xa1, 0xb3, 0x79, 0x95, 0x0b, 0xb3, 0xad, 0x13, 0xc2, 0xb1, - 0xa4, 0x6b, 0xb9, 0x96, 0x62, 0x25, 0x28, 0xdf, 0x32, 0x21, 0xe9, 0xa7, 0x7f, 0xae, 0x6f, 0xf6, - 0x15, 0xe8, 0xa4, 0xd7, 0xde, 0xe4, 0xf5, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x8d, 0x6a, - 0xe8, 0x25, 0x02, 0x00, 0x00, + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c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x8b, 0x26, 0x4f, 0x15, 0xd7, 0x62, 0xae, 0xe7, 0x9a, 0x4e, 0x49, 0xa8, + 0x05, 0x90, 0x16, 0x9f, 0xfe, 0xf9, 0x3a, 0x6e, 0xbd, 0x42, 0x9b, 0xef, 0xef, 0x1e, 0xf4, 0xe5, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, 0x10, 0x85, 0xbc, 0x62, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -146,6 +156,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IbcTransferTimeoutNanos != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.IbcTransferTimeoutNanos)) + i-- + dAtA[i] = 0x28 + } if len(m.FeeCollectorAddress) > 0 { i -= len(m.FeeCollectorAddress) copy(dAtA[i:], m.FeeCollectorAddress) @@ -213,6 +228,9 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovParams(uint64(l)) } + if m.IbcTransferTimeoutNanos != 0 { + n += 1 + sovParams(uint64(m.IbcTransferTimeoutNanos)) + } return n } @@ -383,6 +401,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.FeeCollectorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcTransferTimeoutNanos", wireType) + } + m.IbcTransferTimeoutNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IbcTransferTimeoutNanos |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index a09290169..2802aa029 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -310,9 +310,9 @@ func (m *TransferChannel) GetChannelId() string { } type SymbolInfo struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - NativeChainId string `protobuf:"bytes,2,opt,name=native_chain_id,json=nativeChainId,proto3" json:"native_chain_id,omitempty"` - Channels []*TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty"` + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + NativeChainId string `protobuf:"bytes,2,opt,name=native_chain_id,json=nativeChainId,proto3" json:"native_chain_id,omitempty"` + Channels []TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels"` } func (m *SymbolInfo) Reset() { *m = SymbolInfo{} } @@ -362,7 +362,7 @@ func (m *SymbolInfo) GetNativeChainId() string { return "" } -func (m *SymbolInfo) GetChannels() []*TransferChannel { +func (m *SymbolInfo) GetChannels() []TransferChannel { if m != nil { return m.Channels } @@ -370,9 +370,9 @@ func (m *SymbolInfo) GetChannels() []*TransferChannel { } type DenomInfo struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - Channels []*TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels,omitempty"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Channels []TransferChannel `protobuf:"bytes,3,rep,name=channels,proto3" json:"channels"` } func (m *DenomInfo) Reset() { *m = DenomInfo{} } @@ -422,7 +422,7 @@ func (m *DenomInfo) GetSymbol() string { return "" } -func (m *DenomInfo) GetChannels() []*TransferChannel { +func (m *DenomInfo) GetChannels() []TransferChannel { if m != nil { return m.Channels } @@ -687,58 +687,59 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 814 bytes of a gzipped FileDescriptorProto + // 817 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, 0x14, 0xaf, 0xf3, 0xaf, 0xf5, 0x0b, 0xdb, 0xae, 0xa6, 0xdd, 0x5d, 0x77, 0x11, 0x69, 0x94, 0x03, - 0x84, 0x43, 0x6d, 0x5a, 0x3e, 0xc1, 0x36, 0x11, 0x52, 0x80, 0x03, 0x72, 0x29, 0x20, 0x2e, 0xd6, - 0xc4, 0x9e, 0x38, 0xa3, 0xb5, 0x67, 0xa2, 0x99, 0x49, 0x4b, 0x24, 0x24, 0xbe, 0x01, 0x42, 0x7c, - 0x0c, 0xce, 0x7b, 0x43, 0xdc, 0xf7, 0xb8, 0xda, 0x0b, 0x88, 0xc3, 0x0a, 0xb5, 0x5f, 0x04, 0x79, - 0x66, 0x6c, 0x25, 0x6d, 0xc3, 0xa1, 0x2a, 0xbd, 0xf9, 0xbd, 0x79, 0xf3, 0xde, 0x6f, 0xde, 0xfb, - 0xbd, 0x9f, 0x0c, 0x87, 0x73, 0x36, 0x67, 0x74, 0x42, 0x83, 0x05, 0x25, 0x59, 0x82, 0xd3, 0x54, - 0x90, 0x14, 0x2b, 0x2e, 0xae, 0xdb, 0xfe, 0x4c, 0x70, 0xc5, 0xd1, 0x33, 0x1b, 0xee, 0x5f, 0x3b, - 0x7e, 0xbe, 0x97, 0xf2, 0x94, 0xeb, 0x98, 0xa0, 0xf8, 0x32, 0xe1, 0xcf, 0xf7, 0x63, 0x2e, 0x73, - 0x2e, 0x23, 0x73, 0x60, 0x0c, 0x7b, 0xd4, 0x31, 0x56, 0x30, 0xc6, 0x92, 0x04, 0xe7, 0x47, 0x63, - 0xa2, 0xf0, 0x51, 0x10, 0x73, 0xca, 0xcc, 0x79, 0xef, 0x47, 0xd8, 0x3e, 0x55, 0x02, 0x2b, 0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0xb8, 0x6f, 0xa9, + 0x68, 0xbe, 0x37, 0xa9, 0x68, 0xbd, 0x73, 0xa9, 0xd8, 0xbc, 0x0f, 0xa9, 0xe8, 0xfd, 0xe2, 0xc0, + 0xb6, 0x81, 0xf2, 0x7e, 0x97, 0x7f, 0x69, 0xb5, 0x9b, 0x2b, 0xab, 0xfd, 0x87, 0x03, 0xbb, 0x5f, + 0x0b, 0x3e, 0xe3, 0x12, 0x67, 0xcf, 0x92, 0x64, 0x19, 0x95, 0xa2, 0x2a, 0x23, 0x25, 0x2a, 0x6d, + 0x5c, 0xd7, 0x90, 0xda, 0x4d, 0x0d, 0xa9, 0x5e, 0x53, 0x5f, 0x7e, 0xcd, 0x6d, 0xe8, 0x1b, 0xff, + 0x8f, 0xbe, 0x79, 0x3b, 0xfa, 0x15, 0x61, 0x3a, 0x79, 0xfe, 0xea, 0xb2, 0xe3, 0xbc, 0xbe, 0xec, + 0x38, 0xff, 0x5e, 0x76, 0x9c, 0x5f, 0xaf, 0x3a, 0x1b, 0xaf, 0xaf, 0x3a, 0x1b, 0x7f, 0x5f, 0x75, + 0x36, 0x7e, 0xf8, 0x2c, 0xa5, 0x6a, 0x3a, 0x1f, 0xfb, 0x31, 0xcf, 0x83, 0x33, 0x76, 0xc6, 0xe8, + 0x17, 0x34, 0xd0, 0x42, 0x12, 0xfc, 0x78, 0xe3, 0x4f, 0x46, 0x2d, 0x66, 0x44, 0x8e, 0x5b, 0xfa, + 0xb7, 0xe2, 0xf3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x13, 0x61, 0xd5, 0xf1, 0x08, 0x00, + 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -2490,7 +2491,7 @@ func (m *SymbolInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Channels = append(m.Channels, &TransferChannel{}) + m.Channels = append(m.Channels, TransferChannel{}) if err := m.Channels[len(m.Channels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2638,7 +2639,7 @@ func (m *DenomInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Channels = append(m.Channels, &TransferChannel{}) + m.Channels = append(m.Channels, TransferChannel{}) if err := m.Channels[len(m.Channels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From db9b38ae1b8e3f66e319538dd0967214a365a748 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 6 Oct 2023 21:48:48 +0800 Subject: [PATCH 20/59] Add protobuf files for intermediary accounts configuration --- proto/ununifi/yieldaggregator/query.proto | 9 + proto/ununifi/yieldaggregator/tx.proto | 6 + .../yieldaggregator/yieldaggregator.proto | 8 + x/yieldaggregator/types/query.pb.go | 515 ++++++++++++++--- x/yieldaggregator/types/query.pb.gw.go | 65 +++ x/yieldaggregator/types/tx.pb.go | 498 ++++++++++++++--- x/yieldaggregator/types/yieldaggregator.pb.go | 517 ++++++++++++++++-- 7 files changed, 1396 insertions(+), 222 deletions(-) diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index fbf8b94df..398012e38 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -54,6 +54,10 @@ service Query { rpc SymbolInfos(QuerySymbolInfosRequest) returns (QuerySymbolInfosResponse) { option (google.api.http).get = "/ununifi/yieldaggregator/symbol-infos"; } + + rpc IntermediaryAccountInfo(QueryIntermediaryAccountInfoRequest) returns (QueryIntermediaryAccountInfoResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/intermediary-account-info"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -196,3 +200,8 @@ message QuerySymbolInfosRequest {} message QuerySymbolInfosResponse { repeated SymbolInfo info = 1 [(gogoproto.nullable) = false]; } + +message QueryIntermediaryAccountInfoRequest {} +message QueryIntermediaryAccountInfoResponse { + repeated ChainAddress addrs = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index 716136013..fc69aebe4 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -28,6 +28,7 @@ service Msg { rpc UpdateStrategy(MsgUpdateStrategy) returns (MsgUpdateStrategyResponse); rpc RegisterDenomInfos(MsgRegisterDenomInfos) returns (MsgRegisterDenomInfosResponse); rpc RegisterSymbolInfos(MsgSymbolInfos) returns (MsgSymbolInfosResponse); + rpc SetIntermediaryAccountInfo(MsgSetIntermediaryAccountInfo) returns (MsgSetIntermediaryAccountInfoResponse); } // this line is used by starport scaffolding # proto/tx/message @@ -197,3 +198,8 @@ message MsgSymbolInfos { repeated SymbolInfo info = 2 [(gogoproto.nullable) = false]; } message MsgSymbolInfosResponse {} + +message MsgSetIntermediaryAccountInfo { + repeated ChainAddress addrs = 1 [(gogoproto.nullable) = false]; +} +message MsgSetIntermediaryAccountInfoResponse {} diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 4de61e61d..f2c3774ac 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -64,6 +64,14 @@ message DenomInfo { [(gogoproto.nullable) = false]; // channels to transfer back to native chain from the denom } +message ChainAddress { + string chain_id = 1; + string address = 2; +} +message IntermediaryAccountInfo { + repeated ChainAddress addrs = 1 [(gogoproto.nullable) = false]; +} + // Deprecated: Just for v3.2.2 upgrade handler message LegacyVault { uint64 id = 1; diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 598c3effd..814d88e46 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -1069,6 +1069,86 @@ func (m *QuerySymbolInfosResponse) GetInfo() []SymbolInfo { return nil } +type QueryIntermediaryAccountInfoRequest struct { +} + +func (m *QueryIntermediaryAccountInfoRequest) Reset() { *m = QueryIntermediaryAccountInfoRequest{} } +func (m *QueryIntermediaryAccountInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIntermediaryAccountInfoRequest) ProtoMessage() {} +func (*QueryIntermediaryAccountInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{22} +} +func (m *QueryIntermediaryAccountInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIntermediaryAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIntermediaryAccountInfoRequest.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 *QueryIntermediaryAccountInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIntermediaryAccountInfoRequest.Merge(m, src) +} +func (m *QueryIntermediaryAccountInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIntermediaryAccountInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIntermediaryAccountInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIntermediaryAccountInfoRequest proto.InternalMessageInfo + +type QueryIntermediaryAccountInfoResponse struct { + Addrs []ChainAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"` +} + +func (m *QueryIntermediaryAccountInfoResponse) Reset() { *m = QueryIntermediaryAccountInfoResponse{} } +func (m *QueryIntermediaryAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIntermediaryAccountInfoResponse) ProtoMessage() {} +func (*QueryIntermediaryAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{23} +} +func (m *QueryIntermediaryAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIntermediaryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIntermediaryAccountInfoResponse.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 *QueryIntermediaryAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIntermediaryAccountInfoResponse.Merge(m, src) +} +func (m *QueryIntermediaryAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIntermediaryAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIntermediaryAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIntermediaryAccountInfoResponse proto.InternalMessageInfo + +func (m *QueryIntermediaryAccountInfoResponse) GetAddrs() []ChainAddress { + if m != nil { + return m.Addrs + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.yieldaggregator.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.yieldaggregator.QueryParamsResponse") @@ -1092,6 +1172,8 @@ func init() { proto.RegisterType((*QueryDenomInfosResponse)(nil), "ununifi.yieldaggregator.QueryDenomInfosResponse") proto.RegisterType((*QuerySymbolInfosRequest)(nil), "ununifi.yieldaggregator.QuerySymbolInfosRequest") proto.RegisterType((*QuerySymbolInfosResponse)(nil), "ununifi.yieldaggregator.QuerySymbolInfosResponse") + proto.RegisterType((*QueryIntermediaryAccountInfoRequest)(nil), "ununifi.yieldaggregator.QueryIntermediaryAccountInfoRequest") + proto.RegisterType((*QueryIntermediaryAccountInfoResponse)(nil), "ununifi.yieldaggregator.QueryIntermediaryAccountInfoResponse") } func init() { @@ -1099,93 +1181,98 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1368 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x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8, 0xbb, 0x29, 0xdc, 0xa6, 0xcd, 0xab, 0x74, 0x2b, - 0xc2, 0xc4, 0x76, 0x23, 0x90, 0x08, 0x1c, 0x06, 0x31, 0xeb, 0xa8, 0xb9, 0xd8, 0xe5, 0xa1, 0xe6, - 0xae, 0xf7, 0xdc, 0xc0, 0xe8, 0x8a, 0x0b, 0x11, 0xcc, 0xdb, 0x90, 0x57, 0x91, 0xae, 0x78, 0x92, - 0x35, 0x6d, 0x49, 0x3f, 0x66, 0x5c, 0xea, 0x37, 0x21, 0xe1, 0x01, 0x25, 0x27, 0x21, 0xc8, 0x78, - 0xec, 0x95, 0x2b, 0xed, 0xc5, 0x55, 0xed, 0x6d, 0x56, 0x61, 0x36, 0x11, 0x18, 0x4f, 0xf2, 0x01, - 0x4c, 0x37, 0x19, 0x0f, 0x61, 0xf4, 0x61, 0x8e, 0xc6, 0xc4, 0x1e, 0xc8, 0x7c, 0x55, 0x30, 0x1e, - 0x54, 0x4b, 0x33, 0x44, 0x32, 0x37, 0xe0, 0x58, 0x2c, 0x48, 0x89, 0xd6, 0x28, 0x6d, 0x0e, 0xe6, - 0x3f, 0x0b, 0xd3, 0x95, 0xb6, 0xcb, 0xe3, 0xe4, 0xc1, 0x5f, 0x42, 0xd0, 0x9f, 0x33, 0xd8, 0xff, - 0xfa, 0xa3, 0x22, 0xf9, 0x95, 0xa0, 0xff, 0x8d, 0xc6, 0x5e, 0x37, 0x48, 0x7c, 0x75, 0x97, 0x60, - 0x7c, 0x93, 0x52, 0xac, 0xf2, 0xa1, 0xae, 0xbe, 0x2d, 0x59, 0x83, 0xbd, 0xae, 0xa2, 0x13, 0x6d, - 0x01, 0x29, 0x9c, 0xf7, 0xb8, 0x91, 0x43, 0xf8, 0xe4, 0x75, 0x47, 0x41, 0x90, 0x89, 0x94, 0xe4, - 0x95, 0x13, 0xa6, 0x69, 0x06, 0x0e, 0xab, 0x2c, 0xad, 0xf9, 0xaf, 0xc7, 0x35, 0xbe, 0x29, 0xc2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x9a, 0xe3, 0xca, 0x47, 0x4f, - 0x5f, 0xe6, 0x8d, 0x67, 0x2f, 0xf3, 0xc6, 0x3f, 0x2f, 0xf3, 0xc6, 0xb7, 0xaf, 0xf2, 0x63, 0xcf, - 0x5e, 0xe5, 0xc7, 0xfe, 0x7a, 0x95, 0x1f, 0xfb, 0x7c, 0xd1, 0x61, 0xb2, 0xde, 0xae, 0x14, 0xab, - 0xa2, 0x69, 0xdd, 0xe4, 0x37, 0x39, 0x5b, 0x67, 0x56, 0xb5, 0x6e, 0x33, 0x6e, 0x7d, 0xd5, 0x03, - 0x29, 0x3b, 0x2d, 0xea, 0x55, 0xa6, 0xd4, 0x3f, 0xc2, 0xde, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, - 0xd8, 0xcc, 0x97, 0xfd, 0x38, 0x14, 0x00, 0x00, + // 1456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x5d, 0x6f, 0x13, 0x47, + 0x17, 0xce, 0x3a, 0x1f, 0x82, 0x13, 0x3e, 0x07, 0x03, 0xc1, 0xef, 0x2b, 0x87, 0x6c, 0x08, 0x89, + 0x00, 0x7b, 0x93, 0xbc, 0xaf, 0xd4, 0x12, 0xa0, 0xad, 0x93, 0x10, 0x9a, 0x8a, 0x4a, 0xd4, 0x29, + 0xa0, 0x16, 0xb5, 0xd6, 0xd8, 0x3b, 0xb1, 0x47, 0xd8, 0x33, 0x66, 0x77, 0x0c, 0xb5, 0x10, 0x37, + 0xbd, 0xee, 0x45, 0xd5, 0xf6, 0xb2, 0x55, 0x85, 0x54, 0xa9, 0x7f, 0x80, 0xfe, 0x07, 0xd4, 0x2b, + 0x44, 0xa5, 0xaa, 0xea, 0x05, 0xaa, 0x80, 0x3f, 0xd1, 0xbb, 0x6a, 0x67, 0xce, 0x3a, 0x5e, 0x3b, + 0xeb, 0x8f, 0x88, 0xcb, 0xde, 0x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 0x08, + 0x19, 0x6a, 0x20, 0x74, 0x56, 0xab, 0x1f, 0x3c, 0x7d, 0x99, 0xb6, 0x9e, 0xbd, 0x4c, 0x5b, 0x7f, + 0xbd, 0x4c, 0x5b, 0x5f, 0xbf, 0x4a, 0x8f, 0x3c, 0x7b, 0x95, 0x1e, 0xf9, 0xe3, 0x55, 0x7a, 0xe4, + 0xd3, 0xc5, 0x32, 0x57, 0x95, 0x46, 0x31, 0x5b, 0x92, 0x35, 0xe7, 0xa6, 0xb8, 0x29, 0xf8, 0x06, + 0x77, 0x4a, 0xc1, 0x98, 0x77, 0xbe, 0xe8, 0xc2, 0x57, 0xcd, 0x3a, 0xf3, 0x8b, 0x13, 0xfa, 0xff, + 0x8d, 0xff, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x56, 0xc3, 0xa5, 0x90, 0x9f, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1212,6 +1299,7 @@ type QueryClient interface { EstimateRedeemAmount(ctx context.Context, in *QueryEstimateRedeemAmountRequest, opts ...grpc.CallOption) (*QueryEstimateRedeemAmountResponse, error) DenomInfos(ctx context.Context, in *QueryDenomInfosRequest, opts ...grpc.CallOption) (*QueryDenomInfosResponse, error) SymbolInfos(ctx context.Context, in *QuerySymbolInfosRequest, opts ...grpc.CallOption) (*QuerySymbolInfosResponse, error) + IntermediaryAccountInfo(ctx context.Context, in *QueryIntermediaryAccountInfoRequest, opts ...grpc.CallOption) (*QueryIntermediaryAccountInfoResponse, error) } type queryClient struct { @@ -1312,6 +1400,15 @@ func (c *queryClient) SymbolInfos(ctx context.Context, in *QuerySymbolInfosReque return out, nil } +func (c *queryClient) IntermediaryAccountInfo(ctx context.Context, in *QueryIntermediaryAccountInfoRequest, opts ...grpc.CallOption) (*QueryIntermediaryAccountInfoResponse, error) { + out := new(QueryIntermediaryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/IntermediaryAccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1326,6 +1423,7 @@ type QueryServer interface { EstimateRedeemAmount(context.Context, *QueryEstimateRedeemAmountRequest) (*QueryEstimateRedeemAmountResponse, error) DenomInfos(context.Context, *QueryDenomInfosRequest) (*QueryDenomInfosResponse, error) SymbolInfos(context.Context, *QuerySymbolInfosRequest) (*QuerySymbolInfosResponse, error) + IntermediaryAccountInfo(context.Context, *QueryIntermediaryAccountInfoRequest) (*QueryIntermediaryAccountInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1362,6 +1460,9 @@ func (*UnimplementedQueryServer) DenomInfos(ctx context.Context, req *QueryDenom func (*UnimplementedQueryServer) SymbolInfos(ctx context.Context, req *QuerySymbolInfosRequest) (*QuerySymbolInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SymbolInfos not implemented") } +func (*UnimplementedQueryServer) IntermediaryAccountInfo(ctx context.Context, req *QueryIntermediaryAccountInfoRequest) (*QueryIntermediaryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IntermediaryAccountInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1547,6 +1648,24 @@ func _Query_SymbolInfos_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_IntermediaryAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIntermediaryAccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IntermediaryAccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Query/IntermediaryAccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IntermediaryAccountInfo(ctx, req.(*QueryIntermediaryAccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.yieldaggregator.Query", HandlerType: (*QueryServer)(nil), @@ -1591,6 +1710,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "SymbolInfos", Handler: _Query_SymbolInfos_Handler, }, + { + MethodName: "IntermediaryAccountInfo", + Handler: _Query_IntermediaryAccountInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/yieldaggregator/query.proto", @@ -2479,6 +2602,66 @@ func (m *QuerySymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryIntermediaryAccountInfoRequest) 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 *QueryIntermediaryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIntermediaryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryIntermediaryAccountInfoResponse) 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 *QueryIntermediaryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIntermediaryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addrs) > 0 { + for iNdEx := len(m.Addrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Addrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2810,6 +2993,30 @@ func (m *QuerySymbolInfosResponse) Size() (n int) { return n } +func (m *QueryIntermediaryAccountInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryIntermediaryAccountInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addrs) > 0 { + for _, e := range m.Addrs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5136,6 +5343,140 @@ func (m *QuerySymbolInfosResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryIntermediaryAccountInfoRequest) 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 ErrIntOverflowQuery + } + 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: QueryIntermediaryAccountInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIntermediaryAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIntermediaryAccountInfoResponse) 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 ErrIntOverflowQuery + } + 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: QueryIntermediaryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIntermediaryAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addrs = append(m.Addrs, ChainAddress{}) + if err := m.Addrs[len(m.Addrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/types/query.pb.gw.go b/x/yieldaggregator/types/query.pb.gw.go index 3ad6019d6..71be08bc9 100644 --- a/x/yieldaggregator/types/query.pb.gw.go +++ b/x/yieldaggregator/types/query.pb.gw.go @@ -483,6 +483,24 @@ func local_request_Query_SymbolInfos_0(ctx context.Context, marshaler runtime.Ma } +func request_Query_IntermediaryAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIntermediaryAccountInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.IntermediaryAccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_IntermediaryAccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIntermediaryAccountInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.IntermediaryAccountInfo(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -719,6 +737,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_IntermediaryAccountInfo_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_Query_IntermediaryAccountInfo_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_Query_IntermediaryAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -960,6 +1001,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_IntermediaryAccountInfo_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_Query_IntermediaryAccountInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_IntermediaryAccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -983,6 +1044,8 @@ var ( pattern_Query_DenomInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "denom-infos"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_SymbolInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "symbol-infos"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_IntermediaryAccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "intermediary-account-info"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1005,4 +1068,6 @@ var ( forward_Query_DenomInfos_0 = runtime.ForwardResponseMessage forward_Query_SymbolInfos_0 = runtime.ForwardResponseMessage + + forward_Query_IntermediaryAccountInfo_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index a5cd2ce6c..6a7ccfcb4 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -998,6 +998,86 @@ func (m *MsgSymbolInfosResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSymbolInfosResponse proto.InternalMessageInfo +type MsgSetIntermediaryAccountInfo struct { + Addrs []ChainAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"` +} + +func (m *MsgSetIntermediaryAccountInfo) Reset() { *m = MsgSetIntermediaryAccountInfo{} } +func (m *MsgSetIntermediaryAccountInfo) String() string { return proto.CompactTextString(m) } +func (*MsgSetIntermediaryAccountInfo) ProtoMessage() {} +func (*MsgSetIntermediaryAccountInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{24} +} +func (m *MsgSetIntermediaryAccountInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetIntermediaryAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetIntermediaryAccountInfo.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 *MsgSetIntermediaryAccountInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetIntermediaryAccountInfo.Merge(m, src) +} +func (m *MsgSetIntermediaryAccountInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgSetIntermediaryAccountInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetIntermediaryAccountInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetIntermediaryAccountInfo proto.InternalMessageInfo + +func (m *MsgSetIntermediaryAccountInfo) GetAddrs() []ChainAddress { + if m != nil { + return m.Addrs + } + return nil +} + +type MsgSetIntermediaryAccountInfoResponse struct { +} + +func (m *MsgSetIntermediaryAccountInfoResponse) Reset() { *m = MsgSetIntermediaryAccountInfoResponse{} } +func (m *MsgSetIntermediaryAccountInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetIntermediaryAccountInfoResponse) ProtoMessage() {} +func (*MsgSetIntermediaryAccountInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{25} +} +func (m *MsgSetIntermediaryAccountInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetIntermediaryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetIntermediaryAccountInfoResponse.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 *MsgSetIntermediaryAccountInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetIntermediaryAccountInfoResponse.Merge(m, src) +} +func (m *MsgSetIntermediaryAccountInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetIntermediaryAccountInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetIntermediaryAccountInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetIntermediaryAccountInfoResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgDepositToVault)(nil), "ununifi.yieldaggregator.MsgDepositToVault") proto.RegisterType((*MsgDepositToVaultResponse)(nil), "ununifi.yieldaggregator.MsgDepositToVaultResponse") @@ -1023,90 +1103,96 @@ func init() { proto.RegisterType((*MsgRegisterDenomInfosResponse)(nil), "ununifi.yieldaggregator.MsgRegisterDenomInfosResponse") proto.RegisterType((*MsgSymbolInfos)(nil), "ununifi.yieldaggregator.MsgSymbolInfos") proto.RegisterType((*MsgSymbolInfosResponse)(nil), "ununifi.yieldaggregator.MsgSymbolInfosResponse") + proto.RegisterType((*MsgSetIntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfo") + proto.RegisterType((*MsgSetIntermediaryAccountInfoResponse)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfoResponse") } func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1238 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0x26, 0x4e, 0xd2, 0xbc, 0x81, 0xa4, 0xdd, 0x24, 0xcd, 0xc6, 0xa5, 0xb6, 0x71, 0x41, - 0x31, 0x85, 0x78, 0x1b, 0x03, 0x45, 0x54, 0x14, 0xa9, 0x69, 0x54, 0x29, 0x88, 0x08, 0xb4, 0x49, - 0x28, 0xea, 0xc5, 0x5a, 0xef, 0x8e, 0xd7, 0x43, 0xbd, 0x33, 0xab, 0x99, 0x71, 0x52, 0x4b, 0x5c, - 0xe0, 0x42, 0x8f, 0xdc, 0xb8, 0xf6, 0x07, 0x54, 0x88, 0x43, 0xf9, 0x0f, 0xe5, 0x80, 0x28, 0x3d, - 0x21, 0x0e, 0x15, 0x4a, 0x0f, 0x70, 0xe0, 0x47, 0xa0, 0xfd, 0xf0, 0x74, 0x6d, 0xef, 0xba, 0xb6, - 0x9b, 0x4a, 0x9c, 0xec, 0xdd, 0x79, 0xde, 0x8f, 0xe7, 0x9d, 0xf7, 0x4b, 0x0b, 0x85, 0x16, 0x69, - 0x11, 0x5c, 0xc7, 0x7a, 0x1b, 0xa3, 0xa6, 0x6d, 0x3a, 0x0e, 0x43, 0x8e, 0x29, 0x28,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 0x33, 0xc1, 0xf7, 0x99, 0x77, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x74, - 0xdc, 0xc7, 0x9b, 0x12, 0x00, 0x00, + // 1312 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0x8f, 0x93, 0x4d, 0xd2, 0xbc, 0x94, 0xa4, 0x75, 0x92, 0xc6, 0xd9, 0xd2, 0x4d, 0xd8, 0x52, + 0x25, 0x14, 0xb2, 0x6e, 0x16, 0x28, 0xa2, 0xa2, 0x95, 0xf2, 0x47, 0x95, 0x82, 0x88, 0x40, 0x4e, + 0x42, 0x51, 0x2f, 0x2b, 0xaf, 0x3d, 0xeb, 0x0c, 0x5d, 0xcf, 0x58, 0x33, 0x93, 0xa4, 0x2b, 0x71, + 0x81, 0x0b, 0x3d, 0x72, 0x40, 0xe2, 0xda, 0x0f, 0x80, 0x10, 0x87, 0xf2, 0x09, 0xb8, 0x94, 0x03, + 0xa2, 0xf4, 0x84, 0x38, 0x54, 0x28, 0x3d, 0xc0, 0x81, 0x0f, 0x81, 0xec, 0xf1, 0x4e, 0x9d, 0xac, + 0xed, 0x6e, 0xb6, 0xa9, 0xc4, 0x29, 0x6b, 0xcf, 0xef, 0xbd, 0xf7, 0xfb, 0xbd, 0x99, 0xf7, 0xde, + 0xc4, 0x30, 0xb7, 0x4b, 0x76, 0x09, 0x6e, 0x60, 0xb3, 0x85, 0x51, 0xd3, 0xb5, 0x3d, 0x8f, 0x21, + 0xcf, 0x16, 0x94, 0x99, 0xe2, 0x6e, 0x25, 0x60, 0x54, 0x50, 0x7d, 0x3a, 0x46, 0x54, 0x8e, 0x20, + 0x8a, 0x93, 0x1e, 0xf5, 0x68, 0x84, 0x31, 0xc3, 0x5f, 0x12, 0x5e, 0x9c, 0x76, 0x28, 0xf7, 0x29, + 0x37, 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+ 0x1d, 0x94, 0xb4, 0x6f, 0x9e, 0x96, 0xfa, 0x1e, 0x3d, 0x2d, 0xf5, 0xfd, 0xf1, 0xb4, 0xd4, 0x77, + 0xfb, 0x8a, 0x87, 0xc5, 0xce, 0x6e, 0xbd, 0xe2, 0x50, 0xdf, 0xdc, 0x26, 0xdb, 0x04, 0xdf, 0xc4, + 0xa6, 0x13, 0x8e, 0x2d, 0xf3, 0x6e, 0xe7, 0x77, 0xb9, 0x56, 0x80, 0x78, 0x7d, 0x28, 0xfa, 0x86, + 0xf5, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x67, 0x2d, 0xa8, 0xbf, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1134,6 +1220,7 @@ type MsgClient interface { UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, opts ...grpc.CallOption) (*MsgUpdateStrategyResponse, error) RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenomInfos, opts ...grpc.CallOption) (*MsgRegisterDenomInfosResponse, error) RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, opts ...grpc.CallOption) (*MsgSymbolInfosResponse, error) + SetIntermediaryAccountInfo(ctx context.Context, in *MsgSetIntermediaryAccountInfo, opts ...grpc.CallOption) (*MsgSetIntermediaryAccountInfoResponse, error) } type msgClient struct { @@ -1252,6 +1339,15 @@ func (c *msgClient) RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, return out, nil } +func (c *msgClient) SetIntermediaryAccountInfo(ctx context.Context, in *MsgSetIntermediaryAccountInfo, opts ...grpc.CallOption) (*MsgSetIntermediaryAccountInfoResponse, error) { + out := new(MsgSetIntermediaryAccountInfoResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/SetIntermediaryAccountInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // this line is used by starport scaffolding # proto/tx/rpc @@ -1267,6 +1363,7 @@ type MsgServer interface { UpdateStrategy(context.Context, *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) RegisterDenomInfos(context.Context, *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) RegisterSymbolInfos(context.Context, *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) + SetIntermediaryAccountInfo(context.Context, *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1309,6 +1406,9 @@ func (*UnimplementedMsgServer) RegisterDenomInfos(ctx context.Context, req *MsgR func (*UnimplementedMsgServer) RegisterSymbolInfos(ctx context.Context, req *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterSymbolInfos not implemented") } +func (*UnimplementedMsgServer) SetIntermediaryAccountInfo(ctx context.Context, req *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetIntermediaryAccountInfo not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1530,6 +1630,24 @@ func _Msg_RegisterSymbolInfos_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_SetIntermediaryAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetIntermediaryAccountInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetIntermediaryAccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Msg/SetIntermediaryAccountInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetIntermediaryAccountInfo(ctx, req.(*MsgSetIntermediaryAccountInfo)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.yieldaggregator.Msg", HandlerType: (*MsgServer)(nil), @@ -1582,6 +1700,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "RegisterSymbolInfos", Handler: _Msg_RegisterSymbolInfos_Handler, }, + { + MethodName: "SetIntermediaryAccountInfo", + Handler: _Msg_SetIntermediaryAccountInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/yieldaggregator/tx.proto", @@ -2504,6 +2626,66 @@ func (m *MsgSymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgSetIntermediaryAccountInfo) 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 *MsgSetIntermediaryAccountInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetIntermediaryAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addrs) > 0 { + for iNdEx := len(m.Addrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Addrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgSetIntermediaryAccountInfoResponse) 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 *MsgSetIntermediaryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetIntermediaryAccountInfoResponse) 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 @@ -2905,6 +3087,30 @@ func (m *MsgSymbolInfosResponse) Size() (n int) { return n } +func (m *MsgSetIntermediaryAccountInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addrs) > 0 { + for _, e := range m.Addrs { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgSetIntermediaryAccountInfoResponse) 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 } @@ -5561,6 +5767,140 @@ func (m *MsgSymbolInfosResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSetIntermediaryAccountInfo) 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: MsgSetIntermediaryAccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetIntermediaryAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", 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 + } + m.Addrs = append(m.Addrs, ChainAddress{}) + if err := m.Addrs[len(m.Addrs)-1].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 *MsgSetIntermediaryAccountInfoResponse) 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: MsgSetIntermediaryAccountInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetIntermediaryAccountInfoResponse: 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 diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index 2802aa029..742690a25 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -429,6 +429,102 @@ func (m *DenomInfo) GetChannels() []TransferChannel { return nil } +type ChainAddress struct { + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *ChainAddress) Reset() { *m = ChainAddress{} } +func (m *ChainAddress) String() string { return proto.CompactTextString(m) } +func (*ChainAddress) ProtoMessage() {} +func (*ChainAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{6} +} +func (m *ChainAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainAddress.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 *ChainAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainAddress.Merge(m, src) +} +func (m *ChainAddress) XXX_Size() int { + return m.Size() +} +func (m *ChainAddress) XXX_DiscardUnknown() { + xxx_messageInfo_ChainAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainAddress proto.InternalMessageInfo + +func (m *ChainAddress) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *ChainAddress) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +type IntermediaryAccountInfo struct { + Addrs []ChainAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"` +} + +func (m *IntermediaryAccountInfo) Reset() { *m = IntermediaryAccountInfo{} } +func (m *IntermediaryAccountInfo) String() string { return proto.CompactTextString(m) } +func (*IntermediaryAccountInfo) ProtoMessage() {} +func (*IntermediaryAccountInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{7} +} +func (m *IntermediaryAccountInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IntermediaryAccountInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IntermediaryAccountInfo.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 *IntermediaryAccountInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntermediaryAccountInfo.Merge(m, src) +} +func (m *IntermediaryAccountInfo) XXX_Size() int { + return m.Size() +} +func (m *IntermediaryAccountInfo) XXX_DiscardUnknown() { + xxx_messageInfo_IntermediaryAccountInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_IntermediaryAccountInfo proto.InternalMessageInfo + +func (m *IntermediaryAccountInfo) GetAddrs() []ChainAddress { + if m != nil { + return m.Addrs + } + return nil +} + // Deprecated: Just for v3.2.2 upgrade handler type LegacyVault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` @@ -444,7 +540,7 @@ func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{6} + return fileDescriptor_7877bd9c4573997d, []int{8} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,7 +617,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{7} + return fileDescriptor_7877bd9c4573997d, []int{9} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -599,7 +695,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{8} + return fileDescriptor_7877bd9c4573997d, []int{10} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -677,6 +773,8 @@ func init() { proto.RegisterType((*TransferChannel)(nil), "ununifi.yieldaggregator.TransferChannel") proto.RegisterType((*SymbolInfo)(nil), "ununifi.yieldaggregator.SymbolInfo") proto.RegisterType((*DenomInfo)(nil), "ununifi.yieldaggregator.DenomInfo") + proto.RegisterType((*ChainAddress)(nil), "ununifi.yieldaggregator.ChainAddress") + proto.RegisterType((*IntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.IntermediaryAccountInfo") proto.RegisterType((*LegacyVault)(nil), "ununifi.yieldaggregator.LegacyVault") proto.RegisterType((*LegacyStrategy)(nil), "ununifi.yieldaggregator.LegacyStrategy") proto.RegisterType((*ProposalAddStrategy)(nil), "ununifi.yieldaggregator.ProposalAddStrategy") @@ -687,59 +785,62 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 817 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0xf3, 0xaf, 0xf5, 0x0b, 0xdb, 0xae, 0xa6, 0xdd, 0x5d, 0x77, 0x11, 0x69, 0x94, 0x03, - 0x84, 0x43, 0x6d, 0x5a, 0x3e, 0xc1, 0x36, 0x11, 0x52, 0x16, 0x0e, 0xc8, 0xa5, 0x80, 0xb8, 0x58, - 0x13, 0x7b, 0xe2, 0x8c, 0xd6, 0x9e, 0x89, 0x66, 0x26, 0x2d, 0x91, 0xb8, 0x72,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0xfc, 0x78, 0xe3, 0x4f, 0x46, 0x2d, 0x66, 0x44, 0x8e, 0x5b, 0xfa, - 0xb7, 0xe2, 0xf3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x13, 0x61, 0xd5, 0xf1, 0x08, 0x00, - 0x00, + // 872 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0xd3, 0x38, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23, 0x4b, + 0x40, 0x38, 0xd4, 0xa6, 0xe5, 0x17, 0xb4, 0x89, 0x90, 0xb2, 0x70, 0x40, 0x2e, 0x05, 0x84, 0x90, + 0xac, 0x89, 0x3d, 0x71, 0x46, 0x6b, 0xcf, 0x44, 0x33, 0x93, 0x96, 0x48, 0x5c, 0xb9, 0x22, 0x8e, + 0xfc, 0x06, 0xce, 0x7b, 0x43, 0xdc, 0xf7, 0xb8, 0xda, 0x0b, 0x88, 0xc3, 0x0a, 0xb5, 0x7f, 0x04, + 0x79, 0x66, 0x6c, 0x25, 0x6d, 0xb3, 0x87, 0xaa, 0xbb, 0x37, 0xbf, 0x37, 0x6f, 0xde, 0xfb, 0xe6, + 0xbd, 0xef, 0x7d, 0x32, 0x1c, 0xcc, 0xe8, 0x8c, 0x92, 0x31, 0x09, 0xe6, 0x04, 0x67, 0x09, 0x4a, + 0x53, 0x8e, 0x53, 0x24, 0x19, 0xbf, 0x6e, 0xfb, 0x53, 0xce, 0x24, 0x73, 0x76, 0x4d, 0xb8, 0x7f, + 0xed, 0xf8, 0xe9, 0x4e, 0xca, 0x52, 0xa6, 0x62, 0x82, 0xe2, 0x4b, 0x87, 0x3f, 0xdd, 0x8b, 0x99, + 0xc8, 0x99, 0x88, 0xf4, 0x81, 0x36, 0xcc, 0x51, 0x47, 0x5b, 0xc1, 0x08, 0x09, 0x1c, 0x9c, 0x1f, + 0x8e, 0xb0, 0x44, 0x87, 0x41, 0xcc, 0x08, 0xd5, 0xe7, 0xde, 0xcf, 0xb0, 0x79, 0x2a, 0x39, 0x92, + 0x38, 0x9d, 0x7f, 0x87, 0x49, 0x3a, 0x91, 0xce, 0x3e, 0xb4, 0x85, 0xf1, 0x44, 0x24, 0x71, 0xad, + 0xae, 0xd5, 0xab, 0x87, 0x50, 0xba, 0x86, 0x89, 0x33, 0x84, 0xc6, 0x85, 0x0a, 0x75, 0x6b, 0x5d, + 0xab, 0xd7, 0x3a, 0x39, 0x7c, 0xf9, 0x66, 0x7f, 0xed, 0xdf, 0x37, 0xfb, 0x1f, 0xe8, 0x52, 0x22, + 0x79, 0xee, 0x13, 0x16, 0xe4, 0x48, 0x4e, 0xfc, 0xaf, 0x70, 0x8a, 0xe2, 0xf9, 0x00, 0xc7, 0xaf, + 0x5f, 0x1c, 0x80, 0xc1, 0x35, 0xc0, 0x71, 0x68, 0x12, 0x78, 0x7f, 0xd5, 0xc1, 0xfe, 0x16, 0xcd, + 0x32, 0xe9, 0x6c, 0x42, 0xad, 0x2a, 0x56, 0x23, 0x89, 0xf3, 0x04, 0x1a, 0x62, 0x9e, 0x8f, 0x58, + 0xa6, 0x8b, 0x84, 0xc6, 0x72, 0x1c, 0xa8, 0x53, 0x94, 0x63, 0x77, 0x5d, 0x79, 0xd5, 0xb7, 0xd3, + 0x85, 0x76, 0x82, 0x45, 0xcc, 0xc9, 0x54, 0x12, 0x46, 0xdd, 0xba, 0x3a, 0x5a, 0x74, 0x39, 0x3e, + 0xd8, 0xec, 0x82, 0x62, 0xee, 0xda, 0x0a, 0xb1, 0xfb, 0xfa, 0xc5, 0xc1, 0x8e, 0x81, 0x73, 0x9c, + 0x24, 0x1c, 0x0b, 0x71, 0x2a, 0x39, 0xa1, 0x69, 0xa8, 0xc3, 0x9c, 0x01, 0x3c, 0x54, 0x1f, 0x51, + 0x82, 0x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0x50, 0xea, 0x9b, + 0xde, 0xdf, 0xeb, 0xd0, 0xd6, 0xeb, 0x77, 0xbb, 0x0a, 0x56, 0xcd, 0xab, 0x2d, 0x36, 0xaf, 0x52, + 0xb3, 0xf5, 0x3b, 0xaa, 0x59, 0xfd, 0xbe, 0xd5, 0xcc, 0x7e, 0x6f, 0x6a, 0xd6, 0x78, 0xe7, 0x6a, + 0xd6, 0xbc, 0x0f, 0x35, 0xf3, 0x7e, 0xb5, 0x60, 0x53, 0x43, 0x79, 0xbf, 0xfa, 0xb4, 0xa0, 0x3e, + 0xf6, 0x92, 0xfa, 0xfc, 0x69, 0xc1, 0xf6, 0xd7, 0x9c, 0x4d, 0x99, 0x40, 0xd9, 0x71, 0x92, 0x2c, + 0xa2, 0x92, 0x44, 0x66, 0xb8, 0x44, 0xa5, 0x8c, 0xeb, 0x32, 0x57, 0xbb, 0x29, 0x73, 0xd5, 0x6b, + 0xd6, 0x17, 0x5f, 0x73, 0x1b, 0xfa, 0xfa, 0xdb, 0xd1, 0xdb, 0xb7, 0xa3, 0x5f, 0xd2, 0xce, 0x93, + 0x67, 0x2f, 0x2f, 0x3b, 0xd6, 0xab, 0xcb, 0x8e, 0xf5, 0xdf, 0x65, 0xc7, 0xfa, 0xed, 0xaa, 0xb3, + 0xf6, 0xea, 0xaa, 0xb3, 0xf6, 0xcf, 0x55, 0x67, 0xed, 0x87, 0xcf, 0x52, 0x22, 0x27, 0xb3, 0x91, + 0x1f, 0xb3, 0x3c, 0x38, 0xa3, 0x67, 0x94, 0x7c, 0x41, 0x02, 0xb5, 0xd6, 0xc1, 0x4f, 0x37, 0x7e, + 0xb6, 0xe4, 0x7c, 0x8a, 0xc5, 0xa8, 0xa1, 0xfe, 0x7c, 0x3e, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, + 0x7f, 0xf1, 0x54, 0x1c, 0x94, 0x09, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -1089,6 +1190,80 @@ func (m *DenomInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ChainAddress) 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 *ChainAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *IntermediaryAccountInfo) 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 *IntermediaryAccountInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IntermediaryAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addrs) > 0 { + for iNdEx := len(m.Addrs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Addrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *LegacyVault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1460,6 +1635,38 @@ func (m *DenomInfo) Size() (n int) { return n } +func (m *ChainAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + return n +} + +func (m *IntermediaryAccountInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addrs) > 0 { + for _, e := range m.Addrs { + l = e.Size() + n += 1 + l + sovYieldaggregator(uint64(l)) + } + } + return n +} + func (m *LegacyVault) Size() (n int) { if m == nil { return 0 @@ -2665,6 +2872,204 @@ func (m *DenomInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *ChainAddress) 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 ErrIntOverflowYieldaggregator + } + 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: ChainAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IntermediaryAccountInfo) 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 ErrIntOverflowYieldaggregator + } + 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: IntermediaryAccountInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntermediaryAccountInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addrs = append(m.Addrs, ChainAddress{}) + if err := m.Addrs[len(m.Addrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LegacyVault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From adf4d0e204aeb0222e4440d377d434f74961f2cb Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 10 Oct 2023 01:25:20 +0800 Subject: [PATCH 21/59] Add denom and strategy id on vault struct and resolve most of the build issues --- go.mod | 1 + go.sum | 4 + proto/ununifi/yieldaggregator/query.proto | 20 +- proto/ununifi/yieldaggregator/tx.proto | 5 +- .../yieldaggregator/yieldaggregator.proto | 5 +- .../keeper/grpc_query_estimate_mint_amount.go | 2 +- .../grpc_query_estimate_redeem_amount.go | 12 +- .../grpc_query_intermediary_account_info.go | 20 ++ .../keeper/grpc_query_symbol_info.go | 2 +- x/yieldaggregator/keeper/grpc_query_vault.go | 2 +- x/yieldaggregator/keeper/hooks.go | 2 +- x/yieldaggregator/keeper/hooks_test.go | 4 +- x/yieldaggregator/keeper/lp.go | 32 +-- x/yieldaggregator/keeper/lp_test.go | 24 +- .../keeper/msg_server_create_vault.go | 4 +- .../keeper/msg_server_register_symbol_info.go | 2 +- ...sg_server_set_intermediary_account_info.go | 20 ++ x/yieldaggregator/keeper/pfm_intermediary.go | 29 ++ x/yieldaggregator/keeper/strategy.go | 12 +- x/yieldaggregator/keeper/strategy_test.go | 12 +- x/yieldaggregator/keeper/vault.go | 7 +- x/yieldaggregator/keeper/vault_test.go | 2 +- x/yieldaggregator/types/keys.go | 1 + .../types/message_create_vault.go | 8 +- x/yieldaggregator/types/query.pb.go | 258 ++++++++---------- x/yieldaggregator/types/tx.pb.go | 238 +++++++++------- x/yieldaggregator/types/yieldaggregator.pb.go | 173 +++++++----- 27 files changed, 540 insertions(+), 361 deletions(-) create mode 100644 x/yieldaggregator/keeper/grpc_query_intermediary_account_info.go create mode 100644 x/yieldaggregator/keeper/msg_server_set_intermediary_account_info.go create mode 100644 x/yieldaggregator/keeper/pfm_intermediary.go diff --git a/go.mod b/go.mod index 4ec624833..e86c2b5ca 100644 --- a/go.mod +++ b/go.mod @@ -120,6 +120,7 @@ require ( github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/huandu/xstrings v1.0.0 // indirect + github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 96afc810c..4df61a31b 100644 --- a/go.sum +++ b/go.sum @@ -760,6 +760,10 @@ github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbc github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= +github.com/iancoleman/orderedmap v0.2.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= +github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index 398012e38..bc56acd06 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -184,10 +184,22 @@ message QueryEstimateRedeemAmountRequest { } message QueryEstimateRedeemAmountResponse { - cosmos.base.v1beta1.Coin share_amount = 1 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin fee = 2 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin redeem_amount = 3 [(gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin total_amount = 4 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin share_amount = 1 [(gogoproto.nullable) = false]; + string fee = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string redeem_amount = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string total_amount = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; } message QueryDenomInfosRequest {} diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index fc69aebe4..e231a060c 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -80,7 +80,7 @@ message MsgCreateVault { option (gogoproto.goproto_getters) = false; string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string denom = 2; + string symbol = 2; string name = 3; string description = 4; string commission_rate = 5 [ @@ -200,6 +200,7 @@ message MsgSymbolInfos { message MsgSymbolInfosResponse {} message MsgSetIntermediaryAccountInfo { - repeated ChainAddress addrs = 1 [(gogoproto.nullable) = false]; + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated ChainAddress addrs = 2 [(gogoproto.nullable) = false]; } message MsgSetIntermediaryAccountInfoResponse {} diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index f2c3774ac..1d5efebe1 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -8,8 +8,9 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/types"; message StrategyWeight { - uint64 strategy_id = 1; - string weight = 2 [ + string denom = 1; + uint64 strategy_id = 2; + string weight = 3 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false diff --git a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go index 341e96e02..959cdf332 100644 --- a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go +++ b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go @@ -27,7 +27,7 @@ func (k Keeper) EstimateMintAmount(c context.Context, req *types.QueryEstimateMi if !ok { return nil, types.ErrInvalidAmount } - mintAmount := k.EstimateMintAmountInternal(ctx, vault.Denom, vault.Id, depositAmount) + mintAmount := k.EstimateMintAmountInternal(ctx, vault.Id, depositAmount) return &types.QueryEstimateMintAmountResponse{ MintAmount: mintAmount, diff --git a/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go b/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go index ba0c491d2..588032e92 100644 --- a/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go +++ b/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go @@ -29,10 +29,10 @@ func (k Keeper) EstimateRedeemAmount(c context.Context, req *types.QueryEstimate if !ok { return nil, types.ErrInvalidAmount } - principal := k.EstimateRedeemAmountInternal(ctx, vault.Denom, vault.Id, burnAmount) + principal := k.EstimateRedeemAmountInternal(ctx, vault.Id, burnAmount) // Unstake funds from Strategy - amountToUnbond := principal.Amount + amountToUnbond := principal // implement fees on withdrawal amountInVault := k.VaultWithdrawalAmount(ctx, vault) @@ -48,8 +48,8 @@ func (k Keeper) EstimateRedeemAmount(c context.Context, req *types.QueryEstimate Quo(e.Power(osmomath.BigDecFromSDKDec(reserveMaintenanceRate).MulInt64(10))). SDKDec() - withdrawFee := sdk.NewDecFromInt(principal.Amount).Mul(withdrawFeeRate).RoundInt() - withdrawAmount := principal.Amount.Sub(withdrawFee) + withdrawFee := sdk.NewDecFromInt(amountToUnbond).Mul(withdrawFeeRate).RoundInt() + withdrawAmount := amountToUnbond.Sub(withdrawFee) withdrawModuleCommissionFee := sdk.NewDecFromInt(withdrawAmount).Mul(params.CommissionRate).RoundInt() withdrawVaultCommissionFee := sdk.NewDecFromInt(withdrawAmount).Mul(vault.WithdrawCommissionRate).RoundInt() @@ -58,8 +58,8 @@ func (k Keeper) EstimateRedeemAmount(c context.Context, req *types.QueryEstimate return &types.QueryEstimateRedeemAmountResponse{ ShareAmount: sdk.NewCoin(types.GetLPTokenDenom(vault.Id), burnAmount), - Fee: sdk.NewCoin(principal.Denom, fee), - RedeemAmount: sdk.NewCoin(principal.Denom, withdrawAmountWithoutCommission), + Fee: fee, + RedeemAmount: withdrawAmountWithoutCommission, TotalAmount: principal, }, nil } diff --git a/x/yieldaggregator/keeper/grpc_query_intermediary_account_info.go b/x/yieldaggregator/keeper/grpc_query_intermediary_account_info.go new file mode 100644 index 000000000..d70f10d03 --- /dev/null +++ b/x/yieldaggregator/keeper/grpc_query_intermediary_account_info.go @@ -0,0 +1,20 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k Keeper) IntermediaryAccountInfo(c context.Context, req *types.QueryIntermediaryAccountInfoRequest) (*types.QueryIntermediaryAccountInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + info := k.GetIntermediaryAccountInfo(ctx) + return &types.QueryIntermediaryAccountInfoResponse{Addrs: info.Addrs}, nil +} diff --git a/x/yieldaggregator/keeper/grpc_query_symbol_info.go b/x/yieldaggregator/keeper/grpc_query_symbol_info.go index 895aa61b4..12cfd6704 100644 --- a/x/yieldaggregator/keeper/grpc_query_symbol_info.go +++ b/x/yieldaggregator/keeper/grpc_query_symbol_info.go @@ -10,7 +10,7 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k Keeper) SymbolInfo(c context.Context, req *types.QuerySymbolInfosRequest) (*types.QuerySymbolInfosResponse, error) { +func (k Keeper) SymbolInfos(c context.Context, req *types.QuerySymbolInfosRequest) (*types.QuerySymbolInfosResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } diff --git a/x/yieldaggregator/keeper/grpc_query_vault.go b/x/yieldaggregator/keeper/grpc_query_vault.go index 1068496ed..c76a4d709 100644 --- a/x/yieldaggregator/keeper/grpc_query_vault.go +++ b/x/yieldaggregator/keeper/grpc_query_vault.go @@ -67,7 +67,7 @@ func (k Keeper) Vault(c context.Context, req *types.QueryGetVaultRequest) (*type strategies := []types.Strategy{} for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } diff --git a/x/yieldaggregator/keeper/hooks.go b/x/yieldaggregator/keeper/hooks.go index eab3db6f5..245abfb13 100644 --- a/x/yieldaggregator/keeper/hooks.go +++ b/x/yieldaggregator/keeper/hooks.go @@ -26,7 +26,7 @@ func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInf } amountToUnbond := targetUnbonded.Sub(reserve.Add(unbonding)) for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } diff --git a/x/yieldaggregator/keeper/hooks_test.go b/x/yieldaggregator/keeper/hooks_test.go index db6b07c11..ddaaaf1c0 100644 --- a/x/yieldaggregator/keeper/hooks_test.go +++ b/x/yieldaggregator/keeper/hooks_test.go @@ -36,13 +36,13 @@ func (suite *KeeperTestSuite) TestBeforeEpochStart() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.NewDecWithPrec(1, 1), // 10% WithdrawReserveRate: sdk.NewDecWithPrec(1, 1), // 10% StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } suite.app.YieldaggregatorKeeper.SetVault(suite.ctx, vault) diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index e261aa895..8450bd1f1 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -15,7 +15,7 @@ func (k Keeper) VaultAmountInStrategies(ctx sdk.Context, vault types.Vault) sdkm // calculate amount in strategies for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } @@ -33,7 +33,7 @@ func (k Keeper) VaultUnbondingAmountInStrategies(ctx sdk.Context, vault types.Va // calculate amount in strategies for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } @@ -64,7 +64,7 @@ func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { // lpAmount = lpSupply * (principalAmountToMint / principalAmountInVault) // If principalAmountInVault is zero, lpAmount = principalAmountToMint -func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultDenom string, vaultId uint64, principalAmount sdkmath.Int) sdk.Coin { +func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultId uint64, principalAmount sdkmath.Int) sdk.Coin { lpDenom := types.GetLPTokenDenom(vaultId) vault, found := k.GetVault(ctx, vaultId) if !found { @@ -84,21 +84,21 @@ func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultDenom string, v // calculate principalAmount // principalAmount = principalAmountInVault * (lpAmountToBurn / lpSupply) -func (k Keeper) EstimateRedeemAmountInternal(ctx sdk.Context, vaultDenom string, vaultId uint64, lpAmount sdkmath.Int) sdk.Coin { +func (k Keeper) EstimateRedeemAmountInternal(ctx sdk.Context, vaultId uint64, lpAmount sdkmath.Int) sdk.Int { vault, found := k.GetVault(ctx, vaultId) if !found { - return sdk.NewCoin(vaultDenom, sdk.ZeroInt()) + return sdk.ZeroInt() } principalInVault := k.VaultAmountTotal(ctx, vault) lpDenom := types.GetLPTokenDenom(vaultId) lpSupply := k.bankKeeper.GetSupply(ctx, lpDenom).Amount if lpSupply.IsZero() { - return sdk.NewCoin(vaultDenom, sdk.ZeroInt()) + return sdk.ZeroInt() } principalAmount := principalInVault.Mul(lpAmount).Quo(lpSupply) - return sdk.NewCoin(vaultDenom, principalAmount) + return principalAmount } func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, principalAmount sdk.Int) error { @@ -108,7 +108,7 @@ func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, v } // calculate lp token amount - lp := k.EstimateMintAmountInternal(ctx, vault.Denom, vaultId, principalAmount) + lp := k.EstimateMintAmountInternal(ctx, vaultId, principalAmount) // transfer coins after lp amount calculation vaultModName := types.GetVaultModuleAccountName(vaultId) @@ -135,7 +135,7 @@ func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, v newStrategyAmount := sdk.NewDecFromInt(totalAmount).Mul(sdk.OneDec().Sub(vault.WithdrawReserveRate)).RoundInt() amountToInvest := newStrategyAmount.Sub(stratAmount) for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } @@ -163,7 +163,7 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va return err } - principal := k.EstimateRedeemAmountInternal(ctx, vault.Denom, vaultId, lpAmount) + principal := k.EstimateRedeemAmountInternal(ctx, vaultId, lpAmount) // burn lp tokens after calculating withdrawal amount vaultModName := types.GetVaultModuleAccountName(vaultId) @@ -180,7 +180,7 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va } // Unstake funds from the vault - amountToUnbond := principal.Amount + amountToUnbond := principal // implement fees on withdrawal amountInVault := k.VaultWithdrawalAmount(ctx, vault) @@ -204,8 +204,8 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va // withdraw_fee = withdraw_fee_rate * amount_to_withdraw // If reserve_maintenance_rate is close to 1, withdraw_fee_rate will be close to 0 and vice versa - withdrawFee := sdk.NewDecFromInt(principal.Amount).Mul(withdrawFeeRate).RoundInt() - withdrawAmount := principal.Amount.Sub(withdrawFee) + withdrawFee := sdk.NewDecFromInt(amountToUnbond).Mul(withdrawFeeRate).RoundInt() + withdrawAmount := amountToUnbond.Sub(withdrawFee) withdrawModuleCommissionFee := sdk.NewDecFromInt(withdrawAmount).Mul(params.CommissionRate).RoundInt() withdrawVaultCommissionFee := sdk.NewDecFromInt(withdrawAmount).Mul(vault.WithdrawCommissionRate).RoundInt() @@ -247,7 +247,7 @@ func (k Keeper) BurnLPTokenAndBeginUnbonding(ctx sdk.Context, address sdk.AccAdd return types.ErrInvalidVaultId } - principal := k.EstimateRedeemAmountInternal(ctx, vault.Denom, vaultId, lpAmount) + principal := k.EstimateRedeemAmountInternal(ctx, vaultId, lpAmount) // burn lp tokens after calculating withdrawal amount lpDenom := types.GetLPTokenDenom(vaultId) @@ -262,9 +262,9 @@ func (k Keeper) BurnLPTokenAndBeginUnbonding(ctx sdk.Context, address sdk.AccAdd } // Unstake funds from Strategy - amountToUnbond := principal.Amount + amountToUnbond := principal for _, strategyWeight := range vault.StrategyWeights { - strategy, found := k.GetStrategy(ctx, vault.Denom, strategyWeight.StrategyId) + strategy, found := k.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { continue } diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 1f91451cd..0420d9323 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -27,13 +27,13 @@ func (suite *KeeperTestSuite) TestVaultAmountUnbondingAmountInStrategies() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } @@ -84,13 +84,13 @@ func (suite *KeeperTestSuite) TestVaultWithdrawalAmount() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } @@ -127,13 +127,13 @@ func (suite *KeeperTestSuite) TestVaultAmountTotal() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } @@ -188,13 +188,13 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.NewDecWithPrec(1, 1), // 10% WithdrawReserveRate: sdk.NewDecWithPrec(1, 1), // 10% StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } suite.app.YieldaggregatorKeeper.SetVault(suite.ctx, vault) @@ -210,10 +210,10 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) suite.Require().NoError(err) - estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Denom, vault.Id, sdk.NewInt(100000)) + estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) suite.Require().Equal(estMintAmount.String(), "100000"+lpDenom) - estBurnAmount := suite.app.YieldaggregatorKeeper.EstimateRedeemAmountInternal(suite.ctx, vault.Denom, vault.Id, sdk.NewInt(100000)) + estBurnAmount := suite.app.YieldaggregatorKeeper.EstimateRedeemAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) suite.Require().Equal(estBurnAmount.String(), "100000"+atomIbcDenom) } @@ -243,13 +243,13 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.NewDecWithPrec(1, 1), // 10% WithdrawReserveRate: sdk.NewDecWithPrec(1, 1), // 10% StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } suite.app.YieldaggregatorKeeper.SetVault(suite.ctx, vault) diff --git a/x/yieldaggregator/keeper/msg_server_create_vault.go b/x/yieldaggregator/keeper/msg_server_create_vault.go index 426b2b4fe..c8311d075 100644 --- a/x/yieldaggregator/keeper/msg_server_create_vault.go +++ b/x/yieldaggregator/keeper/msg_server_create_vault.go @@ -52,14 +52,14 @@ func (k msgServer) CreateVault(goCtx context.Context, msg *types.MsgCreateVault) } for _, strategyWeight := range msg.StrategyWeights { - _, found := k.Keeper.GetStrategy(ctx, msg.Denom, strategyWeight.StrategyId) + _, found := k.Keeper.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { return nil, types.ErrInvalidStrategyInvolved } } vault := types.Vault{ - Denom: msg.Denom, + Symbol: msg.Symbol, Name: msg.Name, Description: msg.Description, Owner: msg.Sender, diff --git a/x/yieldaggregator/keeper/msg_server_register_symbol_info.go b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go index 91f0d2e41..470fbf3a1 100644 --- a/x/yieldaggregator/keeper/msg_server_register_symbol_info.go +++ b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go @@ -9,7 +9,7 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k msgServer) RegisterSymbolInfo(ctx context.Context, msg *types.MsgSymbolInfos) (*types.MsgSymbolInfosResponse, error) { +func (k msgServer) RegisterSymbolInfos(ctx context.Context, msg *types.MsgSymbolInfos) (*types.MsgSymbolInfosResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) if k.authority != msg.Sender { return nil, sdkerrors.ErrUnauthorized diff --git a/x/yieldaggregator/keeper/msg_server_set_intermediary_account_info.go b/x/yieldaggregator/keeper/msg_server_set_intermediary_account_info.go new file mode 100644 index 000000000..e9f80b312 --- /dev/null +++ b/x/yieldaggregator/keeper/msg_server_set_intermediary_account_info.go @@ -0,0 +1,20 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k msgServer) SetIntermediaryAccountInfo(ctx context.Context, msg *types.MsgSetIntermediaryAccountInfo) (*types.MsgSetIntermediaryAccountInfoResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if k.authority != msg.Sender { + return nil, sdkerrors.ErrUnauthorized + } + + k.Keeper.SetIntermediaryAccountInfo(sdkCtx, msg.Addrs) + return &types.MsgSetIntermediaryAccountInfoResponse{}, nil +} diff --git a/x/yieldaggregator/keeper/pfm_intermediary.go b/x/yieldaggregator/keeper/pfm_intermediary.go new file mode 100644 index 000000000..f9af42b7a --- /dev/null +++ b/x/yieldaggregator/keeper/pfm_intermediary.go @@ -0,0 +1,29 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k Keeper) GetIntermediaryAccountInfo(ctx sdk.Context) types.IntermediaryAccountInfo { + store := ctx.KVStore(k.storeKey) + byteKey := types.KeyPrefix(types.ChainReceiverKey) + bz := store.Get(byteKey) + + info := types.IntermediaryAccountInfo{} + if bz == nil { + return info + } + + k.cdc.MustUnmarshal(bz, &info) + return info +} + +func (k Keeper) SetIntermediaryAccountInfo(ctx sdk.Context, addrs []types.ChainAddress) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&types.IntermediaryAccountInfo{ + Addrs: addrs, + }) + store.Set(types.KeyPrefix(types.ChainReceiverKey), bz) +} diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 69adac0f2..41f1df6bf 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -248,7 +248,7 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy, amount sdk.Int) error { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) - stakeCoin := sdk.NewCoin(vault.Denom, amount) + stakeCoin := sdk.NewCoin(strategy.Denom, amount) switch strategy.ContractAddress { case "x/ibc-staking": @@ -315,7 +315,7 @@ func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy err := k.stakeibcKeeper.RedeemStake( ctx, vaultModAddr, - sdk.NewCoin(vault.Denom, amount), + sdk.NewCoin(strategy.Denom, amount), recipient, ) if err != nil { @@ -351,8 +351,8 @@ func (k Keeper) GetAmountFromStrategy(ctx sdk.Context, vault types.Vault, strate vaultModAddr := authtypes.NewModuleAddress(vaultModName) switch strategy.ContractAddress { case "x/ibc-staking": - updatedAmount := k.stakeibcKeeper.GetUpdatedBalance(ctx, vaultModAddr, vault.Denom) - return sdk.NewCoin(vault.Denom, updatedAmount), nil + updatedAmount := k.stakeibcKeeper.GetUpdatedBalance(ctx, vaultModAddr, strategy.Denom) + return sdk.NewCoin(strategy.Denom, updatedAmount), nil default: version := k.GetStrategyVersion(ctx, strategy) switch version { @@ -397,12 +397,12 @@ func (k Keeper) GetUnbondingAmountFromStrategy(ctx sdk.Context, vault types.Vaul vaultModAddr := authtypes.NewModuleAddress(vaultModName) switch strategy.ContractAddress { case "x/ibc-staking": - zone, err := k.stakeibcKeeper.GetHostZoneFromIBCDenom(ctx, vault.Denom) + zone, err := k.stakeibcKeeper.GetHostZoneFromIBCDenom(ctx, strategy.Denom) if err != nil { return sdk.Coin{}, err } unbondingAmount := k.recordsKeeper.GetUserRedemptionRecordBySenderAndHostZone(ctx, vaultModAddr, zone.ChainId) - return sdk.NewCoin(vault.Denom, unbondingAmount), nil + return sdk.NewCoin(strategy.Denom, unbondingAmount), nil default: version := k.GetStrategyVersion(ctx, strategy) switch version { diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index afe2570d0..58e3e2c4f 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -159,13 +159,13 @@ func (suite *KeeperTestSuite) TestStakeToStrategy() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } @@ -215,13 +215,13 @@ func (suite *KeeperTestSuite) TestUnstakeFromStrategy() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } @@ -269,13 +269,13 @@ func (suite *KeeperTestSuite) TestGetAmountAndUnbondingAmountFromStrategy() { vault := types.Vault{ Id: 1, - Denom: atomIbcDenom, + Symbol: "ATOM", Owner: addr1.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 100), WithdrawCommissionRate: sdk.ZeroDec(), WithdrawReserveRate: sdk.ZeroDec(), StrategyWeights: []types.StrategyWeight{ - {StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, }, } diff --git a/x/yieldaggregator/keeper/vault.go b/x/yieldaggregator/keeper/vault.go index 99fc1fabe..9c115725c 100644 --- a/x/yieldaggregator/keeper/vault.go +++ b/x/yieldaggregator/keeper/vault.go @@ -92,10 +92,15 @@ func (k Keeper) MigrateAllLegacyVaults(ctx sdk.Context) { legacyVaults = append(legacyVaults, val) } + denomInfo := k.GetAllDenomInfo(ctx) + denomSymbolMap := make(map[string]string) + for _, di := range denomInfo { + denomSymbolMap[di.Denom] = di.Symbol + } for _, legacyVault := range legacyVaults { vault := types.Vault{ Id: legacyVault.Id, - Denom: legacyVault.Denom, + Symbol: denomSymbolMap[legacyVault.Denom], Name: "", Description: "", Owner: legacyVault.Owner, diff --git a/x/yieldaggregator/keeper/vault_test.go b/x/yieldaggregator/keeper/vault_test.go index a0acfad98..2e0a5b110 100644 --- a/x/yieldaggregator/keeper/vault_test.go +++ b/x/yieldaggregator/keeper/vault_test.go @@ -14,13 +14,13 @@ func createNVault(keeper *keeper.Keeper, ctx sdk.Context, denom string, n int) [ for i := range items { addr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) items[i] = types.Vault{ - Denom: denom, WithdrawCommissionRate: sdk.MustNewDecFromStr("0.001"), WithdrawReserveRate: sdk.MustNewDecFromStr("0.001"), Owner: addr.String(), OwnerDeposit: sdk.NewInt64Coin("uguu", 1000_000), StrategyWeights: []types.StrategyWeight{ { + Denom: denom, StrategyId: 1, Weight: sdk.OneDec(), }, diff --git a/x/yieldaggregator/types/keys.go b/x/yieldaggregator/types/keys.go index 6b47ad2be..ce6a15a17 100644 --- a/x/yieldaggregator/types/keys.go +++ b/x/yieldaggregator/types/keys.go @@ -31,6 +31,7 @@ const ( StrategyCountKey = "Strategy/count/" DenomInfoKey = "Denom/info/" SymbolInfoKey = "Symbol/info/" + ChainReceiverKey = "ChainReceiver/info/" ) func KeyPrefixStrategy(vaultDenom string) []byte { diff --git a/x/yieldaggregator/types/message_create_vault.go b/x/yieldaggregator/types/message_create_vault.go index dc6e4e242..17704cceb 100644 --- a/x/yieldaggregator/types/message_create_vault.go +++ b/x/yieldaggregator/types/message_create_vault.go @@ -10,10 +10,10 @@ import ( var _ sdk.Msg = &MsgCreateVault{} -func NewMsgCreateVault(sender string, denom string, commissionRate sdk.Dec, withdrawReserveRate sdk.Dec, strategyWeights []StrategyWeight, fee types.Coin, deposit types.Coin, feeCollectorAddress string) *MsgCreateVault { +func NewMsgCreateVault(sender string, symbol string, commissionRate sdk.Dec, withdrawReserveRate sdk.Dec, strategyWeights []StrategyWeight, fee types.Coin, deposit types.Coin, feeCollectorAddress string) *MsgCreateVault { return &MsgCreateVault{ Sender: sender, - Denom: denom, + Symbol: symbol, CommissionRate: commissionRate, StrategyWeights: strategyWeights, Fee: fee, @@ -32,8 +32,8 @@ func (msg MsgCreateVault) ValidateBasic() error { return sdkerrors.ErrInvalidAddress.Wrapf("invalid fee collector address: %s", err) } - if err := sdk.ValidateDenom(msg.Denom); err != nil { - return err + if msg.Symbol == "" { + return sdkerrors.ErrInvalidRequest.Wrapf("empty symbol is not allowed") } if msg.CommissionRate.IsNegative() || msg.CommissionRate.GTE(sdk.OneDec()) { diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 814d88e46..7b6a79cf1 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -842,10 +842,10 @@ func (m *QueryEstimateRedeemAmountRequest) GetBurnAmount() string { } type QueryEstimateRedeemAmountResponse struct { - ShareAmount types.Coin `protobuf:"bytes,1,opt,name=share_amount,json=shareAmount,proto3" json:"share_amount"` - Fee types.Coin `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee"` - RedeemAmount types.Coin `protobuf:"bytes,3,opt,name=redeem_amount,json=redeemAmount,proto3" json:"redeem_amount"` - TotalAmount types.Coin `protobuf:"bytes,4,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount"` + ShareAmount types.Coin `protobuf:"bytes,1,opt,name=share_amount,json=shareAmount,proto3" json:"share_amount"` + Fee cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=fee,proto3,customtype=cosmossdk.io/math.Int" json:"fee"` + RedeemAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=redeem_amount,json=redeemAmount,proto3,customtype=cosmossdk.io/math.Int" json:"redeem_amount"` + TotalAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=total_amount,json=totalAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_amount"` } func (m *QueryEstimateRedeemAmountResponse) Reset() { *m = QueryEstimateRedeemAmountResponse{} } @@ -888,27 +888,6 @@ func (m *QueryEstimateRedeemAmountResponse) GetShareAmount() types.Coin { return types.Coin{} } -func (m *QueryEstimateRedeemAmountResponse) GetFee() types.Coin { - if m != nil { - return m.Fee - } - return types.Coin{} -} - -func (m *QueryEstimateRedeemAmountResponse) GetRedeemAmount() types.Coin { - if m != nil { - return m.RedeemAmount - } - return types.Coin{} -} - -func (m *QueryEstimateRedeemAmountResponse) GetTotalAmount() types.Coin { - if m != nil { - return m.TotalAmount - } - return types.Coin{} -} - type QueryDenomInfosRequest struct { } @@ -1181,98 +1160,98 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1456 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x5d, 0x6f, 0x13, 0x47, - 0x17, 0xce, 0x3a, 0x1f, 0x82, 0x13, 0x3e, 0x07, 0x03, 0xc1, 0xef, 0x2b, 0x87, 0x6c, 0x08, 0x89, - 0x00, 0x7b, 0x93, 0xbc, 0xaf, 0xd4, 0x12, 0xa0, 0xad, 0x93, 0x10, 0x9a, 0x8a, 0x4a, 0xd4, 0x29, - 0xa0, 0x16, 0xb5, 0xd6, 0xd8, 0x3b, 0xb1, 0x47, 0xd8, 0x33, 0x66, 0x77, 0x0c, 0xb5, 0x10, 0x37, - 0xbd, 0xee, 0x45, 0xd5, 0xf6, 0xb2, 0x55, 0x85, 0x54, 0xa9, 0x7f, 0x80, 0xfe, 0x07, 0xd4, 0x2b, - 0x44, 0xa5, 0xaa, 0xea, 0x05, 0xaa, 0x80, 0x3f, 0xd1, 0xbb, 0x6a, 0x67, 0xce, 0x3a, 0x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, 0xfe, 0x4f, 0x96, 0x63, 0xf3, 0xe0, 0x6d, 0x08, - 0x19, 0x6a, 0x20, 0x74, 0x56, 0xab, 0x1f, 0x3c, 0x7d, 0x99, 0xb6, 0x9e, 0xbd, 0x4c, 0x5b, 0x7f, - 0xbd, 0x4c, 0x5b, 0x5f, 0xbf, 0x4a, 0x8f, 0x3c, 0x7b, 0x95, 0x1e, 0xf9, 0xe3, 0x55, 0x7a, 0xe4, - 0xd3, 0xc5, 0x32, 0x57, 0x95, 0x46, 0x31, 0x5b, 0x92, 0x35, 0xe7, 0xa6, 0xb8, 0x29, 0xf8, 0x06, - 0x77, 0x4a, 0xc1, 0x98, 0x77, 0xbe, 0xe8, 0xc2, 0x57, 0xcd, 0x3a, 0xf3, 0x8b, 0x13, 0xfa, 0xff, - 0x8d, 0xff, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x56, 0xc3, 0xa5, 0x90, 0x9f, 0x15, 0x00, 0x00, + // 1454 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x5d, 0x6f, 0x1b, 0x45, + 0x17, 0xce, 0x3a, 0x1f, 0x6a, 0x8f, 0xfb, 0x39, 0x75, 0xdb, 0xd4, 0xef, 0x2b, 0xa7, 0xd9, 0x34, + 0x4d, 0xd4, 0xd6, 0xde, 0x24, 0x20, 0x41, 0xd3, 0x06, 0x70, 0x92, 0xa6, 0x04, 0x15, 0x14, 0x1c, + 0xda, 0x0a, 0x2a, 0xb0, 0xc6, 0xde, 0x89, 0x3d, 0xaa, 0x77, 0xc6, 0xdd, 0x1d, 0xb7, 0x58, 0x55, + 0x6f, 0xb8, 0xe6, 0x02, 0x01, 0x97, 0x20, 0xd4, 0x2b, 0xfe, 0x40, 0xf9, 0x0f, 0x15, 0x57, 0x55, + 0x91, 0x10, 0xe2, 0xa2, 0x42, 0x6d, 0xff, 0x04, 0x77, 0x68, 0x67, 0x66, 0x37, 0x5e, 0x3b, 0xeb, + 0x2f, 0x72, 0xc9, 0x5d, 0x3c, 0x73, 0xce, 0x73, 0x9e, 0x73, 0xe6, 0x99, 0x39, 0x67, 0x03, 0x33, + 0x0d, 0xd6, 0x60, 0x74, 0x87, 0x5a, 0x4d, 0x4a, 0x6a, 0x36, 0xae, 0x54, 0x5c, 0x52, 0xc1, 0x82, + 0xbb, 0xd6, 0xbd, 0x06, 0x71, 0x9b, 0xb9, 0xba, 0xcb, 0x05, 0x47, 0xa7, 0xb5, 0x51, 0xae, 0xcd, + 0x28, 0x9d, 0xaa, 0xf0, 0x0a, 0x97, 0x36, 0x96, 0xff, 0x97, 0x32, 0x4f, 0x9f, 0x29, 0x73, 0xcf, + 0xe1, 0x5e, 0x51, 0x6d, 0xa8, 0x1f, 0x7a, 0xeb, 0xff, 0x15, 0xce, 0x2b, 0x35, 0x62, 0xe1, 0x3a, + 0xb5, 0x30, 0x63, 0x5c, 0x60, 0x41, 0x39, 0x0b, 0x76, 0x2f, 0x28, 0x5b, 0xab, 0x84, 0x3d, 0xa2, + 0x08, 0x58, 0xf7, 0x17, 0x4b, 0x44, 0xe0, 0x45, 0xab, 0x8e, 0x2b, 0x94, 0x49, 0x63, 0x6d, 0x9b, + 0x69, 0xb5, 0x0d, 0xac, 0xca, 0x9c, 0x06, 0xfb, 0xe7, 0xe2, 0x12, 0xab, 0x63, 0x17, 0x3b, 0x41, + 0xc4, 0x6c, 0x9c, 0x55, 0xdb, 0x6f, 0x65, 0x6e, 0xa6, 0x00, 0x7d, 0xec, 0xd3, 0xda, 0x92, 0x18, + 0x05, 0x72, 0xaf, 0x41, 0x3c, 0x61, 0x7e, 0x02, 0x27, 0x22, 0xab, 0x5e, 0x9d, 0x33, 0x8f, 0xa0, + 0x15, 0x98, 0x50, 0xb1, 0x26, 0x8d, 0xb3, 0xc6, 0x7c, 0x72, 0x69, 0x2a, 0x17, 0x53, 0xc6, 0x9c, + 0x72, 0x5c, 0x1d, 0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xf3, 0x78, 0x13, 0x2d, 0xc5, 0xe6, 0x41, 0x5b, 0x10, 0xb2, 0x58, + 0x41, 0xc8, 0xac, 0x56, 0x3f, 0x78, 0xfa, 0x32, 0x63, 0x3c, 0x7b, 0x99, 0x31, 0xfe, 0x7a, 0x99, + 0x31, 0xbe, 0x79, 0x95, 0x19, 0x79, 0xf6, 0x2a, 0x33, 0xf2, 0xc7, 0xab, 0xcc, 0xc8, 0x67, 0x0b, + 0x15, 0x2a, 0xaa, 0x8d, 0x52, 0xae, 0xcc, 0x1d, 0xeb, 0x26, 0xbb, 0xc9, 0xe8, 0x06, 0xb5, 0xca, + 0x7e, 0x9b, 0xb7, 0xbe, 0xec, 0xc0, 0x17, 0xcd, 0x3a, 0xf1, 0x4a, 0x13, 0xf2, 0x7f, 0x92, 0x6f, + 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x6f, 0x08, 0x32, 0xc3, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2440,31 +2419,31 @@ func (m *QueryEstimateRedeemAmountResponse) MarshalToSizedBuffer(dAtA []byte) (i var l int _ = l { - size, err := m.TotalAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.TotalAmount.Size() + i -= size + if _, err := m.TotalAmount.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 { - size, err := m.RedeemAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.RedeemAmount.Size() + i -= size + if _, err := m.RedeemAmount.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.Fee.Size() + i -= size + if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- @@ -4959,7 +4938,7 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4969,15 +4948,16 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } @@ -4992,7 +4972,7 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RedeemAmount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5002,15 +4982,16 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } @@ -5025,7 +5006,7 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TotalAmount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5035,15 +5016,16 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 6a7ccfcb4..0a6fda617 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -278,7 +278,7 @@ var xxx_messageInfo_MsgWithdrawFromVaultWithUnbondingTimeResponse proto.Internal type MsgCreateVault struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` CommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=commission_rate,json=commissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"commission_rate"` @@ -999,7 +999,8 @@ func (m *MsgSymbolInfosResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSymbolInfosResponse proto.InternalMessageInfo type MsgSetIntermediaryAccountInfo struct { - Addrs []ChainAddress `protobuf:"bytes,1,rep,name=addrs,proto3" json:"addrs"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Addrs []ChainAddress `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs"` } func (m *MsgSetIntermediaryAccountInfo) Reset() { *m = MsgSetIntermediaryAccountInfo{} } @@ -1035,6 +1036,13 @@ func (m *MsgSetIntermediaryAccountInfo) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetIntermediaryAccountInfo proto.InternalMessageInfo +func (m *MsgSetIntermediaryAccountInfo) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + func (m *MsgSetIntermediaryAccountInfo) GetAddrs() []ChainAddress { if m != nil { return m.Addrs @@ -1110,89 +1118,90 @@ func init() { func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0x8f, 0x93, 0x4d, 0xd2, 0xbc, 0x94, 0xa4, 0x75, 0x92, 0xc6, 0xd9, 0xd2, 0x4d, 0xd8, 0x52, - 0x25, 0x14, 0xb2, 0x6e, 0x16, 0x28, 0xa2, 0xa2, 0x95, 0xf2, 0x47, 0x95, 0x82, 0x88, 0x40, 0x4e, - 0x42, 0x51, 0x2f, 0x2b, 0xaf, 0x3d, 0xeb, 0x0c, 0x5d, 0xcf, 0x58, 0x33, 0x93, 0xa4, 0x2b, 0x71, - 0x81, 0x0b, 0x3d, 0x72, 0x40, 0xe2, 0xda, 0x0f, 0x80, 0x10, 0x87, 0xf2, 0x09, 0xb8, 0x94, 0x03, - 0xa2, 0xf4, 0x84, 0x38, 0x54, 0x28, 0x3d, 0xc0, 0x81, 0x0f, 0x81, 0xec, 0xf1, 0x4e, 0x9d, 0xac, - 0xed, 0x6e, 0xb6, 0xa9, 0xc4, 0x29, 0x6b, 0xcf, 0xef, 0xbd, 0xf7, 0xfb, 0xbd, 0x99, 0xf7, 0xde, - 0xc4, 0x30, 0xb7, 0x4b, 0x76, 0x09, 0x6e, 0x60, 0xb3, 0x85, 0x51, 0xd3, 0xb5, 0x3d, 0x8f, 0x21, - 0xcf, 0x16, 0x94, 0x99, 0xe2, 0x6e, 0x25, 0x60, 0x54, 0x50, 0x7d, 0x3a, 0x46, 0x54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xd9, 0x76, 0xc5, - 0x1b, 0xbd, 0xd9, 0xb5, 0x69, 0xad, 0x7c, 0xf8, 0xf0, 0xa0, 0xa4, 0x3d, 0x3a, 0x28, 0x69, 0x7f, - 0x1d, 0x94, 0xb4, 0x6f, 0x9e, 0x96, 0xfa, 0x1e, 0x3d, 0x2d, 0xf5, 0xfd, 0xf1, 0xb4, 0xd4, 0x77, - 0xfb, 0x8a, 0x87, 0xc5, 0xce, 0x6e, 0xbd, 0xe2, 0x50, 0xdf, 0xdc, 0x26, 0xdb, 0x04, 0xdf, 0xc4, - 0xa6, 0x13, 0x8e, 0x2d, 0xf3, 0x6e, 0xe7, 0x77, 0xb9, 0x56, 0x80, 0x78, 0x7d, 0x28, 0xfa, 0x86, - 0xf5, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x67, 0x2d, 0xa8, 0xbf, 0x13, 0x00, 0x00, + // 1324 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x26, 0x8e, 0xd3, 0xbc, 0x94, 0xa4, 0xdd, 0x24, 0x8d, 0xe3, 0x52, 0x27, 0xb8, 0x54, + 0x09, 0x85, 0x78, 0x1b, 0x03, 0x45, 0x54, 0xb4, 0x52, 0xfe, 0xa8, 0x52, 0x10, 0x11, 0x68, 0x93, + 0x50, 0xd4, 0x8b, 0xb5, 0xd9, 0x1d, 0x6f, 0x86, 0x7a, 0x67, 0xac, 0x99, 0x49, 0x52, 0x4b, 0x5c, + 0xe0, 0x42, 0x8f, 0x1c, 0x2a, 0x71, 0xed, 0x07, 0x40, 0x88, 0x43, 0xf9, 0x04, 0x5c, 0xca, 0x01, + 0x51, 0x7a, 0x42, 0x1c, 0x2a, 0xd4, 0x22, 0xc1, 0x81, 0x0f, 0x81, 0x76, 0x67, 0x3c, 0xd9, 0xc4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7a, 0xdd, 0xe6, 0x33, 0x90, 0xe7, + 0xad, 0x60, 0x9b, 0x36, 0x22, 0x8d, 0xc3, 0xb6, 0x7a, 0x32, 0x4d, 0xc8, 0x11, 0x27, 0x40, 0x52, + 0x97, 0x1d, 0x7d, 0x37, 0x67, 0x61, 0xc4, 0x43, 0xdc, 0x65, 0xb8, 0x29, 0x30, 0x25, 0x85, 0x5c, + 0xb4, 0x14, 0x7f, 0x65, 0xde, 0x84, 0x31, 0x97, 0x06, 0x01, 0xe6, 0x1c, 0x53, 0x52, 0x63, 0x8e, + 0x40, 0x85, 0xc1, 0x88, 0xc8, 0xa2, 0x4a, 0xcc, 0xd9, 0xce, 0xc4, 0x7c, 0x84, 0x7c, 0xc7, 0x6d, + 0xad, 0x22, 0x37, 0x96, 0x9e, 0x55, 0xe4, 0xda, 0xa3, 0x07, 0x9e, 0x6c, 0x47, 0x20, 0x13, 0xc1, + 0xe4, 0xbe, 0x4a, 0x4e, 0x8d, 0x21, 0x8e, 0xd8, 0x1e, 0x92, 0x11, 0xf2, 0xbd, 0x46, 0x18, 0x6f, + 0xfb, 0xb3, 0xa5, 0xbb, 0x28, 0xcc, 0x67, 0x70, 0x8a, 0x8b, 0xd0, 0xaf, 0xdf, 0xaa, 0xed, 0x23, + 0xec, 0xef, 0x08, 0x5e, 0x18, 0x9a, 0x1d, 0x98, 0x1f, 0xa9, 0xce, 0x55, 0x52, 0x7a, 0x60, 0x65, + 0x43, 0x19, 0xdc, 0x88, 0xf0, 0xaa, 0x8a, 0xc7, 0xf8, 0xa1, 0xb7, 0xdc, 0x5c, 0x84, 0x81, 0x3a, + 0x42, 0x85, 0x13, 0xdd, 0x35, 0x81, 0x10, 0x6b, 0xbe, 0x0f, 0x43, 0x9e, 0xac, 0xf4, 0xc2, 0x70, + 0x77, 0x66, 0x6d, 0xbc, 0x59, 0x85, 0xc9, 0x3a, 0x42, 0x35, 0x97, 0x36, 0x1a, 0xc8, 0x15, 0x94, + 0xd5, 0x1c, 0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 0xe6, 0xb8, 0x42, 0x9f, 0x27, 0x79, 0x2c, 0xc7, 0xda, + 0xef, 0x95, 0x3b, 0x7d, 0x6a, 0x73, 0xe9, 0xa7, 0x76, 0xb0, 0xf3, 0xd4, 0x4e, 0xc1, 0x90, 0x8f, + 0x45, 0x6d, 0x97, 0x35, 0x64, 0x53, 0xb3, 0xf3, 0x3e, 0x16, 0x5b, 0xac, 0x91, 0x9c, 0x89, 0x73, + 0x70, 0x36, 0x41, 0xad, 0xce, 0xc6, 0xaf, 0xf2, 0x66, 0x23, 0x33, 0xf5, 0xc2, 0x73, 0x21, 0xcb, + 0x74, 0xa0, 0xa3, 0x4c, 0x5f, 0xa6, 0x60, 0x79, 0xf5, 0x39, 0x2c, 0x48, 0xcb, 0x65, 0x51, 0xef, + 0x59, 0x45, 0x0d, 0xd4, 0x7b, 0xef, 0x49, 0x2f, 0xc1, 0xac, 0xe6, 0x10, 0x8b, 0xa9, 0xd9, 0x7c, + 0x6d, 0xc0, 0x64, 0x6c, 0x73, 0x56, 0xc3, 0x9c, 0xad, 0x91, 0x3a, 0xed, 0xa5, 0x8a, 0x3e, 0x80, + 0x1c, 0x26, 0x75, 0x5a, 0xe8, 0x8f, 0xa6, 0x50, 0x39, 0xb5, 0x86, 0x74, 0x10, 0x55, 0x46, 0x91, + 0x55, 0x79, 0x06, 0xce, 0x25, 0x12, 0xd1, 0x54, 0xbf, 0x94, 0x5d, 0x7b, 0x23, 0x9a, 0xfb, 0xbd, + 0x72, 0xbc, 0x7a, 0x88, 0xe3, 0xf9, 0xf4, 0x49, 0xa9, 0xa3, 0x1c, 0x22, 0x29, 0x13, 0x19, 0xa3, + 0xa0, 0xd9, 0xdd, 0x35, 0x22, 0xfe, 0x1b, 0x48, 0xac, 0x11, 0x81, 0x58, 0x80, 0x3c, 0xec, 0xb0, + 0xd6, 0x92, 0xeb, 0x86, 0x77, 0xa6, 0x10, 0xda, 0x03, 0xd9, 0x25, 0x18, 0x0c, 0xcb, 0x97, 0x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8, 0x3c, 0xbf, 0xf8, 0x6c, 0x17, 0x3a, 0x8b, 0xd5, 0xee, 0xb1, 0x3a, 0xe2, 0x17, + 0x60, 0x26, 0x0c, 0xb1, 0x4a, 0x37, 0xfb, 0x71, 0x80, 0x2f, 0x5e, 0x3e, 0x1e, 0x5e, 0x47, 0xa7, + 0x30, 0xae, 0x77, 0x37, 0x36, 0x9f, 0x32, 0x13, 0x1c, 0x03, 0x66, 0x27, 0x38, 0x61, 0xdc, 0x98, + 0x77, 0x0d, 0x28, 0x66, 0xcc, 0x9a, 0x4c, 0x1d, 0xe9, 0x76, 0xc5, 0x6b, 0xbd, 0xd9, 0xb5, 0x69, + 0x2d, 0x7f, 0xf8, 0xe0, 0x49, 0xc9, 0x78, 0xf8, 0xa4, 0x64, 0xfc, 0xf9, 0xa4, 0x64, 0x7c, 0xf3, + 0xb4, 0xd4, 0xf7, 0xf0, 0x69, 0xa9, 0xef, 0xf7, 0xa7, 0xa5, 0xbe, 0x9b, 0x97, 0x7c, 0x2c, 0x76, + 0x76, 0xb7, 0x2b, 0x2e, 0x0d, 0xac, 0x2d, 0xb2, 0x45, 0xf0, 0x75, 0x6c, 0xb9, 0xe1, 0xd8, 0xb2, + 0x6e, 0x77, 0xfe, 0x99, 0xd7, 0x6a, 0x22, 0xbe, 0x9d, 0x8f, 0xfe, 0xf8, 0x7a, 0xfb, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xdc, 0x2e, 0x7e, 0x61, 0xf4, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2008,10 +2017,10 @@ func (m *MsgCreateVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) i-- dAtA[i] = 0x12 } @@ -2657,9 +2666,16 @@ func (m *MsgSetIntermediaryAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -2788,7 +2804,7 @@ func (m *MsgCreateVault) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Denom) + l = len(m.Symbol) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -3093,6 +3109,10 @@ func (m *MsgSetIntermediaryAccountInfo) Size() (n int) { } var l int _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if len(m.Addrs) > 0 { for _, e := range m.Addrs { l = e.Size() @@ -3734,7 +3754,7 @@ func (m *MsgCreateVault) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3762,7 +3782,7 @@ func (m *MsgCreateVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -5797,6 +5817,38 @@ func (m *MsgSetIntermediaryAccountInfo) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Addrs", wireType) } diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index 742690a25..5c0af0a40 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -27,8 +27,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type StrategyWeight struct { - StrategyId uint64 `protobuf:"varint,1,opt,name=strategy_id,json=strategyId,proto3" json:"strategy_id,omitempty"` - Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + StrategyId uint64 `protobuf:"varint,2,opt,name=strategy_id,json=strategyId,proto3" json:"strategy_id,omitempty"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"` } func (m *StrategyWeight) Reset() { *m = StrategyWeight{} } @@ -64,6 +65,13 @@ func (m *StrategyWeight) XXX_DiscardUnknown() { var xxx_messageInfo_StrategyWeight proto.InternalMessageInfo +func (m *StrategyWeight) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + func (m *StrategyWeight) GetStrategyId() uint64 { if m != nil { return m.StrategyId @@ -785,62 +793,62 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 872 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0xd3, 0x38, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23, 0x4b, - 0x40, 0x38, 0xd4, 0xa6, 0xe5, 0x17, 0xb4, 0x89, 0x90, 0xb2, 0x70, 0x40, 0x2e, 0x05, 0x84, 0x90, - 0xac, 0x89, 0x3d, 0x71, 0x46, 0x6b, 0xcf, 0x44, 0x33, 0x93, 0x96, 0x48, 0x5c, 0xb9, 0x22, 0x8e, - 0xfc, 0x06, 0xce, 0x7b, 0x43, 0xdc, 0xf7, 0xb8, 0xda, 0x0b, 0x88, 0xc3, 0x0a, 0xb5, 0x7f, 0x04, - 0x79, 0x66, 0x6c, 0x25, 0x6d, 0xb3, 0x87, 0xaa, 0xbb, 0x37, 0xbf, 0x37, 0x6f, 0xde, 0xfb, 0xe6, - 0xbd, 0xef, 0x7d, 0x32, 0x1c, 0xcc, 0xe8, 0x8c, 0x92, 0x31, 0x09, 0xe6, 0x04, 0x67, 0x09, 0x4a, - 0x53, 0x8e, 0x53, 0x24, 0x19, 0xbf, 0x6e, 0xfb, 0x53, 0xce, 0x24, 0x73, 0x76, 0x4d, 0xb8, 0x7f, - 0xed, 0xf8, 0xe9, 0x4e, 0xca, 0x52, 0xa6, 0x62, 0x82, 0xe2, 0x4b, 0x87, 0x3f, 0xdd, 0x8b, 0x99, - 0xc8, 0x99, 0x88, 0xf4, 0x81, 0x36, 0xcc, 0x51, 0x47, 0x5b, 0xc1, 0x08, 0x09, 0x1c, 0x9c, 0x1f, - 0x8e, 0xb0, 0x44, 0x87, 0x41, 0xcc, 0x08, 0xd5, 0xe7, 0xde, 0xcf, 0xb0, 0x79, 0x2a, 0x39, 0x92, - 0x38, 0x9d, 0x7f, 0x87, 0x49, 0x3a, 0x91, 0xce, 0x3e,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, 0xd6, 0x78, 0xe7, 0x6a, - 0xd6, 0xbc, 0x0f, 0x35, 0xf3, 0x7e, 0xb5, 0x60, 0x53, 0x43, 0x79, 0xbf, 0xfa, 0xb4, 0xa0, 0x3e, - 0xf6, 0x92, 0xfa, 0xfc, 0x69, 0xc1, 0xf6, 0xd7, 0x9c, 0x4d, 0x99, 0x40, 0xd9, 0x71, 0x92, 0x2c, - 0xa2, 0x92, 0x44, 0x66, 0xb8, 0x44, 0xa5, 0x8c, 0xeb, 0x32, 0x57, 0xbb, 0x29, 0x73, 0xd5, 0x6b, - 0xd6, 0x17, 0x5f, 0x73, 0x1b, 0xfa, 0xfa, 0xdb, 0xd1, 0xdb, 0xb7, 0xa3, 0x5f, 0xd2, 0xce, 0x93, - 0x67, 0x2f, 0x2f, 0x3b, 0xd6, 0xab, 0xcb, 0x8e, 0xf5, 0xdf, 0x65, 0xc7, 0xfa, 0xed, 0xaa, 0xb3, - 0xf6, 0xea, 0xaa, 0xb3, 0xf6, 0xcf, 0x55, 0x67, 0xed, 0x87, 0xcf, 0x52, 0x22, 0x27, 0xb3, 0x91, - 0x1f, 0xb3, 0x3c, 0x38, 0xa3, 0x67, 0x94, 0x7c, 0x41, 0x02, 0xb5, 0xd6, 0xc1, 0x4f, 0x37, 0x7e, - 0xb6, 0xe4, 0x7c, 0x8a, 0xc5, 0xa8, 0xa1, 0xfe, 0x7c, 0x3e, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, - 0x7f, 0xf1, 0x54, 0x1c, 0x94, 0x09, 0x00, 0x00, + // 880 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x13, 0x3b, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23, 0x4b, + 0x40, 0x38, 0xd4, 0xa6, 0xe5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, 0xf3, 0x35, + 0x67, 0x53, 0x26, 0x50, 0x7a, 0x12, 0xc7, 0x8b, 0xa8, 0x24, 0x91, 0x29, 0x2e, 0x51, 0x29, 0xe3, + 0xa6, 0xcc, 0xd5, 0x6e, 0xcb, 0x5c, 0xf5, 0x9a, 0xfa, 0xe2, 0x6b, 0x56, 0xa1, 0x37, 0xdf, 0x8e, + 0xde, 0x5a, 0x8d, 0x7e, 0x49, 0x3b, 0x4f, 0x9f, 0xbd, 0xbc, 0xea, 0x18, 0xaf, 0xae, 0x3a, 0xc6, + 0x7f, 0x57, 0x1d, 0xe3, 0xd7, 0xeb, 0xce, 0xc6, 0xab, 0xeb, 0xce, 0xc6, 0x3f, 0xd7, 0x9d, 0x8d, + 0x1f, 0x3e, 0x4b, 0x88, 0x9c, 0xcc, 0x46, 0x5e, 0xc4, 0x32, 0xff, 0x9c, 0x9e, 0x53, 0xf2, 0x05, + 0xf1, 0xd5, 0x5a, 0xfb, 0x3f, 0xdd, 0xfa, 0x07, 0x93, 0xf3, 0x29, 0x16, 0xa3, 0x86, 0xfa, 0x21, + 0xfa, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x56, 0x2c, 0xbf, 0xab, 0x09, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -872,11 +880,18 @@ func (m *StrategyWeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a if m.StrategyId != 0 { i = encodeVarintYieldaggregator(dAtA, i, uint64(m.StrategyId)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1488,6 +1503,10 @@ func (m *StrategyWeight) Size() (n int) { } var l int _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } if m.StrategyId != 0 { n += 1 + sovYieldaggregator(uint64(m.StrategyId)) } @@ -1796,6 +1815,38 @@ func (m *StrategyWeight) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field StrategyId", wireType) } @@ -1814,7 +1865,7 @@ func (m *StrategyWeight) Unmarshal(dAtA []byte) error { break } } - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) } From 0f6c87864068e151b0f130de060bb2d0da2cf9b7 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 11 Oct 2023 20:48:02 +0800 Subject: [PATCH 22/59] multiple denoms withdrawal implementation & resolve build issues for multiple denoms management --- wasmbinding/message_plugin.go | 2 +- .../client/cli/tx_create_vault.go | 6 +- x/yieldaggregator/keeper/hooks_test.go | 13 +++-- x/yieldaggregator/keeper/lp.go | 57 +++++++++++++++---- x/yieldaggregator/keeper/lp_test.go | 13 +++-- .../keeper/msg_server_deposit_to_vault.go | 2 +- x/yieldaggregator/types/errors.go | 33 +++++------ x/yieldaggregator/types/vault.go | 14 +++++ 8 files changed, 96 insertions(+), 44 deletions(-) create mode 100644 x/yieldaggregator/types/vault.go diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index 732dd39f3..de75f3657 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -164,7 +164,7 @@ func PerformDeputyDepositToVault(bk *bankkeeper.BaseKeeper, iyaKeeper *yieldaggr ctx, depositor, deputyDepositToVault.VaultId, - amount.Amount, + amount, ) if err != nil { return sdkerrors.Wrap(err, "depositing to vault") diff --git a/x/yieldaggregator/client/cli/tx_create_vault.go b/x/yieldaggregator/client/cli/tx_create_vault.go index 600542587..405f3f475 100644 --- a/x/yieldaggregator/client/cli/tx_create_vault.go +++ b/x/yieldaggregator/client/cli/tx_create_vault.go @@ -17,7 +17,7 @@ import ( func CmdTxCreateVault() *cobra.Command { cmd := &cobra.Command{ - Use: "create-vault [denom] [commission-rate] [withdraw-reserve-rate] [fee] [deposit] [strategy-weights] [fee-collector]", + Use: "create-vault [symbol] [commission-rate] [withdraw-reserve-rate] [fee] [deposit] [strategy-weights] [fee-collector]", Short: "create a new vault", Long: `create a new vault ununifid tx yieldaggregator create-vault uguu 0.001 1000uguu 1000000uguu 1:0.1,2:0.9 @@ -29,7 +29,7 @@ func CmdTxCreateVault() *cobra.Command { return err } - denom := args[0] + symbol := args[0] commissionRate, err := sdk.NewDecFromStr(args[1]) if err != nil { return err @@ -72,7 +72,7 @@ func CmdTxCreateVault() *cobra.Command { msg := types.NewMsgCreateVault( clientCtx.GetFromAddress().String(), - denom, + symbol, commissionRate, withdrawReserveRate, strategyWeights, diff --git a/x/yieldaggregator/keeper/hooks_test.go b/x/yieldaggregator/keeper/hooks_test.go index ddaaaf1c0..2db1730ed 100644 --- a/x/yieldaggregator/keeper/hooks_test.go +++ b/x/yieldaggregator/keeper/hooks_test.go @@ -11,19 +11,20 @@ import ( ) func (suite *KeeperTestSuite) TestBeforeEpochStart() { + atomHostDenom := "uatom" + prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) + atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() + lpDenom := types.GetLPTokenDenom(1) + // try execution with invalid vault id addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) - err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().Error(err) // try execution with invalid vault id err = suite.app.YieldaggregatorKeeper.BurnLPTokenAndRedeem(suite.ctx, addr1, 1, sdk.NewInt(100000)) suite.Require().Error(err) - atomHostDenom := "uatom" - prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) - atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() - lpDenom := types.GetLPTokenDenom(1) _ = suite.SetupZoneAndEpoch(atomHostDenom, atomIbcDenom) strategy := types.Strategy{ @@ -55,7 +56,7 @@ func (suite *KeeperTestSuite) TestBeforeEpochStart() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) // burn execution diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index 8450bd1f1..f3d535b3b 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -46,11 +46,20 @@ func (k Keeper) VaultUnbondingAmountInStrategies(ctx sdk.Context, vault types.Va return unbondingAmount } -func (k Keeper) VaultWithdrawalAmount(ctx sdk.Context, vault types.Vault) sdk.Int { +func (k Keeper) VaultBalances(ctx sdk.Context, vault types.Vault) sdk.Coins { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) - balance := k.bankKeeper.GetBalance(ctx, vaultModAddr, vault.Denom) - return balance.Amount + return k.bankKeeper.GetAllBalances(ctx, vaultModAddr) +} + +func (k Keeper) VaultWithdrawalAmount(ctx sdk.Context, vault types.Vault) sdk.Int { + denoms := vault.StrategyDenoms() + amount := sdk.ZeroInt() + vaultBalances := k.VaultBalances(ctx, vault) + for _, denom := range denoms { + amount = amount.Add(vaultBalances.AmountOf(denom)) + } + return amount } func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { @@ -101,19 +110,47 @@ func (k Keeper) EstimateRedeemAmountInternal(ctx sdk.Context, vaultId uint64, lp return principalAmount } -func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, principalAmount sdk.Int) error { +func (k Keeper) SendCoinsFromVault(ctx sdk.Context, vault types.Vault, address sdk.AccAddress, amount sdk.Int) error { + vaultDenoms := vault.StrategyDenoms() + vaultBalances := k.VaultBalances(ctx, vault) + coins := sdk.Coins{} + remainingAmount := amount + for _, denom := range vaultDenoms { + denomAmount := vaultBalances.AmountOf(denom) + if denomAmount.IsZero() { + continue + } + if remainingAmount.GT(denomAmount) { + coins = coins.Add(sdk.NewCoin(denom, denomAmount)) + remainingAmount = remainingAmount.Sub(denomAmount) + } else { + coins = coins.Add(sdk.NewCoin(denom, remainingAmount)) + break + } + } + + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + return k.bankKeeper.SendCoins(ctx, vaultModAddr, address, coins) +} + +func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, vaultId uint64, principal sdk.Coin) error { vault, found := k.GetVault(ctx, vaultId) if !found { return types.ErrInvalidVaultId } + denomInfo := k.GetDenomInfo(ctx, principal.Denom) + if denomInfo.Symbol != vault.Symbol { + return types.ErrDenomDoesNotMatchVaultSymbol + } + // calculate lp token amount - lp := k.EstimateMintAmountInternal(ctx, vaultId, principalAmount) + lp := k.EstimateMintAmountInternal(ctx, vaultId, principal.Amount) // transfer coins after lp amount calculation vaultModName := types.GetVaultModuleAccountName(vaultId) vaultModAddr := authtypes.NewModuleAddress(vaultModName) - principal := sdk.NewCoin(vault.Denom, principalAmount) err := k.bankKeeper.SendCoins(ctx, address, vaultModAddr, sdk.NewCoins(principal)) if err != nil { return err @@ -166,8 +203,6 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va principal := k.EstimateRedeemAmountInternal(ctx, vaultId, lpAmount) // burn lp tokens after calculating withdrawal amount - vaultModName := types.GetVaultModuleAccountName(vaultId) - vaultModAddr := authtypes.NewModuleAddress(vaultModName) lpDenom := types.GetLPTokenDenom(vaultId) lp := sdk.NewCoin(lpDenom, lpAmount) err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, address, types.ModuleName, sdk.NewCoins(lp)) @@ -216,7 +251,7 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va if err != nil { return err } - err = k.bankKeeper.SendCoins(ctx, vaultModAddr, feeCollector, sdk.NewCoins(sdk.NewCoin(principal.Denom, withdrawModuleCommissionFee))) + err = k.SendCoinsFromVault(ctx, vault, feeCollector, withdrawModuleCommissionFee) if err != nil { return err } @@ -227,13 +262,13 @@ func (k Keeper) BurnLPTokenAndRedeem(ctx sdk.Context, address sdk.AccAddress, va if err != nil { return err } - err = k.bankKeeper.SendCoins(ctx, vaultModAddr, vaultOwner, sdk.NewCoins(sdk.NewCoin(principal.Denom, withdrawVaultCommissionFee))) + err = k.SendCoinsFromVault(ctx, vault, vaultOwner, withdrawVaultCommissionFee) if err != nil { return err } } - err = k.bankKeeper.SendCoins(ctx, vaultModAddr, address, sdk.NewCoins(sdk.NewCoin(principal.Denom, withdrawAmountWithoutCommission))) + err = k.SendCoinsFromVault(ctx, vault, address, withdrawAmountWithoutCommission) if err != nil { return err } diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 0420d9323..e1b1a71e5 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -207,7 +207,7 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) @@ -218,18 +218,19 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { } func (suite *KeeperTestSuite) TestMintBurnLPToken() { + atomHostDenom := "uatom" + prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) + atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() + // try execution with invalid vault id addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) - err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err := suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().Error(err) // try execution with invalid vault id err = suite.app.YieldaggregatorKeeper.BurnLPTokenAndRedeem(suite.ctx, addr1, 1, sdk.NewInt(100000)) suite.Require().Error(err) - atomHostDenom := "uatom" - prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-0", atomHostDenom) - atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() lpDenom := types.GetLPTokenDenom(1) _ = suite.SetupZoneAndEpoch(atomHostDenom, atomIbcDenom) @@ -262,7 +263,7 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { suite.Require().NoError(err) // try execution after setup - err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt(100000)) + err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) // check changes in user balance diff --git a/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go b/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go index ab3725b9a..1c9c4a979 100644 --- a/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go +++ b/x/yieldaggregator/keeper/msg_server_deposit_to_vault.go @@ -15,7 +15,7 @@ func (k msgServer) DepositToVault(ctx context.Context, msg *types.MsgDepositToVa return nil, err } - err = k.Keeper.DepositAndMintLPToken(sdkCtx, sender, msg.VaultId, msg.Amount.Amount) + err = k.Keeper.DepositAndMintLPToken(sdkCtx, sender, msg.VaultId, msg.Amount) if err != nil { return nil, err } diff --git a/x/yieldaggregator/types/errors.go b/x/yieldaggregator/types/errors.go index 440ab1cef..60a01e90d 100644 --- a/x/yieldaggregator/types/errors.go +++ b/x/yieldaggregator/types/errors.go @@ -6,20 +6,21 @@ import ( // x/yieldaggregator module sentinel errors var ( - ErrParsingParams = errors.Register(ModuleName, 1, "failed to marshal or unmarshal module params") - ErrInvalidFeeDenom = errors.Register(ModuleName, 2, "invalid fee denom") - ErrInsufficientFee = errors.Register(ModuleName, 3, "insufficient fee") - ErrInvalidDepositDenom = errors.Register(ModuleName, 4, "invalid deposit denom") - ErrInsufficientDeposit = errors.Register(ModuleName, 5, "insufficient deposit") - ErrInvalidVaultId = errors.Register(ModuleName, 6, "invalid vault id") - ErrNotVaultOwner = errors.Register(ModuleName, 7, "not a vault owner") - ErrVaultHasPositiveBalance = errors.Register(ModuleName, 8, "vault has positive balance") - ErrInvalidCommissionRate = errors.Register(ModuleName, 9, "invalid commission rate") - ErrDuplicatedStrategy = errors.Register(ModuleName, 10, "duplicated strategy") - ErrInvalidStrategyWeightSum = errors.Register(ModuleName, 11, "invalid strategy weight sum") - ErrInvalidStrategyInvolved = errors.Register(ModuleName, 12, "invalid strategy id involved") - ErrInvalidWithdrawReserveRate = errors.Register(ModuleName, 13, "invalid withdraw reserve rate") - ErrInvalidAmount = errors.Register(ModuleName, 14, "invalid amount") - ErrStrategyNotFound = errors.Register(ModuleName, 15, "strategy not found") - ErrVaultNotFound = errors.Register(ModuleName, 16, "vault not found") + ErrParsingParams = errors.Register(ModuleName, 1, "failed to marshal or unmarshal module params") + ErrInvalidFeeDenom = errors.Register(ModuleName, 2, "invalid fee denom") + ErrInsufficientFee = errors.Register(ModuleName, 3, "insufficient fee") + ErrInvalidDepositDenom = errors.Register(ModuleName, 4, "invalid deposit denom") + ErrInsufficientDeposit = errors.Register(ModuleName, 5, "insufficient deposit") + ErrInvalidVaultId = errors.Register(ModuleName, 6, "invalid vault id") + ErrNotVaultOwner = errors.Register(ModuleName, 7, "not a vault owner") + ErrVaultHasPositiveBalance = errors.Register(ModuleName, 8, "vault has positive balance") + ErrInvalidCommissionRate = errors.Register(ModuleName, 9, "invalid commission rate") + ErrDuplicatedStrategy = errors.Register(ModuleName, 10, "duplicated strategy") + ErrInvalidStrategyWeightSum = errors.Register(ModuleName, 11, "invalid strategy weight sum") + ErrInvalidStrategyInvolved = errors.Register(ModuleName, 12, "invalid strategy id involved") + ErrInvalidWithdrawReserveRate = errors.Register(ModuleName, 13, "invalid withdraw reserve rate") + ErrInvalidAmount = errors.Register(ModuleName, 14, "invalid amount") + ErrStrategyNotFound = errors.Register(ModuleName, 15, "strategy not found") + ErrVaultNotFound = errors.Register(ModuleName, 16, "vault not found") + ErrDenomDoesNotMatchVaultSymbol = errors.Register(ModuleName, 17, "denom does not match vault symbol") ) diff --git a/x/yieldaggregator/types/vault.go b/x/yieldaggregator/types/vault.go new file mode 100644 index 000000000..1f663af58 --- /dev/null +++ b/x/yieldaggregator/types/vault.go @@ -0,0 +1,14 @@ +package types + +func (vault Vault) StrategyDenoms() []string { + denoms := []string{} + denomsUsed := make(map[string]bool) + for _, strategy := range vault.StrategyWeights { + if denomsUsed[strategy.Denom] { + continue + } + denomsUsed[strategy.Denom] = true + denoms = append(denoms, strategy.Denom) + } + return denoms +} From a6d241888b88e2d598fc79baaf00d79945c7083a Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 11 Oct 2023 21:23:05 +0800 Subject: [PATCH 23/59] resolve unit tests and implement missing codecs registration --- proto/ununifi/yieldaggregator/tx.proto | 6 +- x/yieldaggregator/keeper/hooks_test.go | 4 + x/yieldaggregator/keeper/lp_test.go | 10 +- .../keeper/msg_server_register_symbol_info.go | 4 +- x/yieldaggregator/types/codec.go | 3 + .../types/message_register_denom_infos.go | 28 ++ .../types/message_register_symbol_infos.go | 28 ++ .../message_set_intermediary_account_info.go | 28 ++ x/yieldaggregator/types/tx.pb.go | 272 +++++++++--------- 9 files changed, 241 insertions(+), 142 deletions(-) create mode 100644 x/yieldaggregator/types/message_register_denom_infos.go create mode 100644 x/yieldaggregator/types/message_register_symbol_infos.go create mode 100644 x/yieldaggregator/types/message_set_intermediary_account_info.go diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index e231a060c..50999893c 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -27,7 +27,7 @@ service Msg { rpc UpdateVault(MsgUpdateVault) returns (MsgUpdateVaultResponse); rpc UpdateStrategy(MsgUpdateStrategy) returns (MsgUpdateStrategyResponse); rpc RegisterDenomInfos(MsgRegisterDenomInfos) returns (MsgRegisterDenomInfosResponse); - rpc RegisterSymbolInfos(MsgSymbolInfos) returns (MsgSymbolInfosResponse); + rpc RegisterSymbolInfos(MsgRegisterSymbolInfos) returns (MsgRegisterSymbolInfosResponse); rpc SetIntermediaryAccountInfo(MsgSetIntermediaryAccountInfo) returns (MsgSetIntermediaryAccountInfoResponse); } @@ -193,11 +193,11 @@ message MsgRegisterDenomInfos { } message MsgRegisterDenomInfosResponse {} -message MsgSymbolInfos { +message MsgRegisterSymbolInfos { string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; repeated SymbolInfo info = 2 [(gogoproto.nullable) = false]; } -message MsgSymbolInfosResponse {} +message MsgRegisterSymbolInfosResponse {} message MsgSetIntermediaryAccountInfo { string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/x/yieldaggregator/keeper/hooks_test.go b/x/yieldaggregator/keeper/hooks_test.go index 2db1730ed..66e62f46a 100644 --- a/x/yieldaggregator/keeper/hooks_test.go +++ b/x/yieldaggregator/keeper/hooks_test.go @@ -35,6 +35,10 @@ func (suite *KeeperTestSuite) TestBeforeEpochStart() { } suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: atomIbcDenom, + Symbol: "ATOM", + }) vault := types.Vault{ Id: 1, Symbol: "ATOM", diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index e1b1a71e5..970269c3b 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -186,6 +186,10 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { } suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: atomIbcDenom, + Symbol: "ATOM", + }) vault := types.Vault{ Id: 1, Symbol: "ATOM", @@ -214,7 +218,7 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { suite.Require().Equal(estMintAmount.String(), "100000"+lpDenom) estBurnAmount := suite.app.YieldaggregatorKeeper.EstimateRedeemAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) - suite.Require().Equal(estBurnAmount.String(), "100000"+atomIbcDenom) + suite.Require().Equal(estBurnAmount.String(), "100000") } func (suite *KeeperTestSuite) TestMintBurnLPToken() { @@ -242,6 +246,10 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { } suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: atomIbcDenom, + Symbol: "ATOM", + }) vault := types.Vault{ Id: 1, Symbol: "ATOM", diff --git a/x/yieldaggregator/keeper/msg_server_register_symbol_info.go b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go index 470fbf3a1..7084f3f3b 100644 --- a/x/yieldaggregator/keeper/msg_server_register_symbol_info.go +++ b/x/yieldaggregator/keeper/msg_server_register_symbol_info.go @@ -9,7 +9,7 @@ import ( "github.com/UnUniFi/chain/x/yieldaggregator/types" ) -func (k msgServer) RegisterSymbolInfos(ctx context.Context, msg *types.MsgSymbolInfos) (*types.MsgSymbolInfosResponse, error) { +func (k msgServer) RegisterSymbolInfos(ctx context.Context, msg *types.MsgRegisterSymbolInfos) (*types.MsgRegisterSymbolInfosResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) if k.authority != msg.Sender { return nil, sdkerrors.ErrUnauthorized @@ -19,5 +19,5 @@ func (k msgServer) RegisterSymbolInfos(ctx context.Context, msg *types.MsgSymbol k.SetSymbolInfo(sdkCtx, dsm) } - return &types.MsgSymbolInfosResponse{}, nil + return &types.MsgRegisterSymbolInfosResponse{}, nil } diff --git a/x/yieldaggregator/types/codec.go b/x/yieldaggregator/types/codec.go index 8e10afbaa..4a8d25ee4 100644 --- a/x/yieldaggregator/types/codec.go +++ b/x/yieldaggregator/types/codec.go @@ -26,6 +26,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgDeleteVault{}, &MsgUpdateStrategy{}, &MsgUpdateVault{}, + &MsgRegisterDenomInfos{}, + &MsgRegisterSymbolInfos{}, + &MsgSetIntermediaryAccountInfo{}, ) // Deprecated: Just for backward compatibility of query proposals diff --git a/x/yieldaggregator/types/message_register_denom_infos.go b/x/yieldaggregator/types/message_register_denom_infos.go new file mode 100644 index 000000000..6b3cea0d2 --- /dev/null +++ b/x/yieldaggregator/types/message_register_denom_infos.go @@ -0,0 +1,28 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgRegisterDenomInfos{} + +func NewMsgRegisterDenomInfos(sender string, info []DenomInfo) *MsgRegisterDenomInfos { + return &MsgRegisterDenomInfos{ + Sender: sender, + Info: info, + } +} + +func (msg MsgRegisterDenomInfos) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +func (msg MsgRegisterDenomInfos) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} diff --git a/x/yieldaggregator/types/message_register_symbol_infos.go b/x/yieldaggregator/types/message_register_symbol_infos.go new file mode 100644 index 000000000..5cfd00c99 --- /dev/null +++ b/x/yieldaggregator/types/message_register_symbol_infos.go @@ -0,0 +1,28 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgRegisterSymbolInfos{} + +func NewMsgRegisterSymbolInfos(sender string, info []SymbolInfo) *MsgRegisterSymbolInfos { + return &MsgRegisterSymbolInfos{ + Sender: sender, + Info: info, + } +} + +func (msg MsgRegisterSymbolInfos) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +func (msg MsgRegisterSymbolInfos) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} diff --git a/x/yieldaggregator/types/message_set_intermediary_account_info.go b/x/yieldaggregator/types/message_set_intermediary_account_info.go new file mode 100644 index 000000000..4f0a142a8 --- /dev/null +++ b/x/yieldaggregator/types/message_set_intermediary_account_info.go @@ -0,0 +1,28 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgSetIntermediaryAccountInfo{} + +func NewMsgSetIntermediaryAccountInfo(sender string, addrs []ChainAddress) *MsgSetIntermediaryAccountInfo { + return &MsgSetIntermediaryAccountInfo{ + Sender: sender, + Addrs: addrs, + } +} + +func (msg MsgSetIntermediaryAccountInfo) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +func (msg MsgSetIntermediaryAccountInfo) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 0a6fda617..0aef4057c 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -910,23 +910,23 @@ func (m *MsgRegisterDenomInfosResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterDenomInfosResponse proto.InternalMessageInfo -type MsgSymbolInfos struct { +type MsgRegisterSymbolInfos struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Info []SymbolInfo `protobuf:"bytes,2,rep,name=info,proto3" json:"info"` } -func (m *MsgSymbolInfos) Reset() { *m = MsgSymbolInfos{} } -func (m *MsgSymbolInfos) String() string { return proto.CompactTextString(m) } -func (*MsgSymbolInfos) ProtoMessage() {} -func (*MsgSymbolInfos) Descriptor() ([]byte, []int) { +func (m *MsgRegisterSymbolInfos) Reset() { *m = MsgRegisterSymbolInfos{} } +func (m *MsgRegisterSymbolInfos) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterSymbolInfos) ProtoMessage() {} +func (*MsgRegisterSymbolInfos) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{22} } -func (m *MsgSymbolInfos) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterSymbolInfos) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSymbolInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterSymbolInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSymbolInfos.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterSymbolInfos.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -936,47 +936,47 @@ func (m *MsgSymbolInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *MsgSymbolInfos) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSymbolInfos.Merge(m, src) +func (m *MsgRegisterSymbolInfos) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterSymbolInfos.Merge(m, src) } -func (m *MsgSymbolInfos) XXX_Size() int { +func (m *MsgRegisterSymbolInfos) XXX_Size() int { return m.Size() } -func (m *MsgSymbolInfos) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSymbolInfos.DiscardUnknown(m) +func (m *MsgRegisterSymbolInfos) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterSymbolInfos.DiscardUnknown(m) } -var xxx_messageInfo_MsgSymbolInfos proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterSymbolInfos proto.InternalMessageInfo -func (m *MsgSymbolInfos) GetSender() string { +func (m *MsgRegisterSymbolInfos) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *MsgSymbolInfos) GetInfo() []SymbolInfo { +func (m *MsgRegisterSymbolInfos) GetInfo() []SymbolInfo { if m != nil { return m.Info } return nil } -type MsgSymbolInfosResponse struct { +type MsgRegisterSymbolInfosResponse struct { } -func (m *MsgSymbolInfosResponse) Reset() { *m = MsgSymbolInfosResponse{} } -func (m *MsgSymbolInfosResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSymbolInfosResponse) ProtoMessage() {} -func (*MsgSymbolInfosResponse) Descriptor() ([]byte, []int) { +func (m *MsgRegisterSymbolInfosResponse) Reset() { *m = MsgRegisterSymbolInfosResponse{} } +func (m *MsgRegisterSymbolInfosResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterSymbolInfosResponse) ProtoMessage() {} +func (*MsgRegisterSymbolInfosResponse) Descriptor() ([]byte, []int) { return fileDescriptor_a6f503b1413abc44, []int{23} } -func (m *MsgSymbolInfosResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgRegisterSymbolInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSymbolInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgRegisterSymbolInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSymbolInfosResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgRegisterSymbolInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -986,17 +986,17 @@ func (m *MsgSymbolInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgSymbolInfosResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSymbolInfosResponse.Merge(m, src) +func (m *MsgRegisterSymbolInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterSymbolInfosResponse.Merge(m, src) } -func (m *MsgSymbolInfosResponse) XXX_Size() int { +func (m *MsgRegisterSymbolInfosResponse) XXX_Size() int { return m.Size() } -func (m *MsgSymbolInfosResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSymbolInfosResponse.DiscardUnknown(m) +func (m *MsgRegisterSymbolInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterSymbolInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSymbolInfosResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgRegisterSymbolInfosResponse proto.InternalMessageInfo type MsgSetIntermediaryAccountInfo struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` @@ -1109,8 +1109,8 @@ func init() { proto.RegisterType((*MsgDeleteVaultResponse)(nil), "ununifi.yieldaggregator.MsgDeleteVaultResponse") proto.RegisterType((*MsgRegisterDenomInfos)(nil), "ununifi.yieldaggregator.MsgRegisterDenomInfos") proto.RegisterType((*MsgRegisterDenomInfosResponse)(nil), "ununifi.yieldaggregator.MsgRegisterDenomInfosResponse") - proto.RegisterType((*MsgSymbolInfos)(nil), "ununifi.yieldaggregator.MsgSymbolInfos") - proto.RegisterType((*MsgSymbolInfosResponse)(nil), "ununifi.yieldaggregator.MsgSymbolInfosResponse") + proto.RegisterType((*MsgRegisterSymbolInfos)(nil), "ununifi.yieldaggregator.MsgRegisterSymbolInfos") + proto.RegisterType((*MsgRegisterSymbolInfosResponse)(nil), "ununifi.yieldaggregator.MsgRegisterSymbolInfosResponse") proto.RegisterType((*MsgSetIntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfo") proto.RegisterType((*MsgSetIntermediaryAccountInfoResponse)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfoResponse") } @@ -1118,90 +1118,90 @@ func init() { func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1324 bytes of a gzipped FileDescriptorProto + // 1325 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x26, 0x8e, 0xd3, 0xbc, 0x94, 0xa4, 0xdd, 0x24, 0x8d, 0xe3, 0x52, 0x27, 0xb8, 0x54, - 0x09, 0x85, 0x78, 0x1b, 0x03, 0x45, 0x54, 0xb4, 0x52, 0xfe, 0xa8, 0x52, 0x10, 0x11, 0x68, 0x93, - 0x50, 0xd4, 0x8b, 0xb5, 0xd9, 0x1d, 0x6f, 0x86, 0x7a, 0x67, 0xac, 0x99, 0x49, 0x52, 0x4b, 0x5c, - 0xe0, 0x42, 0x8f, 0x1c, 0x2a, 0x71, 0xed, 0x07, 0x40, 0x88, 0x43, 0xf9, 0x04, 0x5c, 0xca, 0x01, - 0x51, 0x7a, 0x42, 0x1c, 0x2a, 0xd4, 0x22, 0xc1, 0x81, 0x0f, 0x81, 0x76, 0x67, 0x3c, 0xd9, 0xc4, - 0xbb, 0x5b, 0xc7, 0x6d, 0x25, 0x4e, 0xf6, 0xee, 0xfc, 0xde, 0x7b, 0xbf, 0xdf, 0x9b, 0x79, 0xef, - 0x8d, 0x0d, 0xb3, 0xbb, 0x64, 0x97, 0xe0, 0x3a, 0xb6, 0x5a, 0x18, 0x35, 0x3c, 0xc7, 0xf7, 0x19, - 0xf2, 0x1d, 0x41, 0x99, 0x25, 0x6e, 0x57, 0x9a, 0x8c, 0x0a, 0x6a, 0x4e, 0x29, 0x44, 0xe5, 0x08, - 0xa2, 0x38, 0xe1, 0x53, 0x9f, 0x46, 0x18, 0x2b, 0xfc, 0x26, 0xe1, 0xc5, 0x29, 0x97, 0xf2, 0x80, - 0x72, 0x2b, 0xe0, 0xbe, 0xb5, 0xb7, 0x18, 0x7e, 0xa8, 0x85, 0x69, 0xb9, 0x50, 0x93, 0x16, 0xf2, - 0x41, 0x2d, 0x95, 0x94, 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e, 0x82, 0xa0, 0x0d, 0x18, 0x6b, 0x34, 0x6b, 0x82, - 0xde, 0x42, 0xa4, 0x16, 0x53, 0x36, 0xbc, 0xfc, 0x66, 0x48, 0xff, 0x8f, 0xc7, 0x33, 0x93, 0xd2, - 0x33, 0xf7, 0x6e, 0x55, 0x30, 0xb5, 0x02, 0x47, 0xec, 0x54, 0xd6, 0x88, 0x78, 0x74, 0x7f, 0x01, - 0x54, 0xc8, 0x35, 0x22, 0xec, 0x57, 0x1a, 0xcd, 0xcd, 0xd0, 0xc5, 0x52, 0x86, 0xd8, 0x12, 0xbc, - 0x9a, 0x24, 0x47, 0xeb, 0xfd, 0xd9, 0x80, 0x0b, 0x49, 0x80, 0xf0, 0xc5, 0x16, 0xd9, 0xa6, 0xc4, - 0xc3, 0xc4, 0xdf, 0xc4, 0x01, 0xfa, 0xff, 0x27, 0xa0, 0x6c, 0xc1, 0x42, 0x57, 0x52, 0xb4, 0xf8, - 0xbf, 0x72, 0x30, 0xba, 0xce, 0xfd, 0x15, 0x86, 0x1c, 0x81, 0x7a, 0xdd, 0xe6, 0x33, 0x90, 0xe7, - 0xad, 0x60, 0x9b, 0x36, 0x22, 0x8d, 0xc3, 0xb6, 0x7a, 0x32, 0x4d, 0xc8, 0x11, 0x27, 0x40, 0x52, - 0x97, 0x1d, 0x7d, 0x37, 0x67, 0x61, 0xc4, 0x43, 0xdc, 0x65, 0xb8, 0x29, 0x30, 0x25, 0x85, 0x5c, - 0xb4, 0x14, 0x7f, 0x65, 0xde, 0x84, 0x31, 0x97, 0x06, 0x01, 0xe6, 0x1c, 0x53, 0x52, 0x63, 0x8e, - 0x40, 0x85, 0xc1, 0x88, 0xc8, 0xa2, 0x4a, 0xcc, 0xd9, 0xce, 0xc4, 0x7c, 0x84, 0x7c, 0xc7, 0x6d, - 0xad, 0x22, 0x37, 0x96, 0x9e, 0x55, 0xe4, 0xda, 0xa3, 0x07, 0x9e, 0x6c, 0x47, 0x20, 0x13, 0xc1, - 0xe4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87, 0xd9, 0xd3, 0x51, 0x57, 0xba, 0x9d, 0x71, 0xbd, 0x3f, 0xbb, + 0x26, 0xad, 0x95, 0x0f, 0x1e, 0x3e, 0xcd, 0x6b, 0x8f, 0x9e, 0xe6, 0xb5, 0x3f, 0x9f, 0xe6, 0xb5, + 0x6f, 0x0e, 0xf3, 0x03, 0x8f, 0x0e, 0xf3, 0x03, 0xbf, 0x1f, 0xe6, 0x07, 0x6e, 0x5d, 0xf2, 0xb0, + 0xd8, 0xdd, 0xdb, 0x29, 0x39, 0xd4, 0x37, 0xb7, 0xc9, 0x36, 0xc1, 0x37, 0xb0, 0xe9, 0x04, 0x63, + 0xcc, 0xbc, 0xd3, 0xfe, 0x67, 0x5f, 0xa3, 0x8e, 0xf8, 0x4e, 0x36, 0xfc, 0x63, 0xec, 0xed, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x11, 0x12, 0x5c, 0x14, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1228,7 +1228,7 @@ type MsgClient interface { UpdateVault(ctx context.Context, in *MsgUpdateVault, opts ...grpc.CallOption) (*MsgUpdateVaultResponse, error) UpdateStrategy(ctx context.Context, in *MsgUpdateStrategy, opts ...grpc.CallOption) (*MsgUpdateStrategyResponse, error) RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenomInfos, opts ...grpc.CallOption) (*MsgRegisterDenomInfosResponse, error) - RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, opts ...grpc.CallOption) (*MsgSymbolInfosResponse, error) + RegisterSymbolInfos(ctx context.Context, in *MsgRegisterSymbolInfos, opts ...grpc.CallOption) (*MsgRegisterSymbolInfosResponse, error) SetIntermediaryAccountInfo(ctx context.Context, in *MsgSetIntermediaryAccountInfo, opts ...grpc.CallOption) (*MsgSetIntermediaryAccountInfoResponse, error) } @@ -1339,8 +1339,8 @@ func (c *msgClient) RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenom return out, nil } -func (c *msgClient) RegisterSymbolInfos(ctx context.Context, in *MsgSymbolInfos, opts ...grpc.CallOption) (*MsgSymbolInfosResponse, error) { - out := new(MsgSymbolInfosResponse) +func (c *msgClient) RegisterSymbolInfos(ctx context.Context, in *MsgRegisterSymbolInfos, opts ...grpc.CallOption) (*MsgRegisterSymbolInfosResponse, error) { + out := new(MsgRegisterSymbolInfosResponse) err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/RegisterSymbolInfos", in, out, opts...) if err != nil { return nil, err @@ -1371,7 +1371,7 @@ type MsgServer interface { UpdateVault(context.Context, *MsgUpdateVault) (*MsgUpdateVaultResponse, error) UpdateStrategy(context.Context, *MsgUpdateStrategy) (*MsgUpdateStrategyResponse, error) RegisterDenomInfos(context.Context, *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) - RegisterSymbolInfos(context.Context, *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) + RegisterSymbolInfos(context.Context, *MsgRegisterSymbolInfos) (*MsgRegisterSymbolInfosResponse, error) SetIntermediaryAccountInfo(context.Context, *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) } @@ -1412,7 +1412,7 @@ func (*UnimplementedMsgServer) UpdateStrategy(ctx context.Context, req *MsgUpdat func (*UnimplementedMsgServer) RegisterDenomInfos(ctx context.Context, req *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterDenomInfos not implemented") } -func (*UnimplementedMsgServer) RegisterSymbolInfos(ctx context.Context, req *MsgSymbolInfos) (*MsgSymbolInfosResponse, error) { +func (*UnimplementedMsgServer) RegisterSymbolInfos(ctx context.Context, req *MsgRegisterSymbolInfos) (*MsgRegisterSymbolInfosResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterSymbolInfos not implemented") } func (*UnimplementedMsgServer) SetIntermediaryAccountInfo(ctx context.Context, req *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) { @@ -1622,7 +1622,7 @@ func _Msg_RegisterDenomInfos_Handler(srv interface{}, ctx context.Context, dec f } func _Msg_RegisterSymbolInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSymbolInfos) + in := new(MsgRegisterSymbolInfos) if err := dec(in); err != nil { return nil, err } @@ -1634,7 +1634,7 @@ func _Msg_RegisterSymbolInfos_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/ununifi.yieldaggregator.Msg/RegisterSymbolInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterSymbolInfos(ctx, req.(*MsgSymbolInfos)) + return srv.(MsgServer).RegisterSymbolInfos(ctx, req.(*MsgRegisterSymbolInfos)) } return interceptor(ctx, in, info, handler) } @@ -2568,7 +2568,7 @@ func (m *MsgRegisterDenomInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgSymbolInfos) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterSymbolInfos) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2578,12 +2578,12 @@ func (m *MsgSymbolInfos) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSymbolInfos) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterSymbolInfos) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSymbolInfos) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterSymbolInfos) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2612,7 +2612,7 @@ func (m *MsgSymbolInfos) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgSymbolInfosResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterSymbolInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2622,12 +2622,12 @@ func (m *MsgSymbolInfosResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSymbolInfosResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterSymbolInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterSymbolInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3075,7 +3075,7 @@ func (m *MsgRegisterDenomInfosResponse) Size() (n int) { return n } -func (m *MsgSymbolInfos) Size() (n int) { +func (m *MsgRegisterSymbolInfos) Size() (n int) { if m == nil { return 0 } @@ -3094,7 +3094,7 @@ func (m *MsgSymbolInfos) Size() (n int) { return n } -func (m *MsgSymbolInfosResponse) Size() (n int) { +func (m *MsgRegisterSymbolInfosResponse) Size() (n int) { if m == nil { return 0 } @@ -5621,7 +5621,7 @@ func (m *MsgRegisterDenomInfosResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSymbolInfos) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterSymbolInfos) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5644,10 +5644,10 @@ func (m *MsgSymbolInfos) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSymbolInfos: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterSymbolInfos: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSymbolInfos: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterSymbolInfos: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5737,7 +5737,7 @@ func (m *MsgSymbolInfos) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSymbolInfosResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterSymbolInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5760,10 +5760,10 @@ func (m *MsgSymbolInfosResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSymbolInfosResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterSymbolInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSymbolInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterSymbolInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From d25ca5435364ee5667bcce9759806d8c973275b9 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 11 Oct 2023 21:27:39 +0800 Subject: [PATCH 24/59] Update CLI command for create-vault for modified vault struct --- x/yieldaggregator/client/cli/tx_create_vault.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x/yieldaggregator/client/cli/tx_create_vault.go b/x/yieldaggregator/client/cli/tx_create_vault.go index 405f3f475..04bbd38c4 100644 --- a/x/yieldaggregator/client/cli/tx_create_vault.go +++ b/x/yieldaggregator/client/cli/tx_create_vault.go @@ -20,7 +20,7 @@ func CmdTxCreateVault() *cobra.Command { Use: "create-vault [symbol] [commission-rate] [withdraw-reserve-rate] [fee] [deposit] [strategy-weights] [fee-collector]", Short: "create a new vault", Long: `create a new vault - ununifid tx yieldaggregator create-vault uguu 0.001 1000uguu 1000000uguu 1:0.1,2:0.9 + ununifid tx yieldaggregator create-vault uguu 0.001 1000uguu 1000000uguu ibc/XXXD:1:0.1,ibc/XXXD:2:0.9 `, Args: cobra.ExactArgs(7), RunE: func(cmd *cobra.Command, args []string) error { @@ -52,19 +52,21 @@ func CmdTxCreateVault() *cobra.Command { strategyWeights := make([]types.StrategyWeight, 0) for _, strategyWeightStr := range strategyWeightStrs { split := strings.Split(strategyWeightStr, ":") - if len(split) != 2 { + if len(split) != 3 { return fmt.Errorf("invalid strategy weight: %s", strategyWeightStr) } - strategyId, err := strconv.Atoi(split[0]) + strategyDenom := split[0] + strategyId, err := strconv.Atoi(split[1]) if err != nil { return err } - weight, err := sdk.NewDecFromStr(split[1]) + weight, err := sdk.NewDecFromStr(split[2]) if err != nil { return err } strategyWeights = append(strategyWeights, types.StrategyWeight{ + Denom: strategyDenom, StrategyId: uint64(strategyId), Weight: weight, }) From da2f31d08558a39e094a7cee6822bc9a67f5f4dc Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 12 Oct 2023 20:09:42 +0800 Subject: [PATCH 25/59] records module protobuf addition + PendingDeposit addition for YA --- proto/ununifi/records/callbacks.proto | 14 + proto/ununifi/records/genesis.proto | 20 + proto/ununifi/records/params.proto | 7 + proto/ununifi/records/query.proto | 160 + proto/ununifi/records/records.proto | 94 + proto/ununifi/yieldaggregator/genesis.proto | 5 +- .../yieldaggregator/yieldaggregator.proto | 9 + x/yieldaggregator/genesis.go | 4 + x/yieldaggregator/keeper/grpc_query_vault.go | 3 + x/yieldaggregator/keeper/lp.go | 3 +- x/yieldaggregator/keeper/pending_deposit.go | 66 + x/yieldaggregator/keeper/strategy.go | 2 +- x/yieldaggregator/keeper/strategy_test.go | 6 +- .../records/keeper/callback_transfer.go | 8 +- .../submodules/records/keeper/msg_server.go | 17 - .../records/keeper/user_redemption_record.go | 2 +- .../submodules/records/types/callbacks.pb.go | 221 +- .../submodules/records/types/genesis.pb.go | 2600 ++--------------- .../submodules/records/types/params.go | 7 - .../submodules/records/types/params.pb.go | 265 ++ .../submodules/records/types/query.pb.go | 1309 +++++++-- .../submodules/records/types/query.pb.gw.go | 250 +- .../submodules/records/types/records.pb.go | 2463 ++++++++++++++++ .../stakeibc/keeper/deposit_records.go | 17 +- .../submodules/stakeibc/keeper/hooks.go | 18 +- .../stakeibc/keeper/icacallbacks_claim.go | 2 +- .../keeper/icacallbacks_redemption.go | 2 +- .../stakeibc/keeper/icacallbacks_reinvest.go | 4 +- .../keeper/icacallbacks_undelegate.go | 2 +- .../msg_server_claim_undelegated_tokens.go | 2 +- .../keeper/msg_server_register_host_zone.go | 4 +- .../stakeibc/keeper/unbonding_records.go | 8 +- x/yieldaggregator/types/genesis.pb.go | 105 +- x/yieldaggregator/types/keys.go | 15 +- x/yieldaggregator/types/yieldaggregator.pb.go | 331 ++- 35 files changed, 5324 insertions(+), 2721 deletions(-) create mode 100644 proto/ununifi/records/callbacks.proto create mode 100644 proto/ununifi/records/genesis.proto create mode 100644 proto/ununifi/records/params.proto create mode 100644 proto/ununifi/records/query.proto create mode 100644 proto/ununifi/records/records.proto create mode 100644 x/yieldaggregator/keeper/pending_deposit.go delete mode 100644 x/yieldaggregator/submodules/records/keeper/msg_server.go create mode 100644 x/yieldaggregator/submodules/records/types/params.pb.go create mode 100644 x/yieldaggregator/submodules/records/types/records.pb.go diff --git a/proto/ununifi/records/callbacks.proto b/proto/ununifi/records/callbacks.proto new file mode 100644 index 000000000..5dd4e033f --- /dev/null +++ b/proto/ununifi/records/callbacks.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package ununifi.records; + +import "ununifi/records/records.proto"; + +option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types"; + +message TransferCallback { + uint64 deposit_record_id = 1; +} + +message TransferLSMTokenCallback { + LSMTokenDeposit deposit = 1; +} diff --git a/proto/ununifi/records/genesis.proto b/proto/ununifi/records/genesis.proto new file mode 100644 index 000000000..8744cf866 --- /dev/null +++ b/proto/ununifi/records/genesis.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package ununifi.records; + +import "ununifi/records/params.proto"; +import "ununifi/records/records.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types"; + +// GenesisState defines the records module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + string port_id = 2; + repeated UserRedemptionRecord user_redemption_record_list = 3 [(gogoproto.nullable) = false]; + uint64 user_redemption_record_count = 4; + repeated EpochUnbondingRecord epoch_unbonding_record_list = 5 [(gogoproto.nullable) = false]; + repeated DepositRecord deposit_record_list = 7 [(gogoproto.nullable) = false]; + uint64 deposit_record_count = 8; + repeated LSMTokenDeposit lsm_token_deposit_list = 9 [(gogoproto.nullable) = false]; +} diff --git a/proto/ununifi/records/params.proto b/proto/ununifi/records/params.proto new file mode 100644 index 000000000..8c3333cc2 --- /dev/null +++ b/proto/ununifi/records/params.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; +package ununifi.records; + +option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types"; + +// Params defines the parameters for the module. +message Params {} \ No newline at end of file diff --git a/proto/ununifi/records/query.proto b/proto/ununifi/records/query.proto new file mode 100644 index 000000000..ac612eba9 --- /dev/null +++ b/proto/ununifi/records/query.proto @@ -0,0 +1,160 @@ +syntax = "proto3"; +package ununifi.records; + +import "ununifi/records/records.proto"; +import "ununifi/records/params.proto"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/ununifi/records/params"; + } + // Queries a UserRedemptionRecord by id. + rpc UserRedemptionRecord(QueryGetUserRedemptionRecordRequest) returns (QueryGetUserRedemptionRecordResponse) { + option (google.api.http).get = "/ununifi/records/user_redemption_record/{id}"; + } + + // Queries a list of UserRedemptionRecord items. + rpc UserRedemptionRecordAll(QueryAllUserRedemptionRecordRequest) returns (QueryAllUserRedemptionRecordResponse) { + option (google.api.http).get = "/ununifi/records/user_redemption_record"; + } + + // Queries a list of UserRedemptionRecord items by chainId / userId pair. + rpc UserRedemptionRecordForUser(QueryAllUserRedemptionRecordForUserRequest) + returns (QueryAllUserRedemptionRecordForUserResponse) { + option (google.api.http).get = "/ununifi/records/user_redemption_record_for_user/" + "{chain_id}/{day}/{address}/{limit}"; + } + + // Queries a EpochUnbondingRecord by id. + rpc EpochUnbondingRecord(QueryGetEpochUnbondingRecordRequest) returns (QueryGetEpochUnbondingRecordResponse) { + option (google.api.http).get = "/ununifi/records/epoch_unbonding_record/{epoch_number}"; + } + + // Queries a list of EpochUnbondingRecord items. + rpc EpochUnbondingRecordAll(QueryAllEpochUnbondingRecordRequest) returns (QueryAllEpochUnbondingRecordResponse) { + option (google.api.http).get = "/ununifi/records/epoch_unbonding_record"; + } + + // Queries a DepositRecord by id. + rpc DepositRecord(QueryGetDepositRecordRequest) returns (QueryGetDepositRecordResponse) { + option (google.api.http).get = "/ununifi/records/deposit_record/{id}"; + } + + // Queries a list of DepositRecord items. + rpc DepositRecordAll(QueryAllDepositRecordRequest) returns (QueryAllDepositRecordResponse) { + option (google.api.http).get = "/ununifi/records/deposit_record"; + } + + // Queries the existing LSMTokenDeposits for one specific deposit + rpc LSMDeposit(QueryLSMDepositRequest) returns (QueryLSMDepositResponse) { + option (google.api.http).get = "/ununifi/stakeibc/lsm_deposit/{chain_id}/{denom}"; + } + + // Queries the existing LSMTokenDeposits for all which match filters + // intended use: + // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z + rpc LSMDeposits(QueryLSMDepositsRequest) returns (QueryLSMDepositsResponse) { + option (google.api.http).get = "/ununifi/stakeibc/lsm_deposits"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +message QueryGetDepositRecordRequest { + uint64 id = 1; +} + +message QueryGetDepositRecordResponse { + DepositRecord deposit_record = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllDepositRecordRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllDepositRecordResponse { + repeated DepositRecord deposit_record = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryGetUserRedemptionRecordRequest { + string id = 1; +} + +message QueryGetUserRedemptionRecordResponse { + UserRedemptionRecord user_redemption_record = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllUserRedemptionRecordRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllUserRedemptionRecordResponse { + repeated UserRedemptionRecord user_redemption_record = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// Query UserRedemptionRecords by chainId / userId pair +message QueryAllUserRedemptionRecordForUserRequest { + string chain_id = 1; + uint64 day = 2; + string address = 3; + uint64 limit = 4; + cosmos.base.query.v1beta1.PageRequest pagination = 5; +} + +message QueryAllUserRedemptionRecordForUserResponse { + repeated UserRedemptionRecord user_redemption_record = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryGetEpochUnbondingRecordRequest { + uint64 epoch_number = 1; +} + +message QueryGetEpochUnbondingRecordResponse { + EpochUnbondingRecord epoch_unbonding_record = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllEpochUnbondingRecordRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllEpochUnbondingRecordResponse { + repeated EpochUnbondingRecord epoch_unbonding_record = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryLSMDepositRequest { + string chain_id = 1; + string denom = 2; +} + +message QueryLSMDepositResponse { + LSMTokenDeposit deposit = 1 [(gogoproto.nullable) = false]; +} + +message QueryLSMDepositsRequest { + string chain_id = 1; + string validator_address = 2; + string status = 3; +} + +message QueryLSMDepositsResponse { + repeated LSMTokenDeposit deposits = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ununifi/records/records.proto b/proto/ununifi/records/records.proto new file mode 100644 index 000000000..1cad7b9c3 --- /dev/null +++ b/proto/ununifi/records/records.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; +package ununifi.records; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types"; + +message UserRedemptionRecord { + string id = 1; // {chain_id}.{epoch}.{sender} + string sender = 2; + string receiver = 3; + string amount = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string denom = 5; + string host_zone_id = 6; + uint64 epoch_number = 7; + bool claim_is_pending = 8; +} + +message DepositRecord { + uint64 id = 1; + string amount = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string denom = 3; + string host_zone_id = 4; + enum Status { + // in transfer queue to be sent to the delegation ICA + TRANSFER_QUEUE = 0; + // transfer in progress (IBC packet sent, ack not received) + TRANSFER_IN_PROGRESS = 2; + // in staking queue on delegation ICA + DELEGATION_QUEUE = 1; + // staking in progress (ICA packet sent, ack not received) + DELEGATION_IN_PROGRESS = 3; + } + enum Source { + UNUNIFI = 0; + WITHDRAWAL_ICA = 1; + } + Status status = 6; + uint64 deposit_epoch_number = 7; + Source source = 8; + + reserved 5; +} + +message HostZoneUnbonding { + enum Status { + // tokens bonded on delegate account + UNBONDING_QUEUE = 0; + UNBONDING_IN_PROGRESS = 3; + // unbonding completed on delegate account + EXIT_TRANSFER_QUEUE = 1; + EXIT_TRANSFER_IN_PROGRESS = 4; + // transfer success + CLAIMABLE = 2; + } + string st_token_amount = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string native_token_amount = 2 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string denom = 3; + string host_zone_id = 4; + uint64 unbonding_time = 5; + Status status = 6; + repeated string user_redemption_records = 7; +} + +message EpochUnbondingRecord { + uint64 epoch_number = 1; + repeated HostZoneUnbonding host_zone_unbondings = 3; + reserved 2; +} + +message LSMTokenDeposit { + enum Status { + DEPOSIT_PENDING = 0; + TRANSFER_QUEUE = 1; + TRANSFER_IN_PROGRESS = 2; + TRANSFER_FAILED = 3; + DETOKENIZATION_QUEUE = 4; + DETOKENIZATION_IN_PROGRESS = 5; + DETOKENIZATION_FAILED = 6; + } + + string deposit_id = 1; + string chain_id = 2; + string denom = 3; + string ibc_denom = 4; + string staker_address = 5; + string validator_address = 6; + string amount = 7 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin st_token = 8 [(gogoproto.nullable) = false]; + Status status = 9; +} diff --git a/proto/ununifi/yieldaggregator/genesis.proto b/proto/ununifi/yieldaggregator/genesis.proto index 5043a39fb..c82b1783c 100644 --- a/proto/ununifi/yieldaggregator/genesis.proto +++ b/proto/ununifi/yieldaggregator/genesis.proto @@ -12,6 +12,7 @@ option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/types"; message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; // this line is used by starport scaffolding # genesis/proto/state - repeated Vault vaults = 2 [(gogoproto.nullable) = false]; - repeated Strategy strategies = 3 [(gogoproto.nullable) = false]; + repeated Vault vaults = 2 [(gogoproto.nullable) = false]; + repeated Strategy strategies = 3 [(gogoproto.nullable) = false]; + repeated PendingDeposit pending_deposits = 4 [(gogoproto.nullable) = false]; } diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 1d5efebe1..f0a0a6ce4 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -58,6 +58,15 @@ message SymbolInfo { [(gogoproto.nullable) = false]; // channels to send to target chain for the symbol } +message PendingDeposit { + uint64 vault_id = 1; + string amount = 2 [ + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + message DenomInfo { string denom = 1; string symbol = 2; diff --git a/x/yieldaggregator/genesis.go b/x/yieldaggregator/genesis.go index 0861d3f77..730355d96 100644 --- a/x/yieldaggregator/genesis.go +++ b/x/yieldaggregator/genesis.go @@ -18,6 +18,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, vault := range genState.Vaults { k.AppendVault(ctx, vault) } + for _, deposit := range genState.PendingDeposits { + k.SetPendingDeposit(ctx, deposit.VaultId, deposit.Amount) + } } // ExportGenesis returns the module's exported genesis @@ -29,6 +32,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { } genesis.Strategies = k.GetAllStrategy(ctx, "") genesis.Vaults = k.GetAllVault(ctx) + genesis.PendingDeposits = k.GetAllPendingDeposits(ctx) return genesis } diff --git a/x/yieldaggregator/keeper/grpc_query_vault.go b/x/yieldaggregator/keeper/grpc_query_vault.go index c76a4d709..ee0dd2ace 100644 --- a/x/yieldaggregator/keeper/grpc_query_vault.go +++ b/x/yieldaggregator/keeper/grpc_query_vault.go @@ -45,6 +45,7 @@ func (k Keeper) VaultAll(c context.Context, req *types.QueryAllVaultRequest) (*t for _, vault := range vaults { vaultContainers = append(vaultContainers, types.VaultContainer{ Vault: vault, + TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), @@ -77,6 +78,7 @@ func (k Keeper) Vault(c context.Context, req *types.QueryGetVaultRequest) (*type return &types.QueryGetVaultResponse{ Vault: vault, Strategies: strategies, + TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), @@ -118,6 +120,7 @@ func (k Keeper) VaultAllByShareHolder(c context.Context, req *types.QueryAllVaul vaultContainers = append(vaultContainers, types.VaultContainer{ Vault: vault, + TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index f3d535b3b..b1a709f9c 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -66,8 +66,9 @@ func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { amountInStrategies := k.VaultAmountInStrategies(ctx, vault) amountInVault := k.VaultWithdrawalAmount(ctx, vault) amountUnbonding := k.VaultUnbondingAmountInStrategies(ctx, vault) + pendingDeposit := k.GetPendingDeposit(ctx, vault.Id) - totalAmount := amountInStrategies.Add(amountInVault).Add(amountUnbonding) + totalAmount := amountInStrategies.Add(amountInVault).Add(amountUnbonding).Add(pendingDeposit) return totalAmount } diff --git a/x/yieldaggregator/keeper/pending_deposit.go b/x/yieldaggregator/keeper/pending_deposit.go new file mode 100644 index 000000000..07b6ebd56 --- /dev/null +++ b/x/yieldaggregator/keeper/pending_deposit.go @@ -0,0 +1,66 @@ +package keeper + +import ( + "fmt" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k Keeper) GetAllPendingDeposits(ctx sdk.Context) []types.PendingDeposit { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) + deposits := []types.PendingDeposit{} + iterator := store.Iterator(nil, nil) + for ; iterator.Valid(); iterator.Next() { + var amount math.Int + err := amount.Unmarshal(iterator.Value()) + if err != nil { + panic(fmt.Errorf("unable to unmarshal supply value %v", err)) + } + + deposits = append(deposits, types.PendingDeposit{ + VaultId: sdk.BigEndianToUint64(iterator.Key()), + Amount: amount, + }) + } + return deposits +} + +func (k Keeper) IncreasePendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { + deposit := k.GetPendingDeposit(ctx, vaultId) + k.SetPendingDeposit(ctx, vaultId, deposit.Add(amount)) +} + +func (k Keeper) DecreasePendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { + deposit := k.GetPendingDeposit(ctx, vaultId) + k.SetPendingDeposit(ctx, vaultId, deposit.Sub(amount)) +} + +func (k Keeper) GetPendingDeposit(ctx sdk.Context, vaultId uint64) sdk.Int { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) + bz := store.Get(sdk.Uint64ToBigEndian(vaultId)) + if bz == nil { + return sdk.ZeroInt() + } + + var amount math.Int + err := amount.Unmarshal(bz) + if err != nil { + panic(fmt.Errorf("unable to unmarshal supply value %v", err)) + } + + return amount +} + +func (k Keeper) SetPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) + bz, err := amount.Marshal() + if err != nil { + panic(fmt.Errorf("unable to marshal amount value %v", err)) + } + + store.Set(sdk.Uint64ToBigEndian(vaultId), bz) +} diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 41f1df6bf..3dd7fbb38 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -286,6 +286,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) memo, err := json.Marshal(metadata) + k.IncreasePendingDeposit(ctx, vault.Id, stakeCoin.Amount) msg := ibctypes.NewMsgTransfer( ibctransfertypes.PortID, transferRoute[0].ChannelId, @@ -297,7 +298,6 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ string(memo), ) err = k.recordsKeeper.YATransfer(ctx, msg) - // TODO: handle YATransfer callback handler for packet forwarding response return err } } diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 58e3e2c4f..55ea82a1a 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -120,7 +120,7 @@ func (suite *KeeperTestSuite) SetupZoneAndEpoch(hostDenom, ibcDenom string) stak Denom: zone.HostDenom, HostZoneId: zone.ChainId, UnbondingTime: 0, - Status: recordstypes.HostZoneUnbonding_BONDED, + Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, UserRedemptionRecords: []string{}, }, }, @@ -132,7 +132,7 @@ func (suite *KeeperTestSuite) SetupZoneAndEpoch(hostDenom, ibcDenom string) stak Amount: 100, Denom: ibcDenom, HostZoneId: "hub-1", - Status: recordstypes.DepositRecord_STAKE, + Status: recordstypes.DepositRecord_DELEGATION_QUEUE, DepositEpochNumber: 1, Source: recordstypes.DepositRecord_UNUNIFI, }) @@ -247,7 +247,7 @@ func (suite *KeeperTestSuite) TestUnstakeFromStrategy() { suite.Require().True(found) suite.Require().Len(unbondingRecord.HostZoneUnbondings, 1) suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].StTokenAmount, uint64(1000_000)) - suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].Status, recordstypes.HostZoneUnbonding_BONDED) + suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].Status, recordstypes.HostZoneUnbonding_UNBONDING_QUEUE) suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].NativeTokenAmount, uint64(1000_000)) suite.Require().Len(unbondingRecord.HostZoneUnbondings[0].UserRedemptionRecords, 1) } diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index 17722e8df..a3cacbb72 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -61,7 +61,7 @@ func TransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack k.Logger(ctx).Error(fmt.Sprintf("TransferCallback deposit record not found, packet %v", packet)) return sdkerrors.Wrapf(types.ErrUnknownDepositRecord, "deposit record not found %d", transferCallbackData.DepositRecordId) } - depositRecord.Status = types.DepositRecord_STAKE + depositRecord.Status = types.DepositRecord_DELEGATION_QUEUE k.SetDepositRecord(ctx, depositRecord) k.Logger(ctx).Info(fmt.Sprintf("\t [IBC-TRANSFER] Deposit record updated: {%v}", depositRecord.Id)) k.Logger(ctx).Info(fmt.Sprintf("[IBC-TRANSFER] success to %s", depositRecord.HostZoneId)) @@ -151,6 +151,9 @@ func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, a } k.Logger(ctx).Info(fmt.Sprintf("YATransferCallback unmarshalled FungibleTokenPacketData %v", data)) + // TODO: move pending deposits to records module + + // TODO: not data.Sender but deposit strategy contract address + vault id contractAddress, err := sdk.AccAddressFromBech32(data.Sender) if err != nil { return sdkerrors.Wrapf(types.ErrUnmarshalFailure, "cannot retrieve contract address: %s", err.Error()) @@ -176,5 +179,8 @@ func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, a k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) return fmt.Errorf("failed to Sudo: %v", err) } + + k.YAKeeper.DecreasePendingDeposit(ctx, vault.Id, data.Amount) + return nil } diff --git a/x/yieldaggregator/submodules/records/keeper/msg_server.go b/x/yieldaggregator/submodules/records/keeper/msg_server.go deleted file mode 100644 index 2973dfe04..000000000 --- a/x/yieldaggregator/submodules/records/keeper/msg_server.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper - -import ( - "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" -) - -type msgServer struct { - Keeper -} - -// NewMsgServerImpl returns an implementation of the MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} -} - -var _ types.MsgServer = msgServer{} diff --git a/x/yieldaggregator/submodules/records/keeper/user_redemption_record.go b/x/yieldaggregator/submodules/records/keeper/user_redemption_record.go index 117016695..32a6f206e 100644 --- a/x/yieldaggregator/submodules/records/keeper/user_redemption_record.go +++ b/x/yieldaggregator/submodules/records/keeper/user_redemption_record.go @@ -43,7 +43,7 @@ func (k Keeper) GetUserRedemptionRecordBySenderAndHostZone(ctx sdk.Context, send if val.Sender == sender.String() && val.HostZoneId == zoneId { - return sdk.NewInt(int64(val.Amount)) + return val.Amount } } return sdk.ZeroInt() diff --git a/x/yieldaggregator/submodules/records/types/callbacks.pb.go b/x/yieldaggregator/submodules/records/types/callbacks.pb.go index 714b75c7a..14383cb39 100644 --- a/x/yieldaggregator/submodules/records/types/callbacks.pb.go +++ b/x/yieldaggregator/submodules/records/types/callbacks.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: records/callbacks.proto +// source: ununifi/records/callbacks.proto package types @@ -22,16 +22,15 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ---------------------- Transfer Callback ---------------------- // type TransferCallback struct { - DepositRecordId uint64 `protobuf:"varint,1,opt,name=depositRecordId,proto3" json:"depositRecordId,omitempty"` + DepositRecordId uint64 `protobuf:"varint,1,opt,name=deposit_record_id,json=depositRecordId,proto3" json:"deposit_record_id,omitempty"` } func (m *TransferCallback) Reset() { *m = TransferCallback{} } func (m *TransferCallback) String() string { return proto.CompactTextString(m) } func (*TransferCallback) ProtoMessage() {} func (*TransferCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_b54f911f44fb63f4, []int{0} + return fileDescriptor_1a9d66e4bf18ea7d, []int{0} } func (m *TransferCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -67,27 +66,75 @@ func (m *TransferCallback) GetDepositRecordId() uint64 { return 0 } -func init() { - proto.RegisterType((*TransferCallback)(nil), "Stridelabs.stride.records.TransferCallback") +type TransferLSMTokenCallback struct { + Deposit *LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` +} + +func (m *TransferLSMTokenCallback) Reset() { *m = TransferLSMTokenCallback{} } +func (m *TransferLSMTokenCallback) String() string { return proto.CompactTextString(m) } +func (*TransferLSMTokenCallback) ProtoMessage() {} +func (*TransferLSMTokenCallback) Descriptor() ([]byte, []int) { + return fileDescriptor_1a9d66e4bf18ea7d, []int{1} +} +func (m *TransferLSMTokenCallback) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TransferLSMTokenCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TransferLSMTokenCallback.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 *TransferLSMTokenCallback) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferLSMTokenCallback.Merge(m, src) +} +func (m *TransferLSMTokenCallback) XXX_Size() int { + return m.Size() +} +func (m *TransferLSMTokenCallback) XXX_DiscardUnknown() { + xxx_messageInfo_TransferLSMTokenCallback.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferLSMTokenCallback proto.InternalMessageInfo + +func (m *TransferLSMTokenCallback) GetDeposit() *LSMTokenDeposit { + if m != nil { + return m.Deposit + } + return nil } func init() { - // proto.RegisterFile("records/callbacks.proto", fileDescriptor_b54f911f44fb63f4) + proto.RegisterType((*TransferCallback)(nil), "ununifi.records.TransferCallback") + proto.RegisterType((*TransferLSMTokenCallback)(nil), "ununifi.records.TransferLSMTokenCallback") } -var fileDescriptor_b54f911f44fb63f4 = []byte{ - // 174 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x4a, 0x4d, 0xce, - 0x2f, 0x4a, 0x29, 0xd6, 0x4f, 0x4e, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x0c, 0x2e, 0x29, 0xca, 0x4c, 0x49, 0xcd, 0x49, 0x4c, 0x2a, 0xd6, - 0x2b, 0x06, 0x33, 0xf5, 0xa0, 0x4a, 0x95, 0x6c, 0xb8, 0x04, 0x42, 0x8a, 0x12, 0xf3, 0x8a, 0xd3, - 0x52, 0x8b, 0x9c, 0xa1, 0xba, 0x84, 0x34, 0xb8, 0xf8, 0x53, 0x52, 0x0b, 0xf2, 0x8b, 0x33, 0x4b, - 0x82, 0xc0, 0xaa, 0x3c, 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0x58, 0x82, 0xd0, 0x85, 0x9d, 0xdc, - 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, - 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, - 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x62, 0xbb, 0xae, 0x4f, 0x62, 0x52, 0xb1, 0x3e, 0xc4, - 0x7a, 0xfd, 0x0a, 0x7d, 0x98, 0x5b, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x0e, 0x35, - 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x33, 0x7a, 0x69, 0x3b, 0xc3, 0x00, 0x00, 0x00, +func init() { proto.RegisterFile("ununifi/records/callbacks.proto", fileDescriptor_1a9d66e4bf18ea7d) } + +var fileDescriptor_1a9d66e4bf18ea7d = []byte{ + // 251 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xcd, 0x2b, 0xcd, + 0xcb, 0x4c, 0xcb, 0xd4, 0x2f, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x29, 0xd6, 0x4f, 0x4e, 0xcc, 0xc9, + 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x2a, 0xd0, + 0x83, 0x2a, 0x90, 0x92, 0x45, 0xd7, 0x01, 0xa5, 0x21, 0xea, 0x95, 0xec, 0xb8, 0x04, 0x42, 0x8a, + 0x12, 0xf3, 0x8a, 0xd3, 0x52, 0x8b, 0x9c, 0xa1, 0x46, 0x09, 0x69, 0x71, 0x09, 0xa6, 0xa4, 0x16, + 0xe4, 0x17, 0x67, 0x96, 0xc4, 0x43, 0x14, 0xc7, 0x67, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, + 0x04, 0xf1, 0x43, 0x25, 0x82, 0xc0, 0xe2, 0x9e, 0x29, 0x4a, 0x61, 0x5c, 0x12, 0x30, 0xfd, 0x3e, + 0xc1, 0xbe, 0x21, 0xf9, 0xd9, 0xa9, 0x79, 0x70, 0x73, 0xac, 0xb8, 0xd8, 0xa1, 0xca, 0xc1, 0xba, + 0xb9, 0x8d, 0x14, 0xf4, 0xd0, 0x5c, 0xa7, 0x07, 0xd3, 0xe3, 0x02, 0x35, 0x16, 0xa6, 0xc1, 0x29, + 0xf6, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, + 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x9c, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x43, 0xf3, 0x42, 0xf3, 0x32, 0xdd, 0x32, 0xf5, 0x93, + 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x2b, 0xf4, 0x2b, 0x33, 0x53, 0x73, 0x52, 0x12, 0xd3, 0xd3, 0x8b, + 0x52, 0xd3, 0x13, 0x4b, 0xf2, 0x8b, 0xf4, 0x8b, 0x4b, 0x93, 0x72, 0xf3, 0x53, 0x4a, 0x73, 0x52, + 0xe1, 0xde, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xfb, 0xde, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x02, 0xf9, 0xb6, 0x4c, 0x50, 0x01, 0x00, 0x00, } func (m *TransferCallback) Marshal() (dAtA []byte, err error) { @@ -118,6 +165,41 @@ func (m *TransferCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TransferLSMTokenCallback) 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 *TransferLSMTokenCallback) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TransferLSMTokenCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Deposit != nil { + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCallbacks(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintCallbacks(dAtA []byte, offset int, v uint64) int { offset -= sovCallbacks(v) base := offset @@ -141,6 +223,19 @@ func (m *TransferCallback) Size() (n int) { return n } +func (m *TransferLSMTokenCallback) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Deposit != nil { + l = m.Deposit.Size() + n += 1 + l + sovCallbacks(uint64(l)) + } + return n +} + func sovCallbacks(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -216,6 +311,92 @@ func (m *TransferCallback) Unmarshal(dAtA []byte) error { } return nil } +func (m *TransferLSMTokenCallback) 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 ErrIntOverflowCallbacks + } + 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: TransferLSMTokenCallback: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TransferLSMTokenCallback: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCallbacks + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCallbacks + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCallbacks + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Deposit == nil { + m.Deposit = &LSMTokenDeposit{} + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCallbacks(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCallbacks + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipCallbacks(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/submodules/records/types/genesis.pb.go b/x/yieldaggregator/submodules/records/types/genesis.pb.go index 01f47b360..e23297e58 100644 --- a/x/yieldaggregator/submodules/records/types/genesis.pb.go +++ b/x/yieldaggregator/submodules/records/types/genesis.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: records/genesis.proto +// source: ununifi/records/genesis.proto package types import ( - context "context" fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - grpc "google.golang.org/grpc" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -27,112 +23,30 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type DepositRecord_Status int32 - -const ( - // pending transfer to delegate account - DepositRecord_TRANSFER DepositRecord_Status = 0 - // pending staking on delegate account - DepositRecord_STAKE DepositRecord_Status = 1 -) - -var DepositRecord_Status_name = map[int32]string{ - 0: "TRANSFER", - 1: "STAKE", -} - -var DepositRecord_Status_value = map[string]int32{ - "TRANSFER": 0, - "STAKE": 1, -} - -func (x DepositRecord_Status) String() string { - return proto.EnumName(DepositRecord_Status_name, int32(x)) -} - -func (DepositRecord_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{4, 0} -} - -type DepositRecord_Source int32 - -const ( - DepositRecord_UNUNIFI DepositRecord_Source = 0 - DepositRecord_WITHDRAWAL_ICA DepositRecord_Source = 1 -) - -var DepositRecord_Source_name = map[int32]string{ - 0: "UNUNIFI", - 1: "WITHDRAWAL_ICA", -} - -var DepositRecord_Source_value = map[string]int32{ - "UNUNIFI": 0, - "WITHDRAWAL_ICA": 1, -} - -func (x DepositRecord_Source) String() string { - return proto.EnumName(DepositRecord_Source_name, int32(x)) -} - -func (DepositRecord_Source) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{4, 1} -} - -type HostZoneUnbonding_Status int32 - -const ( - // tokens bonded on delegate account - HostZoneUnbonding_BONDED HostZoneUnbonding_Status = 0 - // unbonding completed on delegate account - HostZoneUnbonding_UNBONDED HostZoneUnbonding_Status = 1 - // transfer success - HostZoneUnbonding_TRANSFERRED HostZoneUnbonding_Status = 2 -) - -var HostZoneUnbonding_Status_name = map[int32]string{ - 0: "BONDED", - 1: "UNBONDED", - 2: "TRANSFERRED", -} - -var HostZoneUnbonding_Status_value = map[string]int32{ - "BONDED": 0, - "UNBONDED": 1, - "TRANSFERRED": 2, -} - -func (x HostZoneUnbonding_Status) String() string { - return proto.EnumName(HostZoneUnbonding_Status_name, int32(x)) -} - -func (HostZoneUnbonding_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{5, 0} -} - -type UserRedemptionRecord struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,6,opt,name=hostZoneId,proto3" json:"hostZoneId,omitempty"` - EpochNumber uint64 `protobuf:"varint,7,opt,name=epochNumber,proto3" json:"epochNumber,omitempty"` - ClaimIsPending bool `protobuf:"varint,8,opt,name=claimIsPending,proto3" json:"claimIsPending,omitempty"` +// GenesisState defines the records module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` + UserRedemptionRecordList []UserRedemptionRecord `protobuf:"bytes,3,rep,name=user_redemption_record_list,json=userRedemptionRecordList,proto3" json:"user_redemption_record_list"` + UserRedemptionRecordCount uint64 `protobuf:"varint,4,opt,name=user_redemption_record_count,json=userRedemptionRecordCount,proto3" json:"user_redemption_record_count,omitempty"` + EpochUnbondingRecordList []EpochUnbondingRecord `protobuf:"bytes,5,rep,name=epoch_unbonding_record_list,json=epochUnbondingRecordList,proto3" json:"epoch_unbonding_record_list"` + DepositRecordList []DepositRecord `protobuf:"bytes,7,rep,name=deposit_record_list,json=depositRecordList,proto3" json:"deposit_record_list"` + DepositRecordCount uint64 `protobuf:"varint,8,opt,name=deposit_record_count,json=depositRecordCount,proto3" json:"deposit_record_count,omitempty"` + LsmTokenDepositList []LSMTokenDeposit `protobuf:"bytes,9,rep,name=lsm_token_deposit_list,json=lsmTokenDepositList,proto3" json:"lsm_token_deposit_list"` } -func (m *UserRedemptionRecord) Reset() { *m = UserRedemptionRecord{} } -func (m *UserRedemptionRecord) String() string { return proto.CompactTextString(m) } -func (*UserRedemptionRecord) ProtoMessage() {} -func (*UserRedemptionRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{0} +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_fd3c6e654df38706, []int{0} } -func (m *UserRedemptionRecord) XXX_Unmarshal(b []byte) error { +func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *UserRedemptionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_UserRedemptionRecord.Marshal(b, m, deterministic) + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -142,2311 +56,279 @@ func (m *UserRedemptionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *UserRedemptionRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserRedemptionRecord.Merge(m, src) +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) } -func (m *UserRedemptionRecord) XXX_Size() int { +func (m *GenesisState) XXX_Size() int { return m.Size() } -func (m *UserRedemptionRecord) XXX_DiscardUnknown() { - xxx_messageInfo_UserRedemptionRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_UserRedemptionRecord proto.InternalMessageInfo - -func (m *UserRedemptionRecord) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *UserRedemptionRecord) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *UserRedemptionRecord) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) } -func (m *UserRedemptionRecord) GetAmount() uint64 { - if m != nil { - return m.Amount - } - return 0 -} +var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *UserRedemptionRecord) GetDenom() string { +func (m *GenesisState) GetParams() Params { if m != nil { - return m.Denom + return m.Params } - return "" + return Params{} } -func (m *UserRedemptionRecord) GetHostZoneId() string { +func (m *GenesisState) GetPortId() string { if m != nil { - return m.HostZoneId + return m.PortId } return "" } -func (m *UserRedemptionRecord) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func (m *UserRedemptionRecord) GetClaimIsPending() bool { - if m != nil { - return m.ClaimIsPending - } - return false -} - -// Params defines the parameters for the module. -type Params struct { -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{1} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -type RecordsPacketData struct { - // Types that are valid to be assigned to Packet: - // *RecordsPacketData_NoData - Packet isRecordsPacketData_Packet `protobuf_oneof:"packet"` -} - -func (m *RecordsPacketData) Reset() { *m = RecordsPacketData{} } -func (m *RecordsPacketData) String() string { return proto.CompactTextString(m) } -func (*RecordsPacketData) ProtoMessage() {} -func (*RecordsPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{2} -} -func (m *RecordsPacketData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RecordsPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RecordsPacketData.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 *RecordsPacketData) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecordsPacketData.Merge(m, src) -} -func (m *RecordsPacketData) XXX_Size() int { - return m.Size() -} -func (m *RecordsPacketData) XXX_DiscardUnknown() { - xxx_messageInfo_RecordsPacketData.DiscardUnknown(m) -} - -var xxx_messageInfo_RecordsPacketData proto.InternalMessageInfo - -type isRecordsPacketData_Packet interface { - isRecordsPacketData_Packet() - MarshalTo([]byte) (int, error) - Size() int -} - -type RecordsPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=noData,proto3,oneof" json:"noData,omitempty"` -} - -func (*RecordsPacketData_NoData) isRecordsPacketData_Packet() {} - -func (m *RecordsPacketData) GetPacket() isRecordsPacketData_Packet { +func (m *GenesisState) GetUserRedemptionRecordList() []UserRedemptionRecord { if m != nil { - return m.Packet - } - return nil -} - -func (m *RecordsPacketData) GetNoData() *NoData { - if x, ok := m.GetPacket().(*RecordsPacketData_NoData); ok { - return x.NoData + return m.UserRedemptionRecordList } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*RecordsPacketData) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*RecordsPacketData_NoData)(nil), - } -} - -type NoData struct { -} - -func (m *NoData) Reset() { *m = NoData{} } -func (m *NoData) String() string { return proto.CompactTextString(m) } -func (*NoData) ProtoMessage() {} -func (*NoData) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{3} -} -func (m *NoData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoData.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 *NoData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoData.Merge(m, src) -} -func (m *NoData) XXX_Size() int { - return m.Size() -} -func (m *NoData) XXX_DiscardUnknown() { - xxx_messageInfo_NoData.DiscardUnknown(m) -} - -var xxx_messageInfo_NoData proto.InternalMessageInfo - -type DepositRecord struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=hostZoneId,proto3" json:"hostZoneId,omitempty"` - Status DepositRecord_Status `protobuf:"varint,6,opt,name=status,proto3,enum=Stridelabs.stride.records.DepositRecord_Status" json:"status,omitempty"` - DepositEpochNumber uint64 `protobuf:"varint,7,opt,name=depositEpochNumber,proto3" json:"depositEpochNumber,omitempty"` - Source DepositRecord_Source `protobuf:"varint,8,opt,name=source,proto3,enum=Stridelabs.stride.records.DepositRecord_Source" json:"source,omitempty"` -} - -func (m *DepositRecord) Reset() { *m = DepositRecord{} } -func (m *DepositRecord) String() string { return proto.CompactTextString(m) } -func (*DepositRecord) ProtoMessage() {} -func (*DepositRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{4} -} -func (m *DepositRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DepositRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DepositRecord.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 *DepositRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositRecord.Merge(m, src) -} -func (m *DepositRecord) XXX_Size() int { - return m.Size() -} -func (m *DepositRecord) XXX_DiscardUnknown() { - xxx_messageInfo_DepositRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositRecord proto.InternalMessageInfo - -func (m *DepositRecord) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *DepositRecord) GetAmount() int64 { +func (m *GenesisState) GetUserRedemptionRecordCount() uint64 { if m != nil { - return m.Amount + return m.UserRedemptionRecordCount } return 0 } -func (m *DepositRecord) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *DepositRecord) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *DepositRecord) GetStatus() DepositRecord_Status { - if m != nil { - return m.Status - } - return DepositRecord_TRANSFER -} - -func (m *DepositRecord) GetDepositEpochNumber() uint64 { +func (m *GenesisState) GetEpochUnbondingRecordList() []EpochUnbondingRecord { if m != nil { - return m.DepositEpochNumber + return m.EpochUnbondingRecordList } - return 0 + return nil } -func (m *DepositRecord) GetSource() DepositRecord_Source { +func (m *GenesisState) GetDepositRecordList() []DepositRecord { if m != nil { - return m.Source - } - return DepositRecord_UNUNIFI -} - -type HostZoneUnbonding struct { - StTokenAmount uint64 `protobuf:"varint,1,opt,name=stTokenAmount,proto3" json:"stTokenAmount,omitempty"` - NativeTokenAmount uint64 `protobuf:"varint,2,opt,name=nativeTokenAmount,proto3" json:"nativeTokenAmount,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=hostZoneId,proto3" json:"hostZoneId,omitempty"` - UnbondingTime uint64 `protobuf:"varint,5,opt,name=unbondingTime,proto3" json:"unbondingTime,omitempty"` - Status HostZoneUnbonding_Status `protobuf:"varint,6,opt,name=status,proto3,enum=Stridelabs.stride.records.HostZoneUnbonding_Status" json:"status,omitempty"` - UserRedemptionRecords []string `protobuf:"bytes,7,rep,name=userRedemptionRecords,proto3" json:"userRedemptionRecords,omitempty"` -} - -func (m *HostZoneUnbonding) Reset() { *m = HostZoneUnbonding{} } -func (m *HostZoneUnbonding) String() string { return proto.CompactTextString(m) } -func (*HostZoneUnbonding) ProtoMessage() {} -func (*HostZoneUnbonding) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{5} -} -func (m *HostZoneUnbonding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostZoneUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostZoneUnbonding.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.DepositRecordList } -} -func (m *HostZoneUnbonding) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostZoneUnbonding.Merge(m, src) -} -func (m *HostZoneUnbonding) XXX_Size() int { - return m.Size() -} -func (m *HostZoneUnbonding) XXX_DiscardUnknown() { - xxx_messageInfo_HostZoneUnbonding.DiscardUnknown(m) + return nil } -var xxx_messageInfo_HostZoneUnbonding proto.InternalMessageInfo - -func (m *HostZoneUnbonding) GetStTokenAmount() uint64 { +func (m *GenesisState) GetDepositRecordCount() uint64 { if m != nil { - return m.StTokenAmount + return m.DepositRecordCount } return 0 } -func (m *HostZoneUnbonding) GetNativeTokenAmount() uint64 { +func (m *GenesisState) GetLsmTokenDepositList() []LSMTokenDeposit { if m != nil { - return m.NativeTokenAmount + return m.LsmTokenDepositList } - return 0 + return nil } -func (m *HostZoneUnbonding) GetDenom() string { - if m != nil { - return m.Denom - } - return "" +func init() { + proto.RegisterType((*GenesisState)(nil), "ununifi.records.GenesisState") +} + +func init() { proto.RegisterFile("ununifi/records/genesis.proto", fileDescriptor_fd3c6e654df38706) } + +var fileDescriptor_fd3c6e654df38706 = []byte{ + // 438 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x6b, 0xd4, 0x40, + 0x18, 0xc7, 0x37, 0x76, 0xdd, 0xda, 0xa9, 0x20, 0xa6, 0xc5, 0xc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 0xc7, 0xbf, 0xf0, 0x39, 0x83, 0x8a, 0xe4, + 0x94, 0x4a, 0xa0, 0xb9, 0x16, 0x12, 0x2b, 0x53, 0xd4, 0x82, 0x98, 0x0a, 0x6e, 0xde, 0x34, 0xd6, + 0xe7, 0x0d, 0xa8, 0x62, 0x62, 0x1f, 0xf1, 0xab, 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x83, + 0xcb, 0x28, 0x49, 0x03, 0x00, 0x00, } -func (m *HostZoneUnbonding) GetHostZoneId() string { - if m != nil { - return m.HostZoneId +func (m *GenesisState) 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 "" + return dAtA[:n], nil } -func (m *HostZoneUnbonding) GetUnbondingTime() uint64 { - if m != nil { - return m.UnbondingTime - } - return 0 +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HostZoneUnbonding) GetStatus() HostZoneUnbonding_Status { - if m != nil { - return m.Status - } - return HostZoneUnbonding_BONDED -} - -func (m *HostZoneUnbonding) GetUserRedemptionRecords() []string { - if m != nil { - return m.UserRedemptionRecords - } - return nil -} - -type EpochUnbondingRecord struct { - EpochNumber uint64 `protobuf:"varint,1,opt,name=epochNumber,proto3" json:"epochNumber,omitempty"` - HostZoneUnbondings []*HostZoneUnbonding `protobuf:"bytes,3,rep,name=hostZoneUnbondings,proto3" json:"hostZoneUnbondings,omitempty"` -} - -func (m *EpochUnbondingRecord) Reset() { *m = EpochUnbondingRecord{} } -func (m *EpochUnbondingRecord) String() string { return proto.CompactTextString(m) } -func (*EpochUnbondingRecord) ProtoMessage() {} -func (*EpochUnbondingRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{6} -} -func (m *EpochUnbondingRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochUnbondingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochUnbondingRecord.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 *EpochUnbondingRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochUnbondingRecord.Merge(m, src) -} -func (m *EpochUnbondingRecord) XXX_Size() int { - return m.Size() -} -func (m *EpochUnbondingRecord) XXX_DiscardUnknown() { - xxx_messageInfo_EpochUnbondingRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochUnbondingRecord proto.InternalMessageInfo - -func (m *EpochUnbondingRecord) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func (m *EpochUnbondingRecord) GetHostZoneUnbondings() []*HostZoneUnbonding { - if m != nil { - return m.HostZoneUnbondings - } - return nil -} - -// GenesisState defines the recordπs module's genesis state. -// next id: 9 -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - UserRedemptionRecordList []UserRedemptionRecord `protobuf:"bytes,3,rep,name=userRedemptionRecordList,proto3" json:"userRedemptionRecordList"` - UserRedemptionRecordCount uint64 `protobuf:"varint,4,opt,name=userRedemptionRecordCount,proto3" json:"userRedemptionRecordCount,omitempty"` - EpochUnbondingRecordList []EpochUnbondingRecord `protobuf:"bytes,5,rep,name=epochUnbondingRecordList,proto3" json:"epochUnbondingRecordList"` - DepositRecordList []DepositRecord `protobuf:"bytes,7,rep,name=depositRecordList,proto3" json:"depositRecordList"` - DepositRecordCount uint64 `protobuf:"varint,8,opt,name=depositRecordCount,proto3" json:"depositRecordCount,omitempty"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_03dd178cbf8084c6, []int{7} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *GenesisState) GetUserRedemptionRecordList() []UserRedemptionRecord { - if m != nil { - return m.UserRedemptionRecordList - } - return nil -} - -func (m *GenesisState) GetUserRedemptionRecordCount() uint64 { - if m != nil { - return m.UserRedemptionRecordCount - } - return 0 -} - -func (m *GenesisState) GetEpochUnbondingRecordList() []EpochUnbondingRecord { - if m != nil { - return m.EpochUnbondingRecordList - } - return nil -} - -func (m *GenesisState) GetDepositRecordList() []DepositRecord { - if m != nil { - return m.DepositRecordList - } - return nil -} - -func (m *GenesisState) GetDepositRecordCount() uint64 { - if m != nil { - return m.DepositRecordCount - } - return 0 -} - -func init() { - proto.RegisterEnum("Stridelabs.stride.records.DepositRecord_Status", DepositRecord_Status_name, DepositRecord_Status_value) - proto.RegisterEnum("Stridelabs.stride.records.DepositRecord_Source", DepositRecord_Source_name, DepositRecord_Source_value) - proto.RegisterEnum("Stridelabs.stride.records.HostZoneUnbonding_Status", HostZoneUnbonding_Status_name, HostZoneUnbonding_Status_value) - proto.RegisterType((*UserRedemptionRecord)(nil), "Stridelabs.stride.records.UserRedemptionRecord") - proto.RegisterType((*Params)(nil), "Stridelabs.stride.records.Params") - proto.RegisterType((*RecordsPacketData)(nil), "Stridelabs.stride.records.RecordsPacketData") - proto.RegisterType((*NoData)(nil), "Stridelabs.stride.records.NoData") - proto.RegisterType((*DepositRecord)(nil), "Stridelabs.stride.records.DepositRecord") - proto.RegisterType((*HostZoneUnbonding)(nil), "Stridelabs.stride.records.HostZoneUnbonding") - proto.RegisterType((*EpochUnbondingRecord)(nil), "Stridelabs.stride.records.EpochUnbondingRecord") - proto.RegisterType((*GenesisState)(nil), "Stridelabs.stride.records.GenesisState") -} - -func init() { - // proto.RegisterFile("records/genesis.proto", fileDescriptor_03dd178cbf8084c6) -} - -var fileDescriptor_03dd178cbf8084c6 = []byte{ - // 835 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x3f, 0x6f, 0xdb, 0x46, - 0x14, 0x27, 0x45, 0x8a, 0xa6, 0x9f, 0x63, 0x95, 0x3e, 0x38, 0x2d, 0xe3, 0x41, 0x56, 0x88, 0xa0, - 0xd0, 0x90, 0x90, 0x80, 0xdd, 0xa9, 0x2d, 0x50, 0x48, 0x91, 0x6a, 0x2b, 0x71, 0x55, 0xe3, 0x24, - 0x23, 0x80, 0x11, 0x20, 0xa0, 0xc4, 0x2b, 0x45, 0xc4, 0xe4, 0xb1, 0xbc, 0x63, 0xd0, 0xae, 0xfd, - 0x04, 0x1d, 0x8b, 0xa2, 0x43, 0x3f, 0x4e, 0xc6, 0x8c, 0x9d, 0x8a, 0xc2, 0xfe, 0x06, 0x5d, 0xbb, - 0x14, 0x3c, 0x52, 0x06, 0x25, 0x52, 0x6e, 0xd2, 0xed, 0xde, 0xff, 0xf7, 0x7e, 0x8f, 0xef, 0x47, - 0xb8, 0x9f, 0x90, 0x39, 0x4d, 0x3c, 0xe6, 0xf8, 0x24, 0x22, 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 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// 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 { -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Stridelabs.stride.records.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "records/genesis.proto", -} - -func (m *UserRedemptionRecord) 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 *UserRedemptionRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserRedemptionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimIsPending { - i-- - if m.ClaimIsPending { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.EpochNumber != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x38 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x32 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x2a - } - if m.Amount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *RecordsPacketData) 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 *RecordsPacketData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecordsPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Packet != nil { - { - size := m.Packet.Size() - i -= size - if _, err := m.Packet.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *RecordsPacketData_NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecordsPacketData_NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NoData != nil { - { - size, err := m.NoData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *NoData) 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 *NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *DepositRecord) 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 *DepositRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DepositRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Source != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Source)) - i-- - dAtA[i] = 0x40 - } - if m.DepositEpochNumber != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.DepositEpochNumber)) - i-- - dAtA[i] = 0x38 - } - if m.Status != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - if m.Amount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Amount)) - i-- - dAtA[i] = 0x10 - } - if m.Id != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HostZoneUnbonding) 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 *HostZoneUnbonding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostZoneUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserRedemptionRecords) > 0 { - for iNdEx := len(m.UserRedemptionRecords) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UserRedemptionRecords[iNdEx]) - copy(dAtA[i:], m.UserRedemptionRecords[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.UserRedemptionRecords[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if m.Status != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if m.UnbondingTime != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.UnbondingTime)) - i-- - dAtA[i] = 0x28 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - if m.NativeTokenAmount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.NativeTokenAmount)) - i-- - dAtA[i] = 0x10 - } - if m.StTokenAmount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.StTokenAmount)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *EpochUnbondingRecord) 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 *EpochUnbondingRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochUnbondingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostZoneUnbondings) > 0 { - for iNdEx := len(m.HostZoneUnbondings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.HostZoneUnbondings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.EpochNumber != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DepositRecordCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.DepositRecordCount)) - i-- - dAtA[i] = 0x40 - } - if len(m.DepositRecordList) > 0 { - for iNdEx := len(m.DepositRecordList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DepositRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.EpochUnbondingRecordList) > 0 { - for iNdEx := len(m.EpochUnbondingRecordList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EpochUnbondingRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.UserRedemptionRecordCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.UserRedemptionRecordCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.UserRedemptionRecordList) > 0 { - for iNdEx := len(m.UserRedemptionRecordList) - 1; iNdEx >= 0; iNdEx-- { + if len(m.LsmTokenDepositList) > 0 { + for iNdEx := len(m.LsmTokenDepositList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.UserRedemptionRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserRedemptionRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Amount != 0 { - n += 1 + sovGenesis(uint64(m.Amount)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.EpochNumber != 0 { - n += 1 + sovGenesis(uint64(m.EpochNumber)) - } - if m.ClaimIsPending { - n += 2 - } - return n -} - -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *RecordsPacketData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Packet != nil { - n += m.Packet.Size() - } - return n -} - -func (m *RecordsPacketData_NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoData != nil { - l = m.NoData.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} -func (m *NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *DepositRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovGenesis(uint64(m.Id)) - } - if m.Amount != 0 { - n += 1 + sovGenesis(uint64(m.Amount)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovGenesis(uint64(m.Status)) - } - if m.DepositEpochNumber != 0 { - n += 1 + sovGenesis(uint64(m.DepositEpochNumber)) - } - if m.Source != 0 { - n += 1 + sovGenesis(uint64(m.Source)) - } - return n -} - -func (m *HostZoneUnbonding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StTokenAmount != 0 { - n += 1 + sovGenesis(uint64(m.StTokenAmount)) - } - if m.NativeTokenAmount != 0 { - n += 1 + sovGenesis(uint64(m.NativeTokenAmount)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.UnbondingTime != 0 { - n += 1 + sovGenesis(uint64(m.UnbondingTime)) - } - if m.Status != 0 { - n += 1 + sovGenesis(uint64(m.Status)) - } - if len(m.UserRedemptionRecords) > 0 { - for _, s := range m.UserRedemptionRecords { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *EpochUnbondingRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochNumber != 0 { - n += 1 + sovGenesis(uint64(m.EpochNumber)) - } - if len(m.HostZoneUnbondings) > 0 { - for _, e := range m.HostZoneUnbondings { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.UserRedemptionRecordList) > 0 { - for _, e := range m.UserRedemptionRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.UserRedemptionRecordCount != 0 { - n += 1 + sovGenesis(uint64(m.UserRedemptionRecordCount)) - } - if len(m.EpochUnbondingRecordList) > 0 { - for _, e := range m.EpochUnbondingRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.DepositRecordList) > 0 { - for _, e := range m.DepositRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.DepositRecordCount != 0 { - n += 1 + sovGenesis(uint64(m.DepositRecordCount)) - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserRedemptionRecord) 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 ErrIntOverflowGenesis - } - 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: UserRedemptionRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserRedemptionRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClaimIsPending = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Params) 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 ErrIntOverflowGenesis - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RecordsPacketData) 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 ErrIntOverflowGenesis - } - 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: RecordsPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RecordsPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &NoData{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Packet = &RecordsPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoData) 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 ErrIntOverflowGenesis - } - 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: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DepositRecord) 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 ErrIntOverflowGenesis - } - 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: DepositRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DepositRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - m.Amount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Amount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= DepositRecord_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositEpochNumber", wireType) - } - m.DepositEpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositEpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - m.Source = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Source |= DepositRecord_Source(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostZoneUnbonding) 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 ErrIntOverflowGenesis - } - 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: HostZoneUnbonding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostZoneUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) - } - m.StTokenAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StTokenAmount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) - } - m.NativeTokenAmount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NativeTokenAmount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - m.UnbondingTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= HostZoneUnbonding_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecords", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF + size, err := m.LsmTokenDepositList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - m.UserRedemptionRecords = append(m.UserRedemptionRecords, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err + i-- + dAtA[i] = 0x4a + } + } + if m.DepositRecordCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.DepositRecordCount)) + i-- + dAtA[i] = 0x40 + } + if len(m.DepositRecordList) > 0 { + for iNdEx := len(m.DepositRecordList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DepositRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis + i-- + dAtA[i] = 0x3a + } + } + if len(m.EpochUnbondingRecordList) > 0 { + for iNdEx := len(m.EpochUnbondingRecordList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.EpochUnbondingRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + i-- + dAtA[i] = 0x2a + } + } + if m.UserRedemptionRecordCount != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.UserRedemptionRecordCount)) + i-- + dAtA[i] = 0x20 + } + if len(m.UserRedemptionRecordList) > 0 { + for iNdEx := len(m.UserRedemptionRecordList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UserRedemptionRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - iNdEx += skippy + i-- + dAtA[i] = 0x1a + } + } + if len(m.PortId) > 0 { + i -= len(m.PortId) + copy(dAtA[i:], m.PortId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return nil + dAtA[offset] = uint8(v) + return base } -func (m *EpochUnbondingRecord) 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 ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = len(m.PortId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.UserRedemptionRecordList) > 0 { + for _, e := range m.UserRedemptionRecordList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EpochUnbondingRecord: wiretype end group for non-group") + } + if m.UserRedemptionRecordCount != 0 { + n += 1 + sovGenesis(uint64(m.UserRedemptionRecordCount)) + } + if len(m.EpochUnbondingRecordList) > 0 { + for _, e := range m.EpochUnbondingRecordList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochUnbondingRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + if len(m.DepositRecordList) > 0 { + for _, e := range m.DepositRecordList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneUnbondings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneUnbondings = append(m.HostZoneUnbondings, &HostZoneUnbonding{}) - if err := m.HostZoneUnbondings[len(m.HostZoneUnbondings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + } + if m.DepositRecordCount != 0 { + n += 1 + sovGenesis(uint64(m.DepositRecordCount)) + } + if len(m.LsmTokenDepositList) > 0 { + for _, e := range m.LsmTokenDepositList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) } } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -2682,6 +564,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LsmTokenDepositList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LsmTokenDepositList = append(m.LsmTokenDepositList, LSMTokenDeposit{}) + if err := m.LsmTokenDepositList[len(m.LsmTokenDepositList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/yieldaggregator/submodules/records/types/params.go b/x/yieldaggregator/submodules/records/types/params.go index 357196ad6..4f3215e35 100644 --- a/x/yieldaggregator/submodules/records/types/params.go +++ b/x/yieldaggregator/submodules/records/types/params.go @@ -2,7 +2,6 @@ package types import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "gopkg.in/yaml.v2" ) var _ paramtypes.ParamSet = (*Params)(nil) @@ -31,9 +30,3 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { func (p Params) Validate() error { return nil } - -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/yieldaggregator/submodules/records/types/params.pb.go b/x/yieldaggregator/submodules/records/types/params.pb.go new file mode 100644 index 000000000..33ecf48f7 --- /dev/null +++ b/x/yieldaggregator/submodules/records/types/params.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ununifi/records/params.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_8b2b15948dc10468, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "ununifi.records.Params") +} + +func init() { proto.RegisterFile("ununifi/records/params.proto", fileDescriptor_8b2b15948dc10468) } + +var fileDescriptor_8b2b15948dc10468 = []byte{ + // 163 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xcd, 0x2b, 0xcd, + 0xcb, 0x4c, 0xcb, 0xd4, 0x2f, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x29, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, + 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xca, 0xea, 0x41, 0x65, 0x95, + 0x38, 0xb8, 0xd8, 0x02, 0xc0, 0x0a, 0x9c, 0x62, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, + 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, + 0x8e, 0x21, 0xca, 0x39, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x34, + 0x2f, 0x34, 0x2f, 0xd3, 0x2d, 0x53, 0x3f, 0x39, 0x23, 0x31, 0x33, 0x4f, 0xbf, 0x42, 0xbf, 0x32, + 0x33, 0x35, 0x27, 0x25, 0x31, 0x3d, 0xbd, 0x28, 0x35, 0x3d, 0xb1, 0x24, 0xbf, 0x48, 0xbf, 0xb8, + 0x34, 0x29, 0x37, 0x3f, 0xa5, 0x34, 0x27, 0xb5, 0x18, 0xee, 0x80, 0x92, 0xca, 0x82, 0xd4, 0xe2, + 0x24, 0x36, 0xb0, 0x03, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x4f, 0x41, 0x57, 0xa0, + 0x00, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/yieldaggregator/submodules/records/types/query.pb.go b/x/yieldaggregator/submodules/records/types/query.pb.go index f301baa83..b60a24114 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: records/query.proto +// source: ununifi/records/query.proto package types @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -38,7 +38,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{0} + return fileDescriptor_75af079ed2bd9fe5, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{1} + return fileDescriptor_75af079ed2bd9fe5, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -121,7 +121,7 @@ func (m *QueryGetDepositRecordRequest) Reset() { *m = QueryGetDepositRec func (m *QueryGetDepositRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetDepositRecordRequest) ProtoMessage() {} func (*QueryGetDepositRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{2} + return fileDescriptor_75af079ed2bd9fe5, []int{2} } func (m *QueryGetDepositRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,14 +158,14 @@ func (m *QueryGetDepositRecordRequest) GetId() uint64 { } type QueryGetDepositRecordResponse struct { - DepositRecord DepositRecord `protobuf:"bytes,1,opt,name=DepositRecord,proto3" json:"DepositRecord"` + DepositRecord DepositRecord `protobuf:"bytes,1,opt,name=deposit_record,json=depositRecord,proto3" json:"deposit_record"` } func (m *QueryGetDepositRecordResponse) Reset() { *m = QueryGetDepositRecordResponse{} } func (m *QueryGetDepositRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetDepositRecordResponse) ProtoMessage() {} func (*QueryGetDepositRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{3} + return fileDescriptor_75af079ed2bd9fe5, []int{3} } func (m *QueryGetDepositRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -209,7 +209,7 @@ func (m *QueryAllDepositRecordRequest) Reset() { *m = QueryAllDepositRec func (m *QueryAllDepositRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllDepositRecordRequest) ProtoMessage() {} func (*QueryAllDepositRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{4} + return fileDescriptor_75af079ed2bd9fe5, []int{4} } func (m *QueryAllDepositRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ func (m *QueryAllDepositRecordRequest) GetPagination() *query.PageRequest { } type QueryAllDepositRecordResponse struct { - DepositRecord []DepositRecord `protobuf:"bytes,1,rep,name=DepositRecord,proto3" json:"DepositRecord"` + DepositRecord []DepositRecord `protobuf:"bytes,1,rep,name=deposit_record,json=depositRecord,proto3" json:"deposit_record"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -254,7 +254,7 @@ func (m *QueryAllDepositRecordResponse) Reset() { *m = QueryAllDepositRe func (m *QueryAllDepositRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllDepositRecordResponse) ProtoMessage() {} func (*QueryAllDepositRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{5} + return fileDescriptor_75af079ed2bd9fe5, []int{5} } func (m *QueryAllDepositRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +305,7 @@ func (m *QueryGetUserRedemptionRecordRequest) Reset() { *m = QueryGetUse func (m *QueryGetUserRedemptionRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetUserRedemptionRecordRequest) ProtoMessage() {} func (*QueryGetUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{6} + return fileDescriptor_75af079ed2bd9fe5, []int{6} } func (m *QueryGetUserRedemptionRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -342,14 +342,14 @@ func (m *QueryGetUserRedemptionRecordRequest) GetId() string { } type QueryGetUserRedemptionRecordResponse struct { - UserRedemptionRecord UserRedemptionRecord `protobuf:"bytes,1,opt,name=UserRedemptionRecord,proto3" json:"UserRedemptionRecord"` + UserRedemptionRecord UserRedemptionRecord `protobuf:"bytes,1,opt,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` } func (m *QueryGetUserRedemptionRecordResponse) Reset() { *m = QueryGetUserRedemptionRecordResponse{} } func (m *QueryGetUserRedemptionRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetUserRedemptionRecordResponse) ProtoMessage() {} func (*QueryGetUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{7} + return fileDescriptor_75af079ed2bd9fe5, []int{7} } func (m *QueryGetUserRedemptionRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -393,7 +393,7 @@ func (m *QueryAllUserRedemptionRecordRequest) Reset() { *m = QueryAllUse func (m *QueryAllUserRedemptionRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllUserRedemptionRecordRequest) ProtoMessage() {} func (*QueryAllUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{8} + return fileDescriptor_75af079ed2bd9fe5, []int{8} } func (m *QueryAllUserRedemptionRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -430,7 +430,7 @@ func (m *QueryAllUserRedemptionRecordRequest) GetPagination() *query.PageRequest } type QueryAllUserRedemptionRecordResponse struct { - UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=UserRedemptionRecord,proto3" json:"UserRedemptionRecord"` + UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -438,7 +438,7 @@ func (m *QueryAllUserRedemptionRecordResponse) Reset() { *m = QueryAllUs func (m *QueryAllUserRedemptionRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllUserRedemptionRecordResponse) ProtoMessage() {} func (*QueryAllUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{9} + return fileDescriptor_75af079ed2bd9fe5, []int{9} } func (m *QueryAllUserRedemptionRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -483,7 +483,7 @@ func (m *QueryAllUserRedemptionRecordResponse) GetPagination() *query.PageRespon // Query UserRedemptionRecords by chainId / userId pair type QueryAllUserRedemptionRecordForUserRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chainId,proto3" json:"chainId,omitempty"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` Day uint64 `protobuf:"varint,2,opt,name=day,proto3" json:"day,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` @@ -498,7 +498,7 @@ func (m *QueryAllUserRedemptionRecordForUserRequest) String() string { } func (*QueryAllUserRedemptionRecordForUserRequest) ProtoMessage() {} func (*QueryAllUserRedemptionRecordForUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{10} + return fileDescriptor_75af079ed2bd9fe5, []int{10} } func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -563,7 +563,7 @@ func (m *QueryAllUserRedemptionRecordForUserRequest) GetPagination() *query.Page } type QueryAllUserRedemptionRecordForUserResponse struct { - UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=UserRedemptionRecord,proto3" json:"UserRedemptionRecord"` + UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -575,7 +575,7 @@ func (m *QueryAllUserRedemptionRecordForUserResponse) String() string { } func (*QueryAllUserRedemptionRecordForUserResponse) ProtoMessage() {} func (*QueryAllUserRedemptionRecordForUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{11} + return fileDescriptor_75af079ed2bd9fe5, []int{11} } func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -619,14 +619,14 @@ func (m *QueryAllUserRedemptionRecordForUserResponse) GetPagination() *query.Pag } type QueryGetEpochUnbondingRecordRequest struct { - EpochNumber uint64 `protobuf:"varint,1,opt,name=epochNumber,proto3" json:"epochNumber,omitempty"` + EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` } func (m *QueryGetEpochUnbondingRecordRequest) Reset() { *m = QueryGetEpochUnbondingRecordRequest{} } func (m *QueryGetEpochUnbondingRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetEpochUnbondingRecordRequest) ProtoMessage() {} func (*QueryGetEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{12} + return fileDescriptor_75af079ed2bd9fe5, []int{12} } func (m *QueryGetEpochUnbondingRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -663,14 +663,14 @@ func (m *QueryGetEpochUnbondingRecordRequest) GetEpochNumber() uint64 { } type QueryGetEpochUnbondingRecordResponse struct { - EpochUnbondingRecord EpochUnbondingRecord `protobuf:"bytes,1,opt,name=EpochUnbondingRecord,proto3" json:"EpochUnbondingRecord"` + EpochUnbondingRecord EpochUnbondingRecord `protobuf:"bytes,1,opt,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record"` } func (m *QueryGetEpochUnbondingRecordResponse) Reset() { *m = QueryGetEpochUnbondingRecordResponse{} } func (m *QueryGetEpochUnbondingRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetEpochUnbondingRecordResponse) ProtoMessage() {} func (*QueryGetEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{13} + return fileDescriptor_75af079ed2bd9fe5, []int{13} } func (m *QueryGetEpochUnbondingRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -714,7 +714,7 @@ func (m *QueryAllEpochUnbondingRecordRequest) Reset() { *m = QueryAllEpo func (m *QueryAllEpochUnbondingRecordRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllEpochUnbondingRecordRequest) ProtoMessage() {} func (*QueryAllEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{14} + return fileDescriptor_75af079ed2bd9fe5, []int{14} } func (m *QueryAllEpochUnbondingRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +751,7 @@ func (m *QueryAllEpochUnbondingRecordRequest) GetPagination() *query.PageRequest } type QueryAllEpochUnbondingRecordResponse struct { - EpochUnbondingRecord []EpochUnbondingRecord `protobuf:"bytes,1,rep,name=EpochUnbondingRecord,proto3" json:"EpochUnbondingRecord"` + EpochUnbondingRecord []EpochUnbondingRecord `protobuf:"bytes,1,rep,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -759,7 +759,7 @@ func (m *QueryAllEpochUnbondingRecordResponse) Reset() { *m = QueryAllEp func (m *QueryAllEpochUnbondingRecordResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllEpochUnbondingRecordResponse) ProtoMessage() {} func (*QueryAllEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f871b183106cf451, []int{15} + return fileDescriptor_75af079ed2bd9fe5, []int{15} } func (m *QueryAllEpochUnbondingRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -802,88 +802,303 @@ func (m *QueryAllEpochUnbondingRecordResponse) GetPagination() *query.PageRespon return nil } -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "Stridelabs.stride.records.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "Stridelabs.stride.records.QueryParamsResponse") - proto.RegisterType((*QueryGetDepositRecordRequest)(nil), "Stridelabs.stride.records.QueryGetDepositRecordRequest") - proto.RegisterType((*QueryGetDepositRecordResponse)(nil), "Stridelabs.stride.records.QueryGetDepositRecordResponse") - proto.RegisterType((*QueryAllDepositRecordRequest)(nil), "Stridelabs.stride.records.QueryAllDepositRecordRequest") - proto.RegisterType((*QueryAllDepositRecordResponse)(nil), "Stridelabs.stride.records.QueryAllDepositRecordResponse") - proto.RegisterType((*QueryGetUserRedemptionRecordRequest)(nil), "Stridelabs.stride.records.QueryGetUserRedemptionRecordRequest") - proto.RegisterType((*QueryGetUserRedemptionRecordResponse)(nil), "Stridelabs.stride.records.QueryGetUserRedemptionRecordResponse") - proto.RegisterType((*QueryAllUserRedemptionRecordRequest)(nil), "Stridelabs.stride.records.QueryAllUserRedemptionRecordRequest") - proto.RegisterType((*QueryAllUserRedemptionRecordResponse)(nil), "Stridelabs.stride.records.QueryAllUserRedemptionRecordResponse") - proto.RegisterType((*QueryAllUserRedemptionRecordForUserRequest)(nil), "Stridelabs.stride.records.QueryAllUserRedemptionRecordForUserRequest") - proto.RegisterType((*QueryAllUserRedemptionRecordForUserResponse)(nil), "Stridelabs.stride.records.QueryAllUserRedemptionRecordForUserResponse") - proto.RegisterType((*QueryGetEpochUnbondingRecordRequest)(nil), "Stridelabs.stride.records.QueryGetEpochUnbondingRecordRequest") - proto.RegisterType((*QueryGetEpochUnbondingRecordResponse)(nil), "Stridelabs.stride.records.QueryGetEpochUnbondingRecordResponse") - proto.RegisterType((*QueryAllEpochUnbondingRecordRequest)(nil), "Stridelabs.stride.records.QueryAllEpochUnbondingRecordRequest") - proto.RegisterType((*QueryAllEpochUnbondingRecordResponse)(nil), "Stridelabs.stride.records.QueryAllEpochUnbondingRecordResponse") +type QueryLSMDepositRequest struct { + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryLSMDepositRequest) Reset() { *m = QueryLSMDepositRequest{} } +func (m *QueryLSMDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLSMDepositRequest) ProtoMessage() {} +func (*QueryLSMDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{16} +} +func (m *QueryLSMDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLSMDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLSMDepositRequest.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 *QueryLSMDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLSMDepositRequest.Merge(m, src) +} +func (m *QueryLSMDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLSMDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLSMDepositRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLSMDepositRequest proto.InternalMessageInfo + +func (m *QueryLSMDepositRequest) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *QueryLSMDepositRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type QueryLSMDepositResponse struct { + Deposit LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` +} + +func (m *QueryLSMDepositResponse) Reset() { *m = QueryLSMDepositResponse{} } +func (m *QueryLSMDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLSMDepositResponse) ProtoMessage() {} +func (*QueryLSMDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{17} +} +func (m *QueryLSMDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLSMDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLSMDepositResponse.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 *QueryLSMDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLSMDepositResponse.Merge(m, src) +} +func (m *QueryLSMDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLSMDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLSMDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLSMDepositResponse proto.InternalMessageInfo + +func (m *QueryLSMDepositResponse) GetDeposit() LSMTokenDeposit { + if m != nil { + return m.Deposit + } + return LSMTokenDeposit{} +} + +type QueryLSMDepositsRequest struct { + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (m *QueryLSMDepositsRequest) Reset() { *m = QueryLSMDepositsRequest{} } +func (m *QueryLSMDepositsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLSMDepositsRequest) ProtoMessage() {} +func (*QueryLSMDepositsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{18} +} +func (m *QueryLSMDepositsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLSMDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLSMDepositsRequest.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 *QueryLSMDepositsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLSMDepositsRequest.Merge(m, src) +} +func (m *QueryLSMDepositsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLSMDepositsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLSMDepositsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLSMDepositsRequest proto.InternalMessageInfo + +func (m *QueryLSMDepositsRequest) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *QueryLSMDepositsRequest) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *QueryLSMDepositsRequest) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +type QueryLSMDepositsResponse struct { + Deposits []LSMTokenDeposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` +} + +func (m *QueryLSMDepositsResponse) Reset() { *m = QueryLSMDepositsResponse{} } +func (m *QueryLSMDepositsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLSMDepositsResponse) ProtoMessage() {} +func (*QueryLSMDepositsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{19} +} +func (m *QueryLSMDepositsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLSMDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLSMDepositsResponse.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 *QueryLSMDepositsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLSMDepositsResponse.Merge(m, src) +} +func (m *QueryLSMDepositsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLSMDepositsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLSMDepositsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLSMDepositsResponse proto.InternalMessageInfo + +func (m *QueryLSMDepositsResponse) GetDeposits() []LSMTokenDeposit { + if m != nil { + return m.Deposits + } + return nil } func init() { - // proto.RegisterFile("records/query.proto", fileDescriptor_f871b183106cf451) -} - -var fileDescriptor_f871b183106cf451 = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x97, 0xdf, 0x4f, 0xdb, 0x46, - 0x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97, 0xaa, 0x93, 0x93, 0xae, 0x2d, 0xf5, - 0x2f, 0x96, 0x80, 0x0d, 0xf8, 0x47, 0x52, 0x02, 0xd8, 0x4c, 0x68, 0xb4, 0x23, 0x13, 0xe7, 0x9d, - 0xdc, 0x37, 0x2b, 0x78, 0x4b, 0xcb, 0x5c, 0xa5, 0x6d, 0xe9, 0x1b, 0x61, 0x0e, 0xb9, 0x9d, 0xd3, - 0xb5, 0xb4, 0x1c, 0x13, 0x3e, 0x53, 0x2e, 0x7d, 0xbc, 0xc3, 0x6a, 0x8a, 0xac, 0xcb, 0x7e, 0x38, - 0x4a, 0xbf, 0x5c, 0x5f, 0x51, 0x00, 0x54, 0x19, 0xc0, 0x2a, 0x44, 0x49, 0x00, 0x26, 0x57, 0x8d, - 0xdd, 0x34, 0x4f, 0x15, 0x30, 0x13, 0x33, 0x19, 0xd6, 0xa3, 0x9a, 0x22, 0x9f, 0xa3, 0x01, 0x0c, - 0xfa, 0x03, 0x52, 0x2b, 0x0c, 0xe0, 0x07, 0xb8, 0x9c, 0x1e, 0x60, 0xa3, 0x76, 0x78, 0x5a, 0x56, - 0x8e, 0x4e, 0xcb, 0xca, 0x9b, 0xd3, 0xb2, 0xf2, 0xf0, 0xac, 0x9c, 0x39, 0x3a, 0x2b, 0x67, 0x8e, - 0xcf, 0xca, 0x99, 0x3b, 0x2b, 0x96, 0x1d, 0xec, 0xb5, 0x0d, 0xad, 0x49, 0x5a, 0x32, 0x7b, 0xf7, - 0xcf, 0x2d, 0x06, 0x1d, 0x0f, 0x53, 0x63, 0x92, 0xfd, 0x24, 0xff, 0xf8, 0x2e, 0x00, 0x00, 0xff, - 0xff, 0xbd, 0xfc, 0xa3, 0xbb, 0xcd, 0x0f, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.records.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.records.QueryParamsResponse") + proto.RegisterType((*QueryGetDepositRecordRequest)(nil), "ununifi.records.QueryGetDepositRecordRequest") + proto.RegisterType((*QueryGetDepositRecordResponse)(nil), "ununifi.records.QueryGetDepositRecordResponse") + proto.RegisterType((*QueryAllDepositRecordRequest)(nil), "ununifi.records.QueryAllDepositRecordRequest") + proto.RegisterType((*QueryAllDepositRecordResponse)(nil), "ununifi.records.QueryAllDepositRecordResponse") + proto.RegisterType((*QueryGetUserRedemptionRecordRequest)(nil), "ununifi.records.QueryGetUserRedemptionRecordRequest") + proto.RegisterType((*QueryGetUserRedemptionRecordResponse)(nil), "ununifi.records.QueryGetUserRedemptionRecordResponse") + proto.RegisterType((*QueryAllUserRedemptionRecordRequest)(nil), "ununifi.records.QueryAllUserRedemptionRecordRequest") + proto.RegisterType((*QueryAllUserRedemptionRecordResponse)(nil), "ununifi.records.QueryAllUserRedemptionRecordResponse") + proto.RegisterType((*QueryAllUserRedemptionRecordForUserRequest)(nil), "ununifi.records.QueryAllUserRedemptionRecordForUserRequest") + proto.RegisterType((*QueryAllUserRedemptionRecordForUserResponse)(nil), "ununifi.records.QueryAllUserRedemptionRecordForUserResponse") + proto.RegisterType((*QueryGetEpochUnbondingRecordRequest)(nil), "ununifi.records.QueryGetEpochUnbondingRecordRequest") + proto.RegisterType((*QueryGetEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryGetEpochUnbondingRecordResponse") + proto.RegisterType((*QueryAllEpochUnbondingRecordRequest)(nil), "ununifi.records.QueryAllEpochUnbondingRecordRequest") + proto.RegisterType((*QueryAllEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryAllEpochUnbondingRecordResponse") + proto.RegisterType((*QueryLSMDepositRequest)(nil), "ununifi.records.QueryLSMDepositRequest") + proto.RegisterType((*QueryLSMDepositResponse)(nil), "ununifi.records.QueryLSMDepositResponse") + proto.RegisterType((*QueryLSMDepositsRequest)(nil), "ununifi.records.QueryLSMDepositsRequest") + proto.RegisterType((*QueryLSMDepositsResponse)(nil), "ununifi.records.QueryLSMDepositsResponse") +} + +func init() { proto.RegisterFile("ununifi/records/query.proto", fileDescriptor_75af079ed2bd9fe5) } + +var fileDescriptor_75af079ed2bd9fe5 = []byte{ + // 1117 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0xdc, 0x44, + 0x14, 0x8f, 0xf3, 0xd5, 0xf6, 0x85, 0x94, 0x30, 0xac, 0x92, 0x74, 0xdb, 0x6e, 0x52, 0x37, 0x24, + 0xfd, 0xf4, 0xd0, 0xd0, 0xa0, 0x4a, 0x20, 0x44, 0x02, 0xa4, 0x54, 0xa4, 0xa8, 0x6c, 0xd8, 0x0b, + 0x15, 0xac, 0xbc, 0xeb, 0x89, 0x33, 0xaa, 0xed, 0xd9, 0x7a, 0xec, 0x8a, 0xd5, 0x6a, 0x2f, 0xdc, + 0xe0, 0x84, 0xc4, 0x09, 0xc4, 0xbf, 0x81, 0x10, 0x67, 0x2e, 0x3d, 0x06, 0xb8, 0xc0, 0x05, 0xa1, + 0x84, 0x7f, 0x81, 0x3b, 0xf2, 0xcc, 0x78, 0xb3, 0x8e, 0xbd, 0xde, 0xcd, 0x6a, 0x39, 0x70, 0x5a, + 0xdb, 0xef, 0xeb, 0xf7, 0x7b, 0x6f, 0xde, 0x7b, 0xf6, 0xc2, 0xc5, 0xd0, 0x0b, 0x3d, 0xba, 0x47, + 0xb1, 0x4f, 0xea, 0xcc, 0xb7, 0x38, 0x7e, 0x1a, 0x12, 0xbf, 0x69, 0x34, 0x7c, 0x16, 0x30, 0xf4, + 0xa2, 0x12, 0x1a, 0x4a, 0x58, 0xbc, 0x7c, 0x52, 0x5b, 0xfd, 0x4a, 0xfd, 0xe2, 0xa5, 0x93, 0xe2, + 0x86, 0xe9, 0x9b, 0x6e, 0x2c, 0x2d, 0xd8, 0xcc, 0x66, 0xe2, 0x12, 0x47, 0x57, 0xb1, 0x8d, 0xcd, + 0x98, 0xed, 0x10, 0x6c, 0x36, 0x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, 0x96, 0x69, 0xdb, 0x3e, 0xb1, 0xa3, 0xbd, 0x8c, 0x79, 0x58, 0x73, 0x99, 0x15, + 0x3a, 0xa4, 0xf3, 0x2f, 0x09, 0x0e, 0x9a, 0x0d, 0xc2, 0x6b, 0xd3, 0xe2, 0xef, 0x8a, 0xd7, 0xfe, + 0x0d, 0x00, 0x00, 0xff, 0xff, 0x12, 0x85, 0x63, 0x11, 0x7b, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -914,6 +1129,13 @@ type QueryClient interface { DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) + // Queries the existing LSMTokenDeposits for one specific deposit + LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) + // Queries the existing LSMTokenDeposits for all which match filters + // + // intended use: + // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z + LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) } type queryClient struct { @@ -926,7 +1148,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -935,7 +1157,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) UserRedemptionRecord(ctx context.Context, in *QueryGetUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryGetUserRedemptionRecordResponse, error) { out := new(QueryGetUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/UserRedemptionRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/UserRedemptionRecord", in, out, opts...) if err != nil { return nil, err } @@ -944,7 +1166,7 @@ func (c *queryClient) UserRedemptionRecord(ctx context.Context, in *QueryGetUser func (c *queryClient) UserRedemptionRecordAll(ctx context.Context, in *QueryAllUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordResponse, error) { out := new(QueryAllUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/UserRedemptionRecordAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/UserRedemptionRecordAll", in, out, opts...) if err != nil { return nil, err } @@ -953,7 +1175,7 @@ func (c *queryClient) UserRedemptionRecordAll(ctx context.Context, in *QueryAllU func (c *queryClient) UserRedemptionRecordForUser(ctx context.Context, in *QueryAllUserRedemptionRecordForUserRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordForUserResponse, error) { out := new(QueryAllUserRedemptionRecordForUserResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/UserRedemptionRecordForUser", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/UserRedemptionRecordForUser", in, out, opts...) if err != nil { return nil, err } @@ -962,7 +1184,7 @@ func (c *queryClient) UserRedemptionRecordForUser(ctx context.Context, in *Query func (c *queryClient) EpochUnbondingRecord(ctx context.Context, in *QueryGetEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryGetEpochUnbondingRecordResponse, error) { out := new(QueryGetEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/EpochUnbondingRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/EpochUnbondingRecord", in, out, opts...) if err != nil { return nil, err } @@ -971,7 +1193,7 @@ func (c *queryClient) EpochUnbondingRecord(ctx context.Context, in *QueryGetEpoc func (c *queryClient) EpochUnbondingRecordAll(ctx context.Context, in *QueryAllEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryAllEpochUnbondingRecordResponse, error) { out := new(QueryAllEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/EpochUnbondingRecordAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/EpochUnbondingRecordAll", in, out, opts...) if err != nil { return nil, err } @@ -980,7 +1202,7 @@ func (c *queryClient) EpochUnbondingRecordAll(ctx context.Context, in *QueryAllE func (c *queryClient) DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) { out := new(QueryGetDepositRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/DepositRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/DepositRecord", in, out, opts...) if err != nil { return nil, err } @@ -989,7 +1211,25 @@ func (c *queryClient) DepositRecord(ctx context.Context, in *QueryGetDepositReco func (c *queryClient) DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) { out := new(QueryAllDepositRecordResponse) - err := c.cc.Invoke(ctx, "/Stridelabs.stride.records.Query/DepositRecordAll", in, out, opts...) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/DepositRecordAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) { + out := new(QueryLSMDepositResponse) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/LSMDeposit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) { + out := new(QueryLSMDepositsResponse) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/LSMDeposits", in, out, opts...) if err != nil { return nil, err } @@ -1014,6 +1254,13 @@ type QueryServer interface { DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) + // Queries the existing LSMTokenDeposits for one specific deposit + LSMDeposit(context.Context, *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) + // Queries the existing LSMTokenDeposits for all which match filters + // + // intended use: + // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z + LSMDeposits(context.Context, *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1044,6 +1291,12 @@ func (*UnimplementedQueryServer) DepositRecord(ctx context.Context, req *QueryGe func (*UnimplementedQueryServer) DepositRecordAll(ctx context.Context, req *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositRecordAll not implemented") } +func (*UnimplementedQueryServer) LSMDeposit(ctx context.Context, req *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LSMDeposit not implemented") +} +func (*UnimplementedQueryServer) LSMDeposits(ctx context.Context, req *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LSMDeposits not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1059,7 +1312,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/Params", + FullMethod: "/ununifi.records.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1077,7 +1330,7 @@ func _Query_UserRedemptionRecord_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/UserRedemptionRecord", + FullMethod: "/ununifi.records.Query/UserRedemptionRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UserRedemptionRecord(ctx, req.(*QueryGetUserRedemptionRecordRequest)) @@ -1095,7 +1348,7 @@ func _Query_UserRedemptionRecordAll_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/UserRedemptionRecordAll", + FullMethod: "/ununifi.records.Query/UserRedemptionRecordAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UserRedemptionRecordAll(ctx, req.(*QueryAllUserRedemptionRecordRequest)) @@ -1113,7 +1366,7 @@ func _Query_UserRedemptionRecordForUser_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/UserRedemptionRecordForUser", + FullMethod: "/ununifi.records.Query/UserRedemptionRecordForUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).UserRedemptionRecordForUser(ctx, req.(*QueryAllUserRedemptionRecordForUserRequest)) @@ -1131,7 +1384,7 @@ func _Query_EpochUnbondingRecord_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/EpochUnbondingRecord", + FullMethod: "/ununifi.records.Query/EpochUnbondingRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EpochUnbondingRecord(ctx, req.(*QueryGetEpochUnbondingRecordRequest)) @@ -1149,7 +1402,7 @@ func _Query_EpochUnbondingRecordAll_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/EpochUnbondingRecordAll", + FullMethod: "/ununifi.records.Query/EpochUnbondingRecordAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EpochUnbondingRecordAll(ctx, req.(*QueryAllEpochUnbondingRecordRequest)) @@ -1167,7 +1420,7 @@ func _Query_DepositRecord_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/DepositRecord", + FullMethod: "/ununifi.records.Query/DepositRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DepositRecord(ctx, req.(*QueryGetDepositRecordRequest)) @@ -1185,7 +1438,7 @@ func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Stridelabs.stride.records.Query/DepositRecordAll", + FullMethod: "/ununifi.records.Query/DepositRecordAll", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DepositRecordAll(ctx, req.(*QueryAllDepositRecordRequest)) @@ -1193,8 +1446,44 @@ func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_LSMDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLSMDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LSMDeposit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.records.Query/LSMDeposit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LSMDeposit(ctx, req.(*QueryLSMDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_LSMDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLSMDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).LSMDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.records.Query/LSMDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).LSMDeposits(ctx, req.(*QueryLSMDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "Stridelabs.stride.records.Query", + ServiceName: "ununifi.records.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1229,9 +1518,17 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DepositRecordAll", Handler: _Query_DepositRecordAll_Handler, }, + { + MethodName: "LSMDeposit", + Handler: _Query_LSMDeposit_Handler, + }, + { + MethodName: "LSMDeposits", + Handler: _Query_LSMDeposits_Handler, + }, }, Streams: []grpc.StreamDesc{}, - Metadata: "records/query.proto", + Metadata: "ununifi/records/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { @@ -1835,83 +2132,234 @@ func (m *QueryAllEpochUnbondingRecordResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryLSMDepositRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryLSMDepositRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryLSMDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryGetDepositRecordResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryLSMDepositResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.DepositRecord.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryAllDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryLSMDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllDepositRecordResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryLSMDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.DepositRecord) > 0 { - for _, e := range m.DepositRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryLSMDepositsRequest) 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 *QueryLSMDepositsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLSMDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Status) > 0 { + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLSMDepositsResponse) 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 *QueryLSMDepositsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLSMDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Deposits) > 0 { + for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetDepositRecordRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryGetDepositRecordResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DepositRecord.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllDepositRecordRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllDepositRecordResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DepositRecord) > 0 { + for _, e := range m.DepositRecord { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) } } if m.Pagination != nil { @@ -2078,6 +2526,70 @@ func (m *QueryAllEpochUnbondingRecordResponse) Size() (n int) { return n } +func (m *QueryLSMDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLSMDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Deposit.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryLSMDepositsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Status) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLSMDepositsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Deposits) > 0 { + for _, e := range m.Deposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3612,6 +4124,433 @@ func (m *QueryAllEpochUnbondingRecordResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryLSMDepositRequest) 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 ErrIntOverflowQuery + } + 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: QueryLSMDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLSMDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLSMDepositResponse) 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 ErrIntOverflowQuery + } + 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: QueryLSMDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLSMDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLSMDepositsRequest) 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 ErrIntOverflowQuery + } + 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: QueryLSMDepositsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLSMDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLSMDepositsResponse) 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 ErrIntOverflowQuery + } + 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: QueryLSMDepositsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLSMDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deposits = append(m.Deposits, LSMTokenDeposit{}) + if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/submodules/records/types/query.pb.gw.go b/x/yieldaggregator/submodules/records/types/query.pb.gw.go index 79610d1a8..97ca98984 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.gw.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: records/query.proto +// source: ununifi/records/query.proto /* Package types is a reverse proxy. @@ -142,7 +142,7 @@ func local_request_Query_UserRedemptionRecordAll_0(ctx context.Context, marshale } var ( - filter_Query_UserRedemptionRecordForUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"chainId": 0, "day": 1, "address": 2, "limit": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} + filter_Query_UserRedemptionRecordForUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"chain_id": 0, "day": 1, "address": 2, "limit": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} ) func request_Query_UserRedemptionRecordForUser_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -156,15 +156,15 @@ func request_Query_UserRedemptionRecordForUser_0(ctx context.Context, marshaler _ = err ) - val, ok = pathParams["chainId"] + val, ok = pathParams["chain_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chainId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") } protoReq.ChainId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chainId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) } val, ok = pathParams["day"] @@ -223,15 +223,15 @@ func local_request_Query_UserRedemptionRecordForUser_0(ctx context.Context, mars _ = err ) - val, ok = pathParams["chainId"] + val, ok = pathParams["chain_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chainId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") } protoReq.ChainId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chainId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) } val, ok = pathParams["day"] @@ -290,15 +290,15 @@ func request_Query_EpochUnbondingRecord_0(ctx context.Context, marshaler runtime _ = err ) - val, ok = pathParams["epochNumber"] + val, ok = pathParams["epoch_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epochNumber") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") } protoReq.EpochNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epochNumber", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) } msg, err := client.EpochUnbondingRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -317,15 +317,15 @@ func local_request_Query_EpochUnbondingRecord_0(ctx context.Context, marshaler r _ = err ) - val, ok = pathParams["epochNumber"] + val, ok = pathParams["epoch_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epochNumber") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") } protoReq.EpochNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epochNumber", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) } msg, err := server.EpochUnbondingRecord(ctx, &protoReq) @@ -459,6 +459,118 @@ func local_request_Query_DepositRecordAll_0(ctx context.Context, marshaler runti } +func request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLSMDepositRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.LSMDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLSMDepositRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.LSMDeposit(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_LSMDeposits_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLSMDepositsRequest + 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_Query_LSMDeposits_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LSMDeposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLSMDepositsRequest + 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_Query_LSMDeposits_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LSMDeposits(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -649,6 +761,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_LSMDeposit_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_Query_LSMDeposit_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_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LSMDeposits_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_Query_LSMDeposits_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_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -850,25 +1008,69 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_LSMDeposit_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_Query_LSMDeposit_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_LSMDeposits_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_Query_LSMDeposits_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"StrideLabs", "stride", "records", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UserRedemptionRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "records", "user_redemption_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UserRedemptionRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "user_redemption_record"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UserRedemptionRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "user_redemption_record", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_UserRedemptionRecordForUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"ununifi", "records", "user_redemption_record_for_user", "chain_id", "day", "address", "limit"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UserRedemptionRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "user_redemption_record"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_EpochUnbondingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "records", "epoch_unbonding_record", "epoch_number"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_UserRedemptionRecordForUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"Stride-Labs", "stride", "records", "user_redemption_record_for_user", "chainId", "day", "address", "limit"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_EpochUnbondingRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "epoch_unbonding_record"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EpochUnbondingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "epoch_unbonding_record", "epochNumber"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DepositRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "records", "deposit_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EpochUnbondingRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "epoch_unbonding_record"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DepositRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "deposit_record"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DepositRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "deposit_record", "id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_LSMDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"ununifi", "stakeibc", "lsm_deposit", "chain_id", "denom"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DepositRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "deposit_record"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_LSMDeposits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "stakeibc", "lsm_deposits"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -887,4 +1089,8 @@ var ( forward_Query_DepositRecord_0 = runtime.ForwardResponseMessage forward_Query_DepositRecordAll_0 = runtime.ForwardResponseMessage + + forward_Query_LSMDeposit_0 = runtime.ForwardResponseMessage + + forward_Query_LSMDeposits_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/submodules/records/types/records.pb.go b/x/yieldaggregator/submodules/records/types/records.pb.go new file mode 100644 index 000000000..a4362f1bb --- /dev/null +++ b/x/yieldaggregator/submodules/records/types/records.pb.go @@ -0,0 +1,2463 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: ununifi/records/records.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type DepositRecord_Status int32 + +const ( + // in transfer queue to be sent to the delegation ICA + DepositRecord_TRANSFER_QUEUE_QUEUE DepositRecord_Status = 0 + // transfer in progress (IBC packet sent, ack not received) + DepositRecord_TRANSFER_QUEUE_QUEUE_IN_PROGRESS DepositRecord_Status = 2 + // in staking queue on delegation ICA + DepositRecord_DELEGATION_QUEUE DepositRecord_Status = 1 + // staking in progress (ICA packet sent, ack not received) + DepositRecord_DELEGATION_IN_PROGRESS DepositRecord_Status = 3 +) + +var DepositRecord_Status_name = map[int32]string{ + 0: "TRANSFER_QUEUE", + 2: "TRANSFER_IN_PROGRESS", + 1: "DELEGATION_QUEUE", + 3: "DELEGATION_IN_PROGRESS", +} + +var DepositRecord_Status_value = map[string]int32{ + "TRANSFER_QUEUE": 0, + "TRANSFER_IN_PROGRESS": 2, + "DELEGATION_QUEUE": 1, + "DELEGATION_IN_PROGRESS": 3, +} + +func (x DepositRecord_Status) String() string { + return proto.EnumName(DepositRecord_Status_name, int32(x)) +} + +func (DepositRecord_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{1, 0} +} + +type DepositRecord_Source int32 + +const ( + DepositRecord_UNUNIFI DepositRecord_Source = 0 + DepositRecord_WITHDRAWAL_ICA DepositRecord_Source = 1 +) + +var DepositRecord_Source_name = map[int32]string{ + 0: "UNUNIFI", + 1: "WITHDRAWAL_ICA", +} + +var DepositRecord_Source_value = map[string]int32{ + "UNUNIFI": 0, + "WITHDRAWAL_ICA": 1, +} + +func (x DepositRecord_Source) String() string { + return proto.EnumName(DepositRecord_Source_name, int32(x)) +} + +func (DepositRecord_Source) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{1, 1} +} + +type HostZoneUnbonding_Status int32 + +const ( + // tokens bonded on delegate account + HostZoneUnbonding_UNBONDING_QUEUE HostZoneUnbonding_Status = 0 + HostZoneUnbonding_UNBONDING_IN_PROGRESS HostZoneUnbonding_Status = 3 + // unbonding completed on delegate account + HostZoneUnbonding_EXIT_TRANSFER_QUEUE HostZoneUnbonding_Status = 1 + HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS HostZoneUnbonding_Status = 4 + // transfer success + HostZoneUnbonding_CLAIMABLE HostZoneUnbonding_Status = 2 +) + +var HostZoneUnbonding_Status_name = map[int32]string{ + 0: "UNBONDING_QUEUE", + 3: "UNBONDING_IN_PROGRESS", + 1: "EXIT_TRANSFER_QUEUE", + 4: "EXIT_TRANSFER_IN_PROGRESS", + 2: "CLAIMABLE", +} + +var HostZoneUnbonding_Status_value = map[string]int32{ + "UNBONDING_QUEUE": 0, + "UNBONDING_IN_PROGRESS": 3, + "EXIT_TRANSFER_QUEUE": 1, + "EXIT_TRANSFER_IN_PROGRESS": 4, + "CLAIMABLE": 2, +} + +func (x HostZoneUnbonding_Status) String() string { + return proto.EnumName(HostZoneUnbonding_Status_name, int32(x)) +} + +func (HostZoneUnbonding_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{2, 0} +} + +type LSMTokenDeposit_Status int32 + +const ( + LSMTokenDeposit_DEPOSIT_PENDING LSMTokenDeposit_Status = 0 + LSMTokenDeposit_TRANSFER_QUEUE LSMTokenDeposit_Status = 1 + LSMTokenDeposit_TRANSFER_IN_PROGRESS LSMTokenDeposit_Status = 2 + LSMTokenDeposit_TRANSFER_FAILED LSMTokenDeposit_Status = 3 + LSMTokenDeposit_DETOKENIZATION_QUEUE LSMTokenDeposit_Status = 4 + LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS LSMTokenDeposit_Status = 5 + LSMTokenDeposit_DETOKENIZATION_FAILED LSMTokenDeposit_Status = 6 +) + +var LSMTokenDeposit_Status_name = map[int32]string{ + 0: "DEPOSIT_PENDING", + 1: "TRANSFER_QUEUE", + 2: "TRANSFER_IN_PROGRESS", + 3: "TRANSFER_FAILED", + 4: "DETOKENIZATION_QUEUE", + 5: "DETOKENIZATION_IN_PROGRESS", + 6: "DETOKENIZATION_FAILED", +} + +var LSMTokenDeposit_Status_value = map[string]int32{ + "DEPOSIT_PENDING": 0, + "TRANSFER_QUEUE": 1, + "TRANSFER_IN_PROGRESS": 2, + "TRANSFER_FAILED": 3, + "DETOKENIZATION_QUEUE": 4, + "DETOKENIZATION_IN_PROGRESS": 5, + "DETOKENIZATION_FAILED": 6, +} + +func (x LSMTokenDeposit_Status) String() string { + return proto.EnumName(LSMTokenDeposit_Status_name, int32(x)) +} + +func (LSMTokenDeposit_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{4, 0} +} + +type UserRedemptionRecord struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` + HostZoneId string `protobuf:"bytes,6,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` + EpochNumber uint64 `protobuf:"varint,7,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` + ClaimIsPending bool `protobuf:"varint,8,opt,name=claim_is_pending,json=claimIsPending,proto3" json:"claim_is_pending,omitempty"` +} + +func (m *UserRedemptionRecord) Reset() { *m = UserRedemptionRecord{} } +func (m *UserRedemptionRecord) String() string { return proto.CompactTextString(m) } +func (*UserRedemptionRecord) ProtoMessage() {} +func (*UserRedemptionRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{0} +} +func (m *UserRedemptionRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UserRedemptionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UserRedemptionRecord.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 *UserRedemptionRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserRedemptionRecord.Merge(m, src) +} +func (m *UserRedemptionRecord) XXX_Size() int { + return m.Size() +} +func (m *UserRedemptionRecord) XXX_DiscardUnknown() { + xxx_messageInfo_UserRedemptionRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_UserRedemptionRecord proto.InternalMessageInfo + +func (m *UserRedemptionRecord) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *UserRedemptionRecord) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *UserRedemptionRecord) GetReceiver() string { + if m != nil { + return m.Receiver + } + return "" +} + +func (m *UserRedemptionRecord) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *UserRedemptionRecord) GetHostZoneId() string { + if m != nil { + return m.HostZoneId + } + return "" +} + +func (m *UserRedemptionRecord) GetEpochNumber() uint64 { + if m != nil { + return m.EpochNumber + } + return 0 +} + +func (m *UserRedemptionRecord) GetClaimIsPending() bool { + if m != nil { + return m.ClaimIsPending + } + return false +} + +type DepositRecord struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` + Status DepositRecord_Status `protobuf:"varint,6,opt,name=status,proto3,enum=ununifi.records.DepositRecord_Status" json:"status,omitempty"` + DepositEpochNumber uint64 `protobuf:"varint,7,opt,name=deposit_epoch_number,json=depositEpochNumber,proto3" json:"deposit_epoch_number,omitempty"` + Source DepositRecord_Source `protobuf:"varint,8,opt,name=source,proto3,enum=ununifi.records.DepositRecord_Source" json:"source,omitempty"` +} + +func (m *DepositRecord) Reset() { *m = DepositRecord{} } +func (m *DepositRecord) String() string { return proto.CompactTextString(m) } +func (*DepositRecord) ProtoMessage() {} +func (*DepositRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{1} +} +func (m *DepositRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DepositRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DepositRecord.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 *DepositRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositRecord.Merge(m, src) +} +func (m *DepositRecord) XXX_Size() int { + return m.Size() +} +func (m *DepositRecord) XXX_DiscardUnknown() { + xxx_messageInfo_DepositRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_DepositRecord proto.InternalMessageInfo + +func (m *DepositRecord) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *DepositRecord) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *DepositRecord) GetHostZoneId() string { + if m != nil { + return m.HostZoneId + } + return "" +} + +func (m *DepositRecord) GetStatus() DepositRecord_Status { + if m != nil { + return m.Status + } + return DepositRecord_TRANSFER_QUEUE_QUEUE +} + +func (m *DepositRecord) GetDepositEpochNumber() uint64 { + if m != nil { + return m.DepositEpochNumber + } + return 0 +} + +func (m *DepositRecord) GetSource() DepositRecord_Source { + if m != nil { + return m.Source + } + return DepositRecord_UNUNIFI +} + +type HostZoneUnbonding struct { + StTokenAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=st_token_amount,json=stTokenAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"st_token_amount"` + NativeTokenAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=native_token_amount,json=nativeTokenAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"native_token_amount"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` + UnbondingTime uint64 `protobuf:"varint,5,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` + Status HostZoneUnbonding_Status `protobuf:"varint,6,opt,name=status,proto3,enum=ununifi.records.HostZoneUnbonding_Status" json:"status,omitempty"` + UserRedemptionRecords []string `protobuf:"bytes,7,rep,name=user_redemption_records,json=userRedemptionRecords,proto3" json:"user_redemption_records,omitempty"` +} + +func (m *HostZoneUnbonding) Reset() { *m = HostZoneUnbonding{} } +func (m *HostZoneUnbonding) String() string { return proto.CompactTextString(m) } +func (*HostZoneUnbonding) ProtoMessage() {} +func (*HostZoneUnbonding) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{2} +} +func (m *HostZoneUnbonding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HostZoneUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HostZoneUnbonding.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 *HostZoneUnbonding) XXX_Merge(src proto.Message) { + xxx_messageInfo_HostZoneUnbonding.Merge(m, src) +} +func (m *HostZoneUnbonding) XXX_Size() int { + return m.Size() +} +func (m *HostZoneUnbonding) XXX_DiscardUnknown() { + xxx_messageInfo_HostZoneUnbonding.DiscardUnknown(m) +} + +var xxx_messageInfo_HostZoneUnbonding proto.InternalMessageInfo + +func (m *HostZoneUnbonding) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *HostZoneUnbonding) GetHostZoneId() string { + if m != nil { + return m.HostZoneId + } + return "" +} + +func (m *HostZoneUnbonding) GetUnbondingTime() uint64 { + if m != nil { + return m.UnbondingTime + } + return 0 +} + +func (m *HostZoneUnbonding) GetStatus() HostZoneUnbonding_Status { + if m != nil { + return m.Status + } + return HostZoneUnbonding_UNBONDING_QUEUE +} + +func (m *HostZoneUnbonding) GetUserRedemptionRecords() []string { + if m != nil { + return m.UserRedemptionRecords + } + return nil +} + +type EpochUnbondingRecord struct { + EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` + HostZoneUnbondings []*HostZoneUnbonding `protobuf:"bytes,3,rep,name=host_zone_unbondings,json=hostZoneUnbondings,proto3" json:"host_zone_unbondings,omitempty"` +} + +func (m *EpochUnbondingRecord) Reset() { *m = EpochUnbondingRecord{} } +func (m *EpochUnbondingRecord) String() string { return proto.CompactTextString(m) } +func (*EpochUnbondingRecord) ProtoMessage() {} +func (*EpochUnbondingRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{3} +} +func (m *EpochUnbondingRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EpochUnbondingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EpochUnbondingRecord.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 *EpochUnbondingRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_EpochUnbondingRecord.Merge(m, src) +} +func (m *EpochUnbondingRecord) XXX_Size() int { + return m.Size() +} +func (m *EpochUnbondingRecord) XXX_DiscardUnknown() { + xxx_messageInfo_EpochUnbondingRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_EpochUnbondingRecord proto.InternalMessageInfo + +func (m *EpochUnbondingRecord) GetEpochNumber() uint64 { + if m != nil { + return m.EpochNumber + } + return 0 +} + +func (m *EpochUnbondingRecord) GetHostZoneUnbondings() []*HostZoneUnbonding { + if m != nil { + return m.HostZoneUnbondings + } + return nil +} + +type LSMTokenDeposit struct { + DepositId string `protobuf:"bytes,1,opt,name=deposit_id,json=depositId,proto3" json:"deposit_id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + IbcDenom string `protobuf:"bytes,4,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` + StakerAddress string `protobuf:"bytes,5,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` + StToken types.Coin `protobuf:"bytes,8,opt,name=st_token,json=stToken,proto3" json:"st_token"` + Status LSMTokenDeposit_Status `protobuf:"varint,9,opt,name=status,proto3,enum=ununifi.records.LSMTokenDeposit_Status" json:"status,omitempty"` +} + +func (m *LSMTokenDeposit) Reset() { *m = LSMTokenDeposit{} } +func (m *LSMTokenDeposit) String() string { return proto.CompactTextString(m) } +func (*LSMTokenDeposit) ProtoMessage() {} +func (*LSMTokenDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{4} +} +func (m *LSMTokenDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LSMTokenDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LSMTokenDeposit.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 *LSMTokenDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_LSMTokenDeposit.Merge(m, src) +} +func (m *LSMTokenDeposit) XXX_Size() int { + return m.Size() +} +func (m *LSMTokenDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_LSMTokenDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_LSMTokenDeposit proto.InternalMessageInfo + +func (m *LSMTokenDeposit) GetDepositId() string { + if m != nil { + return m.DepositId + } + return "" +} + +func (m *LSMTokenDeposit) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *LSMTokenDeposit) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *LSMTokenDeposit) GetIbcDenom() string { + if m != nil { + return m.IbcDenom + } + return "" +} + +func (m *LSMTokenDeposit) GetStakerAddress() string { + if m != nil { + return m.StakerAddress + } + return "" +} + +func (m *LSMTokenDeposit) GetValidatorAddress() string { + if m != nil { + return m.ValidatorAddress + } + return "" +} + +func (m *LSMTokenDeposit) GetStToken() types.Coin { + if m != nil { + return m.StToken + } + return types.Coin{} +} + +func (m *LSMTokenDeposit) GetStatus() LSMTokenDeposit_Status { + if m != nil { + return m.Status + } + return LSMTokenDeposit_DEPOSIT_PENDING +} + +func init() { + proto.RegisterEnum("ununifi.records.DepositRecord_Status", DepositRecord_Status_name, DepositRecord_Status_value) + proto.RegisterEnum("ununifi.records.DepositRecord_Source", DepositRecord_Source_name, DepositRecord_Source_value) + proto.RegisterEnum("ununifi.records.HostZoneUnbonding_Status", HostZoneUnbonding_Status_name, HostZoneUnbonding_Status_value) + proto.RegisterEnum("ununifi.records.LSMTokenDeposit_Status", LSMTokenDeposit_Status_name, LSMTokenDeposit_Status_value) + proto.RegisterType((*UserRedemptionRecord)(nil), "ununifi.records.UserRedemptionRecord") + proto.RegisterType((*DepositRecord)(nil), "ununifi.records.DepositRecord") + proto.RegisterType((*HostZoneUnbonding)(nil), "ununifi.records.HostZoneUnbonding") + proto.RegisterType((*EpochUnbondingRecord)(nil), "ununifi.records.EpochUnbondingRecord") + proto.RegisterType((*LSMTokenDeposit)(nil), "ununifi.records.LSMTokenDeposit") +} + +func init() { proto.RegisterFile("ununifi/records/records.proto", fileDescriptor_053f6b4b66254fb3) } + +var fileDescriptor_053f6b4b66254fb3 = []byte{ + // 1016 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6e, 0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, 0x66, 0xee, 0xdb, 0xa9, 0x68, 0x23, 0x49, 0x35, 0x9f, 0xff, 0xb6, 0x82, 0xda, 0x85, + 0x6a, 0x74, 0x7d, 0x79, 0x27, 0x24, 0x13, 0x2c, 0x06, 0x50, 0xb6, 0xd7, 0x32, 0xb4, 0x4f, 0x26, + 0x18, 0x19, 0x0b, 0xba, 0x7b, 0xb8, 0x24, 0x83, 0xa5, 0x52, 0x2e, 0x6a, 0xef, 0x23, 0xb8, 0x1f, + 0x71, 0x1c, 0x38, 0x41, 0x66, 0x43, 0x4e, 0x1a, 0xab, 0x96, 0x1a, 0x85, 0x56, 0xc5, 0xbe, 0x1b, + 0xbd, 0xc6, 0xa4, 0x78, 0xf3, 0xfb, 0x4c, 0x42, 0x9b, 0xb0, 0x3e, 0xe8, 0xee, 0x1f, 0x77, 0xdb, + 0x56, 0xf7, 0x28, 0xd3, 0xd0, 0x16, 0xdc, 0x9d, 0x81, 0x37, 0x24, 0x81, 0xee, 0xc3, 0xa6, 0xf9, + 0xa5, 0xd5, 0x77, 0x16, 0x74, 0x27, 0xa1, 0x1d, 0xd8, 0xba, 0x49, 0xcc, 0xc7, 0xc9, 0x68, 0x0d, + 0x2a, 0x07, 0x1d, 0xc3, 0x7a, 0x6a, 0xec, 0x77, 0x4c, 0x25, 0xdf, 0xfc, 0x51, 0x82, 0x9a, 0x18, + 0x89, 0xec, 0x6a, 0xa9, 0x39, 0x2c, 0x7a, 0x8f, 0xb4, 0xec, 0x3d, 0x7d, 0xa8, 0xcd, 0x1a, 0x90, + 0x95, 0x94, 0xab, 0x85, 0x46, 0xa1, 0xb5, 0xba, 0xd7, 0xfc, 0xe7, 0x2a, 0xda, 0x68, 0xbc, 0x08, + 0xf1, 0x27, 0x72, 0x39, 0xaf, 0x14, 0x9a, 0xbf, 0xca, 0xb0, 0xde, 0xe9, 0x3d, 0x15, 0x2a, 0x48, + 0x87, 0x10, 0xed, 0x00, 0x5c, 0x0f, 0x78, 0x66, 0xed, 0x95,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0x7c, 0x9a, 0xb4, 0xb8, 0xff, 0xd5, 0x8b, 0xcb, 0xba, 0xf4, 0xf2, 0xb2, 0x2e, 0xfd, 0x71, + 0x59, 0x97, 0x7e, 0xb8, 0xaa, 0xe7, 0x5e, 0x5e, 0xd5, 0x73, 0xbf, 0x5d, 0xd5, 0x73, 0xa7, 0x07, + 0x73, 0xe5, 0x1f, 0xd0, 0x01, 0x25, 0x87, 0x44, 0x17, 0xca, 0xd1, 0xbf, 0xd5, 0x9f, 0x13, 0x7c, + 0xee, 0xbb, 0xa3, 0x51, 0x80, 0x47, 0x71, 0x27, 0x75, 0x1e, 0x0d, 0x27, 0xcc, 0x8f, 0xce, 0x71, + 0xf6, 0x3d, 0x93, 0xf4, 0x67, 0x58, 0x14, 0xdf, 0x23, 0x1f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, + 0x52, 0xa3, 0x8d, 0x22, 0xf7, 0x08, 0x00, 0x00, +} + +func (m *UserRedemptionRecord) 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 *UserRedemptionRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UserRedemptionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ClaimIsPending { + i-- + if m.ClaimIsPending { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.EpochNumber != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.EpochNumber)) + i-- + dAtA[i] = 0x38 + } + if len(m.HostZoneId) > 0 { + i -= len(m.HostZoneId) + copy(dAtA[i:], m.HostZoneId) + i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) + i-- + dAtA[i] = 0x32 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x2a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Receiver) > 0 { + i -= len(m.Receiver) + copy(dAtA[i:], m.Receiver) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Receiver))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DepositRecord) 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 *DepositRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DepositRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Source != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.Source)) + i-- + dAtA[i] = 0x40 + } + if m.DepositEpochNumber != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.DepositEpochNumber)) + i-- + dAtA[i] = 0x38 + } + if m.Status != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + if len(m.HostZoneId) > 0 { + i -= len(m.HostZoneId) + copy(dAtA[i:], m.HostZoneId) + i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) + i-- + dAtA[i] = 0x22 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Id != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *HostZoneUnbonding) 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 *HostZoneUnbonding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostZoneUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UserRedemptionRecords) > 0 { + for iNdEx := len(m.UserRedemptionRecords) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UserRedemptionRecords[iNdEx]) + copy(dAtA[i:], m.UserRedemptionRecords[iNdEx]) + i = encodeVarintRecords(dAtA, i, uint64(len(m.UserRedemptionRecords[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if m.Status != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + if m.UnbondingTime != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.UnbondingTime)) + i-- + dAtA[i] = 0x28 + } + if len(m.HostZoneId) > 0 { + i -= len(m.HostZoneId) + copy(dAtA[i:], m.HostZoneId) + i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) + i-- + dAtA[i] = 0x22 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + { + size := m.NativeTokenAmount.Size() + i -= size + if _, err := m.NativeTokenAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.StTokenAmount.Size() + i -= size + if _, err := m.StTokenAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EpochUnbondingRecord) 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 *EpochUnbondingRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EpochUnbondingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.HostZoneUnbondings) > 0 { + for iNdEx := len(m.HostZoneUnbondings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HostZoneUnbondings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.EpochNumber != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.EpochNumber)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *LSMTokenDeposit) 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 *LSMTokenDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LSMTokenDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x48 + } + { + size, err := m.StToken.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if len(m.ValidatorAddress) > 0 { + i -= len(m.ValidatorAddress) + copy(dAtA[i:], m.ValidatorAddress) + i = encodeVarintRecords(dAtA, i, uint64(len(m.ValidatorAddress))) + i-- + dAtA[i] = 0x32 + } + if len(m.StakerAddress) > 0 { + i -= len(m.StakerAddress) + copy(dAtA[i:], m.StakerAddress) + i = encodeVarintRecords(dAtA, i, uint64(len(m.StakerAddress))) + i-- + dAtA[i] = 0x2a + } + if len(m.IbcDenom) > 0 { + i -= len(m.IbcDenom) + copy(dAtA[i:], m.IbcDenom) + i = encodeVarintRecords(dAtA, i, uint64(len(m.IbcDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintRecords(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(m.DepositId) > 0 { + i -= len(m.DepositId) + copy(dAtA[i:], m.DepositId) + i = encodeVarintRecords(dAtA, i, uint64(len(m.DepositId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRecords(dAtA []byte, offset int, v uint64) int { + offset -= sovRecords(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UserRedemptionRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.Receiver) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovRecords(uint64(l)) + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.HostZoneId) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + if m.EpochNumber != 0 { + n += 1 + sovRecords(uint64(m.EpochNumber)) + } + if m.ClaimIsPending { + n += 2 + } + return n +} + +func (m *DepositRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovRecords(uint64(m.Id)) + } + l = m.Amount.Size() + n += 1 + l + sovRecords(uint64(l)) + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.HostZoneId) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovRecords(uint64(m.Status)) + } + if m.DepositEpochNumber != 0 { + n += 1 + sovRecords(uint64(m.DepositEpochNumber)) + } + if m.Source != 0 { + n += 1 + sovRecords(uint64(m.Source)) + } + return n +} + +func (m *HostZoneUnbonding) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.StTokenAmount.Size() + n += 1 + l + sovRecords(uint64(l)) + l = m.NativeTokenAmount.Size() + n += 1 + l + sovRecords(uint64(l)) + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.HostZoneId) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + if m.UnbondingTime != 0 { + n += 1 + sovRecords(uint64(m.UnbondingTime)) + } + if m.Status != 0 { + n += 1 + sovRecords(uint64(m.Status)) + } + if len(m.UserRedemptionRecords) > 0 { + for _, s := range m.UserRedemptionRecords { + l = len(s) + n += 1 + l + sovRecords(uint64(l)) + } + } + return n +} + +func (m *EpochUnbondingRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochNumber != 0 { + n += 1 + sovRecords(uint64(m.EpochNumber)) + } + if len(m.HostZoneUnbondings) > 0 { + for _, e := range m.HostZoneUnbondings { + l = e.Size() + n += 1 + l + sovRecords(uint64(l)) + } + } + return n +} + +func (m *LSMTokenDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DepositId) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.IbcDenom) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.StakerAddress) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = len(m.ValidatorAddress) + if l > 0 { + n += 1 + l + sovRecords(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovRecords(uint64(l)) + l = m.StToken.Size() + n += 1 + l + sovRecords(uint64(l)) + if m.Status != 0 { + n += 1 + sovRecords(uint64(m.Status)) + } + return n +} + +func sovRecords(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRecords(x uint64) (n int) { + return sovRecords(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UserRedemptionRecord) 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 ErrIntOverflowRecords + } + 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: UserRedemptionRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserRedemptionRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receiver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostZoneId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + } + m.EpochNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ClaimIsPending = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DepositRecord) 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 ErrIntOverflowRecords + } + 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: DepositRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DepositRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostZoneId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= DepositRecord_Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositEpochNumber", wireType) + } + m.DepositEpochNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DepositEpochNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + m.Source = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Source |= DepositRecord_Source(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostZoneUnbonding) 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 ErrIntOverflowRecords + } + 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: HostZoneUnbonding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostZoneUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NativeTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostZoneId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + } + m.UnbondingTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= HostZoneUnbonding_Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecords", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserRedemptionRecords = append(m.UserRedemptionRecords, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EpochUnbondingRecord) 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 ErrIntOverflowRecords + } + 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: EpochUnbondingRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EpochUnbondingRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + } + m.EpochNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostZoneUnbondings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecords + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HostZoneUnbondings = append(m.HostZoneUnbondings, &HostZoneUnbonding{}) + if err := m.HostZoneUnbondings[len(m.HostZoneUnbondings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LSMTokenDeposit) 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 ErrIntOverflowRecords + } + 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: LSMTokenDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LSMTokenDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DepositId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRecords + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= LSMTokenDeposit_Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRecords(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecords + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecords + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecords + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRecords + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRecords + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRecords + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRecords = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRecords = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRecords = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go b/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go index a752b4b33..0b30b3fbb 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "strconv" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" @@ -22,10 +21,10 @@ func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64 k.Logger(ctx).Info(fmt.Sprintf("createDepositRecords, index: %d, zoneInfo: %s", index, zoneInfo.ConnectionId)) depositRecord := recordstypes.DepositRecord{ Id: 0, - Amount: 0, + Amount: sdk.ZeroInt(), Denom: zoneInfo.HostDenom, HostZoneId: zoneInfo.ChainId, - Status: recordstypes.DepositRecord_TRANSFER, + Status: recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE, DepositEpochNumber: epochNumber, } k.RecordsKeeper.AppendDepositRecord(ctx, depositRecord) @@ -36,7 +35,7 @@ func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64 func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord) { transferDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - isTransferRecord := record.Status == recordstypes.DepositRecord_TRANSFER + isTransferRecord := record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE isBeforeCurrentEpoch := record.DepositEpochNumber < epochNumber return isTransferRecord && isBeforeCurrentEpoch }) @@ -48,7 +47,7 @@ func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber k.Logger(ctx).Info(pstr) // if a TRANSFER record has 0 balance and was created in the previous epoch, it's safe to remove since it will never be updated or used" - if depositRecord.Amount <= 0 { + if depositRecord.Amount.LTE(sdk.ZeroInt()) { k.Logger(ctx).Info("[TransferExistingDepositsToHostZones] Empty deposit record (ID: %s)! Removing.", depositRecord.Id) k.RecordsKeeper.RemoveDepositRecord(ctx, depositRecord.Id) continue @@ -68,7 +67,7 @@ func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber } delegateAddress := delegateAccount.GetAddress() - transferCoin := sdk.NewCoin(hostZone.GetIBCDenom(), sdk.NewInt(depositRecord.Amount)) + transferCoin := sdk.NewCoin(hostZone.GetIBCDenom(), depositRecord.Amount) // timeout 30 min in the future // NOTE: this assumes no clock drift between chains, which tendermint guarantees // if we onboard non-tendermint chains, we need to use the time on the host chain to @@ -90,7 +89,7 @@ func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord) { stakeDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - isStakeRecord := record.Status == recordstypes.DepositRecord_STAKE + isStakeRecord := record.Status == recordstypes.DepositRecord_DELEGATION_QUEUE isBeforeCurrentEpoch := record.DepositEpochNumber < epochNumber return isStakeRecord && isBeforeCurrentEpoch }) @@ -116,7 +115,7 @@ func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber ui } k.Logger(ctx).Info(fmt.Sprintf("\t[StakeExistingDepositsOnHostZones] Staking %d on %s", depositRecord.Amount, hostZone.HostDenom)) - stakeAmount := sdk.NewCoin(hostZone.HostDenom, sdk.NewInt(depositRecord.Amount)) + stakeAmount := sdk.NewCoin(hostZone.HostDenom, depositRecord.Amount) err := k.DelegateOnHost(ctx, hostZone, stakeAmount, depositRecord.Id) if err != nil { @@ -130,7 +129,7 @@ func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber ui sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute("hostZone", hostZone.ChainId), - sdk.NewAttribute("newAmountStaked", strconv.FormatInt(depositRecord.Amount, 10)), + sdk.NewAttribute("newAmountStaked", depositRecord.Amount.String()), ), ) } diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go b/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go index 3f71f5e54..1c7b87d00 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go @@ -246,7 +246,7 @@ func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordst // calc redemptionRate = (UB+SB+MA)/stSupply k.Logger(ctx).Info(fmt.Sprintf("[REDEMPTION-RATE] undelegatedBalance: %d, stakedBalance: %d, moduleAcctBalance: %d, stSupply: %d", undelegatedBalance, stakedBalance, moduleAcctBalance, stSupply)) - redemptionRate := (sdk.NewDec(undelegatedBalance).Add(sdk.NewDec(stakedBalance)).Add(sdk.NewDec(moduleAcctBalance))).Quo(sdk.NewDec(stSupply)) + redemptionRate := (sdk.NewDecFromInt(undelegatedBalance).Add(sdk.NewDec(stakedBalance)).Add(sdk.NewDecFromInt(moduleAcctBalance))).Quo(sdk.NewDec(stSupply)) k.Logger(ctx).Info(fmt.Sprintf("[REDEMPTION-RATE] New Rate is %d (vs prev %d)", redemptionRate, zoneInfo.LastRedemptionRate)) // set redemptionRate attribute for the hostZone (and update last RedemptionRate) @@ -260,31 +260,31 @@ func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordst k.IterateHostZones(ctx, UpdateRedemptionRate) } -func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error) { +func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (sdk.Int, error) { // filter to only the deposit records for the host zone with status STAKE UndelegatedDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - return record.Status == recordstypes.DepositRecord_STAKE && record.HostZoneId == hostZone.ChainId + return record.Status == recordstypes.DepositRecord_DELEGATION_QUEUE && record.HostZoneId == hostZone.ChainId }) // sum the amounts of the deposit records - var totalAmount int64 + totalAmount := sdk.ZeroInt() for _, depositRecord := range UndelegatedDepositRecords { - totalAmount += depositRecord.Amount + totalAmount = totalAmount.Add(depositRecord.Amount) } return totalAmount, nil } -func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error) { +func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (sdk.Int, error) { // filter to only the deposit records for the host zone with status DELEGATION ModuleAccountRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - return record.Status == recordstypes.DepositRecord_TRANSFER && record.HostZoneId == hostZone.ChainId + return record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE && record.HostZoneId == hostZone.ChainId }) // sum the amounts of the deposit records - totalAmount := int64(0) + totalAmount := sdk.ZeroInt() for _, depositRecord := range ModuleAccountRecords { - totalAmount += depositRecord.Amount + totalAmount = totalAmount.Add(depositRecord.Amount) } return totalAmount, nil diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_claim.go b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_claim.go index 9227ea3e4..04cc77314 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_claim.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_claim.go @@ -89,7 +89,7 @@ func (k Keeper) DecrementHostZoneUnbonding(ctx sdk.Context, userRedemptionRecord return sdkerrors.Wrapf(types.ErrRecordNotFound, "host zone unbonding not found %s", callbackArgs.ChainId) } // decrement the hzu by the amount claimed - hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount - userRedemptionRecord.Amount + hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount.Sub(userRedemptionRecord.Amount) // save the updated hzu on the epoch unbonding record epochUnbondingRecord, success := k.RecordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, callbackArgs.EpochNumber, callbackArgs.ChainId, hostZoneUnbonding) if !success { diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_redemption.go b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_redemption.go index a6b7c7cf4..ce92a063c 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_redemption.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_redemption.go @@ -80,7 +80,7 @@ func RedemptionCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, a k.Logger(ctx).Error(fmt.Sprintf("Could not find host zone unbonding %d for host zone %s", epochUnbondingRecord.EpochNumber, hostZoneId)) return sdkerrors.Wrapf(sdkerrors.ErrNotFound, "Could not find host zone unbonding %d for host zone %s", epochUnbondingRecord.EpochNumber, hostZoneId) } - hostZoneUnbonding.Status = recordstypes.HostZoneUnbonding_TRANSFERRED + hostZoneUnbonding.Status = recordstypes.HostZoneUnbonding_CLAIMABLE updatedEpochUnbondingRecord, success := k.RecordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, hostZoneId, hostZoneUnbonding) if !success { k.Logger(ctx).Error(fmt.Sprintf("Failed to set host zone epoch unbonding record: epochNumber %d, chainId %s, hostZoneUnbonding %v", epochUnbondingRecord.EpochNumber, hostZoneId, hostZoneUnbonding)) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_reinvest.go b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_reinvest.go index e667a94bc..969dfef7b 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_reinvest.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_reinvest.go @@ -70,10 +70,10 @@ func ReinvestCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack epochNumber := strideEpochTracker.EpochNumber // create a new record so that rewards are reinvested record := recordstypes.DepositRecord{ - Amount: amount.Int64(), + Amount: amount, Denom: denom, HostZoneId: reinvestCallback.HostZoneId, - Status: recordstypes.DepositRecord_STAKE, + Status: recordstypes.DepositRecord_DELEGATION_QUEUE, Source: recordstypes.DepositRecord_WITHDRAWAL_ICA, DepositEpochNumber: epochNumber, } diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_undelegate.go b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_undelegate.go index 20a6fb8b4..cc4f1d5a0 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_undelegate.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/icacallbacks_undelegate.go @@ -176,7 +176,7 @@ func (k Keeper) UpdateHostZoneUnbondings( stTokenBurnAmount += stTokenAmount // Update the bonded status and time - hostZoneUnbonding.Status = recordstypes.HostZoneUnbonding_UNBONDED + hostZoneUnbonding.Status = recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE hostZoneUnbonding.UnbondingTime = cast.ToUint64(latestCompletionTime.UnixNano()) updatedEpochUnbondingRecord, success := k.RecordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, zone.ChainId, hostZoneUnbonding) if !success { diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_claim_undelegated_tokens.go b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_claim_undelegated_tokens.go index 1a5497cad..49d0ed74b 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_claim_undelegated_tokens.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_claim_undelegated_tokens.go @@ -119,7 +119,7 @@ func (k Keeper) GetClaimableRedemptionRecord(ctx sdk.Context, msg *types.MsgClai return nil, sdkerrors.Wrapf(types.ErrInvalidUserRedemptionRecord, errMsg) } // records associated with host zone unbondings are claimable after the host zone unbonding tokens have been transferred to the redemption account - if hostZoneUnbonding.Status != recordstypes.HostZoneUnbonding_TRANSFERRED { + if hostZoneUnbonding.Status != recordstypes.HostZoneUnbonding_CLAIMABLE { errMsg := fmt.Sprintf("User redemption record %s is not claimable, host zone unbonding has status: %s, requires status TRANSFERRED", userRedemptionRecord.Id, hostZoneUnbonding.Status) k.Logger(ctx).Error(errMsg) return nil, sdkerrors.Wrapf(types.ErrInvalidUserRedemptionRecord, errMsg) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go index bcc580567..e9d0e3b24 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go @@ -149,7 +149,7 @@ func (k msgServer) RegisterHostZone(goCtx context.Context, msg *types.MsgRegiste StTokenAmount: 0, Denom: zone.HostDenom, HostZoneId: zone.ChainId, - Status: recordstypes.HostZoneUnbonding_BONDED, + Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, } updatedEpochUnbondingRecord, success := k.RecordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding) if !success { @@ -169,7 +169,7 @@ func (k msgServer) RegisterHostZone(goCtx context.Context, msg *types.MsgRegiste Amount: 0, Denom: zone.HostDenom, HostZoneId: zone.ChainId, - Status: recordstypes.DepositRecord_TRANSFER, + Status: recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE, DepositEpochNumber: strideEpochTracker.EpochNumber, } k.RecordsKeeper.AppendDepositRecord(ctx, depositRecord) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go b/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go index a47b9a024..2e40317ac 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go @@ -24,7 +24,7 @@ func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) StTokenAmount: uint64(0), Denom: hostZone.HostDenom, HostZoneId: hostZone.ChainId, - Status: recordstypes.HostZoneUnbonding_BONDED, + Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, } k.Logger(ctx).Info(fmt.Sprintf("Adding hostZoneUnbonding %v to %s", hostZoneUnbonding, hostZone.ChainId)) hostZoneUnbondings = append(hostZoneUnbondings, &hostZoneUnbonding) @@ -60,7 +60,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon continue } // mark the epoch unbonding record for processing if it's bonded and the host zone unbonding has an amount g.t. zero - if hostZoneRecord.Status == recordstypes.HostZoneUnbonding_BONDED && hostZoneRecord.NativeTokenAmount > 0 { + if hostZoneRecord.Status == recordstypes.HostZoneUnbonding_UNBONDING_QUEUE && hostZoneRecord.NativeTokenAmount > 0 { totalAmtToUnbond += hostZoneRecord.NativeTokenAmount epochUnbondingRecordIds = append(epochUnbondingRecordIds, epochUnbonding.EpochNumber) k.Logger(ctx).Info(fmt.Sprintf("[SendHostZoneUnbondings] Sending unbondings, host zone: %s, epochUnbonding: %v", hostZone.ChainId, epochUnbonding)) @@ -256,7 +256,7 @@ func (k Keeper) CleanupEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64 k.Logger(ctx).Info(fmt.Sprintf("processing hostZoneUnbonding %v", hostZoneUnbonding)) // if an EpochUnbondingRecord has any HostZoneUnbonding with non-zero balances, we don't delete the EpochUnbondingRecord // because it has outstanding tokens that need to be claimed - if hostZoneUnbonding.GetNativeTokenAmount() != 0 { + if hostZoneUnbonding.NativeTokenAmount != 0 { shouldDeleteEpochUnbondingRecord = false break } @@ -294,7 +294,7 @@ func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone type continue } - shouldProcess := hostZoneUnbonding.Status == recordstypes.HostZoneUnbonding_UNBONDED + shouldProcess := hostZoneUnbonding.Status == recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE k.Logger(ctx).Info(fmt.Sprintf("\tUnbonding time: %d blockTime %d, shouldProcess %v", hostZoneUnbonding.UnbondingTime, blockTime, shouldProcess)) // if the unbonding period has elapsed, then we can send the ICA call to sweep this hostZone's unbondings to the redemption account (in a batch) diff --git a/x/yieldaggregator/types/genesis.pb.go b/x/yieldaggregator/types/genesis.pb.go index c647f3a81..a74e4e265 100644 --- a/x/yieldaggregator/types/genesis.pb.go +++ b/x/yieldaggregator/types/genesis.pb.go @@ -27,8 +27,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // this line is used by starport scaffolding # genesis/proto/state - Vaults []Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults"` - Strategies []Strategy `protobuf:"bytes,3,rep,name=strategies,proto3" json:"strategies"` + Vaults []Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults"` + Strategies []Strategy `protobuf:"bytes,3,rep,name=strategies,proto3" json:"strategies"` + PendingDeposits []PendingDeposit `protobuf:"bytes,4,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -85,6 +86,13 @@ func (m *GenesisState) GetStrategies() []Strategy { return nil } +func (m *GenesisState) GetPendingDeposits() []PendingDeposit { + if m != nil { + return m.PendingDeposits + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "ununifi.yieldaggregator.GenesisState") } @@ -94,24 +102,27 @@ func init() { } var fileDescriptor_e9e31aa2ddc9ddbc = []byte{ - // 272 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0xcd, 0x2b, 0xcd, - 0xcb, 0x4c, 0xcb, 0xd4, 0xaf, 0xcc, 0x4c, 0xcd, 0x49, 0x49, 0x4c, 0x4f, 0x2f, 0x4a, 0x4d, 0x4f, - 0x2c, 0xc9, 0x2f, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x12, 0x87, 0x2a, 0xd3, 0x43, 0x53, 0x26, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, - 0xa3, 0x0f, 0x62, 0x41, 0x94, 0x4b, 0xa9, 0xe0, 0x32, 0xb5, 0x20, 0xb1, 0x28, 0x31, 0x17, 0x6a, - 0xa8, 0x94, 0x2e, 0x2e, 0x55, 0x68, 0x7c, 0x88, 0x72, 0xa5, 0x2b, 0x8c, 0x5c, 0x3c, 0xee, 0x10, - 0x57, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0xd9, 0x72, 0xb1, 0x41, 0xcc, 0x93, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x36, 0x92, 0xd7, 0xc3, 0xe1, 0x4a, 0xbd, 0x00, 0xb0, 0x32, 0x27, 0x96, 0x13, 0xf7, - 0xe4, 0x19, 0x82, 0xa0, 0x9a, 0x84, 0x6c, 0xb8, 0xd8, 0xca, 0x12, 0x4b, 0x73, 0x4a, 0x8a, 0x25, - 0x98, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0xe4, 0x70, 0x6a, 0x0f, 0x03, 0x29, 0x83, 0xe9, 0x86, 0xe8, - 0x11, 0x72, 0xe7, 0xe2, 0x2a, 0x2e, 0x29, 0x4a, 0x2c, 0x49, 0x4d, 0xcf, 0x4c, 0x2d, 0x96, 0x60, - 0x06, 0x9b, 0xa0, 0x88, 0xd3, 0x84, 0x60, 0x88, 0xd2, 0x4a, 0xa8, 0x21, 0x48, 0x5a, 0x9d, 0xbc, - 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, - 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20, 0x3d, 0xb3, 0x24, 0xa3, - 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x34, 0x2f, 0x34, 0x2f, 0xd3, 0x2d, 0x53, 0x3f, 0x39, - 0x23, 0x31, 0x33, 0x4f, 0xbf, 0x02, 0x23, 0xc8, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, - 0x21, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x56, 0x3b, 0xa9, 0xbe, 0xd6, 0x01, 0x00, 0x00, + // 308 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xf3, 0x30, + 0x18, 0x80, 0xdb, 0x6d, 0xec, 0x90, 0x7d, 0xf0, 0x49, 0x11, 0x2c, 0x3d, 0x64, 0x53, 0x14, 0x77, + 0xb1, 0x91, 0x79, 0xd5, 0xcb, 0x10, 0x07, 0x9e, 0xc4, 0x31, 0x11, 0x2f, 0x92, 0xad, 0x31, 0x7b, + 0x61, 0x4b, 0x42, 0x93, 0x8a, 0xfd, 0x17, 0xfe, 0x12, 0x7f, 0xc7, 0x8e, 0x3b, 0x7a, 0x12, 0x69, + 0xff, 0x88, 0xac, 0xa9, 0xa0, 0x93, 0xdc, 0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0xfb, 0xaf, 0x25, + 0xf6, 0xd6, 0x25, 0xf6, 0xde, 0x4b, 0xec, 0x3d, 0x9c, 0x72, 0x30, 0xf3, 0x6c, 0x1a, 0xcf, 0xe4, + 0x92, 0x4c, 0xc4, 0x44, 0xc0, 0x15, 0x90, 0xd9, 0x9c, 0x82, 0x20, 0x2f, 0x7f, 0x96, 0x61, 0x72, + 0xc5, 0xf4, 0xb4, 0x5d, 0xed, 0xe0, 0xec, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xa9, 0xe3, 0x30, + 0x30, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -134,6 +145,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PendingDeposits) > 0 { + for iNdEx := len(m.PendingDeposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.Strategies) > 0 { for iNdEx := len(m.Strategies) - 1; iNdEx >= 0; iNdEx-- { { @@ -206,6 +231,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.PendingDeposits) > 0 { + for _, e := range m.PendingDeposits { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -345,6 +376,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingDeposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingDeposits = append(m.PendingDeposits, PendingDeposit{}) + if err := m.PendingDeposits[len(m.PendingDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/yieldaggregator/types/keys.go b/x/yieldaggregator/types/keys.go index ce6a15a17..f0b876c69 100644 --- a/x/yieldaggregator/types/keys.go +++ b/x/yieldaggregator/types/keys.go @@ -25,13 +25,14 @@ var ( ) const ( - VaultKey = "Vault/value/" - VaultCountKey = "Vault/count/" - StrategyKey = "Strategy/value/" - StrategyCountKey = "Strategy/count/" - DenomInfoKey = "Denom/info/" - SymbolInfoKey = "Symbol/info/" - ChainReceiverKey = "ChainReceiver/info/" + VaultKey = "Vault/value/" + VaultCountKey = "Vault/count/" + StrategyKey = "Strategy/value/" + StrategyCountKey = "Strategy/count/" + DenomInfoKey = "Denom/info/" + SymbolInfoKey = "Symbol/info/" + ChainReceiverKey = "ChainReceiver/info/" + PendingDepositKey = "PendingDeposit/info" ) func KeyPrefixStrategy(vaultDenom string) []byte { diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index 5c0af0a40..a8e52d7f4 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -7,6 +7,7 @@ import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -377,6 +378,51 @@ func (m *SymbolInfo) GetChannels() []TransferChannel { return nil } +type PendingDeposit struct { + VaultId uint64 `protobuf:"varint,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"` +} + +func (m *PendingDeposit) Reset() { *m = PendingDeposit{} } +func (m *PendingDeposit) String() string { return proto.CompactTextString(m) } +func (*PendingDeposit) ProtoMessage() {} +func (*PendingDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{5} +} +func (m *PendingDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PendingDeposit.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 *PendingDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingDeposit.Merge(m, src) +} +func (m *PendingDeposit) XXX_Size() int { + return m.Size() +} +func (m *PendingDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_PendingDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingDeposit proto.InternalMessageInfo + +func (m *PendingDeposit) GetVaultId() uint64 { + if m != nil { + return m.VaultId + } + return 0 +} + type DenomInfo struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` @@ -387,7 +433,7 @@ func (m *DenomInfo) Reset() { *m = DenomInfo{} } func (m *DenomInfo) String() string { return proto.CompactTextString(m) } func (*DenomInfo) ProtoMessage() {} func (*DenomInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{5} + return fileDescriptor_7877bd9c4573997d, []int{6} } func (m *DenomInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -446,7 +492,7 @@ func (m *ChainAddress) Reset() { *m = ChainAddress{} } func (m *ChainAddress) String() string { return proto.CompactTextString(m) } func (*ChainAddress) ProtoMessage() {} func (*ChainAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{6} + return fileDescriptor_7877bd9c4573997d, []int{7} } func (m *ChainAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +543,7 @@ func (m *IntermediaryAccountInfo) Reset() { *m = IntermediaryAccountInfo func (m *IntermediaryAccountInfo) String() string { return proto.CompactTextString(m) } func (*IntermediaryAccountInfo) ProtoMessage() {} func (*IntermediaryAccountInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{7} + return fileDescriptor_7877bd9c4573997d, []int{8} } func (m *IntermediaryAccountInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -548,7 +594,7 @@ func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{8} + return fileDescriptor_7877bd9c4573997d, []int{9} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -625,7 +671,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{9} + return fileDescriptor_7877bd9c4573997d, []int{10} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -703,7 +749,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{10} + return fileDescriptor_7877bd9c4573997d, []int{11} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,6 +826,7 @@ func init() { proto.RegisterType((*Strategy)(nil), "ununifi.yieldaggregator.Strategy") proto.RegisterType((*TransferChannel)(nil), "ununifi.yieldaggregator.TransferChannel") proto.RegisterType((*SymbolInfo)(nil), "ununifi.yieldaggregator.SymbolInfo") + proto.RegisterType((*PendingDeposit)(nil), "ununifi.yieldaggregator.PendingDeposit") proto.RegisterType((*DenomInfo)(nil), "ununifi.yieldaggregator.DenomInfo") proto.RegisterType((*ChainAddress)(nil), "ununifi.yieldaggregator.ChainAddress") proto.RegisterType((*IntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.IntermediaryAccountInfo") @@ -793,62 +840,67 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 880 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0x13, 0x3b, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23, 0x4b, - 0x40, 0x38, 0xd4, 0xa6, 0xe5, 0x13, 0xb4, 0x89, 0x90, 0xb2, 0x70, 0x40, 0x2e, 0x05, 0x84, 0x90, - 0xac, 0x89, 0x3d, 0x71, 0x46, 0x6b, 0xcf, 0x44, 0x33, 0x93, 0x96, 0x7c, 0x00, 0xae, 0x08, 0x71, - 0xe2, 0x33, 0x70, 0xde, 0x1b, 0xe2, 0xbe, 0xc7, 0xd5, 0x5e, 0x40, 0x1c, 0x56, 0xa8, 0xfd, 0x22, - 0xc8, 0x33, 0xb6, 0x95, 0xb4, 0xc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, 0xae, 0x3a, 0xc6, - 0x7f, 0x57, 0x1d, 0xe3, 0xd7, 0xeb, 0xce, 0xc6, 0xab, 0xeb, 0xce, 0xc6, 0x3f, 0xd7, 0x9d, 0x8d, - 0x1f, 0x3e, 0x4b, 0x88, 0x9c, 0xcc, 0x46, 0x5e, 0xc4, 0x32, 0xff, 0x9c, 0x9e, 0x53, 0xf2, 0x05, - 0xf1, 0xd5, 0x5a, 0xfb, 0x3f, 0xdd, 0xfa, 0x07, 0x93, 0xf3, 0x29, 0x16, 0xa3, 0x86, 0xfa, 0x21, - 0xfa, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x56, 0x2c, 0xbf, 0xab, 0x09, 0x00, 0x00, + // 951 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x3f, 0x6f, 0x23, 0x45, + 0x14, 0xcf, 0x3a, 0xfe, 0x13, 0xbf, 0x5c, 0x92, 0xd3, 0x26, 0x77, 0xd9, 0x1c, 0xc2, 0x89, 0x56, + 0xe2, 0x08, 0x45, 0xd6, 0x24, 0x74, 0x34, 0x28, 0xb1, 0x85, 0xe4, 0x83, 0xe2, 0xb4, 0x21, 0x1c, + 0x42, 0x48, 0xab, 0xf1, 0xce, 0x78, 0x3d, 0xca, 0xee, 0x8c, 0x35, 0x33, 0x4e, 0x70, 0x0f, 0x2d, + 0x42, 0x54, 0x7c, 0x06, 0xea, 0xeb, 0x10, 0xfd, 0x95, 0xa7, 0x6b, 0x40, 0x14, 0x11, 0x4a, 0xbe, + 0x01, 0x9f, 0x00, 0xed, 0xcc, 0xec, 0xca, 0x4e, 0xe2, 0x2b, 0xa2, 0x70, 0x95, 0xf7, 0xcd, 0xbc, + 0x3f, 0xbf, 0x79, 0xef, 0xf7, 0x7e, 0x32, 0xec, 0x8d, 0xd9, 0x98, 0xd1, 0x01, 0x6d, 0x4f, 0x28, + 0x49, 0x31, 0x4a, 0x12, 0x41, 0x12, 0xa4, 0xb8, 0xb8, 0x6e, 0x07, 0x23, 0xc1, 0x15, 0x77, 0x37, + 0xad, 0x7b, 0x70, 0xed, 0xfa, 0xc9, 0x46, 0xc2, 0x13, 0xae, 0x7d, 0xda, 0xf9, 0x97, 0x71, 0x7f, + 0xb2, 0x15, 0x73, 0x99, 0x71, 0x19, 0x99, 0x0b, 0x63, 0xd8, 0xab, 0x96, 0xb1, 0xda, 0x7d, 0x24, + 0x49, 0xfb, 0x6c, 0xbf, 0x4f, 0x14, 0xda, 0x6f, 0xc7, 0x9c, 0x32, 0x73, 0xef, 0xff, 0xe2, 0xc0, + 0xea, 0xb1, 0x12, 0x48, 0x91, 0x64, 0xf2, 0x82, 0xd0, 0x64, 0xa8, 0xdc, 0x0d, 0xa8, 0x61, 0xc2, + 0x78, 0xe6, 0x39, 0x3b, 0xce, 0x6e, 0x33, 0x34, 0x86, 0xbb, 0x0d, 0xcb, 0xd2, 0xfa, 0x45, 0x14, + 0x7b, 0x95, 0x1d, 0x67, 0xb7, 0x1a, 0x42, 0x71, 0xd4, 0xc3, 0x6e, 0x0f, 0xea, 0xe7, 0x3a, 0x81, + 0xb7, 0x98, 0xc7, 0x1d, 0xed, 0xbf, 0xba, 0xd8, 0x5e, 0xf8, 0xfb, 0x62, 0xfb, 0x3d, 0x83, 0x40, + 0xe2, 0xd3, 0x80, 0xf2, 0x76, 0x86, 0xd4, 0x30, 0xf8, 0x92, 0x24, 0x28, 0x9e, 0x74, 0x49, 0xfc, + 0xe6, 0xe5, 0x1e, 0x58, 0xb8, 0x5d, 0x12, 0x87, 0x36, 0x81, 0xff, 0x47, 0x15, 0x6a, 0x5f, 0xa3, + 0x71, 0xaa, 0xdc, 0x55, 0xa8, 0x50, 0xac, 0x81, 0x54, 0xc3, 0x0a, 0xc5, 0xee, 0x63, 0xa8, 0xcb, + 0x49, 0xd6, 0xe7, 0xa9, 0x06, 0xd0, 0x0c, 0xad, 0xe5, 0xba, 0x50, 0x65, 0x28, 0x23, 0xa6, 0x74, + 0xa8, 0xbf, 0xdd, 0x1d, 0x58, 0xc6, 0x44, 0xc6, 0x82, 0x8e, 0x14, 0xe5, 0xcc, 0xab, 0xea, 0xab, + 0xe9, 0x23, 0x37, 0x80, 0x1a, 0x3f, 0x67, 0x44, 0x78, 0x35, 0x8d, 0xd8, 0x7b, 0xf3, 0x72, 0x6f, + 0xc3, 0xc2, 0x39, 0xc4, 0x58, 0x10, 0x29, 0x8f, 0x95, 0xa0, 0x2c, 0x09, 0x8d, 0x9b, 0xdb, 0x85, + 0x15, 0xfd, 0x11, 0x61, 0x32, 0xe2, 0x92, 0x2a, 0xaf, 0xbe, 0xe3, 0xec, 0x2e, 0x1f, 0x6c, 0x05, + 0x36, 0x28, 0x6f, 0x72, 0x60, 0x9b, 0x1c, 0x74, 0x38, 0x65, 0x47, 0xd5, 0xbc, 0x09, 0xe1, 0x03, + 0x1d, 0xd5, 0x35, 0x41, 0xee, 0x29, 0x78, 0xe7, 0x54, 0x0d, 0xb1, 0x40, 0xe7, 0x51, 0xcc, 0xb3, + 0x8c, 0x4a, 0x49, 0x39, 0x8b, 0xf2, 0x46, 0x7a, 0x8d, 0xbb, 0xb6, 0xee, 0x71, 0x91, 0xb2, 0x53, + 0x66, 0x0c, 0x91, 0x22, 0x2e, 0x81, 0x47, 0x65, 0x31, 0x41, 0x24, 0x11, 0x67, 0xc4, 0x54, 0x5a, + 0xba, 0x6b, 0xa5, 0xf5, 0x22, 0x5f, 0x68, 0xd2, 0xe9, 0x32, 0xdf, 0xc0, 0xc3, 0x92, 0x1d, 0x66, + 0x88, 0xd2, 0x6b, 0xee, 0x2c, 0xee, 0x2e, 0x1f, 0x7c, 0x18, 0xcc, 0xe1, 0x72, 0x30, 0x4b, 0x3b, + 0xdb, 0xaa, 0x35, 0x39, 0x73, 0x2a, 0xdd, 0x03, 0x78, 0x34, 0x20, 0x24, 0x8a, 0x79, 0x9a, 0x92, + 0x58, 0x71, 0x11, 0x21, 0x33, 0x19, 0x0f, 0xf4, 0x3c, 0xd7, 0x07, 0x84, 0x74, 0x8a, 0x3b, 0x3b, + 0x34, 0xff, 0x37, 0x07, 0x96, 0x8a, 0xec, 0x73, 0xe8, 0x6c, 0x88, 0x55, 0x29, 0x89, 0xf5, 0x11, + 0x3c, 0x8c, 0x39, 0x53, 0x02, 0xc5, 0xaa, 0xac, 0x60, 0xc8, 0xb4, 0x56, 0x9c, 0xdb, 0xec, 0x25, + 0xd7, 0xaa, 0xf3, 0xb9, 0x56, 0xbb, 0xc9, 0xb5, 0x4d, 0x68, 0x24, 0x54, 0x45, 0x63, 0x91, 0x6a, + 0xd6, 0x34, 0xc3, 0x7a, 0x42, 0xd5, 0x89, 0x48, 0xfd, 0x2f, 0x60, 0xed, 0x2b, 0x81, 0x98, 0x1c, + 0x10, 0xd1, 0x19, 0x22, 0xc6, 0x48, 0xea, 0x6e, 0xc1, 0x52, 0x3c, 0x44, 0x94, 0x45, 0x96, 0xfb, + 0xcd, 0xb0, 0xa1, 0xed, 0x1e, 0x76, 0xdf, 0x07, 0x88, 0x8d, 0x57, 0xb1, 0x85, 0xcd, 0xb0, 0x69, + 0x4f, 0x7a, 0xd8, 0xff, 0xd5, 0x01, 0x38, 0xd6, 0x2b, 0xd1, 0x63, 0x03, 0x3e, 0xb5, 0x2e, 0xce, + 0xcc, 0xba, 0x3c, 0x85, 0x35, 0x86, 0x14, 0x3d, 0x23, 0x51, 0x59, 0xc7, 0xa4, 0x5a, 0x31, 0xc7, + 0x1d, 0x5b, 0xed, 0x99, 0x06, 0x92, 0xe7, 0xce, 0xbb, 0x91, 0x8f, 0x73, 0x77, 0xee, 0x38, 0xaf, + 0x3d, 0xc2, 0xce, 0xb3, 0x8c, 0xf7, 0x7f, 0x70, 0x60, 0xf5, 0x39, 0x61, 0x98, 0xb2, 0xa4, 0xd8, + 0x84, 0x2d, 0x58, 0x3a, 0xcb, 0xd7, 0x3c, 0x2a, 0x77, 0xb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 0x51, 0x7a, 0x88, 0xf1, 0x34, 0x2a, 0x45, 0x55, 0x4a, 0x0a, 0x54, 0xda, 0xb8, 0xae, 0xb6, + 0x95, 0x9b, 0x6a, 0x5b, 0xbe, 0x66, 0x71, 0xfa, 0x35, 0xb7, 0xa1, 0xaf, 0xbe, 0x1d, 0x7d, 0xed, + 0x76, 0xf4, 0x33, 0x12, 0x7e, 0xf4, 0xec, 0xd5, 0x65, 0xcb, 0x79, 0x7d, 0xd9, 0x72, 0xfe, 0xb9, + 0x6c, 0x39, 0x3f, 0x5f, 0xb5, 0x16, 0x5e, 0x5f, 0xb5, 0x16, 0xfe, 0xba, 0x6a, 0x2d, 0x7c, 0xfb, + 0xf1, 0x94, 0x5c, 0x9d, 0xb0, 0x13, 0x46, 0x3f, 0xa7, 0x6d, 0xbd, 0xd6, 0xed, 0xef, 0x6f, 0xfc, + 0x15, 0xd4, 0xe2, 0xd5, 0xaf, 0xeb, 0xff, 0x65, 0x9f, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x7a, + 0xae, 0x99, 0x4d, 0x32, 0x0a, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -1154,6 +1206,44 @@ func (m *SymbolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PendingDeposit) 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 *PendingDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.VaultId != 0 { + i = encodeVarintYieldaggregator(dAtA, i, uint64(m.VaultId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *DenomInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1631,6 +1721,20 @@ func (m *SymbolInfo) Size() (n int) { return n } +func (m *PendingDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VaultId != 0 { + n += 1 + sovYieldaggregator(uint64(m.VaultId)) + } + l = m.Amount.Size() + n += 1 + l + sovYieldaggregator(uint64(l)) + return n +} + func (m *DenomInfo) Size() (n int) { if m == nil { return 0 @@ -2775,6 +2879,109 @@ func (m *SymbolInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *PendingDeposit) 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 ErrIntOverflowYieldaggregator + } + 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: PendingDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) + } + m.VaultId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VaultId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *DenomInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 27cda97c8bb148cfff62f71372e646f1baac56ee Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 12 Oct 2023 20:26:54 +0800 Subject: [PATCH 26/59] resolve build issues on ya submodules --- proto/ununifi/records/query.proto | 31 - .../submodules/records/types/query.pb.go | 1157 ++--------------- .../submodules/records/types/query.pb.gw.go | 206 --- .../submodules/records/types/records.pb.go | 6 +- .../stakeibc/keeper/deposit_records.go | 4 +- .../submodules/stakeibc/keeper/hooks.go | 2 +- .../keeper/msg_server_liquid_stake.go | 4 +- .../keeper/msg_server_redeem_stake.go | 12 +- .../keeper/msg_server_register_host_zone.go | 8 +- .../stakeibc/keeper/unbonding_records.go | 43 +- 10 files changed, 148 insertions(+), 1325 deletions(-) diff --git a/proto/ununifi/records/query.proto b/proto/ununifi/records/query.proto index ac612eba9..c921ed345 100644 --- a/proto/ununifi/records/query.proto +++ b/proto/ununifi/records/query.proto @@ -52,18 +52,6 @@ service Query { rpc DepositRecordAll(QueryAllDepositRecordRequest) returns (QueryAllDepositRecordResponse) { option (google.api.http).get = "/ununifi/records/deposit_record"; } - - // Queries the existing LSMTokenDeposits for one specific deposit - rpc LSMDeposit(QueryLSMDepositRequest) returns (QueryLSMDepositResponse) { - option (google.api.http).get = "/ununifi/stakeibc/lsm_deposit/{chain_id}/{denom}"; - } - - // Queries the existing LSMTokenDeposits for all which match filters - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - rpc LSMDeposits(QueryLSMDepositsRequest) returns (QueryLSMDepositsResponse) { - option (google.api.http).get = "/ununifi/stakeibc/lsm_deposits"; - } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -139,22 +127,3 @@ message QueryAllEpochUnbondingRecordResponse { repeated EpochUnbondingRecord epoch_unbonding_record = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } - -message QueryLSMDepositRequest { - string chain_id = 1; - string denom = 2; -} - -message QueryLSMDepositResponse { - LSMTokenDeposit deposit = 1 [(gogoproto.nullable) = false]; -} - -message QueryLSMDepositsRequest { - string chain_id = 1; - string validator_address = 2; - string status = 3; -} - -message QueryLSMDepositsResponse { - repeated LSMTokenDeposit deposits = 1 [(gogoproto.nullable) = false]; -} diff --git a/x/yieldaggregator/submodules/records/types/query.pb.go b/x/yieldaggregator/submodules/records/types/query.pb.go index b60a24114..84ad494e4 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.go @@ -802,206 +802,6 @@ func (m *QueryAllEpochUnbondingRecordResponse) GetPagination() *query.PageRespon return nil } -type QueryLSMDepositRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *QueryLSMDepositRequest) Reset() { *m = QueryLSMDepositRequest{} } -func (m *QueryLSMDepositRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositRequest) ProtoMessage() {} -func (*QueryLSMDepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_75af079ed2bd9fe5, []int{16} -} -func (m *QueryLSMDepositRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositRequest.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 *QueryLSMDepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositRequest.Merge(m, src) -} -func (m *QueryLSMDepositRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositRequest proto.InternalMessageInfo - -func (m *QueryLSMDepositRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *QueryLSMDepositRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type QueryLSMDepositResponse struct { - Deposit LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` -} - -func (m *QueryLSMDepositResponse) Reset() { *m = QueryLSMDepositResponse{} } -func (m *QueryLSMDepositResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositResponse) ProtoMessage() {} -func (*QueryLSMDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75af079ed2bd9fe5, []int{17} -} -func (m *QueryLSMDepositResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositResponse.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 *QueryLSMDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositResponse.Merge(m, src) -} -func (m *QueryLSMDepositResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositResponse proto.InternalMessageInfo - -func (m *QueryLSMDepositResponse) GetDeposit() LSMTokenDeposit { - if m != nil { - return m.Deposit - } - return LSMTokenDeposit{} -} - -type QueryLSMDepositsRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *QueryLSMDepositsRequest) Reset() { *m = QueryLSMDepositsRequest{} } -func (m *QueryLSMDepositsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositsRequest) ProtoMessage() {} -func (*QueryLSMDepositsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_75af079ed2bd9fe5, []int{18} -} -func (m *QueryLSMDepositsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositsRequest.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 *QueryLSMDepositsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositsRequest.Merge(m, src) -} -func (m *QueryLSMDepositsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositsRequest proto.InternalMessageInfo - -func (m *QueryLSMDepositsRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *QueryLSMDepositsRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *QueryLSMDepositsRequest) GetStatus() string { - if m != nil { - return m.Status - } - return "" -} - -type QueryLSMDepositsResponse struct { - Deposits []LSMTokenDeposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` -} - -func (m *QueryLSMDepositsResponse) Reset() { *m = QueryLSMDepositsResponse{} } -func (m *QueryLSMDepositsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositsResponse) ProtoMessage() {} -func (*QueryLSMDepositsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75af079ed2bd9fe5, []int{19} -} -func (m *QueryLSMDepositsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositsResponse.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 *QueryLSMDepositsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositsResponse.Merge(m, src) -} -func (m *QueryLSMDepositsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositsResponse proto.InternalMessageInfo - -func (m *QueryLSMDepositsResponse) GetDeposits() []LSMTokenDeposit { - if m != nil { - return m.Deposits - } - return nil -} - func init() { proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.records.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.records.QueryParamsResponse") @@ -1019,86 +819,71 @@ func init() { proto.RegisterType((*QueryGetEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryGetEpochUnbondingRecordResponse") proto.RegisterType((*QueryAllEpochUnbondingRecordRequest)(nil), "ununifi.records.QueryAllEpochUnbondingRecordRequest") proto.RegisterType((*QueryAllEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryAllEpochUnbondingRecordResponse") - proto.RegisterType((*QueryLSMDepositRequest)(nil), "ununifi.records.QueryLSMDepositRequest") - proto.RegisterType((*QueryLSMDepositResponse)(nil), "ununifi.records.QueryLSMDepositResponse") - proto.RegisterType((*QueryLSMDepositsRequest)(nil), "ununifi.records.QueryLSMDepositsRequest") - proto.RegisterType((*QueryLSMDepositsResponse)(nil), "ununifi.records.QueryLSMDepositsResponse") } func init() { proto.RegisterFile("ununifi/records/query.proto", fileDescriptor_75af079ed2bd9fe5) } var fileDescriptor_75af079ed2bd9fe5 = []byte{ - // 1117 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0x8f, 0xf3, 0xd5, 0xf6, 0x85, 0x94, 0x30, 0xac, 0x92, 0x74, 0xdb, 0x6e, 0x52, 0x37, 0x24, - 0xfd, 0xf4, 0xd0, 0xd0, 0xa0, 0x4a, 0x20, 0x44, 0x02, 0xa4, 0x54, 0xa4, 0xa8, 0x6c, 0xd8, 0x0b, - 0x15, 0xac, 0xbc, 0xeb, 0x89, 0x33, 0xaa, 0xed, 0xd9, 0x7a, 0xec, 0x8a, 0xd5, 0x6a, 0x2f, 0xdc, - 0xe0, 0x84, 0xc4, 0x09, 0xc4, 0xbf, 0x81, 0x10, 0x67, 0x2e, 0x3d, 0x06, 0xb8, 0xc0, 0x05, 0xa1, - 0x84, 0x7f, 0x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e, - 0x55, 0xe1, 0x49, 0xf6, 0x59, 0xb4, 0x7c, 0xdb, 0xe8, 0x2b, 0x0d, 0x66, 0xba, 0x36, 0x14, 0xea, - 0x1b, 0xb3, 0xb3, 0x46, 0xae, 0x0f, 0xa0, 0xa9, 0xe0, 0xad, 0x0a, 0x78, 0xcb, 0xa8, 0x94, 0x0b, - 0x8f, 0x6f, 0x7d, 0xfa, 0xfc, 0xb0, 0xa4, 0x1d, 0x1c, 0x96, 0xb4, 0xbf, 0x0e, 0x4b, 0xda, 0xd7, - 0x47, 0xa5, 0xb1, 0x83, 0xa3, 0xd2, 0xd8, 0xef, 0x47, 0xa5, 0xb1, 0x4f, 0xde, 0xb1, 0x69, 0xb0, - 0x1f, 0xd6, 0x8c, 0x3a, 0x73, 0x71, 0xc5, 0xab, 0x78, 0x74, 0x9b, 0x62, 0x41, 0x06, 0x7f, 0x8e, - 0x9b, 0x94, 0x38, 0x96, 0x69, 0xdb, 0x3e, 0xb1, 0xa3, 0xbd, 0x8c, 0x79, 0x58, 0x73, 0x99, 0x15, - 0x3a, 0xa4, 0xf3, 0x2f, 0x09, 0x0e, 0x9a, 0x0d, 0xc2, 0x6b, 0xd3, 0xe2, 0xef, 0x8a, 0xd7, 0xfe, - 0x0d, 0x00, 0x00, 0xff, 0xff, 0x12, 0x85, 0x63, 0x11, 0x7b, 0x11, 0x00, 0x00, + // 933 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0x8e, 0x93, 0xb4, 0x0b, 0x53, 0x76, 0x59, 0x0d, 0x11, 0xcd, 0x66, 0x77, 0x53, 0xd6, 0x5b, + 0xb6, 0xb0, 0xb4, 0x1e, 0xb5, 0xb4, 0x08, 0x09, 0x84, 0xd4, 0x02, 0x2d, 0x08, 0x84, 0x4a, 0x50, + 0x2e, 0x20, 0x14, 0x4d, 0xe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, 0x9d, 0x9a, 0x08, + 0xfc, 0x5e, 0x03, 0x37, 0x53, 0xd7, 0x55, 0xb8, 0x91, 0x9b, 0x42, 0xd5, 0xfd, 0xbb, 0x61, 0x4c, + 0xab, 0x2e, 0x11, 0xae, 0x73, 0x84, 0x8f, 0xe0, 0x6a, 0x06, 0x61, 0xfa, 0x72, 0x2d, 0x06, 0xfa, + 0x3b, 0x0d, 0xdc, 0x4e, 0xf9, 0x89, 0x33, 0xba, 0x91, 0x9b, 0x9b, 0xeb, 0x20, 0xcc, 0xbb, 0xe7, + 0xeb, 0x6b, 0x1c, 0xe1, 0x03, 0xb8, 0x32, 0x01, 0xe1, 0xde, 0xe7, 0xa7, 0xe7, 0x4d, 0xed, 0xec, + 0xbc, 0xa9, 0xfd, 0x7d, 0xde, 0xd4, 0xbe, 0xb9, 0x68, 0x96, 0xce, 0x2e, 0x9a, 0xa5, 0x3f, 0x2e, + 0x9a, 0xa5, 0x4f, 0xdf, 0xb6, 0x68, 0x78, 0x1c, 0x75, 0x8d, 0x1e, 0x73, 0x50, 0xdb, 0x6d, 0xbb, + 0x74, 0x9f, 0x22, 0x3e, 0x0b, 0xe8, 0x4b, 0xd4, 0xa7, 0xc4, 0x36, 0xb1, 0x65, 0xf9, 0xc4, 0xc2, + 0x21, 0xf3, 0x51, 0x10, 0x75, 0x1d, 0x66, 0x46, 0x36, 0xb9, 0xfc, 0xe7, 0x89, 0xc2, 0xbe, 0x47, + 0x82, 0xee, 0x22, 0xff, 0x0b, 0xf8, 0xea, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0x17, 0xd6, + 0x03, 0xcf, 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1129,13 +914,6 @@ type QueryClient interface { DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) } type queryClient struct { @@ -1218,24 +996,6 @@ func (c *queryClient) DepositRecordAll(ctx context.Context, in *QueryAllDepositR return out, nil } -func (c *queryClient) LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) { - out := new(QueryLSMDepositResponse) - err := c.cc.Invoke(ctx, "/ununifi.records.Query/LSMDeposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) { - out := new(QueryLSMDepositsResponse) - err := c.cc.Invoke(ctx, "/ununifi.records.Query/LSMDeposits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1254,13 +1014,6 @@ type QueryServer interface { DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(context.Context, *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(context.Context, *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1291,12 +1044,6 @@ func (*UnimplementedQueryServer) DepositRecord(ctx context.Context, req *QueryGe func (*UnimplementedQueryServer) DepositRecordAll(ctx context.Context, req *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositRecordAll not implemented") } -func (*UnimplementedQueryServer) LSMDeposit(ctx context.Context, req *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposit not implemented") -} -func (*UnimplementedQueryServer) LSMDeposits(ctx context.Context, req *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposits not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1446,42 +1193,6 @@ func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Query_LSMDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ununifi.records.Query/LSMDeposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposit(ctx, req.(*QueryLSMDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LSMDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ununifi.records.Query/LSMDeposits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposits(ctx, req.(*QueryLSMDepositsRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.records.Query", HandlerType: (*QueryServer)(nil), @@ -1518,14 +1229,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DepositRecordAll", Handler: _Query_DepositRecordAll_Handler, }, - { - MethodName: "LSMDeposit", - Handler: _Query_LSMDeposit_Handler, - }, - { - MethodName: "LSMDeposits", - Handler: _Query_LSMDeposits_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/records/query.proto", @@ -2132,222 +1835,71 @@ func (m *QueryAllEpochUnbondingRecordResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *QueryLSMDepositRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil + dAtA[offset] = uint8(v) + return base } - -func (m *QueryLSMDepositRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n } -func (m *QueryLSMDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n } -func (m *QueryLSMDepositResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *QueryGetDepositRecordRequest) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n } -func (m *QueryLSMDepositResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *QueryGetDepositRecordResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DepositRecord.Size() + n += 1 + l + sovQuery(uint64(l)) + return n } -func (m *QueryLSMDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *QueryAllDepositRecordRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositsRequest) 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 *QueryLSMDepositsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Status) > 0 { - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositsResponse) 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 *QueryLSMDepositsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Deposits) > 0 { - for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } - return n -} - -func (m *QueryGetDepositRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.DepositRecord.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + return n } func (m *QueryAllDepositRecordResponse) Size() (n int) { @@ -2526,70 +2078,6 @@ func (m *QueryAllEpochUnbondingRecordResponse) Size() (n int) { return n } -func (m *QueryLSMDepositRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryLSMDepositResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Deposit.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryLSMDepositsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Status) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryLSMDepositsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Deposits) > 0 { - for _, e := range m.Deposits { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4124,433 +3612,6 @@ func (m *QueryAllEpochUnbondingRecordResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLSMDepositRequest) 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 ErrIntOverflowQuery - } - 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: QueryLSMDepositRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositResponse) 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 ErrIntOverflowQuery - } - 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: QueryLSMDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositsRequest) 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 ErrIntOverflowQuery - } - 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: QueryLSMDepositsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositsResponse) 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 ErrIntOverflowQuery - } - 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: QueryLSMDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deposits = append(m.Deposits, LSMTokenDeposit{}) - if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/submodules/records/types/query.pb.gw.go b/x/yieldaggregator/submodules/records/types/query.pb.gw.go index 97ca98984..c0c8c13ef 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.gw.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.gw.go @@ -459,118 +459,6 @@ func local_request_Query_DepositRecordAll_0(ctx context.Context, marshaler runti } -func request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := client.LSMDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := server.LSMDeposit(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_LSMDeposits_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositsRequest - 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_Query_LSMDeposits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.LSMDeposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositsRequest - 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_Query_LSMDeposits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.LSMDeposits(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -761,52 +649,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_LSMDeposit_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_Query_LSMDeposit_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_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposits_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_Query_LSMDeposits_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_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -1008,46 +850,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_LSMDeposit_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_Query_LSMDeposit_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposits_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_Query_LSMDeposits_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -1067,10 +869,6 @@ var ( pattern_Query_DepositRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "records", "deposit_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_DepositRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "deposit_record"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LSMDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"ununifi", "stakeibc", "lsm_deposit", "chain_id", "denom"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LSMDeposits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "stakeibc", "lsm_deposits"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1089,8 +887,4 @@ var ( forward_Query_DepositRecord_0 = runtime.ForwardResponseMessage forward_Query_DepositRecordAll_0 = runtime.ForwardResponseMessage - - forward_Query_LSMDeposit_0 = runtime.ForwardResponseMessage - - forward_Query_LSMDeposits_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/submodules/records/types/records.pb.go b/x/yieldaggregator/submodules/records/types/records.pb.go index a4362f1bb..215d3490b 100644 --- a/x/yieldaggregator/submodules/records/types/records.pb.go +++ b/x/yieldaggregator/submodules/records/types/records.pb.go @@ -29,9 +29,9 @@ type DepositRecord_Status int32 const ( // in transfer queue to be sent to the delegation ICA - DepositRecord_TRANSFER_QUEUE_QUEUE DepositRecord_Status = 0 + DepositRecord_TRANSFER_QUEUE DepositRecord_Status = 0 // transfer in progress (IBC packet sent, ack not received) - DepositRecord_TRANSFER_QUEUE_QUEUE_IN_PROGRESS DepositRecord_Status = 2 + DepositRecord_TRANSFER_IN_PROGRESS DepositRecord_Status = 2 // in staking queue on delegation ICA DepositRecord_DELEGATION_QUEUE DepositRecord_Status = 1 // staking in progress (ICA packet sent, ack not received) @@ -323,7 +323,7 @@ func (m *DepositRecord) GetStatus() DepositRecord_Status { if m != nil { return m.Status } - return DepositRecord_TRANSFER_QUEUE_QUEUE + return DepositRecord_TRANSFER_QUEUE } func (m *DepositRecord) GetDepositEpochNumber() uint64 { diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go b/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go index 0b30b3fbb..b42759030 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/deposit_records.go @@ -24,7 +24,7 @@ func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64 Amount: sdk.ZeroInt(), Denom: zoneInfo.HostDenom, HostZoneId: zoneInfo.ChainId, - Status: recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE, + Status: recordstypes.DepositRecord_TRANSFER_QUEUE, DepositEpochNumber: epochNumber, } k.RecordsKeeper.AppendDepositRecord(ctx, depositRecord) @@ -35,7 +35,7 @@ func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64 func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord) { transferDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - isTransferRecord := record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE + isTransferRecord := record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE isBeforeCurrentEpoch := record.DepositEpochNumber < epochNumber return isTransferRecord && isBeforeCurrentEpoch }) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go b/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go index 1c7b87d00..326496643 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/hooks.go @@ -278,7 +278,7 @@ func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords [] func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (sdk.Int, error) { // filter to only the deposit records for the host zone with status DELEGATION ModuleAccountRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - return record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE && record.HostZoneId == hostZone.ChainId + return record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE && record.HostZoneId == hostZone.ChainId }) // sum the amounts of the deposit records diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_liquid_stake.go b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_liquid_stake.go index b0e1a2d8d..6223790af 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_liquid_stake.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_liquid_stake.go @@ -79,7 +79,7 @@ func (k Keeper) LiquidStake(ctx sdk.Context, sender sdk.AccAddress, amount sdk.C } msgAmt := amount.Amount.Int64() - depositRecord.Amount += msgAmt + depositRecord.Amount = depositRecord.Amount.Add(sdk.NewInt(msgAmt)) k.RecordsKeeper.SetDepositRecord(ctx, *depositRecord) return nil @@ -165,7 +165,7 @@ func (k msgServer) LiquidStake(goCtx context.Context, msg *types.MsgLiquidStake) k.Logger(ctx).Error("failed to convert msg.Amount to int64") return nil, sdkerrors.Wrapf(err, "failed to convert msg.Amount to int64") } - depositRecord.Amount += msgAmt + depositRecord.Amount = depositRecord.Amount.Add(sdk.NewInt(msgAmt)) k.RecordsKeeper.SetDepositRecord(ctx, *depositRecord) return &types.MsgLiquidStakeResponse{}, nil diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_redeem_stake.go b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_redeem_stake.go index 9f5372ade..2296a4fbb 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_redeem_stake.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_redeem_stake.go @@ -86,7 +86,7 @@ func (k Keeper) RedeemStake(ctx sdk.Context, sender sdk.AccAddress, amount sdk.C Id: redemptionId, Sender: senderAddr, Receiver: receiver, - Amount: nativeAmount.Uint64(), + Amount: nativeAmount, Denom: hostZone.HostDenom, HostZoneId: hostZone.ChainId, EpochNumber: epochTracker.EpochNumber, @@ -105,7 +105,7 @@ func (k Keeper) RedeemStake(ctx sdk.Context, sender sdk.AccAddress, amount sdk.C if !found { return sdkerrors.Wrapf(types.ErrInvalidHostZone, "host zone not found in unbondings: %s", hostZone.ChainId) } - hostZoneUnbonding.NativeTokenAmount += nativeAmount.Uint64() + hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount.Add(nativeAmount) hostZoneUnbonding.UserRedemptionRecords = append(hostZoneUnbonding.UserRedemptionRecords, userRedemptionRecord.Id) // Escrow user's balance @@ -122,7 +122,7 @@ func (k Keeper) RedeemStake(ctx sdk.Context, sender sdk.AccAddress, amount sdk.C // record the number of stAssets that should be burned after unbonding stTokenAmount := amount.Amount.Uint64() - hostZoneUnbonding.StTokenAmount += stTokenAmount + hostZoneUnbonding.StTokenAmount = hostZoneUnbonding.StTokenAmount.Add(sdk.NewInt(int64(stTokenAmount))) // Actually set the records, we wait until now to prevent any errors k.RecordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) @@ -220,7 +220,7 @@ func (k msgServer) RedeemStake(goCtx context.Context, msg *types.MsgRedeemStake) Id: redemptionId, Sender: senderAddr, Receiver: msg.Receiver, - Amount: nativeAmount.Uint64(), + Amount: nativeAmount, Denom: hostZone.HostDenom, HostZoneId: hostZone.ChainId, EpochNumber: epochTracker.EpochNumber, @@ -239,7 +239,7 @@ func (k msgServer) RedeemStake(goCtx context.Context, msg *types.MsgRedeemStake) if !found { return nil, sdkerrors.Wrapf(types.ErrInvalidHostZone, "host zone not found in unbondings: %s", hostZone.ChainId) } - hostZoneUnbonding.NativeTokenAmount += nativeAmount.Uint64() + hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount.Add(nativeAmount) hostZoneUnbonding.UserRedemptionRecords = append(hostZoneUnbonding.UserRedemptionRecords, userRedemptionRecord.Id) // Escrow user's balance @@ -261,7 +261,7 @@ func (k msgServer) RedeemStake(goCtx context.Context, msg *types.MsgRedeemStake) k.Logger(ctx).Error(errMsg) return nil, sdkerrors.Wrapf(types.ErrIntCast, errMsg) } - hostZoneUnbonding.StTokenAmount += stTokenAmount + hostZoneUnbonding.StTokenAmount = hostZoneUnbonding.StTokenAmount.Add(sdk.NewInt(int64(stTokenAmount))) // Actually set the records, we wait until now to prevent any errors k.RecordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go index e9d0e3b24..b48c558ea 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/msg_server_register_host_zone.go @@ -145,8 +145,8 @@ func (k msgServer) RegisterHostZone(goCtx context.Context, msg *types.MsgRegiste return nil, sdkerrors.Wrapf(recordstypes.ErrEpochUnbondingRecordNotFound, errMsg) } hostZoneUnbonding := &recordstypes.HostZoneUnbonding{ - NativeTokenAmount: 0, - StTokenAmount: 0, + NativeTokenAmount: sdk.ZeroInt(), + StTokenAmount: sdk.ZeroInt(), Denom: zone.HostDenom, HostZoneId: zone.ChainId, Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, @@ -166,10 +166,10 @@ func (k msgServer) RegisterHostZone(goCtx context.Context, msg *types.MsgRegiste } depositRecord := recordstypes.DepositRecord{ Id: 0, - Amount: 0, + Amount: sdk.ZeroInt(), Denom: zone.HostDenom, HostZoneId: zone.ChainId, - Status: recordstypes.DepositRecord_TRANSFER_QUEUE_QUEUE, + Status: recordstypes.DepositRecord_TRANSFER_QUEUE, DepositEpochNumber: strideEpochTracker.EpochNumber, } k.RecordsKeeper.AppendDepositRecord(ctx, depositRecord) diff --git a/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go b/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go index 2e40317ac..25cce3fcf 100644 --- a/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go +++ b/x/yieldaggregator/submodules/stakeibc/keeper/unbonding_records.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "strconv" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -20,8 +19,8 @@ func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) hostZoneUnbondings := []*recordstypes.HostZoneUnbonding{} addEpochUndelegation := func(ctx sdk.Context, index int64, hostZone types.HostZone) error { hostZoneUnbonding := recordstypes.HostZoneUnbonding{ - NativeTokenAmount: uint64(0), - StTokenAmount: uint64(0), + NativeTokenAmount: sdk.ZeroInt(), + StTokenAmount: sdk.ZeroInt(), Denom: hostZone.HostDenom, HostZoneId: hostZone.ChainId, Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, @@ -46,10 +45,10 @@ func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) // - total amount to unbond // - marshalled callback args // - error -func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZone) ([]sdk.Msg, uint64, []byte, error) { +func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZone) ([]sdk.Msg, sdk.Int, []byte, error) { // this function goes and processes all unbonded records for this hostZone // regardless of what epoch they belong to - totalAmtToUnbond := uint64(0) + totalAmtToUnbond := sdk.ZeroInt() epochUnbondingRecordIds := []uint64{} for _, epochUnbonding := range k.RecordsKeeper.GetAllEpochUnbondingRecord(ctx) { hostZoneRecord, found := k.RecordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbonding.EpochNumber, hostZone.ChainId) @@ -60,8 +59,8 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon continue } // mark the epoch unbonding record for processing if it's bonded and the host zone unbonding has an amount g.t. zero - if hostZoneRecord.Status == recordstypes.HostZoneUnbonding_UNBONDING_QUEUE && hostZoneRecord.NativeTokenAmount > 0 { - totalAmtToUnbond += hostZoneRecord.NativeTokenAmount + if hostZoneRecord.Status == recordstypes.HostZoneUnbonding_UNBONDING_QUEUE && hostZoneRecord.NativeTokenAmount.GT(sdk.ZeroInt()) { + totalAmtToUnbond = totalAmtToUnbond.Add(hostZoneRecord.NativeTokenAmount) epochUnbondingRecordIds = append(epochUnbondingRecordIds, epochUnbonding.EpochNumber) k.Logger(ctx).Info(fmt.Sprintf("[SendHostZoneUnbondings] Sending unbondings, host zone: %s, epochUnbonding: %v", hostZone.ChainId, epochUnbonding)) @@ -71,18 +70,18 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if delegationAccount == nil || delegationAccount.GetAddress() == "" { errMsg := fmt.Sprintf("Zone %s is missing a delegation address!", hostZone.ChainId) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrHostZoneICAAccountNotFound, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrHostZoneICAAccountNotFound, errMsg) } validators := hostZone.GetValidators() - if totalAmtToUnbond == 0 { - return nil, 0, nil, nil + if totalAmtToUnbond.IsZero() { + return nil, sdk.ZeroInt(), nil, nil } // we distribute the unbonding based on our target weights - newUnbondingToValidator, err := k.GetTargetValAmtsForHostZone(ctx, hostZone, totalAmtToUnbond) + newUnbondingToValidator, err := k.GetTargetValAmtsForHostZone(ctx, hostZone, totalAmtToUnbond.Uint64()) if err != nil { errMsg := fmt.Sprintf("Error getting target val amts for host zone %s %d: %s", hostZone.ChainId, totalAmtToUnbond, err) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrNoValidatorAmts, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrNoValidatorAmts, errMsg) } valAddrToUnbondAmt := make(map[string]int64) overflowAmt := uint64(0) @@ -93,7 +92,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if err != nil { errMsg := fmt.Sprintf("Error fetching validator staked amount %d: %s", currentAmtStaked, err.Error()) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrNoValidatorAmts, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrNoValidatorAmts, errMsg) } if valUnbondAmt > currentAmtStaked { // if we don't have enough assets to unbond overflowAmt += valUnbondAmt - currentAmtStaked @@ -103,7 +102,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if err != nil { errMsg := fmt.Sprintf("Error casting validator staked amount %d: %s", validator.GetDelegationAmt(), err.Error()) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) } valAddrToUnbondAmt[valAddr] = valUnbondAmtInt64 } @@ -114,7 +113,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if err != nil { errMsg := fmt.Sprintf("Error casting validator staked amount %d: %s", validator.GetDelegationAmt(), err.Error()) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) } currentAmtStaked := validator.GetDelegationAmt() // store how many more tokens we could unbond, if needed @@ -126,7 +125,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if err != nil { errMsg := fmt.Sprintf("Error casting overflow amount %d: %s", overflowAmt, err.Error()) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) } valAddrToUnbondAmt[valAddr] += overflowAmtInt64 overflowAmt = 0 @@ -136,7 +135,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon if err != nil { errMsg := fmt.Sprintf("Error casting overflow amount %d: %s", amtToPotentiallyUnbond, err.Error()) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(types.ErrIntCast, errMsg) } valAddrToUnbondAmt[valAddr] += amtToPotentiallyUnbondInt64 overflowAmt -= amtToPotentiallyUnbond @@ -148,7 +147,7 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon errMsg := fmt.Sprintf("Could not unbond %d on Host Zone %s, unable to balance the unbond amount across validators", totalAmtToUnbond, hostZone.ChainId) k.Logger(ctx).Error(errMsg) - return nil, 0, nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, errMsg) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, errMsg) } var splitDelegations []*types.SplitDelegation var msgs []sdk.Msg @@ -177,13 +176,13 @@ func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZon marshalledCallbackArgs, err := k.MarshalUndelegateCallbackArgs(ctx, undelegateCallback) if err != nil { k.Logger(ctx).Error(err.Error()) - return nil, 0, nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, err.Error()) + return nil, sdk.ZeroInt(), nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, err.Error()) } return msgs, totalAmtToUnbond, marshalledCallbackArgs, nil } -func (k Keeper) SubmitHostZoneUnbondingMsg(ctx sdk.Context, msgs []sdk.Msg, totalAmtToUnbond uint64, marshalledCallbackArgs []byte, hostZone types.HostZone) error { +func (k Keeper) SubmitHostZoneUnbondingMsg(ctx sdk.Context, msgs []sdk.Msg, totalAmtToUnbond sdk.Int, marshalledCallbackArgs []byte, hostZone types.HostZone) error { delegationAccount := hostZone.GetDelegationAccount() // safety check: if msgs is nil, error @@ -202,7 +201,7 @@ func (k Keeper) SubmitHostZoneUnbondingMsg(ctx sdk.Context, msgs []sdk.Msg, tota sdk.NewEvent( sdk.EventTypeMessage, sdk.NewAttribute("hostZone", hostZone.ChainId), - sdk.NewAttribute("newAmountUnbonding", strconv.FormatUint(totalAmtToUnbond, 10)), + sdk.NewAttribute("newAmountUnbonding", totalAmtToUnbond.String()), ), ) @@ -256,7 +255,7 @@ func (k Keeper) CleanupEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64 k.Logger(ctx).Info(fmt.Sprintf("processing hostZoneUnbonding %v", hostZoneUnbonding)) // if an EpochUnbondingRecord has any HostZoneUnbonding with non-zero balances, we don't delete the EpochUnbondingRecord // because it has outstanding tokens that need to be claimed - if hostZoneUnbonding.NativeTokenAmount != 0 { + if !hostZoneUnbonding.NativeTokenAmount.IsZero() { shouldDeleteEpochUnbondingRecord = false break } From d77be046efc1a23c8da5f20a44db59f1a874b2be Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 12 Oct 2023 21:19:20 +0800 Subject: [PATCH 27/59] implement transfer callback for vault direct deposit to strategy ica --- proto/ununifi/records/callbacks.proto | 5 +- proto/ununifi/records/genesis.proto | 1 + proto/ununifi/records/query.proto | 10 + proto/ununifi/records/records.proto | 9 + proto/ununifi/yieldaggregator/genesis.proto | 5 +- proto/ununifi/yieldaggregator/query.proto | 12 +- .../yieldaggregator/yieldaggregator.proto | 9 - x/yieldaggregator/genesis.go | 4 - x/yieldaggregator/keeper/grpc_query_vault.go | 6 +- x/yieldaggregator/keeper/lp.go | 2 +- x/yieldaggregator/keeper/strategy.go | 6 +- x/yieldaggregator/keeper/strategy_test.go | 6 +- .../submodules/records/genesis.go | 5 + .../records/keeper/callback_transfer.go | 28 +- .../submodules/records/keeper/callbacks.go | 2 +- .../submodules/records/keeper/grpc_query.go | 9 + .../submodules/records/keeper/keeper.go | 18 +- .../records}/keeper/pending_deposit.go | 20 +- .../submodules/records/types/callbacks.pb.go | 159 +++--- .../submodules/records/types/genesis.pb.go | 122 +++-- .../submodules/records/types/keys.go | 1 + .../submodules/records/types/query.pb.go | 462 +++++++++++++++--- .../submodules/records/types/query.pb.gw.go | 65 +++ .../submodules/records/types/records.pb.go | 334 ++++++++++--- x/yieldaggregator/types/expected_keepers.go | 5 +- x/yieldaggregator/types/genesis.pb.go | 105 +--- x/yieldaggregator/types/keys.go | 15 +- x/yieldaggregator/types/query.pb.go | 284 +++++++---- x/yieldaggregator/types/yieldaggregator.pb.go | 331 +++---------- 29 files changed, 1310 insertions(+), 730 deletions(-) rename x/yieldaggregator/{ => submodules/records}/keeper/pending_deposit.go (63%) diff --git a/proto/ununifi/records/callbacks.proto b/proto/ununifi/records/callbacks.proto index 5dd4e033f..1f5dfa878 100644 --- a/proto/ununifi/records/callbacks.proto +++ b/proto/ununifi/records/callbacks.proto @@ -9,6 +9,7 @@ message TransferCallback { uint64 deposit_record_id = 1; } -message TransferLSMTokenCallback { - LSMTokenDeposit deposit = 1; +message VaultTransferCallback { + uint64 vault_id = 1; + string strategy_contract = 2; } diff --git a/proto/ununifi/records/genesis.proto b/proto/ununifi/records/genesis.proto index 8744cf866..fa06b88c8 100644 --- a/proto/ununifi/records/genesis.proto +++ b/proto/ununifi/records/genesis.proto @@ -17,4 +17,5 @@ message GenesisState { repeated DepositRecord deposit_record_list = 7 [(gogoproto.nullable) = false]; uint64 deposit_record_count = 8; repeated LSMTokenDeposit lsm_token_deposit_list = 9 [(gogoproto.nullable) = false]; + repeated PendingDeposit pending_deposits = 10 [(gogoproto.nullable) = false]; } diff --git a/proto/ununifi/records/query.proto b/proto/ununifi/records/query.proto index c921ed345..a615b5489 100644 --- a/proto/ununifi/records/query.proto +++ b/proto/ununifi/records/query.proto @@ -52,6 +52,10 @@ service Query { rpc DepositRecordAll(QueryAllDepositRecordRequest) returns (QueryAllDepositRecordResponse) { option (google.api.http).get = "/ununifi/records/deposit_record"; } + + rpc PendingVaultDepositAll(QueryAllPendingVaultDepositRequest) returns (QueryPendingVaultDepositResponse) { + option (google.api.http).get = "/ununifi/records/all_pending_vault_deposits"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -127,3 +131,9 @@ message QueryAllEpochUnbondingRecordResponse { repeated EpochUnbondingRecord epoch_unbonding_record = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +message QueryAllPendingVaultDepositRequest {} + +message QueryPendingVaultDepositResponse { + repeated PendingDeposit pending_deposits = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/ununifi/records/records.proto b/proto/ununifi/records/records.proto index 1cad7b9c3..0139c8545 100644 --- a/proto/ununifi/records/records.proto +++ b/proto/ununifi/records/records.proto @@ -92,3 +92,12 @@ message LSMTokenDeposit { cosmos.base.v1beta1.Coin st_token = 8 [(gogoproto.nullable) = false]; Status status = 9; } + +message PendingDeposit { + uint64 vault_id = 1; + string amount = 2 [ + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/ununifi/yieldaggregator/genesis.proto b/proto/ununifi/yieldaggregator/genesis.proto index c82b1783c..5043a39fb 100644 --- a/proto/ununifi/yieldaggregator/genesis.proto +++ b/proto/ununifi/yieldaggregator/genesis.proto @@ -12,7 +12,6 @@ option go_package = "github.com/UnUniFi/chain/x/yieldaggregator/types"; message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; // this line is used by starport scaffolding # genesis/proto/state - repeated Vault vaults = 2 [(gogoproto.nullable) = false]; - repeated Strategy strategies = 3 [(gogoproto.nullable) = false]; - repeated PendingDeposit pending_deposits = 4 [(gogoproto.nullable) = false]; + repeated Vault vaults = 2 [(gogoproto.nullable) = false]; + repeated Strategy strategies = 3 [(gogoproto.nullable) = false]; } diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index bc56acd06..87e8ba55a 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -92,6 +92,11 @@ message VaultContainer { (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + string total_pending_deposit = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; } message QueryAllVaultResponse { @@ -128,7 +133,12 @@ message QueryGetVaultResponse { (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; - repeated Strategy strategies = 5 [(gogoproto.nullable) = false]; + string total_pending_deposit = 5 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + repeated Strategy strategies = 6 [(gogoproto.nullable) = false]; } message QueryAllStrategyRequest { diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index f0a0a6ce4..1d5efebe1 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -58,15 +58,6 @@ message SymbolInfo { [(gogoproto.nullable) = false]; // channels to send to target chain for the symbol } -message PendingDeposit { - uint64 vault_id = 1; - string amount = 2 [ - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - message DenomInfo { string denom = 1; string symbol = 2; diff --git a/x/yieldaggregator/genesis.go b/x/yieldaggregator/genesis.go index 730355d96..0861d3f77 100644 --- a/x/yieldaggregator/genesis.go +++ b/x/yieldaggregator/genesis.go @@ -18,9 +18,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, vault := range genState.Vaults { k.AppendVault(ctx, vault) } - for _, deposit := range genState.PendingDeposits { - k.SetPendingDeposit(ctx, deposit.VaultId, deposit.Amount) - } } // ExportGenesis returns the module's exported genesis @@ -32,7 +29,6 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { } genesis.Strategies = k.GetAllStrategy(ctx, "") genesis.Vaults = k.GetAllVault(ctx) - genesis.PendingDeposits = k.GetAllPendingDeposits(ctx) return genesis } diff --git a/x/yieldaggregator/keeper/grpc_query_vault.go b/x/yieldaggregator/keeper/grpc_query_vault.go index ee0dd2ace..317fa6b95 100644 --- a/x/yieldaggregator/keeper/grpc_query_vault.go +++ b/x/yieldaggregator/keeper/grpc_query_vault.go @@ -45,7 +45,7 @@ func (k Keeper) VaultAll(c context.Context, req *types.QueryAllVaultRequest) (*t for _, vault := range vaults { vaultContainers = append(vaultContainers, types.VaultContainer{ Vault: vault, - TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), + TotalPendingDeposit: k.recordsKeeper.GetVaultPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), @@ -78,7 +78,7 @@ func (k Keeper) Vault(c context.Context, req *types.QueryGetVaultRequest) (*type return &types.QueryGetVaultResponse{ Vault: vault, Strategies: strategies, - TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), + TotalPendingDeposit: k.recordsKeeper.GetVaultPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), @@ -120,7 +120,7 @@ func (k Keeper) VaultAllByShareHolder(c context.Context, req *types.QueryAllVaul vaultContainers = append(vaultContainers, types.VaultContainer{ Vault: vault, - TotalPendingDeposit: k.GetPendingDeposit(ctx, vault.Id), + TotalPendingDeposit: k.recordsKeeper.GetVaultPendingDeposit(ctx, vault.Id), TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index b1a709f9c..46c954ea4 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -66,7 +66,7 @@ func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { amountInStrategies := k.VaultAmountInStrategies(ctx, vault) amountInVault := k.VaultWithdrawalAmount(ctx, vault) amountUnbonding := k.VaultUnbondingAmountInStrategies(ctx, vault) - pendingDeposit := k.GetPendingDeposit(ctx, vault.Id) + pendingDeposit := k.recordsKeeper.GetVaultPendingDeposit(ctx, vault.Id) totalAmount := amountInStrategies.Add(amountInVault).Add(amountUnbonding).Add(pendingDeposit) return totalAmount diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 3dd7fbb38..e060cbcf3 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -261,9 +261,9 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ version := k.GetStrategyVersion(ctx, strategy) _ = version info := k.GetStrategyDepositInfo(ctx, strategy) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) if info.Denom == stakeCoin.Denom { wasmMsg := `{"stake":{}}` - contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{stakeCoin}) return err } @@ -286,7 +286,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) memo, err := json.Marshal(metadata) - k.IncreasePendingDeposit(ctx, vault.Id, stakeCoin.Amount) + k.recordsKeeper.IncreaseVaultPendingDeposit(ctx, vault.Id, stakeCoin.Amount) msg := ibctypes.NewMsgTransfer( ibctransfertypes.PortID, transferRoute[0].ChannelId, @@ -297,7 +297,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ timeoutTimestamp, string(memo), ) - err = k.recordsKeeper.YATransfer(ctx, msg) + err = k.recordsKeeper.VaultTransfer(ctx, vault.Id, contractAddr, msg) return err } } diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 55ea82a1a..84c85f9b4 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -115,8 +115,8 @@ func (suite *KeeperTestSuite) SetupZoneAndEpoch(hostDenom, ibcDenom string) stak EpochNumber: 1, HostZoneUnbondings: []*recordstypes.HostZoneUnbonding{ { - StTokenAmount: 0, - NativeTokenAmount: 0, + StTokenAmount: sdk.ZeroInt(), + NativeTokenAmount: sdk.ZeroInt(), Denom: zone.HostDenom, HostZoneId: zone.ChainId, UnbondingTime: 0, @@ -129,7 +129,7 @@ func (suite *KeeperTestSuite) SetupZoneAndEpoch(hostDenom, ibcDenom string) stak // set deposit record for env suite.app.RecordsKeeper.SetDepositRecord(suite.ctx, recordstypes.DepositRecord{ Id: 1, - Amount: 100, + Amount: sdk.NewInt(100), Denom: ibcDenom, HostZoneId: "hub-1", Status: recordstypes.DepositRecord_DELEGATION_QUEUE, diff --git a/x/yieldaggregator/submodules/records/genesis.go b/x/yieldaggregator/submodules/records/genesis.go index 3fda0d60a..2e3603611 100644 --- a/x/yieldaggregator/submodules/records/genesis.go +++ b/x/yieldaggregator/submodules/records/genesis.go @@ -30,6 +30,10 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) // Set depositRecord count k.SetDepositRecordCount(ctx, genState.DepositRecordCount) + + for _, deposit := range genState.PendingDeposits { + k.SetVaultPendingDeposit(ctx, deposit.VaultId, deposit.Amount) + } } // ExportGenesis returns the capability module's exported genesis. @@ -41,6 +45,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.UserRedemptionRecordList = k.GetAllUserRedemptionRecord(ctx) genesis.EpochUnbondingRecordList = k.GetAllEpochUnbondingRecord(ctx) + genesis.PendingDeposits = k.GetAllVaultPendingDeposits(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index a3cacbb72..944d27811 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -132,15 +132,15 @@ func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Pac return nil } -func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { - k.Logger(ctx).Info("YATransferCallback executing", "packet", packet) +func VaultTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { + k.Logger(ctx).Info("VaultTransferCallback executing", "packet", packet) if ack.GetError() != "" { - k.Logger(ctx).Error(fmt.Sprintf("YATransferCallback does not handle errors %s", ack.GetError())) - return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "YATransferCallback does not handle errors: %s", ack.GetError()) + k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback does not handle errors %s", ack.GetError())) + return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "VaultTransferCallback does not handle errors: %s", ack.GetError()) } if ack == nil { // timeout - k.Logger(ctx).Error(fmt.Sprintf("YATransferCallback timeout, ack is nil, packet %v", packet)) + k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback timeout, ack is nil, packet %v", packet)) return nil } @@ -149,12 +149,16 @@ func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, a k.Logger(ctx).Error(fmt.Sprintf("Error unmarshalling packet %v", err.Error())) return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet data: %s", err.Error()) } - k.Logger(ctx).Info(fmt.Sprintf("YATransferCallback unmarshalled FungibleTokenPacketData %v", data)) + k.Logger(ctx).Info(fmt.Sprintf("VaultTransferCallback unmarshalled FungibleTokenPacketData %v", data)) - // TODO: move pending deposits to records module + unmarshalledTransferCallback := types.VaultTransferCallback{} + if err := proto.Unmarshal(args, &unmarshalledTransferCallback); err != nil { + k.Logger(ctx).Error(fmt.Sprintf("UnmarshalVaultTransferCallbackArgs %v", err.Error())) + return err + } + k.Logger(ctx).Info(fmt.Sprintf("VaultTransferCallback %v", unmarshalledTransferCallback)) - // TODO: not data.Sender but deposit strategy contract address + vault id - contractAddress, err := sdk.AccAddressFromBech32(data.Sender) + contractAddress, err := sdk.AccAddressFromBech32(unmarshalledTransferCallback.StrategyContract) if err != nil { return sdkerrors.Wrapf(types.ErrUnmarshalFailure, "cannot retrieve contract address: %s", err.Error()) } @@ -180,7 +184,11 @@ func YATransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, a return fmt.Errorf("failed to Sudo: %v", err) } - k.YAKeeper.DecreasePendingDeposit(ctx, vault.Id, data.Amount) + amount, ok := sdk.NewIntFromString(data.Amount) + if !ok { + return fmt.Errorf("failed to parse transfer amount: %s", data.Amount) + } + k.DecreaseVaultPendingDeposit(ctx, unmarshalledTransferCallback.VaultId, amount) return nil } diff --git a/x/yieldaggregator/submodules/records/keeper/callbacks.go b/x/yieldaggregator/submodules/records/keeper/callbacks.go index 83beafd06..53348ad38 100644 --- a/x/yieldaggregator/submodules/records/keeper/callbacks.go +++ b/x/yieldaggregator/submodules/records/keeper/callbacks.go @@ -43,7 +43,7 @@ func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandle a := c. AddICACallback(TRANSFER, ICACallback(TransferCallback)). AddICACallback(CONTRACT_TRANSFER, ICACallback(ContractTransferCallback)). - AddICACallback(YA_TRANSFER, ICACallback(YATransferCallback)) + AddICACallback(YA_TRANSFER, ICACallback(VaultTransferCallback)) return a.(ICACallbacks) } diff --git a/x/yieldaggregator/submodules/records/keeper/grpc_query.go b/x/yieldaggregator/submodules/records/keeper/grpc_query.go index 9541170ee..fba883d90 100644 --- a/x/yieldaggregator/submodules/records/keeper/grpc_query.go +++ b/x/yieldaggregator/submodules/records/keeper/grpc_query.go @@ -185,3 +185,12 @@ func (k Keeper) DepositRecord(c context.Context, req *types.QueryGetDepositRecor return &types.QueryGetDepositRecordResponse{DepositRecord: depositRecord}, nil } + +func (k Keeper) PendingVaultDepositAll(c context.Context, req *types.QueryAllPendingVaultDepositRequest) (*types.QueryPendingVaultDepositResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + return &types.QueryPendingVaultDepositResponse{PendingDeposits: k.GetAllVaultPendingDeposits(ctx)}, nil +} diff --git a/x/yieldaggregator/submodules/records/keeper/keeper.go b/x/yieldaggregator/submodules/records/keeper/keeper.go index a87f76b5e..79e012052 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper.go @@ -6,6 +6,7 @@ import ( "github.com/cometbft/cometbft/libs/log" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + "github.com/golang/protobuf/proto" icacallbackstypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/icacallbacks/types" @@ -160,7 +161,7 @@ func (k Keeper) ContractTransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) err return nil } -func (k Keeper) YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error { +func (k Keeper) VaultTransfer(ctx sdk.Context, vaultId uint64, contractAddr sdk.AccAddress, msg *ibctypes.MsgTransfer) error { goCtx := sdk.WrapSDKContext(ctx) sequence, found := k.IBCKeeper.ChannelKeeper.GetNextSequenceSend(ctx, msg.SourcePort, msg.SourceChannel) if !found { @@ -170,8 +171,19 @@ func (k Keeper) YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error { ) } + transferCallback := types.VaultTransferCallback{ + VaultId: vaultId, + StrategyContract: contractAddr.String(), + } + k.Logger(ctx).Info(fmt.Sprintf("Marshalling TransferCallback args: %v", transferCallback)) + marshalledCallbackArgs, err := proto.Marshal(&transferCallback) + if err != nil { + k.Logger(ctx).Error(fmt.Sprintf("MarshalTransferCallbackArgs %v", err.Error())) + return err + } + // trigger transfer - _, err := k.TransferKeeper.Transfer(goCtx, msg) + _, err = k.TransferKeeper.Transfer(goCtx, msg) if err != nil { return err } @@ -183,7 +195,7 @@ func (k Keeper) YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error { ChannelId: msg.SourceChannel, Sequence: sequence, CallbackId: CONTRACT_TRANSFER, - CallbackArgs: []byte{}, + CallbackArgs: marshalledCallbackArgs, } k.Logger(ctx).Info(fmt.Sprintf("Storing callback data: %v", callback)) k.ICACallbacksKeeper.SetCallbackData(ctx, callback) diff --git a/x/yieldaggregator/keeper/pending_deposit.go b/x/yieldaggregator/submodules/records/keeper/pending_deposit.go similarity index 63% rename from x/yieldaggregator/keeper/pending_deposit.go rename to x/yieldaggregator/submodules/records/keeper/pending_deposit.go index 07b6ebd56..c0d596ab3 100644 --- a/x/yieldaggregator/keeper/pending_deposit.go +++ b/x/yieldaggregator/submodules/records/keeper/pending_deposit.go @@ -7,10 +7,10 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/UnUniFi/chain/x/yieldaggregator/types" + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" ) -func (k Keeper) GetAllPendingDeposits(ctx sdk.Context) []types.PendingDeposit { +func (k Keeper) GetAllVaultPendingDeposits(ctx sdk.Context) []types.PendingDeposit { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) deposits := []types.PendingDeposit{} iterator := store.Iterator(nil, nil) @@ -29,17 +29,17 @@ func (k Keeper) GetAllPendingDeposits(ctx sdk.Context) []types.PendingDeposit { return deposits } -func (k Keeper) IncreasePendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { - deposit := k.GetPendingDeposit(ctx, vaultId) - k.SetPendingDeposit(ctx, vaultId, deposit.Add(amount)) +func (k Keeper) IncreaseVaultPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { + deposit := k.GetVaultPendingDeposit(ctx, vaultId) + k.SetVaultPendingDeposit(ctx, vaultId, deposit.Add(amount)) } -func (k Keeper) DecreasePendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { - deposit := k.GetPendingDeposit(ctx, vaultId) - k.SetPendingDeposit(ctx, vaultId, deposit.Sub(amount)) +func (k Keeper) DecreaseVaultPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { + deposit := k.GetVaultPendingDeposit(ctx, vaultId) + k.SetVaultPendingDeposit(ctx, vaultId, deposit.Sub(amount)) } -func (k Keeper) GetPendingDeposit(ctx sdk.Context, vaultId uint64) sdk.Int { +func (k Keeper) GetVaultPendingDeposit(ctx sdk.Context, vaultId uint64) sdk.Int { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) bz := store.Get(sdk.Uint64ToBigEndian(vaultId)) if bz == nil { @@ -55,7 +55,7 @@ func (k Keeper) GetPendingDeposit(ctx sdk.Context, vaultId uint64) sdk.Int { return amount } -func (k Keeper) SetPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { +func (k Keeper) SetVaultPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) { store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.PendingDepositKey)) bz, err := amount.Marshal() if err != nil { diff --git a/x/yieldaggregator/submodules/records/types/callbacks.pb.go b/x/yieldaggregator/submodules/records/types/callbacks.pb.go index 14383cb39..d13f0c499 100644 --- a/x/yieldaggregator/submodules/records/types/callbacks.pb.go +++ b/x/yieldaggregator/submodules/records/types/callbacks.pb.go @@ -66,22 +66,23 @@ func (m *TransferCallback) GetDepositRecordId() uint64 { return 0 } -type TransferLSMTokenCallback struct { - Deposit *LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` +type VaultTransferCallback struct { + VaultId uint64 `protobuf:"varint,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` + StrategyContract string `protobuf:"bytes,2,opt,name=strategy_contract,json=strategyContract,proto3" json:"strategy_contract,omitempty"` } -func (m *TransferLSMTokenCallback) Reset() { *m = TransferLSMTokenCallback{} } -func (m *TransferLSMTokenCallback) String() string { return proto.CompactTextString(m) } -func (*TransferLSMTokenCallback) ProtoMessage() {} -func (*TransferLSMTokenCallback) Descriptor() ([]byte, []int) { +func (m *VaultTransferCallback) Reset() { *m = VaultTransferCallback{} } +func (m *VaultTransferCallback) String() string { return proto.CompactTextString(m) } +func (*VaultTransferCallback) ProtoMessage() {} +func (*VaultTransferCallback) Descriptor() ([]byte, []int) { return fileDescriptor_1a9d66e4bf18ea7d, []int{1} } -func (m *TransferLSMTokenCallback) XXX_Unmarshal(b []byte) error { +func (m *VaultTransferCallback) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TransferLSMTokenCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *VaultTransferCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TransferLSMTokenCallback.Marshal(b, m, deterministic) + return xxx_messageInfo_VaultTransferCallback.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -91,50 +92,58 @@ func (m *TransferLSMTokenCallback) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *TransferLSMTokenCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferLSMTokenCallback.Merge(m, src) +func (m *VaultTransferCallback) XXX_Merge(src proto.Message) { + xxx_messageInfo_VaultTransferCallback.Merge(m, src) } -func (m *TransferLSMTokenCallback) XXX_Size() int { +func (m *VaultTransferCallback) XXX_Size() int { return m.Size() } -func (m *TransferLSMTokenCallback) XXX_DiscardUnknown() { - xxx_messageInfo_TransferLSMTokenCallback.DiscardUnknown(m) +func (m *VaultTransferCallback) XXX_DiscardUnknown() { + xxx_messageInfo_VaultTransferCallback.DiscardUnknown(m) } -var xxx_messageInfo_TransferLSMTokenCallback proto.InternalMessageInfo +var xxx_messageInfo_VaultTransferCallback proto.InternalMessageInfo -func (m *TransferLSMTokenCallback) GetDeposit() *LSMTokenDeposit { +func (m *VaultTransferCallback) GetVaultId() uint64 { if m != nil { - return m.Deposit + return m.VaultId } - return nil + return 0 +} + +func (m *VaultTransferCallback) GetStrategyContract() string { + if m != nil { + return m.StrategyContract + } + return "" } func init() { proto.RegisterType((*TransferCallback)(nil), "ununifi.records.TransferCallback") - proto.RegisterType((*TransferLSMTokenCallback)(nil), "ununifi.records.TransferLSMTokenCallback") + proto.RegisterType((*VaultTransferCallback)(nil), "ununifi.records.VaultTransferCallback") } func init() { proto.RegisterFile("ununifi/records/callbacks.proto", fileDescriptor_1a9d66e4bf18ea7d) } var fileDescriptor_1a9d66e4bf18ea7d = []byte{ - // 251 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0xcd, 0x2b, 0xcd, - 0xcb, 0x4c, 0xcb, 0xd4, 0x2f, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x29, 0xd6, 0x4f, 0x4e, 0xcc, 0xc9, - 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x2a, 0xd0, - 0x83, 0x2a, 0x90, 0x92, 0x45, 0xd7, 0x01, 0xa5, 0x21, 0xea, 0x95, 0xec, 0xb8, 0x04, 0x42, 0x8a, - 0x12, 0xf3, 0x8a, 0xd3, 0x52, 0x8b, 0x9c, 0xa1, 0x46, 0x09, 0x69, 0x71, 0x09, 0xa6, 0xa4, 0x16, - 0xe4, 0x17, 0x67, 0x96, 0xc4, 0x43, 0x14, 0xc7, 0x67, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, - 0x04, 0xf1, 0x43, 0x25, 0x82, 0xc0, 0xe2, 0x9e, 0x29, 0x4a, 0x61, 0x5c, 0x12, 0x30, 0xfd, 0x3e, - 0xc1, 0xbe, 0x21, 0xf9, 0xd9, 0xa9, 0x79, 0x70, 0x73, 0xac, 0xb8, 0xd8, 0xa1, 0xca, 0xc1, 0xba, - 0xb9, 0x8d, 0x14, 0xf4, 0xd0, 0x5c, 0xa7, 0x07, 0xd3, 0xe3, 0x02, 0x35, 0x16, 0xa6, 0xc1, 0x29, - 0xf6, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, - 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x9c, 0xd3, 0x33, 0x4b, 0x32, - 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x43, 0xf3, 0x42, 0xf3, 0x32, 0xdd, 0x32, 0xf5, 0x93, - 0x33, 0x12, 0x33, 0xf3, 0xf4, 0x2b, 0xf4, 0x2b, 0x33, 0x53, 0x73, 0x52, 0x12, 0xd3, 0xd3, 0x8b, - 0x52, 0xd3, 0x13, 0x4b, 0xf2, 0x8b, 0xf4, 0x8b, 0x4b, 0x93, 0x72, 0xf3, 0x53, 0x4a, 0x73, 0x52, - 0xe1, 0xde, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xfb, 0xde, 0x18, 0x10, 0x00, - 0x00, 0xff, 0xff, 0x02, 0xf9, 0xb6, 0x4c, 0x50, 0x01, 0x00, 0x00, + // 269 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x4f, 0x4b, 0xc3, 0x30, + 0x18, 0xc6, 0x1b, 0x11, 0xff, 0xe4, 0xb2, 0xad, 0x20, 0x4c, 0xc1, 0x38, 0x76, 0x1a, 0x0a, 0xcd, + 0xc1, 0xbb, 0x07, 0x0b, 0xc2, 0xae, 0xc5, 0x79, 0x10, 0xa4, 0xa4, 0x49, 0x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6, 0x34, 0x7d, 0xa5, 0x8d, 0x92, 0x95, 0x60, 0x65, 0x69, 0x65, 0xc9, 0xc0, 0x58, 0xea, 0x7c, + 0xb1, 0x36, 0xc2, 0x57, 0xf2, 0xf7, 0x7e, 0x0a, 0x4d, 0x2d, 0x5d, 0x71, 0xd0, 0xbf, 0xe1, 0xfa, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x12, 0x78, 0x9c, 0x59, 0x01, 0x00, 0x00, } func (m *TransferCallback) Marshal() (dAtA []byte, err error) { @@ -165,7 +174,7 @@ func (m *TransferCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TransferLSMTokenCallback) Marshal() (dAtA []byte, err error) { +func (m *VaultTransferCallback) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -175,27 +184,27 @@ func (m *TransferLSMTokenCallback) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TransferLSMTokenCallback) MarshalTo(dAtA []byte) (int, error) { +func (m *VaultTransferCallback) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TransferLSMTokenCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *VaultTransferCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Deposit != nil { - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } + if len(m.StrategyContract) > 0 { + i -= len(m.StrategyContract) + copy(dAtA[i:], m.StrategyContract) + i = encodeVarintCallbacks(dAtA, i, uint64(len(m.StrategyContract))) + i-- + dAtA[i] = 0x12 + } + if m.VaultId != 0 { + i = encodeVarintCallbacks(dAtA, i, uint64(m.VaultId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -223,14 +232,17 @@ func (m *TransferCallback) Size() (n int) { return n } -func (m *TransferLSMTokenCallback) Size() (n int) { +func (m *VaultTransferCallback) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Deposit != nil { - l = m.Deposit.Size() + if m.VaultId != 0 { + n += 1 + sovCallbacks(uint64(m.VaultId)) + } + l = len(m.StrategyContract) + if l > 0 { n += 1 + l + sovCallbacks(uint64(l)) } return n @@ -311,7 +323,7 @@ func (m *TransferCallback) Unmarshal(dAtA []byte) error { } return nil } -func (m *TransferLSMTokenCallback) Unmarshal(dAtA []byte) error { +func (m *VaultTransferCallback) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -334,17 +346,36 @@ func (m *TransferLSMTokenCallback) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TransferLSMTokenCallback: wiretype end group for non-group") + return fmt.Errorf("proto: VaultTransferCallback: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TransferLSMTokenCallback: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VaultTransferCallback: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) + } + m.VaultId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCallbacks + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VaultId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StrategyContract", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCallbacks @@ -354,27 +385,23 @@ func (m *TransferLSMTokenCallback) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthCallbacks } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthCallbacks } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Deposit == nil { - m.Deposit = &LSMTokenDeposit{} - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.StrategyContract = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/yieldaggregator/submodules/records/types/genesis.pb.go b/x/yieldaggregator/submodules/records/types/genesis.pb.go index e23297e58..1c4aca5d3 100644 --- a/x/yieldaggregator/submodules/records/types/genesis.pb.go +++ b/x/yieldaggregator/submodules/records/types/genesis.pb.go @@ -33,6 +33,7 @@ type GenesisState struct { DepositRecordList []DepositRecord `protobuf:"bytes,7,rep,name=deposit_record_list,json=depositRecordList,proto3" json:"deposit_record_list"` DepositRecordCount uint64 `protobuf:"varint,8,opt,name=deposit_record_count,json=depositRecordCount,proto3" json:"deposit_record_count,omitempty"` LsmTokenDepositList []LSMTokenDeposit `protobuf:"bytes,9,rep,name=lsm_token_deposit_list,json=lsmTokenDepositList,proto3" json:"lsm_token_deposit_list"` + PendingDeposits []PendingDeposit `protobuf:"bytes,10,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -124,6 +125,13 @@ func (m *GenesisState) GetLsmTokenDepositList() []LSMTokenDeposit { return nil } +func (m *GenesisState) GetPendingDeposits() []PendingDeposit { + if m != nil { + return m.PendingDeposits + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "ununifi.records.GenesisState") } @@ -131,35 +139,37 @@ func init() { func init() { proto.RegisterFile("ununifi/records/genesis.proto", fileDescriptor_fd3c6e654df38706) } var fileDescriptor_fd3c6e654df38706 = []byte{ - // 438 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x6b, 0xd4, 0x40, - 0x18, 0xc7, 0x37, 0x76, 0xdd, 0xda, 0xa9, 0x20, 0xa6, 0xc5, 0xc6, 0x5a, 0x63, 0x10, 0x84, 0x3d, - 0x65, 0xa4, 0xe2, 0x59, 0x68, 0x7d, 0x41, 0xa8, 0x20, 0x69, 0x73, 0x51, 0x24, 0x24, 0x99, 0xc7, - 0xd9, 0xd1, 0x64, 0x26, 0xcc, 0x0b, 0xd8, 0x6f, 0xe1, 0xc7, 0xea, 0xb1, 0x47, 0x0f, 0x22, 0xb2, - 0xfb, 0x45, 0x4a, 0x26, 0xd3, 0xd2, 0x6c, 0x76, 0x4f, 0x99, 0x3c, 0xcf, 0xff, 0xe5, 0x37, 0x30, - 0xe8, 0xa9, 0xe1, 0x86, 0xb3, 0xef, 0x0c, 0x4b, 0x28, 0x85, 0x24, 0x0a, 0x53, 0xe0, 0xa0, 0x98, - 0x8a, 0x1b, 0x29, 0xb4, 0xf0, 0x1f, 0xb8, 0x75, 0xec, 0xd6, 0xfb, 0x07, 0xcb, 0xfa, 0x26, 0x97, - 0x79, 0xed, 0xe4, 0xfb, 0x83, 0x34, 0xf7, 0x75, 0xeb, 0x5d, 0x2a, 0xa8, 0xb0, 0x47, 0xdc, 0x9e, - 0xba, 0xe9, 0xf3, 0xbf, 0x63, 0x74, 0xff, 0x43, 0xd7, 0x7a, 0xaa, 0x73, 0x0d, 0xfe, 0x6b, 0x34, - 0xe9, 0x52, 0x03, 0x2f, 0xf2, 0xa6, 0xdb, 0x87, 0x7b, 0xf1, 0x12, 0x45, 0xfc, 0xd9, 0xae, 0x8f, - 0xc6, 0x17, 0xff, 0x9e, 0x8d, 0x12, 0x27, 0xf6, 0xf7, 0xd0, 0x66, 0x23, 0xa4, 0xce, 0x18, 0x09, - 0xee, 0x44, 0xde, 0x74, 0x2b, 0x99, 0xb4, 0xbf, 0x1f, 0x89, 0xff, 0x03, 0x3d, 0x31, 0x0a, 0x64, - 0x26, 0x81, 0x40, 0xdd, 0x68, 0x26, 0x78, 0xd6, 0x05, 0x65, 0x15, 0x53, 0x3a, 0xd8, 0x88, 0x36, - 0xa6, 0xdb, 0x87, 0x2f, 0x06, 0x25, 0xa9, 0x02, 0x99, 0xdc, 0x58, 0x12, 0x3b, 0x75, 0x95, 0x81, - 0x59, 0xb1, 0x3b, 0x61, 0x4a, 0xfb, 0x6f, 0xd0, 0xc1, 0x9a, 0xae, 0x52, 0x18, 0xae, 0x83, 0x71, - 0xe4, 0x4d, 0xc7, 0xc9, 0xe3, 0x55, 0xfe, 0xe3, 0x56, 0xd0, 0xc2, 0x42, 0x23, 0xca, 0x59, 0x66, - 0x78, 0x21, 0x38, 0x61, 0x9c, 0xf6, 0x60, 0xef, 0xae, 0x81, 0x7d, 0xd7, 0x7a, 0xd2, 0x6b, 0x4b, - 0x1f, 0x16, 0x56, 0xec, 0x2c, 0xec, 0x19, 0xda, 0x21, 0xd0, 0x08, 0xc5, 0x74, 0xaf, 0x63, 0xd3, - 0x76, 0x84, 0x83, 0x8e, 0xb7, 0x9d, 0xb6, 0x17, 0xfe, 0x90, 0xdc, 0x1e, 0xda, 0xd4, 0x97, 0x68, - 0x77, 0x29, 0xb5, 0xbb, 0xfa, 0x3d, 0x7b, 0x75, 0xbf, 0x67, 0xe8, 0xee, 0xfc, 0x15, 0x3d, 0xaa, - 0x54, 0x9d, 0x69, 0xf1, 0x13, 0x78, 0x76, 0xed, 0xb5, 0x28, 0x5b, 0x16, 0x25, 0x1a, 0xa0, 0x9c, - 0x9c, 0x7e, 0x3a, 0x6b, 0xd5, 0x0e, 0xc9, 0xc1, 0xec, 0x54, 0xaa, 0xbe, 0x3d, 0x6e, 0x71, 0x8e, - 0xbe, 0x5d, 0xcc, 0x43, 0xef, 0x72, 0x1e, 0x7a, 0xff, 0xe7, 0xa1, 0xf7, 0x7b, 0x11, 0x8e, 0x2e, - 0x17, 0xe1, 0xe8, 0xcf, 0x22, 0x1c, 0x7d, 0x39, 0xa6, 0x4c, 0xcf, 0x4c, 0x11, 0x97, 0xa2, 0xc6, - 0x29, 0x4f, 0x39, 0x7b, 0xcf, 0x70, 0x39, 0xcb, 0x19, 0xc7, 0xbf, 0xf0, 0x39, 0x83, 0x8a, 0xe4, - 0x94, 0x4a, 0xa0, 0xb9, 0x16, 0x12, 0x2b, 0x53, 0xd4, 0x82, 0x98, 0x0a, 0x6e, 0xde, 0x34, 0xd6, - 0xe7, 0x0d, 0xa8, 0x62, 0x62, 0x1f, 0xf1, 0xab, 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x83, - 0xcb, 0x28, 0x49, 0x03, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x6a, 0xd4, 0x40, + 0x14, 0xc6, 0x37, 0xb6, 0xdd, 0xda, 0xa9, 0x50, 0x4d, 0x8b, 0x8d, 0xb5, 0xa6, 0x41, 0x10, 0xf6, + 0x2a, 0x23, 0x15, 0xaf, 0x85, 0xd6, 0x3f, 0x08, 0x15, 0x4a, 0xda, 0xbd, 0x51, 0x24, 0x64, 0x33, + 0xc7, 0xec, 0x68, 0x32, 0x33, 0xcc, 0x1f, 0xb0, 0x6f, 0xe1, 0x93, 0xf8, 0x1c, 0xbd, 0xec, 0xa5, + 0x57, 0x22, 0xbb, 0x2f, 0x22, 0x99, 0x99, 0x96, 0x66, 0xb3, 0xbd, 0xca, 0xe4, 0x9c, 0xef, 0x7c, + 0xdf, 0xef, 0x84, 0x0c, 0x7a, 0x66, 0x98, 0x61, 0xf4, 0x1b, 0xc5, 0x12, 0x4a, 0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a, 0x1b, 0x84, 0xde, 0x9b, 0x03, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -182,6 +192,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.PendingDeposits) > 0 { + for iNdEx := len(m.PendingDeposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } if len(m.LsmTokenDepositList) > 0 { for iNdEx := len(m.LsmTokenDepositList) - 1; iNdEx >= 0; iNdEx-- { { @@ -321,6 +345,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.PendingDeposits) > 0 { + for _, e := range m.PendingDeposits { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -598,6 +628,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingDeposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingDeposits = append(m.PendingDeposits, PendingDeposit{}) + if err := m.PendingDeposits[len(m.PendingDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/yieldaggregator/submodules/records/types/keys.go b/x/yieldaggregator/submodules/records/types/keys.go index 6d354f89a..bf0f67e62 100644 --- a/x/yieldaggregator/submodules/records/types/keys.go +++ b/x/yieldaggregator/submodules/records/types/keys.go @@ -40,4 +40,5 @@ const ( EpochUnbondingRecordCountKey = "EpochUnbondingRecord-count-" DepositRecordKey = "DepositRecord-value-" DepositRecordCountKey = "DepositRecord-count-" + PendingDepositKey = "PendingDeposit-info-" ) diff --git a/x/yieldaggregator/submodules/records/types/query.pb.go b/x/yieldaggregator/submodules/records/types/query.pb.go index 84ad494e4..66bb65685 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.go @@ -802,6 +802,86 @@ func (m *QueryAllEpochUnbondingRecordResponse) GetPagination() *query.PageRespon return nil } +type QueryAllPendingVaultDepositRequest struct { +} + +func (m *QueryAllPendingVaultDepositRequest) Reset() { *m = QueryAllPendingVaultDepositRequest{} } +func (m *QueryAllPendingVaultDepositRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllPendingVaultDepositRequest) ProtoMessage() {} +func (*QueryAllPendingVaultDepositRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{16} +} +func (m *QueryAllPendingVaultDepositRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllPendingVaultDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllPendingVaultDepositRequest.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 *QueryAllPendingVaultDepositRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllPendingVaultDepositRequest.Merge(m, src) +} +func (m *QueryAllPendingVaultDepositRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllPendingVaultDepositRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllPendingVaultDepositRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllPendingVaultDepositRequest proto.InternalMessageInfo + +type QueryPendingVaultDepositResponse struct { + PendingDeposits []PendingDeposit `protobuf:"bytes,1,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` +} + +func (m *QueryPendingVaultDepositResponse) Reset() { *m = QueryPendingVaultDepositResponse{} } +func (m *QueryPendingVaultDepositResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPendingVaultDepositResponse) ProtoMessage() {} +func (*QueryPendingVaultDepositResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75af079ed2bd9fe5, []int{17} +} +func (m *QueryPendingVaultDepositResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingVaultDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingVaultDepositResponse.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 *QueryPendingVaultDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingVaultDepositResponse.Merge(m, src) +} +func (m *QueryPendingVaultDepositResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingVaultDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingVaultDepositResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingVaultDepositResponse proto.InternalMessageInfo + +func (m *QueryPendingVaultDepositResponse) GetPendingDeposits() []PendingDeposit { + if m != nil { + return m.PendingDeposits + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.records.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.records.QueryParamsResponse") @@ -819,71 +899,79 @@ func init() { proto.RegisterType((*QueryGetEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryGetEpochUnbondingRecordResponse") proto.RegisterType((*QueryAllEpochUnbondingRecordRequest)(nil), "ununifi.records.QueryAllEpochUnbondingRecordRequest") proto.RegisterType((*QueryAllEpochUnbondingRecordResponse)(nil), "ununifi.records.QueryAllEpochUnbondingRecordResponse") + proto.RegisterType((*QueryAllPendingVaultDepositRequest)(nil), "ununifi.records.QueryAllPendingVaultDepositRequest") + proto.RegisterType((*QueryPendingVaultDepositResponse)(nil), "ununifi.records.QueryPendingVaultDepositResponse") } func init() { proto.RegisterFile("ununifi/records/query.proto", fileDescriptor_75af079ed2bd9fe5) } var fileDescriptor_75af079ed2bd9fe5 = []byte{ - // 933 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0x8e, 0x93, 0xb4, 0x0b, 0x53, 0x76, 0x59, 0x0d, 0x11, 0xcd, 0x66, 0x77, 0x53, 0xd6, 0x5b, - 0xb6, 0xb0, 0xb4, 0x1e, 0xb5, 0xb4, 0x08, 0x09, 0x84, 0xd4, 0x02, 0x2d, 0x08, 0x84, 0x4a, 0x50, - 0x2e, 0x20, 0x14, 0x4d, 0xe2, 0xa9, 0x3b, 0x92, 0xed, 0x71, 0xfd, 0x81, 0x88, 0xa2, 0x5c, 0xb8, - 0x71, 0x43, 0xe2, 0x86, 0xb8, 0xf3, 0x0b, 0x10, 0xe2, 0xcc, 0xa5, 0xc7, 0x02, 0x17, 0xb8, 0x20, - 0xd4, 0xf2, 0x17, 0xb8, 0x23, 0xcf, 0x8c, 0xdb, 0x38, 0x1e, 0x3b, 0x69, 0x14, 0x0e, 0x7b, 0x8a, - 0xed, 0xf7, 0xeb, 0x79, 0xde, 0xaf, 0x99, 0x80, 0xbb, 0x91, 0x1b, 0xb9, 0xf4, 0x88, 0x22, 0x9f, - 0xf4, 0x98, 0x6f, 0x06, 0xe8, 0x24, 0x22, 0x7e, 0xdf, 0xf0, 0x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xfd, 0x7d, 0xde, 0xd4, 0xbe, 0xb9, 0x68, 0x96, 0xce, 0x2e, 0x9a, 0xa5, 0x3f, 0x2e, - 0x9a, 0xa5, 0x4f, 0xdf, 0xb6, 0x68, 0x78, 0x1c, 0x75, 0x8d, 0x1e, 0x73, 0x50, 0xdb, 0x6d, 0xbb, - 0x74, 0x9f, 0x22, 0x3e, 0x0b, 0xe8, 0x4b, 0xd4, 0xa7, 0xc4, 0x36, 0xb1, 0x65, 0xf9, 0xc4, 0xc2, - 0x21, 0xf3, 0x51, 0x10, 0x75, 0x1d, 0x66, 0x46, 0x36, 0xb9, 0xfc, 0xe7, 0x89, 0xc2, 0xbe, 0x47, - 0x82, 0xee, 0x22, 0xff, 0x0b, 0xf8, 0xea, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x85, 0x17, 0xd6, - 0x03, 0xcf, 0x0e, 0x00, 0x00, + // 1025 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x49, 0x0a, 0xaf, 0x5f, 0xd1, 0x60, 0x35, 0xa9, 0xdb, 0x3a, 0xed, 0x36, 0x34, + 0xd0, 0x36, 0x3b, 0x4a, 0xd3, 0x20, 0x24, 0x10, 0x52, 0x0a, 0xa4, 0x20, 0x10, 0x0a, 0x46, 0xe6, + 0x00, 0x42, 0xd6, 0xd8, 0x3b, 0xd9, 0x8c, 0xb4, 0xde, 0xd9, 0xee, 0x47, 0x85, 0x65, 0xf9, 0xc2, + 0x8d, 0x1b, 0x12, 0x37, 0xc4, 0xbf, 0x51, 0x21, 0xce, 0x5c, 0x7a, 0x0c, 0x70, 0x81, 0x0b, 0xa0, + 0x84, 0x7f, 0x81, 0x3b, 0xda, 0x99, 0xd9, 0x24, 0xeb, 0x9d, 0x5d, 0x3b, 0x96, 0x39, 0x70, 0xb2, +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0x61, 0x7b, 0x41, + 0x3c, 0xab, 0x37, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x63, 0xdf, 0x25, 0x58, 0x23, 0x10, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -914,6 +1002,7 @@ type QueryClient interface { DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) + PendingVaultDepositAll(ctx context.Context, in *QueryAllPendingVaultDepositRequest, opts ...grpc.CallOption) (*QueryPendingVaultDepositResponse, error) } type queryClient struct { @@ -996,6 +1085,15 @@ func (c *queryClient) DepositRecordAll(ctx context.Context, in *QueryAllDepositR return out, nil } +func (c *queryClient) PendingVaultDepositAll(ctx context.Context, in *QueryAllPendingVaultDepositRequest, opts ...grpc.CallOption) (*QueryPendingVaultDepositResponse, error) { + out := new(QueryPendingVaultDepositResponse) + err := c.cc.Invoke(ctx, "/ununifi.records.Query/PendingVaultDepositAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -1014,6 +1112,7 @@ type QueryServer interface { DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) // Queries a list of DepositRecord items. DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) + PendingVaultDepositAll(context.Context, *QueryAllPendingVaultDepositRequest) (*QueryPendingVaultDepositResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1044,6 +1143,9 @@ func (*UnimplementedQueryServer) DepositRecord(ctx context.Context, req *QueryGe func (*UnimplementedQueryServer) DepositRecordAll(ctx context.Context, req *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DepositRecordAll not implemented") } +func (*UnimplementedQueryServer) PendingVaultDepositAll(ctx context.Context, req *QueryAllPendingVaultDepositRequest) (*QueryPendingVaultDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PendingVaultDepositAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1193,6 +1295,24 @@ func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_PendingVaultDepositAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllPendingVaultDepositRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PendingVaultDepositAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.records.Query/PendingVaultDepositAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PendingVaultDepositAll(ctx, req.(*QueryAllPendingVaultDepositRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.records.Query", HandlerType: (*QueryServer)(nil), @@ -1229,6 +1349,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "DepositRecordAll", Handler: _Query_DepositRecordAll_Handler, }, + { + MethodName: "PendingVaultDepositAll", + Handler: _Query_PendingVaultDepositAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/records/query.proto", @@ -1835,6 +1959,66 @@ func (m *QueryAllEpochUnbondingRecordResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *QueryAllPendingVaultDepositRequest) 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 *QueryAllPendingVaultDepositRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPendingVaultDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryPendingVaultDepositResponse) 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 *QueryPendingVaultDepositResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingVaultDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PendingDeposits) > 0 { + for iNdEx := len(m.PendingDeposits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2078,6 +2262,30 @@ func (m *QueryAllEpochUnbondingRecordResponse) Size() (n int) { return n } +func (m *QueryAllPendingVaultDepositRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryPendingVaultDepositResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PendingDeposits) > 0 { + for _, e := range m.PendingDeposits { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3612,6 +3820,140 @@ func (m *QueryAllEpochUnbondingRecordResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAllPendingVaultDepositRequest) 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 ErrIntOverflowQuery + } + 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: QueryAllPendingVaultDepositRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllPendingVaultDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryPendingVaultDepositResponse) 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 ErrIntOverflowQuery + } + 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: QueryPendingVaultDepositResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPendingVaultDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingDeposits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingDeposits = append(m.PendingDeposits, PendingDeposit{}) + if err := m.PendingDeposits[len(m.PendingDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/submodules/records/types/query.pb.gw.go b/x/yieldaggregator/submodules/records/types/query.pb.gw.go index c0c8c13ef..d4a4299f9 100644 --- a/x/yieldaggregator/submodules/records/types/query.pb.gw.go +++ b/x/yieldaggregator/submodules/records/types/query.pb.gw.go @@ -459,6 +459,24 @@ func local_request_Query_DepositRecordAll_0(ctx context.Context, marshaler runti } +func request_Query_PendingVaultDepositAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPendingVaultDepositRequest + var metadata runtime.ServerMetadata + + msg, err := client.PendingVaultDepositAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PendingVaultDepositAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPendingVaultDepositRequest + var metadata runtime.ServerMetadata + + msg, err := server.PendingVaultDepositAll(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -649,6 +667,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_PendingVaultDepositAll_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_Query_PendingVaultDepositAll_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_Query_PendingVaultDepositAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -850,6 +891,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_PendingVaultDepositAll_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_Query_PendingVaultDepositAll_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_PendingVaultDepositAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -869,6 +930,8 @@ var ( pattern_Query_DepositRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "records", "deposit_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_DepositRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "deposit_record"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PendingVaultDepositAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "records", "all_pending_vault_deposits"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -887,4 +950,6 @@ var ( forward_Query_DepositRecord_0 = runtime.ForwardResponseMessage forward_Query_DepositRecordAll_0 = runtime.ForwardResponseMessage + + forward_Query_PendingVaultDepositAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/yieldaggregator/submodules/records/types/records.pb.go b/x/yieldaggregator/submodules/records/types/records.pb.go index 215d3490b..7a3acc187 100644 --- a/x/yieldaggregator/submodules/records/types/records.pb.go +++ b/x/yieldaggregator/submodules/records/types/records.pb.go @@ -571,6 +571,51 @@ func (m *LSMTokenDeposit) GetStatus() LSMTokenDeposit_Status { return LSMTokenDeposit_DEPOSIT_PENDING } +type PendingDeposit struct { + VaultId uint64 `protobuf:"varint,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"` +} + +func (m *PendingDeposit) Reset() { *m = PendingDeposit{} } +func (m *PendingDeposit) String() string { return proto.CompactTextString(m) } +func (*PendingDeposit) ProtoMessage() {} +func (*PendingDeposit) Descriptor() ([]byte, []int) { + return fileDescriptor_053f6b4b66254fb3, []int{5} +} +func (m *PendingDeposit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PendingDeposit.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 *PendingDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingDeposit.Merge(m, src) +} +func (m *PendingDeposit) XXX_Size() int { + return m.Size() +} +func (m *PendingDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_PendingDeposit.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingDeposit proto.InternalMessageInfo + +func (m *PendingDeposit) GetVaultId() uint64 { + if m != nil { + return m.VaultId + } + return 0 +} + func init() { proto.RegisterEnum("ununifi.records.DepositRecord_Status", DepositRecord_Status_name, DepositRecord_Status_value) proto.RegisterEnum("ununifi.records.DepositRecord_Source", DepositRecord_Source_name, DepositRecord_Source_value) @@ -581,76 +626,80 @@ func init() { proto.RegisterType((*HostZoneUnbonding)(nil), "ununifi.records.HostZoneUnbonding") proto.RegisterType((*EpochUnbondingRecord)(nil), "ununifi.records.EpochUnbondingRecord") proto.RegisterType((*LSMTokenDeposit)(nil), "ununifi.records.LSMTokenDeposit") + proto.RegisterType((*PendingDeposit)(nil), "ununifi.records.PendingDeposit") } func init() { proto.RegisterFile("ununifi/records/records.proto", fileDescriptor_053f6b4b66254fb3) } var fileDescriptor_053f6b4b66254fb3 = []byte{ - // 1016 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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 0xfe, 0x35, 0x6c, 0x52, 0x37, 0x24, - 0x17, 0xf8, 0x66, 0xee, 0xdb, 0xa9, 0x68, 0x23, 0x49, 0x35, 0x9f, 0xff, 0xb6, 0x82, 0xda, 0x85, - 0x6a, 0x74, 0x7d, 0x79, 0x27, 0x24, 0x13, 0x2c, 0x06, 0x50, 0xb6, 0xd7, 0x32, 0xb4, 0x4f, 0x26, - 0x18, 0x19, 0x0b, 0xba, 0x7b, 0xb8, 0x24, 0x83, 0xa5, 0x52, 0x2e, 0x6a, 0xef, 0x23, 0xb8, 0x1f, - 0x71, 0x1c, 0x38, 0x41, 0x66, 0x43, 0x4e, 0x1a, 0xab, 0x96, 0x1a, 0x85, 0x56, 0xc5, 0xbe, 0x1b, - 0xbd, 0xc6, 0xa4, 0x78, 0xf3, 0xfb, 0x4c, 0x42, 0x9b, 0xb0, 0x3e, 0xe8, 0xee, 0x1f, 0x77, 0xdb, - 0x56, 0xf7, 0x28, 0xd3, 0xd0, 0x16, 0xdc, 0x9d, 0x81, 0x37, 0x24, 0x81, 0xee, 0xc3, 0xa6, 0xf9, - 0xa5, 0xd5, 0x77, 0x16, 0x74, 0x27, 0xa1, 0x1d, 0xd8, 0xba, 0x49, 0xcc, 0xc7, 0xc9, 0x68, 0x0d, - 0x2a, 0x07, 0x1d, 0xc3, 0x7a, 0x6a, 0xec, 0x77, 0x4c, 0x25, 0xdf, 0xfc, 0x51, 0x82, 0x9a, 0x18, - 0x89, 0xec, 0x6a, 0xa9, 0x39, 0x2c, 0x7a, 0x8f, 0xb4, 0xec, 0x3d, 0x7d, 0xa8, 0xcd, 0x1a, 0x90, - 0x95, 0x94, 0xab, 0x85, 0x46, 0xa1, 0xb5, 0xba, 0xd7, 0xfc, 0xe7, 0x2a, 0xda, 0x68, 0xbc, 0x08, - 0xf1, 0x27, 0x72, 0x39, 0xaf, 0x14, 0x9a, 0xbf, 0xca, 0xb0, 0xde, 0xe9, 0x3d, 0x15, 0x2a, 0x48, - 0x87, 0x10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, 0x66, 0x3e, 0xdd, 0x4a, 0x3c, 0x30, - 0x0b, 0x7c, 0x9a, 0xb4, 0xb8, 0xff, 0xd5, 0x8b, 0xcb, 0xba, 0xf4, 0xf2, 0xb2, 0x2e, 0xfd, 0x71, - 0x59, 0x97, 0x7e, 0xb8, 0xaa, 0xe7, 0x5e, 0x5e, 0xd5, 0x73, 0xbf, 0x5d, 0xd5, 0x73, 0xa7, 0x07, - 0x73, 0xe5, 0x1f, 0xd0, 0x01, 0x25, 0x87, 0x44, 0x17, 0xca, 0xd1, 0xbf, 0xd5, 0x9f, 0x13, 0x7c, - 0xee, 0xbb, 0xa3, 0x51, 0x80, 0x47, 0x71, 0x27, 0x75, 0x1e, 0x0d, 0x27, 0xcc, 0x8f, 0xce, 0x71, - 0xf6, 0x3d, 0x93, 0xf4, 0x67, 0x58, 0x14, 0xdf, 0x23, 0x1f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, - 0x52, 0xa3, 0x8d, 0x22, 0xf7, 0x08, 0x00, 0x00, + // 1066 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x17, 0x15, 0x25, 0x5a, 0x3f, 0xd7, 0x91, 0xac, 0x8c, 0x95, 0x44, 0xf6, 0x87, 0xc8, 0xfa, 0x08, + 0xb8, 0x55, 0x50, 0x94, 0x6a, 0x5c, 0xa0, 0x8b, 0x00, 0x45, 0x40, 0x5b, 0xb4, 0xc3, 0x54, 0x91, + 0x5d, 0x4a, 0xaa, 0x0b, 0x03, 0x2d, 0x41, 0x91, 0x53, 0x69, 0x60, 0x91, 0x23, 0x70, 0x48, 0xa3, + 0xee, 0xa6, 0x9b, 0x3e, 0x40, 0x37, 0x7d, 0x85, 0xf6, 0x09, 0xfa, 0x0e, 0xd9, 0x35, 0xcb, 0xa2, + 0x0b, 0xa3, 0xb0, 0x77, 0x5d, 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0xeb, 0x65, 0x43, 0xf8, 0xf6, 0xaa, 0x91, 0x79, 0x75, 0xd5, 0xc8, 0xfc, 0x7c, 0xd5, 0xc8, + 0x9c, 0xec, 0x2d, 0xa4, 0x1e, 0xba, 0x43, 0x97, 0xec, 0x93, 0x36, 0x17, 0x70, 0xfb, 0xcb, 0xf6, + 0x39, 0xc1, 0x53, 0xdb, 0x1c, 0x8f, 0x3d, 0x3c, 0x0e, 0x05, 0xd5, 0x66, 0xc1, 0xc8, 0xa1, 0x76, + 0x30, 0xc5, 0xc9, 0x6f, 0x55, 0xb4, 0xf6, 0x28, 0xcf, 0x7f, 0x8b, 0xde, 0xff, 0x23, 0x00, 0x00, + 0xff, 0xff, 0x4f, 0xfb, 0x39, 0xf8, 0x7e, 0x09, 0x00, 0x00, } func (m *UserRedemptionRecord) Marshal() (dAtA []byte, err error) { @@ -1011,6 +1060,44 @@ func (m *LSMTokenDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PendingDeposit) 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 *PendingDeposit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRecords(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.VaultId != 0 { + i = encodeVarintRecords(dAtA, i, uint64(m.VaultId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintRecords(dAtA []byte, offset int, v uint64) int { offset -= sovRecords(v) base := offset @@ -1181,6 +1268,20 @@ func (m *LSMTokenDeposit) Size() (n int) { return n } +func (m *PendingDeposit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VaultId != 0 { + n += 1 + sovRecords(uint64(m.VaultId)) + } + l = m.Amount.Size() + n += 1 + l + sovRecords(uint64(l)) + return n +} + func sovRecords(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2377,6 +2478,109 @@ func (m *LSMTokenDeposit) Unmarshal(dAtA []byte) error { } return nil } +func (m *PendingDeposit) 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 ErrIntOverflowRecords + } + 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: PendingDeposit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingDeposit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) + } + m.VaultId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VaultId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecords + } + 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 ErrInvalidLengthRecords + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecords + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecords(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRecords + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipRecords(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/yieldaggregator/types/expected_keepers.go b/x/yieldaggregator/types/expected_keepers.go index a55741081..9ae07f21b 100644 --- a/x/yieldaggregator/types/expected_keepers.go +++ b/x/yieldaggregator/types/expected_keepers.go @@ -31,5 +31,8 @@ type BankKeeper interface { type RecordsKeeper interface { GetUserRedemptionRecordBySenderAndHostZone(ctx sdk.Context, sender sdk.AccAddress, zoneId string) sdk.Int - YATransfer(ctx sdk.Context, msg *ibctypes.MsgTransfer) error + VaultTransfer(ctx sdk.Context, vaultId uint64, contractAddr sdk.AccAddress, msg *ibctypes.MsgTransfer) error + GetVaultPendingDeposit(ctx sdk.Context, vaultId uint64) sdk.Int + IncreaseVaultPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) + DecreaseVaultPendingDeposit(ctx sdk.Context, vaultId uint64, amount sdk.Int) } diff --git a/x/yieldaggregator/types/genesis.pb.go b/x/yieldaggregator/types/genesis.pb.go index a74e4e265..c647f3a81 100644 --- a/x/yieldaggregator/types/genesis.pb.go +++ b/x/yieldaggregator/types/genesis.pb.go @@ -27,9 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // this line is used by starport scaffolding # genesis/proto/state - Vaults []Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults"` - Strategies []Strategy `protobuf:"bytes,3,rep,name=strategies,proto3" json:"strategies"` - PendingDeposits []PendingDeposit `protobuf:"bytes,4,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` + Vaults []Vault `protobuf:"bytes,2,rep,name=vaults,proto3" json:"vaults"` + Strategies []Strategy `protobuf:"bytes,3,rep,name=strategies,proto3" json:"strategies"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -86,13 +85,6 @@ func (m *GenesisState) GetStrategies() []Strategy { return nil } -func (m *GenesisState) GetPendingDeposits() []PendingDeposit { - if m != nil { - return m.PendingDeposits - } - return nil -} - func init() { proto.RegisterType((*GenesisState)(nil), "ununifi.yieldaggregator.GenesisState") } @@ -102,27 +94,24 @@ func init() { } var fileDescriptor_e9e31aa2ddc9ddbc = []byte{ - // 308 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xf3, 0x30, - 0x18, 0x80, 0xdb, 0x6d, 0xec, 0x90, 0x7d, 0xf0, 0x49, 0x11, 0x2c, 0x3d, 0x64, 0x53, 0x14, 0x77, - 0xb1, 0x91, 0x79, 0xd5, 0xcb, 0x10, 0x07, 0x9e, 0xc4, 0x31, 0x11, 0x2f, 0x92, 0xad, 0x31, 0x7b, - 0x61, 0x4b, 0x42, 0x93, 0x8a, 0xfd, 0x17, 0xfe, 0x12, 0x7f, 0xc7, 0x8e, 0x3b, 0x7a, 0x12, 0x69, - 0xff, 0x88, 0xac, 0xa9, 0xa0, 0x93, 0xdc, 0x92, 0xf0, 0x3c, 0x0f, 0x6f, 0x78, 0xd1, 0x51, 0x26, - 0x32, 0x01, 0x4f, 0x40, 0x72, 0x60, 0x8b, 0x84, 0x72, 0x9e, 0x32, 0x4e, 0x8d, 0x4c, 0x09, 0x67, - 0x82, 0x69, 0xd0, 0xb1, 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 0x82, 0x20, 0x2f, 0x7f, 0x96, 0x61, 0x72, - 0xc5, 0xf4, 0xb4, 0x5d, 0xed, 0xe0, 0xec, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd1, 0xa9, 0xe3, 0x30, - 0x30, 0x02, 0x00, 0x00, + // 272 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0xcd, 0x2b, 0xcd, + 0xcb, 0x4c, 0xcb, 0xd4, 0xaf, 0xcc, 0x4c, 0xcd, 0x49, 0x49, 0x4c, 0x4f, 0x2f, 0x4a, 0x4d, 0x4f, + 0x2c, 0xc9, 0x2f, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x12, 0x87, 0x2a, 0xd3, 0x43, 0x53, 0x26, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x56, + 0xa3, 0x0f, 0x62, 0x41, 0x94, 0x4b, 0xa9, 0xe0, 0x32, 0xb5, 0x20, 0xb1, 0x28, 0x31, 0x17, 0x6a, + 0xa8, 0x94, 0x2e, 0x2e, 0x55, 0x68, 0x7c, 0x88, 0x72, 0xa5, 0x2b, 0x8c, 0x5c, 0x3c, 0xee, 0x10, + 0x57, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0xd9, 0x72, 0xb1, 0x41, 0xcc, 0x93, 0x60, 0x54, 0x60, + 0xd4, 0xe0, 0x36, 0x92, 0xd7, 0xc3, 0xe1, 0x4a, 0xbd, 0x00, 0xb0, 0x32, 0x27, 0x96, 0x13, 0xf7, + 0xe4, 0x19, 0x82, 0xa0, 0x9a, 0x84, 0x6c, 0xb8, 0xd8, 0xca, 0x12, 0x4b, 0x73, 0x4a, 0x8a, 0x25, + 0x98, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0xe4, 0x70, 0x6a, 0x0f, 0x03, 0x29, 0x83, 0xe9, 0x86, 0xe8, + 0x11, 0x72, 0xe7, 0xe2, 0x2a, 0x2e, 0x29, 0x4a, 0x2c, 0x49, 0x4d, 0xcf, 0x4c, 0x2d, 0x96, 0x60, + 0x06, 0x9b, 0xa0, 0x88, 0xd3, 0x84, 0x60, 0x88, 0xd2, 0x4a, 0xa8, 0x21, 0x48, 0x5a, 0x9d, 0xbc, + 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, + 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20, 0x3d, 0xb3, 0x24, 0xa3, + 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x34, 0x2f, 0x34, 0x2f, 0xd3, 0x2d, 0x53, 0x3f, 0x39, + 0x23, 0x31, 0x33, 0x4f, 0xbf, 0x02, 0x23, 0xc8, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, + 0x21, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x56, 0x3b, 0xa9, 0xbe, 0xd6, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -145,20 +134,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PendingDeposits) > 0 { - for iNdEx := len(m.PendingDeposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PendingDeposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } if len(m.Strategies) > 0 { for iNdEx := len(m.Strategies) - 1; iNdEx >= 0; iNdEx-- { { @@ -231,12 +206,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.PendingDeposits) > 0 { - for _, e := range m.PendingDeposits { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } return n } @@ -376,40 +345,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PendingDeposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PendingDeposits = append(m.PendingDeposits, PendingDeposit{}) - if err := m.PendingDeposits[len(m.PendingDeposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/yieldaggregator/types/keys.go b/x/yieldaggregator/types/keys.go index f0b876c69..ce6a15a17 100644 --- a/x/yieldaggregator/types/keys.go +++ b/x/yieldaggregator/types/keys.go @@ -25,14 +25,13 @@ var ( ) const ( - VaultKey = "Vault/value/" - VaultCountKey = "Vault/count/" - StrategyKey = "Strategy/value/" - StrategyCountKey = "Strategy/count/" - DenomInfoKey = "Denom/info/" - SymbolInfoKey = "Symbol/info/" - ChainReceiverKey = "ChainReceiver/info/" - PendingDepositKey = "PendingDeposit/info" + VaultKey = "Vault/value/" + VaultCountKey = "Vault/count/" + StrategyKey = "Strategy/value/" + StrategyCountKey = "Strategy/count/" + DenomInfoKey = "Denom/info/" + SymbolInfoKey = "Symbol/info/" + ChainReceiverKey = "ChainReceiver/info/" ) func KeyPrefixStrategy(vaultDenom string) []byte { diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 7b6a79cf1..6900eef09 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -165,6 +165,7 @@ type VaultContainer struct { TotalBondedAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_bonded_amount,json=totalBondedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_bonded_amount"` TotalUnbondingAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=total_unbonding_amount,json=totalUnbondingAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_unbonding_amount"` WithdrawReserve cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=withdraw_reserve,json=withdrawReserve,proto3,customtype=cosmossdk.io/math.Int" json:"withdraw_reserve"` + TotalPendingDeposit cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=total_pending_deposit,json=totalPendingDeposit,proto3,customtype=cosmossdk.io/math.Int" json:"total_pending_deposit"` } func (m *VaultContainer) Reset() { *m = VaultContainer{} } @@ -396,7 +397,8 @@ type QueryGetVaultResponse struct { TotalBondedAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_bonded_amount,json=totalBondedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_bonded_amount"` TotalUnbondingAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=total_unbonding_amount,json=totalUnbondingAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_unbonding_amount"` WithdrawReserve cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=withdraw_reserve,json=withdrawReserve,proto3,customtype=cosmossdk.io/math.Int" json:"withdraw_reserve"` - Strategies []Strategy `protobuf:"bytes,5,rep,name=strategies,proto3" json:"strategies"` + TotalPendingDeposit cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=total_pending_deposit,json=totalPendingDeposit,proto3,customtype=cosmossdk.io/math.Int" json:"total_pending_deposit"` + Strategies []Strategy `protobuf:"bytes,6,rep,name=strategies,proto3" json:"strategies"` } func (m *QueryGetVaultResponse) Reset() { *m = QueryGetVaultResponse{} } @@ -1160,98 +1162,100 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1454 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xce, 0x3a, 0x1f, 0x6a, 0x8f, 0xfb, 0x39, 0x75, 0xdb, 0xd4, 0xef, 0x2b, 0xa7, 0xd9, 0x34, - 0x4d, 0xd4, 0xd6, 0xde, 0x24, 0x20, 0x41, 0xd3, 0x06, 0x70, 0x92, 0xa6, 0x04, 0x15, 0x14, 0x1c, - 0xda, 0x0a, 0x2a, 0xb0, 0xc6, 0xde, 0x89, 0x3d, 0xaa, 0x77, 0xc6, 0xdd, 0x1d, 0xb7, 0x58, 0x55, - 0x6f, 0xb8, 0xe6, 0x02, 0x01, 0x97, 0x20, 0xd4, 0x2b, 0xfe, 0x40, 0xf9, 0x0f, 0x15, 0x57, 0x55, - 0x91, 0x10, 0xe2, 0xa2, 0x42, 0x6d, 0xff, 0x04, 0x77, 0x68, 0x67, 0x66, 0x37, 0x5e, 0x3b, 0xeb, - 0x2f, 0x72, 0xc9, 0x5d, 0x3c, 0x73, 0xce, 0x73, 0x9e, 0x73, 0xe6, 0x99, 0x39, 0x67, 0x03, 0x33, - 0x0d, 0xd6, 0x60, 0x74, 0x87, 0x5a, 0x4d, 0x4a, 0x6a, 0x36, 0xae, 0x54, 0x5c, 0x52, 0xc1, 0x82, - 0xbb, 0xd6, 0xbd, 0x06, 0x71, 0x9b, 0xb9, 0xba, 0xcb, 0x05, 0x47, 0xa7, 0xb5, 0x51, 0xae, 0xcd, - 0x28, 0x9d, 0xaa, 0xf0, 0x0a, 0x97, 0x36, 0x96, 0xff, 0x97, 0x32, 0x4f, 0x9f, 0x29, 0x73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0x3a, 0xf1, 0x4a, 0x13, 0xf2, 0x7f, 0x92, 0x6f, - 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x6f, 0x08, 0x32, 0xc3, 0x15, 0x00, 0x00, + // 1479 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x3a, 0x1f, 0x6a, 0x9f, 0xfb, 0x39, 0x75, 0x5a, 0xd7, 0x20, 0xa7, 0xd9, 0x34, 0x4d, + 0xd4, 0xd6, 0xde, 0x24, 0x20, 0x41, 0xd3, 0x06, 0x70, 0x92, 0xa6, 0x04, 0x15, 0x14, 0x1c, 0xda, + 0x0a, 0x2a, 0xb0, 0xc6, 0xde, 0x89, 0x3d, 0xaa, 0x3d, 0xe3, 0xee, 0x8e, 0x5b, 0xac, 0xaa, 0x17, + 0xce, 0x1c, 0x10, 0x1f, 0x37, 0x10, 0xea, 0x89, 0x7f, 0x00, 0xfe, 0x04, 0xa4, 0x8a, 0x53, 0x55, + 0x24, 0x84, 0x38, 0x54, 0xa8, 0xe1, 0x9f, 0xe0, 0x86, 0x76, 0x66, 0x76, 0xe3, 0xb5, 0xb3, 0xfe, + 0xa2, 0x17, 0x24, 0x6e, 0xf1, 0xee, 0x7b, 0xbf, 0xf7, 0x7b, 0x6f, 0x7e, 0x6f, 0xde, 0xdb, 0xc0, + 0x4c, 0x83, 0x35, 0x18, 0xdd, 0xa1, 0x56, 0x93, 0x92, 0xaa, 0x8d, 0xcb, 0x65, 0x87, 0x94, 0xb1, + 0xe0, 0x8e, 0x75, 0xb7, 0x41, 0x9c, 0x66, 0xb6, 0xee, 0x70, 0xc1, 0xd1, 0x29, 0x6d, 0x94, 0x6d, + 0x33, 0x4a, 0x25, 0xca, 0xbc, 0xcc, 0xa5, 0x8d, 0xe5, 0xfd, 0xa5, 0xcc, 0x53, 0xa7, 0x4b, 0xdc, + 0xad, 0x71, 0xb7, 0xa0, 0x5e, 0xa8, 0x1f, 0xfa, 0xd5, 0xcb, 0x65, 0xce, 0xcb, 0x55, 0x62, 0xe1, + 0x3a, 0xb5, 0x30, 0x63, 0x5c, 0x60, 0x41, 0x39, 0xf3, 0xdf, 0x9e, 0x57, 0xb6, 0x56, 0x11, 0xbb, + 0x44, 0x11, 0xb0, 0xee, 0x2d, 0x16, 0x89, 0xc0, 0x8b, 0x56, 0x1d, 0x97, 0x29, 0x93, 0xc6, 0xda, + 0x36, 0xdd, 0x6a, 0xeb, 0x5b, 0x95, 0x38, 0xf5, 0xdf, 0x9f, 0x8d, 0x4a, 0xac, 0x8e, 0x1d, 0x5c, + 0xf3, 0x23, 0x66, 0xa2, 0xac, 0xda, 0x7e, 0x2b, 0x73, 0x33, 0x01, 0xe8, 0x7d, 0x8f, 0xd6, 0x96, + 0xc4, 0xc8, 0x93, 0xbb, 0x0d, 0xe2, 0x0a, 0xf3, 0x03, 0x38, 0x11, 0x7a, 0xea, 0xd6, 0x39, 0x73, + 0x09, 0x5a, 0x81, 0x09, 0x15, 0x2b, 0x69, 0x9c, 0x31, 0xe6, 0xe3, 0x4b, 0x53, 0xd9, 0x88, 0x32, + 0x66, 0x95, 0xe3, 0xea, 0xd8, 0xe3, 0x67, 0x53, 0x23, 0x79, 0xed, 0x64, 0x7e, 0x02, 0x09, 0x89, + 0x9a, 0xab, 0x56, 0x6f, 0xe2, 0x46, 0x55, 0xe8, 0x68, 0x68, 0x03, 0x60, 0xaf, 0x18, 0x1a, 0xfa, + 0x5c, 0x56, 0x57, 0xd9, 0xab, 0x46, 0x56, 0x1d, 0x9d, 0xae, 0x49, 0x76, 0x0b, 0x97, 0x89, 0xf6, + 0xcd, 0xb7, 0x78, 0x9a, 0x3f, 0x8f, 0xc2, 0x11, 0x09, 0xbc, 0xc6, 0x99, 0xc0, 0x94, 0x11, 0x07, + 0x2d, 0xc3, 0xf8, 0x3d, 0xef, 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x5a, 0x28, 0x53, 0x51, 0x69, 0x14, 0xb3, 0x25, 0x5e, + 0xb3, 0x6e, 0xb0, 0x1b, 0x8c, 0x6e, 0x50, 0xab, 0xe4, 0x8d, 0x79, 0xeb, 0xd3, 0x0e, 0x7c, 0xd1, + 0xac, 0x13, 0xb7, 0x38, 0x21, 0xff, 0xab, 0xfa, 0xca, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, + 0xab, 0xe3, 0x51, 0x85, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1809,6 +1813,16 @@ func (m *VaultContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.TotalPendingDeposit.Size() + i -= size + if _, err := m.TotalPendingDeposit.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a { size := m.WithdrawReserve.Size() i -= size @@ -2027,9 +2041,19 @@ func (m *QueryGetVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 + } + } + { + size := m.TotalPendingDeposit.Size() + i -= size + if _, err := m.TotalPendingDeposit.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a { size := m.WithdrawReserve.Size() i -= size @@ -2699,6 +2723,8 @@ func (m *VaultContainer) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) l = m.WithdrawReserve.Size() n += 1 + l + sovQuery(uint64(l)) + l = m.TotalPendingDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -2775,6 +2801,8 @@ func (m *QueryGetVaultResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) l = m.WithdrawReserve.Size() n += 1 + l + sovQuery(uint64(l)) + l = m.TotalPendingDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) if len(m.Strategies) > 0 { for _, e := range m.Strategies { l = e.Size() @@ -3385,6 +3413,40 @@ func (m *VaultContainer) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalPendingDeposit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalPendingDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3926,6 +3988,40 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalPendingDeposit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalPendingDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Strategies", wireType) } diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index a8e52d7f4..5c0af0a40 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -7,7 +7,6 @@ import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -378,51 +377,6 @@ func (m *SymbolInfo) GetChannels() []TransferChannel { return nil } -type PendingDeposit struct { - VaultId uint64 `protobuf:"varint,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"` -} - -func (m *PendingDeposit) Reset() { *m = PendingDeposit{} } -func (m *PendingDeposit) String() string { return proto.CompactTextString(m) } -func (*PendingDeposit) ProtoMessage() {} -func (*PendingDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{5} -} -func (m *PendingDeposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PendingDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PendingDeposit.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 *PendingDeposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_PendingDeposit.Merge(m, src) -} -func (m *PendingDeposit) XXX_Size() int { - return m.Size() -} -func (m *PendingDeposit) XXX_DiscardUnknown() { - xxx_messageInfo_PendingDeposit.DiscardUnknown(m) -} - -var xxx_messageInfo_PendingDeposit proto.InternalMessageInfo - -func (m *PendingDeposit) GetVaultId() uint64 { - if m != nil { - return m.VaultId - } - return 0 -} - type DenomInfo struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` @@ -433,7 +387,7 @@ func (m *DenomInfo) Reset() { *m = DenomInfo{} } func (m *DenomInfo) String() string { return proto.CompactTextString(m) } func (*DenomInfo) ProtoMessage() {} func (*DenomInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{6} + return fileDescriptor_7877bd9c4573997d, []int{5} } func (m *DenomInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -492,7 +446,7 @@ func (m *ChainAddress) Reset() { *m = ChainAddress{} } func (m *ChainAddress) String() string { return proto.CompactTextString(m) } func (*ChainAddress) ProtoMessage() {} func (*ChainAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{7} + return fileDescriptor_7877bd9c4573997d, []int{6} } func (m *ChainAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -543,7 +497,7 @@ func (m *IntermediaryAccountInfo) Reset() { *m = IntermediaryAccountInfo func (m *IntermediaryAccountInfo) String() string { return proto.CompactTextString(m) } func (*IntermediaryAccountInfo) ProtoMessage() {} func (*IntermediaryAccountInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{8} + return fileDescriptor_7877bd9c4573997d, []int{7} } func (m *IntermediaryAccountInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -594,7 +548,7 @@ func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{9} + return fileDescriptor_7877bd9c4573997d, []int{8} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -671,7 +625,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{10} + return fileDescriptor_7877bd9c4573997d, []int{9} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -749,7 +703,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{11} + return fileDescriptor_7877bd9c4573997d, []int{10} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -826,7 +780,6 @@ func init() { proto.RegisterType((*Strategy)(nil), "ununifi.yieldaggregator.Strategy") proto.RegisterType((*TransferChannel)(nil), "ununifi.yieldaggregator.TransferChannel") proto.RegisterType((*SymbolInfo)(nil), "ununifi.yieldaggregator.SymbolInfo") - proto.RegisterType((*PendingDeposit)(nil), "ununifi.yieldaggregator.PendingDeposit") proto.RegisterType((*DenomInfo)(nil), "ununifi.yieldaggregator.DenomInfo") proto.RegisterType((*ChainAddress)(nil), "ununifi.yieldaggregator.ChainAddress") proto.RegisterType((*IntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.IntermediaryAccountInfo") @@ -840,67 +793,62 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 951 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x3f, 0x6f, 0x23, 0x45, - 0x14, 0xcf, 0x3a, 0xfe, 0x13, 0xbf, 0x5c, 0x92, 0xd3, 0x26, 0x77, 0xd9, 0x1c, 0xc2, 0x89, 0x56, - 0xe2, 0x08, 0x45, 0xd6, 0x24, 0x74, 0x34, 0x28, 0xb1, 0x85, 0xe4, 0x83, 0xe2, 0xb4, 0x21, 0x1c, - 0x42, 0x48, 0xab, 0xf1, 0xce, 0x78, 0x3d, 0xca, 0xee, 0x8c, 0x35, 0x33, 0x4e, 0x70, 0x0f, 0x2d, - 0x42, 0x54, 0x7c, 0x06, 0xea, 0xeb, 0x10, 0xfd, 0x95, 0xa7, 0x6b, 0x40, 0x14, 0x11, 0x4a, 0xbe, - 0x01, 0x9f, 0x00, 0xed, 0xcc, 0xec, 0xca, 0x4e, 0xe2, 0x2b, 0xa2, 0x70, 0x95, 0xf7, 0xcd, 0xbc, - 0x3f, 0xbf, 0x79, 0xef, 0xf7, 0x7e, 0x32, 0xec, 0x8d, 0xd9, 0x98, 0xd1, 0x01, 0x6d, 0x4f, 0x28, - 0x49, 0x31, 0x4a, 0x12, 0x41, 0x12, 0xa4, 0xb8, 0xb8, 0x6e, 0x07, 0x23, 0xc1, 0x15, 0x77, 0x37, - 0xad, 0x7b, 0x70, 0xed, 0xfa, 0xc9, 0x46, 0xc2, 0x13, 0xae, 0x7d, 0xda, 0xf9, 0x97, 0x71, 0x7f, - 0xb2, 0x15, 0x73, 0x99, 0x71, 0x19, 0x99, 0x0b, 0x63, 0xd8, 0xab, 0x96, 0xb1, 0xda, 0x7d, 0x24, - 0x49, 0xfb, 0x6c, 0xbf, 0x4f, 0x14, 0xda, 0x6f, 0xc7, 0x9c, 0x32, 0x73, 0xef, 0xff, 0xe2, 0xc0, - 0xea, 0xb1, 0x12, 0x48, 0x91, 0x64, 0xf2, 0x82, 0xd0, 0x64, 0xa8, 0xdc, 0x0d, 0xa8, 0x61, 0xc2, - 0x78, 0xe6, 0x39, 0x3b, 0xce, 0x6e, 0x33, 0x34, 0x86, 0xbb, 0x0d, 0xcb, 0xd2, 0xfa, 0x45, 0x14, - 0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0x54, 0x0d, 0xb1, 0x40, 0xe7, 0x51, 0xcc, 0xb3, - 0x8c, 0x4a, 0x49, 0x39, 0x8b, 0xf2, 0x46, 0x7a, 0x8d, 0xbb, 0xb6, 0xee, 0x71, 0x91, 0xb2, 0x53, - 0x66, 0x0c, 0x91, 0x22, 0x2e, 0x81, 0x47, 0x65, 0x31, 0x41, 0x24, 0x11, 0x67, 0xc4, 0x54, 0x5a, - 0xba, 0x6b, 0xa5, 0xf5, 0x22, 0x5f, 0x68, 0xd2, 0xe9, 0x32, 0xdf, 0xc0, 0xc3, 0x92, 0x1d, 0x66, - 0x88, 0xd2, 0x6b, 0xee, 0x2c, 0xee, 0x2e, 0x1f, 0x7c, 0x18, 0xcc, 0xe1, 0x72, 0x30, 0x4b, 0x3b, - 0xdb, 0xaa, 0x35, 0x39, 0x73, 0x2a, 0xdd, 0x03, 0x78, 0x34, 0x20, 0x24, 0x8a, 0x79, 0x9a, 0x92, - 0x58, 0x71, 0x11, 0x21, 0x33, 0x19, 0x0f, 0xf4, 0x3c, 0xd7, 0x07, 0x84, 0x74, 0x8a, 0x3b, 0x3b, - 0x34, 0xff, 0x37, 0x07, 0x96, 0x8a, 0xec, 0x73, 0xe8, 0x6c, 0x88, 0x55, 0x29, 0x89, 0xf5, 0x11, - 0x3c, 0x8c, 0x39, 0x53, 0x02, 0xc5, 0xaa, 0xac, 0x60, 0xc8, 0xb4, 0x56, 0x9c, 0xdb, 0xec, 0x25, - 0xd7, 0xaa, 0xf3, 0xb9, 0x56, 0xbb, 0xc9, 0xb5, 0x4d, 0x68, 0x24, 0x54, 0x45, 0x63, 0x91, 0x6a, - 0xd6, 0x34, 0xc3, 0x7a, 0x42, 0xd5, 0x89, 0x48, 0xfd, 0x2f, 0x60, 0xed, 0x2b, 0x81, 0x98, 0x1c, - 0x10, 0xd1, 0x19, 0x22, 0xc6, 0x48, 0xea, 0x6e, 0xc1, 0x52, 0x3c, 0x44, 0x94, 0x45, 0x96, 0xfb, - 0xcd, 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xff, 0x7a, - 0xae, 0x99, 0x4d, 0x32, 0x0a, 0x00, 0x00, + // 880 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0x13, 0x3b, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23, 0x4b, + 0x40, 0x38, 0xd4, 0xa6, 0xe5, 0x13, 0xb4, 0x89, 0x90, 0xb2, 0x70, 0x40, 0x2e, 0x05, 0x84, 0x90, + 0xac, 0x89, 0x3d, 0x71, 0x46, 0x6b, 0xcf, 0x44, 0x33, 0x93, 0x96, 0x7c, 0x00, 0xae, 0x08, 0x71, + 0xe2, 0x33, 0x70, 0xde, 0x1b, 0xe2, 0xbe, 0xc7, 0xd5, 0x5e, 0x40, 0x1c, 0x56, 0xa8, 0xfd, 0x22, + 0xc8, 0x33, 0xb6, 0x95, 0xb4, 0xc9, 0x1e, 0xaa, 0xee, 0xde, 0xfc, 0x66, 0xde, 0x9f, 0xdf, 0xbc, + 0xf7, 0x7b, 0x3f, 0x19, 0x0e, 0x67, 0x74, 0x46, 0xc9, 0x98, 0xf8, 0x73, 0x82, 0xd3, 0x18, 0x25, + 0x09, 0xc7, 0x09, 0x92, 0x8c, 0xdf, 0xb4, 0xbd, 0x29, 0x67, 0x92, 0xd9, 0x7b, 0x85, 0xbb, 0x77, + 0xe3, 0xfa, 0xe9, 0x6e, 0xc2, 0x12, 0xa6, 0x7c, 0xfc, 0xfc, 0x4b, 0xbb, 0x3f, 0xdd, 0x8f, 0x98, + 0xc8, 0x98, 0x08, 0xf5, 0x85, 0x36, 0x8a, 0xab, 0x8e, 0xb6, 0xfc, 0x11, 0x12, 0xd8, 0xbf, 0x38, + 0x1a, 0x61, 0x89, 0x8e, 0xfc, 0x88, 0x11, 0xaa, 0xef, 0xdd, 0xdf, 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6f, 0xb5, + 0x0a, 0x56, 0xcd, 0xab, 0x2d, 0x36, 0xaf, 0x52, 0xb3, 0xfa, 0x1d, 0xd5, 0xcc, 0xbc, 0x6f, 0x35, + 0xb3, 0xde, 0x9b, 0x9a, 0x35, 0xde, 0xb9, 0x9a, 0x35, 0xef, 0x43, 0xcd, 0xdc, 0x5f, 0x0c, 0xd8, + 0xd2, 0x50, 0xde, 0xaf, 0x3e, 0x2d, 0xa8, 0x8f, 0xb5, 0xa4, 0x3e, 0x7f, 0x1a, 0xb0, 0xf3, 0x35, + 0x67, 0x53, 0x26, 0x50, 0x7a, 0x12, 0xc7, 0x8b, 0xa8, 0x24, 0x91, 0x29, 0x2e, 0x51, 0x29, 0xe3, + 0xa6, 0xcc, 0xd5, 0x6e, 0xcb, 0x5c, 0xf5, 0x9a, 0xfa, 0xe2, 0x6b, 0x56, 0xa1, 0x37, 0xdf, 0x8e, + 0xde, 0x5a, 0x8d, 0x7e, 0x49, 0x3b, 0x4f, 0x9f, 0xbd, 0xbc, 0xea, 0x18, 0xaf, 0xae, 0x3a, 0xc6, + 0x7f, 0x57, 0x1d, 0xe3, 0xd7, 0xeb, 0xce, 0xc6, 0xab, 0xeb, 0xce, 0xc6, 0x3f, 0xd7, 0x9d, 0x8d, + 0x1f, 0x3e, 0x4b, 0x88, 0x9c, 0xcc, 0x46, 0x5e, 0xc4, 0x32, 0xff, 0x9c, 0x9e, 0x53, 0xf2, 0x05, + 0xf1, 0xd5, 0x5a, 0xfb, 0x3f, 0xdd, 0xfa, 0x07, 0x93, 0xf3, 0x29, 0x16, 0xa3, 0x86, 0xfa, 0x21, + 0xfa, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x56, 0x2c, 0xbf, 0xab, 0x09, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -1206,44 +1154,6 @@ func (m *SymbolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PendingDeposit) 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 *PendingDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PendingDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.VaultId != 0 { - i = encodeVarintYieldaggregator(dAtA, i, uint64(m.VaultId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *DenomInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1721,20 +1631,6 @@ func (m *SymbolInfo) Size() (n int) { return n } -func (m *PendingDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VaultId != 0 { - n += 1 + sovYieldaggregator(uint64(m.VaultId)) - } - l = m.Amount.Size() - n += 1 + l + sovYieldaggregator(uint64(l)) - return n -} - func (m *DenomInfo) Size() (n int) { if m == nil { return 0 @@ -2879,109 +2775,6 @@ func (m *SymbolInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *PendingDeposit) 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 ErrIntOverflowYieldaggregator - } - 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: PendingDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PendingDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) - } - m.VaultId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYieldaggregator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VaultId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowYieldaggregator - } - 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 ErrInvalidLengthYieldaggregator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthYieldaggregator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipYieldaggregator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthYieldaggregator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DenomInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From a43fa1788cfa0a67b3e4cc268294ed3fc138406b Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 13 Oct 2023 21:36:46 +0800 Subject: [PATCH 28/59] modify StakeToStrategy to handle case with multiple denoms & Add ReinitVaultTransfer codebase --- proto/ununifi/yieldaggregator/tx.proto | 10 + .../msg_server_reinit_vault_transfer.go | 34 + x/yieldaggregator/keeper/pfm_intermediary.go | 10 + x/yieldaggregator/keeper/strategy.go | 110 +-- .../submodules/records/keeper/callbacks.go | 4 +- x/yieldaggregator/types/tx.pb.go | 672 +++++++++++++++--- 6 files changed, 712 insertions(+), 128 deletions(-) create mode 100644 x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go diff --git a/proto/ununifi/yieldaggregator/tx.proto b/proto/ununifi/yieldaggregator/tx.proto index 50999893c..4a2550fcf 100644 --- a/proto/ununifi/yieldaggregator/tx.proto +++ b/proto/ununifi/yieldaggregator/tx.proto @@ -29,6 +29,7 @@ service Msg { rpc RegisterDenomInfos(MsgRegisterDenomInfos) returns (MsgRegisterDenomInfosResponse); rpc RegisterSymbolInfos(MsgRegisterSymbolInfos) returns (MsgRegisterSymbolInfosResponse); rpc SetIntermediaryAccountInfo(MsgSetIntermediaryAccountInfo) returns (MsgSetIntermediaryAccountInfoResponse); + rpc ReinitVaultTransfer(MsgReinitVaultTransfer) returns (MsgReinitVaultTransferResponse); } // this line is used by starport scaffolding # proto/tx/message @@ -204,3 +205,12 @@ message MsgSetIntermediaryAccountInfo { repeated ChainAddress addrs = 2 [(gogoproto.nullable) = false]; } message MsgSetIntermediaryAccountInfoResponse {} + +message MsgReinitVaultTransfer { + string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + uint64 vault_id = 2; + string strategy_denom = 3; + uint64 strategy_id = 4; + cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; +} +message MsgReinitVaultTransferResponse {} diff --git a/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go b/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go new file mode 100644 index 000000000..71934684d --- /dev/null +++ b/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go @@ -0,0 +1,34 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (k msgServer) ReinitVaultTransfer(ctx context.Context, msg *types.MsgReinitVaultTransfer) (*types.MsgReinitVaultTransferResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + if k.authority != msg.Sender { + return nil, sdkerrors.ErrUnauthorized + } + + vault, found := k.Keeper.GetVault(sdkCtx, msg.VaultId) + if !found { + return nil, types.ErrVaultNotFound + } + + strategy, found := k.Keeper.GetStrategy(sdkCtx, msg.StrategyDenom, msg.StrategyId) + if !found { + return nil, types.ErrStrategyNotFound + } + + err := k.Keeper.ExecuteVaultTransfer(sdkCtx, vault, strategy, msg.Amount) + if err != nil { + return nil, err + } + + return &types.MsgReinitVaultTransferResponse{}, nil +} diff --git a/x/yieldaggregator/keeper/pfm_intermediary.go b/x/yieldaggregator/keeper/pfm_intermediary.go index f9af42b7a..731173f04 100644 --- a/x/yieldaggregator/keeper/pfm_intermediary.go +++ b/x/yieldaggregator/keeper/pfm_intermediary.go @@ -27,3 +27,13 @@ func (k Keeper) SetIntermediaryAccountInfo(ctx sdk.Context, addrs []types.ChainA }) store.Set(types.KeyPrefix(types.ChainReceiverKey), bz) } + +func (k Keeper) GetIntermediaryReceiver(ctx sdk.Context, chainId string) string { + info := k.GetIntermediaryAccountInfo(ctx) + for _, ca := range info.Addrs { + if ca.ChainId == chainId { + return ca.Address + } + } + return "" +} diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index e060cbcf3..7b523eade 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -197,21 +197,13 @@ func CalculateTransferRoute(currChannels, tarChannels []types.TransferChannel) [ route := []types.TransferChannel{} for index := len(currChannels) - 1; index >= diffStartIndex; index-- { route = append(route, currChannels[index]) - // TODO: Back route } for index := diffStartIndex; index < len(tarChannels); index++ { route = append(route, tarChannels[index]) - // TODO: Forward route } return route } -// TODO: move this to params -func (k Keeper) GetIntermediaryReceiver(chainId string) string { - intermediaryReceivers := make(map[string]string) - return intermediaryReceivers[chainId] -} - func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.TransferChannel, finalReceiver string) (string, *PacketMetadata) { if len(channels) == 0 { return "", nil @@ -232,7 +224,7 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T return "", nil } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos - return k.GetIntermediaryReceiver(channels[0].ChainId), &PacketMetadata{ + return k.GetIntermediaryReceiver(ctx, channels[0].ChainId), &PacketMetadata{ Forward: &ForwardMetadata{ Receiver: receiver, Port: ibctransfertypes.PortID, @@ -248,10 +240,11 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy types.Strategy, amount sdk.Int) error { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) - stakeCoin := sdk.NewCoin(strategy.Denom, amount) + balances := k.bankKeeper.GetAllBalances(ctx, vaultModAddr) switch strategy.ContractAddress { case "x/ibc-staking": + stakeCoin := sdk.NewCoin(strategy.Denom, amount) return k.stakeibcKeeper.LiquidStake( ctx, vaultModAddr, @@ -260,46 +253,79 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ default: version := k.GetStrategyVersion(ctx, strategy) _ = version - info := k.GetStrategyDepositInfo(ctx, strategy) contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) - if info.Denom == stakeCoin.Denom { - wasmMsg := `{"stake":{}}` - _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{stakeCoin}) - return err + strategyDenomAmount := amount + if balances.AmountOf(strategy.Denom).LT(amount) { + strategyDenomAmount = balances.AmountOf(strategy.Denom) } - params, err := k.GetParams(ctx) - if err != nil { - return err + if strategyDenomAmount.IsPositive() { + wasmMsg := `{"stake":{}}` + _, err := k.wasmKeeper.Execute(ctx, contractAddr, vaultModAddr, []byte(wasmMsg), sdk.Coins{sdk.NewCoin(strategy.Denom, strategyDenomAmount)}) + if err != nil { + return err + } } - ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos - timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - denomInfo := k.GetDenomInfo(ctx, info.Denom) - symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) - tarChannel := types.TransferChannel{} - for _, channel := range symbolInfo.Channels { - if channel.ChainId == info.TargetChainId { - tarChannel = channel + + remaining := amount.Sub(strategyDenomAmount) + for _, balance := range balances { + if remaining.IsZero() { + return nil + } + denomInfo := k.GetDenomInfo(ctx, balance.Denom) + if balance.Denom != strategy.Denom && denomInfo.Symbol == vault.Symbol { + stakeAmount := remaining + if balance.Amount.LT(remaining) { + stakeAmount = balance.Amount + } + err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) + if err != nil { + return err + } + k.recordsKeeper.IncreaseVaultPendingDeposit(ctx, vault.Id, stakeAmount) + remaining = remaining.Sub(stakeAmount) } } - transferRoute := CalculateTransferRoute(denomInfo.Channels, []types.TransferChannel{tarChannel}) - initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) - memo, err := json.Marshal(metadata) - - k.recordsKeeper.IncreaseVaultPendingDeposit(ctx, vault.Id, stakeCoin.Amount) - msg := ibctypes.NewMsgTransfer( - ibctransfertypes.PortID, - transferRoute[0].ChannelId, - stakeCoin, - vaultModAddr.String(), - initialReceiver, - clienttypes.Height{}, - timeoutTimestamp, - string(memo), - ) - err = k.recordsKeeper.VaultTransfer(ctx, vault.Id, contractAddr, msg) + + return nil + } +} + +func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strategy types.Strategy, stakeCoin sdk.Coin) error { + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) + info := k.GetStrategyDepositInfo(ctx, strategy) + params, err := k.GetParams(ctx) + if err != nil { return err } + ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos + timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos + denomInfo := k.GetDenomInfo(ctx, info.Denom) + symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) + tarChannel := types.TransferChannel{} + for _, channel := range symbolInfo.Channels { + if channel.ChainId == info.TargetChainId { + tarChannel = channel + } + } + transferRoute := CalculateTransferRoute(denomInfo.Channels, []types.TransferChannel{tarChannel}) + initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) + memo, err := json.Marshal(metadata) + + msg := ibctypes.NewMsgTransfer( + ibctransfertypes.PortID, + transferRoute[0].ChannelId, + stakeCoin, + vaultModAddr.String(), + initialReceiver, + clienttypes.Height{}, + timeoutTimestamp, + string(memo), + ) + err = k.recordsKeeper.VaultTransfer(ctx, vault.Id, contractAddr, msg) + return err } // unstake worth of withdrawal amount from the strategy diff --git a/x/yieldaggregator/submodules/records/keeper/callbacks.go b/x/yieldaggregator/submodules/records/keeper/callbacks.go index 53348ad38..b320ddf46 100644 --- a/x/yieldaggregator/submodules/records/keeper/callbacks.go +++ b/x/yieldaggregator/submodules/records/keeper/callbacks.go @@ -9,7 +9,7 @@ import ( const TRANSFER = "transfer" const CONTRACT_TRANSFER = "contract_transfer" -const YA_TRANSFER = "aggregator_transfer" +const VAULT_TRANSFER = "aggregator_transfer" // ICACallbacks wrapper struct for stakeibc keeper type ICACallback func(Keeper, sdk.Context, channeltypes.Packet, *channeltypes.Acknowledgement, []byte) error @@ -43,7 +43,7 @@ func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandle a := c. AddICACallback(TRANSFER, ICACallback(TransferCallback)). AddICACallback(CONTRACT_TRANSFER, ICACallback(ContractTransferCallback)). - AddICACallback(YA_TRANSFER, ICACallback(VaultTransferCallback)) + AddICACallback(VAULT_TRANSFER, ICACallback(VaultTransferCallback)) return a.(ICACallbacks) } diff --git a/x/yieldaggregator/types/tx.pb.go b/x/yieldaggregator/types/tx.pb.go index 0aef4057c..a6548aee3 100644 --- a/x/yieldaggregator/types/tx.pb.go +++ b/x/yieldaggregator/types/tx.pb.go @@ -1086,6 +1086,118 @@ func (m *MsgSetIntermediaryAccountInfoResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetIntermediaryAccountInfoResponse proto.InternalMessageInfo +type MsgReinitVaultTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + VaultId uint64 `protobuf:"varint,2,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` + StrategyDenom string `protobuf:"bytes,3,opt,name=strategy_denom,json=strategyDenom,proto3" json:"strategy_denom,omitempty"` + StrategyId uint64 `protobuf:"varint,4,opt,name=strategy_id,json=strategyId,proto3" json:"strategy_id,omitempty"` + Amount types.Coin `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgReinitVaultTransfer) Reset() { *m = MsgReinitVaultTransfer{} } +func (m *MsgReinitVaultTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgReinitVaultTransfer) ProtoMessage() {} +func (*MsgReinitVaultTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{26} +} +func (m *MsgReinitVaultTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReinitVaultTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReinitVaultTransfer.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 *MsgReinitVaultTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReinitVaultTransfer.Merge(m, src) +} +func (m *MsgReinitVaultTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgReinitVaultTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReinitVaultTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReinitVaultTransfer proto.InternalMessageInfo + +func (m *MsgReinitVaultTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgReinitVaultTransfer) GetVaultId() uint64 { + if m != nil { + return m.VaultId + } + return 0 +} + +func (m *MsgReinitVaultTransfer) GetStrategyDenom() string { + if m != nil { + return m.StrategyDenom + } + return "" +} + +func (m *MsgReinitVaultTransfer) GetStrategyId() uint64 { + if m != nil { + return m.StrategyId + } + return 0 +} + +func (m *MsgReinitVaultTransfer) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type MsgReinitVaultTransferResponse struct { +} + +func (m *MsgReinitVaultTransferResponse) Reset() { *m = MsgReinitVaultTransferResponse{} } +func (m *MsgReinitVaultTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgReinitVaultTransferResponse) ProtoMessage() {} +func (*MsgReinitVaultTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a6f503b1413abc44, []int{27} +} +func (m *MsgReinitVaultTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgReinitVaultTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgReinitVaultTransferResponse.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 *MsgReinitVaultTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgReinitVaultTransferResponse.Merge(m, src) +} +func (m *MsgReinitVaultTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgReinitVaultTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgReinitVaultTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgReinitVaultTransferResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgDepositToVault)(nil), "ununifi.yieldaggregator.MsgDepositToVault") proto.RegisterType((*MsgDepositToVaultResponse)(nil), "ununifi.yieldaggregator.MsgDepositToVaultResponse") @@ -1113,95 +1225,102 @@ func init() { proto.RegisterType((*MsgRegisterSymbolInfosResponse)(nil), "ununifi.yieldaggregator.MsgRegisterSymbolInfosResponse") proto.RegisterType((*MsgSetIntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfo") proto.RegisterType((*MsgSetIntermediaryAccountInfoResponse)(nil), "ununifi.yieldaggregator.MsgSetIntermediaryAccountInfoResponse") + proto.RegisterType((*MsgReinitVaultTransfer)(nil), "ununifi.yieldaggregator.MsgReinitVaultTransfer") + proto.RegisterType((*MsgReinitVaultTransferResponse)(nil), "ununifi.yieldaggregator.MsgReinitVaultTransferResponse") } func init() { proto.RegisterFile("ununifi/yieldaggregator/tx.proto", fileDescriptor_a6f503b1413abc44) } var fileDescriptor_a6f503b1413abc44 = []byte{ - // 1325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x26, 0x8e, 0xd3, 0xbc, 0x94, 0xa4, 0xdd, 0x24, 0x8d, 0xb3, 0xa5, 0x8e, 0x71, 0xa9, - 0x12, 0x0a, 0xf1, 0x36, 0x06, 0x5a, 0x51, 0xd1, 0x4a, 0xf9, 0xa3, 0x4a, 0x41, 0x44, 0xa0, 0x4d, - 0x42, 0x51, 0x2f, 0xd6, 0x66, 0x77, 0xbc, 0x19, 0xea, 0x9d, 0xb1, 0x66, 0x26, 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x9d, 0x5e, 0xd0, 0xf1, 0x73, 0x8d, 0xcf, 0x87, 0xf9, 0xce, 0x45, 0xa4, 0x80, 0x9d, 0xcf, - 0x35, 0xa1, 0xfb, 0x07, 0x81, 0xe2, 0x97, 0xe0, 0xf9, 0x67, 0xef, 0x50, 0x17, 0x81, 0x12, 0xee, - 0xa0, 0x41, 0x17, 0x69, 0x99, 0xef, 0x17, 0x9f, 0xed, 0x42, 0xed, 0x62, 0xb9, 0x7b, 0xac, 0x8a, - 0xf8, 0x39, 0xe8, 0x09, 0x43, 0xad, 0xd4, 0xcd, 0x79, 0x1c, 0xe1, 0x8d, 0xcb, 0xbd, 0xe1, 0x55, - 0xf4, 0x2f, 0x60, 0x32, 0x69, 0x4e, 0x99, 0x5d, 0xa5, 0xc3, 0x91, 0x81, 0x71, 0xa5, 0x47, 0x03, - 0x45, 0xe0, 0x9e, 0x06, 0x46, 0x87, 0xd9, 0xd3, 0x51, 0x57, 0xba, 0x9d, 0x71, 0xbd, 0x3f, 0xbb, - 0x26, 0xad, 0x95, 0x0f, 0x1e, 0x3e, 0xcd, 0x6b, 0x8f, 0x9e, 0xe6, 0xb5, 0x3f, 0x9f, 0xe6, 0xb5, - 0x6f, 0x0e, 0xf3, 0x03, 0x8f, 0x0e, 0xf3, 0x03, 0xbf, 0x1f, 0xe6, 0x07, 0x6e, 0x5d, 0xf2, 0xb0, - 0xd8, 0xdd, 0xdb, 0x29, 0x39, 0xd4, 0x37, 0xb7, 0xc9, 0x36, 0xc1, 0x37, 0xb0, 0xe9, 0x04, 0x63, - 0xcc, 0xbc, 0xd3, 0xfe, 0x67, 0x5f, 0xa3, 0x8e, 0xf8, 0x4e, 0x36, 0xfc, 0x63, 0xec, 0xed, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x11, 0x12, 0x5c, 0x14, 0x14, 0x00, 0x00, + // 1398 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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xc3, 0xa1, 0x41, 0xe6, 0x4a, 0x8f, 0x06, 0x9a, 0xc0, 0x3d, 0x03, 0x32, + 0x1d, 0xc6, 0x70, 0x47, 0x5d, 0xc9, 0x76, 0x99, 0xeb, 0xfd, 0xd9, 0xb5, 0xe6, 0xa5, 0x7d, 0xb8, + 0x1e, 0x93, 0x97, 0x36, 0x83, 0xe3, 0xf2, 0x92, 0x38, 0xd6, 0x56, 0xde, 0x7b, 0xf8, 0x34, 0x6b, + 0x3c, 0x7a, 0x9a, 0x35, 0x7e, 0x7f, 0x9a, 0x35, 0xbe, 0x7a, 0x96, 0x1d, 0x78, 0xf4, 0x2c, 0x3b, + 0xf0, 0xeb, 0xb3, 0xec, 0xc0, 0xad, 0x4b, 0x3e, 0x16, 0xbb, 0x7b, 0x3b, 0x45, 0x97, 0x06, 0xd6, + 0x36, 0xd9, 0x26, 0xf8, 0x06, 0xb6, 0xdc, 0xf0, 0x48, 0x61, 0xdd, 0x69, 0xff, 0xe1, 0xb5, 0x5e, + 0x43, 0x7c, 0x67, 0x44, 0xfe, 0x48, 0xf9, 0xe6, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x87, + 0xeb, 0xbe, 0xa0, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1230,6 +1349,7 @@ type MsgClient interface { RegisterDenomInfos(ctx context.Context, in *MsgRegisterDenomInfos, opts ...grpc.CallOption) (*MsgRegisterDenomInfosResponse, error) RegisterSymbolInfos(ctx context.Context, in *MsgRegisterSymbolInfos, opts ...grpc.CallOption) (*MsgRegisterSymbolInfosResponse, error) SetIntermediaryAccountInfo(ctx context.Context, in *MsgSetIntermediaryAccountInfo, opts ...grpc.CallOption) (*MsgSetIntermediaryAccountInfoResponse, error) + ReinitVaultTransfer(ctx context.Context, in *MsgReinitVaultTransfer, opts ...grpc.CallOption) (*MsgReinitVaultTransferResponse, error) } type msgClient struct { @@ -1357,6 +1477,15 @@ func (c *msgClient) SetIntermediaryAccountInfo(ctx context.Context, in *MsgSetIn return out, nil } +func (c *msgClient) ReinitVaultTransfer(ctx context.Context, in *MsgReinitVaultTransfer, opts ...grpc.CallOption) (*MsgReinitVaultTransferResponse, error) { + out := new(MsgReinitVaultTransferResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Msg/ReinitVaultTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // this line is used by starport scaffolding # proto/tx/rpc @@ -1373,6 +1502,7 @@ type MsgServer interface { RegisterDenomInfos(context.Context, *MsgRegisterDenomInfos) (*MsgRegisterDenomInfosResponse, error) RegisterSymbolInfos(context.Context, *MsgRegisterSymbolInfos) (*MsgRegisterSymbolInfosResponse, error) SetIntermediaryAccountInfo(context.Context, *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) + ReinitVaultTransfer(context.Context, *MsgReinitVaultTransfer) (*MsgReinitVaultTransferResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1418,6 +1548,9 @@ func (*UnimplementedMsgServer) RegisterSymbolInfos(ctx context.Context, req *Msg func (*UnimplementedMsgServer) SetIntermediaryAccountInfo(ctx context.Context, req *MsgSetIntermediaryAccountInfo) (*MsgSetIntermediaryAccountInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetIntermediaryAccountInfo not implemented") } +func (*UnimplementedMsgServer) ReinitVaultTransfer(ctx context.Context, req *MsgReinitVaultTransfer) (*MsgReinitVaultTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReinitVaultTransfer not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1657,6 +1790,24 @@ func _Msg_SetIntermediaryAccountInfo_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Msg_ReinitVaultTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgReinitVaultTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ReinitVaultTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Msg/ReinitVaultTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ReinitVaultTransfer(ctx, req.(*MsgReinitVaultTransfer)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "ununifi.yieldaggregator.Msg", HandlerType: (*MsgServer)(nil), @@ -1713,6 +1864,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SetIntermediaryAccountInfo", Handler: _Msg_SetIntermediaryAccountInfo_Handler, }, + { + MethodName: "ReinitVaultTransfer", + Handler: _Msg_ReinitVaultTransfer_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ununifi/yieldaggregator/tx.proto", @@ -2702,6 +2857,86 @@ func (m *MsgSetIntermediaryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } +func (m *MsgReinitVaultTransfer) 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 *MsgReinitVaultTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReinitVaultTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.StrategyId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.StrategyId)) + i-- + dAtA[i] = 0x20 + } + if len(m.StrategyDenom) > 0 { + i -= len(m.StrategyDenom) + copy(dAtA[i:], m.StrategyDenom) + i = encodeVarintTx(dAtA, i, uint64(len(m.StrategyDenom))) + i-- + dAtA[i] = 0x1a + } + if m.VaultId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.VaultId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgReinitVaultTransferResponse) 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 *MsgReinitVaultTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgReinitVaultTransferResponse) 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 @@ -3131,6 +3366,40 @@ func (m *MsgSetIntermediaryAccountInfoResponse) Size() (n int) { return n } +func (m *MsgReinitVaultTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.VaultId != 0 { + n += 1 + sovTx(uint64(m.VaultId)) + } + l = len(m.StrategyDenom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.StrategyId != 0 { + n += 1 + sovTx(uint64(m.StrategyId)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgReinitVaultTransferResponse) 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 } @@ -5953,6 +6222,241 @@ func (m *MsgSetIntermediaryAccountInfoResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgReinitVaultTransfer) 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: MsgReinitVaultTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReinitVaultTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VaultId", wireType) + } + m.VaultId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VaultId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategyDenom", 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.StrategyDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategyId", wireType) + } + m.StrategyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StrategyId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *MsgReinitVaultTransferResponse) 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: MsgReinitVaultTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgReinitVaultTransferResponse: 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 From c9e04a94562425399c08b3a29192bd9aed8df1c7 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 13 Oct 2023 22:01:57 +0800 Subject: [PATCH 29/59] resolve issues after merge conflict fix --- .../keeper/grpc_query_estimate_mint_amount.go | 2 +- x/yieldaggregator/keeper/lp.go | 8 ++++---- x/yieldaggregator/keeper/lp_test.go | 2 +- x/yieldaggregator/types/message_create_vault.go | 7 ++----- x/yieldaggregator/types/message_delete_vault.go | 2 +- .../types/message_transfer_vault_ownership.go | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go index 4b838d251..288df0ec9 100644 --- a/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go +++ b/x/yieldaggregator/keeper/grpc_query_estimate_mint_amount.go @@ -28,7 +28,7 @@ func (k Keeper) EstimateMintAmount(c context.Context, req *types.QueryEstimateMi return nil, types.ErrInvalidAmount } - mintAmount := k.EstimateMintAmountInternal(ctx, vault.Id, sdk.NewCoin(vault.Denom, depositAmount)) + mintAmount := k.EstimateMintAmountInternal(ctx, vault.Id, depositAmount) return &types.QueryEstimateMintAmountResponse{ MintAmount: mintAmount, diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index 44aa358a0..0a745c42a 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -74,7 +74,7 @@ func (k Keeper) VaultAmountTotal(ctx sdk.Context, vault types.Vault) sdk.Int { // lpAmount = lpSupply * (principalAmountToMint / principalAmountInVault) // If principalAmountInVault is zero, lpAmount = principalAmountToMint -func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultId uint64, principalCoin sdk.Coin) sdk.Coin { +func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultId uint64, principalAmount sdk.Int) sdk.Coin { lpDenom := types.GetLPTokenDenom(vaultId) vault, found := k.GetVault(ctx, vaultId) if !found { @@ -84,10 +84,10 @@ func (k Keeper) EstimateMintAmountInternal(ctx sdk.Context, vaultId uint64, prin totalVaultAmount := k.VaultAmountTotal(ctx, vault) lpSupply := k.bankKeeper.GetSupply(ctx, lpDenom).Amount if totalVaultAmount.IsZero() || lpSupply.IsZero() { - return sdk.NewCoin(lpDenom, principalCoin.Amount) + return sdk.NewCoin(lpDenom, principalAmount) } - lpAmount := lpSupply.Mul(principalCoin.Amount).Quo(totalVaultAmount) + lpAmount := lpSupply.Mul(principalAmount).Quo(totalVaultAmount) return sdk.NewCoin(lpDenom, lpAmount) } @@ -147,7 +147,7 @@ func (k Keeper) DepositAndMintLPToken(ctx sdk.Context, address sdk.AccAddress, v } // calculate lpCoin token amount - lpCoin := k.EstimateMintAmountInternal(ctx, vaultId, principalCoin) + lpCoin := k.EstimateMintAmountInternal(ctx, vaultId, principalCoin.Amount) // transfer coins after lp amount calculation vaultModName := types.GetVaultModuleAccountName(vaultId) diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index cb0b37bf5..970269c3b 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -214,7 +214,7 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { err = suite.app.YieldaggregatorKeeper.DepositAndMintLPToken(suite.ctx, addr1, 1, sdk.NewInt64Coin(atomIbcDenom, 100000)) suite.Require().NoError(err) - estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Id, sdk.NewInt64Coin(atomIbcDenom, 100000)) + estMintAmount := suite.app.YieldaggregatorKeeper.EstimateMintAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) suite.Require().Equal(estMintAmount.String(), "100000"+lpDenom) estBurnAmount := suite.app.YieldaggregatorKeeper.EstimateRedeemAmountInternal(suite.ctx, vault.Id, sdk.NewInt(100000)) diff --git a/x/yieldaggregator/types/message_create_vault.go b/x/yieldaggregator/types/message_create_vault.go index 890aaf375..5440cb2eb 100644 --- a/x/yieldaggregator/types/message_create_vault.go +++ b/x/yieldaggregator/types/message_create_vault.go @@ -10,7 +10,6 @@ import ( var _ sdk.Msg = &MsgCreateVault{} - func NewMsgCreateVault(sender string, symbol string, name, description string, commissionRate sdk.Dec, withdrawReserveRate sdk.Dec, strategyWeights []StrategyWeight, fee types.Coin, deposit types.Coin, feeCollectorAddress string) *MsgCreateVault { return &MsgCreateVault{ Sender: sender, @@ -27,6 +26,7 @@ func NewMsgCreateVault(sender string, symbol string, name, description string, c } func (msg MsgCreateVault) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) } @@ -37,15 +37,12 @@ func (msg MsgCreateVault) ValidateBasic() error { if msg.Symbol == "" { return sdkerrors.ErrInvalidRequest.Wrapf("empty symbol is not allowed") + } if msg.Description == "" { return ErrInvalidVaultDescription } - if err := sdk.ValidateDenom(msg.Denom); err != nil { - return err - } - if msg.CommissionRate.IsNegative() || msg.CommissionRate.GTE(sdk.OneDec()) { return ErrInvalidCommissionRate } diff --git a/x/yieldaggregator/types/message_delete_vault.go b/x/yieldaggregator/types/message_delete_vault.go index 0cb1b7784..bf8ec61b2 100644 --- a/x/yieldaggregator/types/message_delete_vault.go +++ b/x/yieldaggregator/types/message_delete_vault.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -var _ sdk.Msg = &MsgCreateVault{} +var _ sdk.Msg = &MsgDeleteVault{} func NewMsgDeleteVault(sender string, vaultId uint64) *MsgDeleteVault { return &MsgDeleteVault{ diff --git a/x/yieldaggregator/types/message_transfer_vault_ownership.go b/x/yieldaggregator/types/message_transfer_vault_ownership.go index 798ff3ad0..030726778 100644 --- a/x/yieldaggregator/types/message_transfer_vault_ownership.go +++ b/x/yieldaggregator/types/message_transfer_vault_ownership.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -var _ sdk.Msg = &MsgCreateVault{} +var _ sdk.Msg = &MsgTransferVaultOwnership{} func NewMsgTransferVaultOwnership(sender string, vaultId uint64, recipient string) *MsgTransferVaultOwnership { return &MsgTransferVaultOwnership{ From 7df3a88e2fc07a30f3a4feaff9cee354c88d52d0 Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 08:48:44 +0800 Subject: [PATCH 30/59] codec for MsgReinitVaultTransfer --- x/yieldaggregator/types/codec.go | 1 + .../types/message_reinit_vault_transfer.go | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 x/yieldaggregator/types/message_reinit_vault_transfer.go diff --git a/x/yieldaggregator/types/codec.go b/x/yieldaggregator/types/codec.go index 4a8d25ee4..8762b8a31 100644 --- a/x/yieldaggregator/types/codec.go +++ b/x/yieldaggregator/types/codec.go @@ -29,6 +29,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgRegisterDenomInfos{}, &MsgRegisterSymbolInfos{}, &MsgSetIntermediaryAccountInfo{}, + &MsgReinitVaultTransfer{}, ) // Deprecated: Just for backward compatibility of query proposals diff --git a/x/yieldaggregator/types/message_reinit_vault_transfer.go b/x/yieldaggregator/types/message_reinit_vault_transfer.go new file mode 100644 index 000000000..ca5a2939a --- /dev/null +++ b/x/yieldaggregator/types/message_reinit_vault_transfer.go @@ -0,0 +1,31 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgReinitVaultTransfer{} + +func NewMsgReinitVaultTransfer(sender string, vaultId uint64, strategyDenom string, strategyId uint64, amount sdk.Coin) *MsgReinitVaultTransfer { + return &MsgReinitVaultTransfer{ + Sender: sender, + VaultId: vaultId, + StrategyDenom: strategyDenom, + StrategyId: strategyId, + Amount: amount, + } +} + +func (msg MsgReinitVaultTransfer) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return sdkerrors.ErrInvalidAddress.Wrapf("invalid sender address: %s", err) + } + + return nil +} + +func (msg MsgReinitVaultTransfer) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{addr} +} From 2b059185634f68c5c8357e2e5c8af189367e0bcb Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 09:04:25 +0800 Subject: [PATCH 31/59] add DenomInfo and SymbolInfo store test --- x/yieldaggregator/keeper/denom_info_test.go | 54 ++++++++++++++++++++ x/yieldaggregator/keeper/symbol_info_test.go | 40 +++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 x/yieldaggregator/keeper/denom_info_test.go create mode 100644 x/yieldaggregator/keeper/symbol_info_test.go diff --git a/x/yieldaggregator/keeper/denom_info_test.go b/x/yieldaggregator/keeper/denom_info_test.go new file mode 100644 index 000000000..beaad76cb --- /dev/null +++ b/x/yieldaggregator/keeper/denom_info_test.go @@ -0,0 +1,54 @@ +package keeper_test + +import "github.com/UnUniFi/chain/x/yieldaggregator/types" + +func (suite *KeeperTestSuite) TestDenomInfoStore() { + denomInfos := []types.DenomInfo{ + { + Denom: "ibc/01AAFF", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + ChainId: "cosmoshub-4", + ChannelId: "channel-1", + }, + }, + }, + { + Denom: "ibc/11AAFF", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + ChainId: "cosmoshub-4", + ChannelId: "channel-2", + }, + }, + }, + { + Denom: "ibc/21AAFF", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + ChainId: "osmosis-1", + ChannelId: "channel-1", + }, + { + ChainId: "cosmoshub-4", + ChannelId: "channel-2", + }, + }, + }, + } + + for _, denomInfo := range denomInfos { + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, denomInfo) + } + + for _, denomInfo := range denomInfos { + r := suite.app.YieldaggregatorKeeper.GetDenomInfo(suite.ctx, denomInfo.Denom) + suite.Require().Equal(r, denomInfo) + } + + storedInfos := suite.app.YieldaggregatorKeeper.GetAllDenomInfo(suite.ctx) + suite.Require().Len(storedInfos, 3) +} diff --git a/x/yieldaggregator/keeper/symbol_info_test.go b/x/yieldaggregator/keeper/symbol_info_test.go new file mode 100644 index 000000000..3e2a7a270 --- /dev/null +++ b/x/yieldaggregator/keeper/symbol_info_test.go @@ -0,0 +1,40 @@ +package keeper_test + +import "github.com/UnUniFi/chain/x/yieldaggregator/types" + +func (suite *KeeperTestSuite) TestSymbolInfoStore() { + symbolInfos := []types.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []types.TransferChannel{ + { + ChainId: "osmosis-1", + ChannelId: "channel-1", + }, + }, + }, + { + Symbol: "OSMO", + NativeChainId: "osmosis-1", + Channels: []types.TransferChannel{ + { + ChainId: "cosmoshub-4", + ChannelId: "channel-2", + }, + }, + }, + } + + for _, symbolInfo := range symbolInfos { + suite.app.YieldaggregatorKeeper.SetSymbolInfo(suite.ctx, symbolInfo) + } + + for _, symbolInfo := range symbolInfos { + r := suite.app.YieldaggregatorKeeper.GetSymbolInfo(suite.ctx, symbolInfo.Symbol) + suite.Require().Equal(r, symbolInfo) + } + + storedInfos := suite.app.YieldaggregatorKeeper.GetAllSymbolInfo(suite.ctx) + suite.Require().Len(storedInfos, 2) +} From bec9bea685c50717648bb00719159f3f8d7d515d Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 11:03:08 +0800 Subject: [PATCH 32/59] Add test for SendCoinsFromVault --- x/yieldaggregator/keeper/lp_test.go | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 970269c3b..944b54fa6 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -357,3 +357,69 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { amount = suite.app.YieldaggregatorKeeper.VaultUnbondingAmountInStrategies(suite.ctx, vault) suite.Require().Equal(amount.String(), "0") } + +func (suite *KeeperTestSuite) TestSendCoinsFromVault() { + vault := types.Vault{ + Id: 1, + Symbol: "ATOM", + StrategyWeights: []types.StrategyWeight{ + { + Denom: "uatom1", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + { + Denom: "uatom2", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + }, + } + recvAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + + coins := sdk.Coins{ + sdk.NewInt64Coin("uatom1", 1000000), + sdk.NewInt64Coin("uatom2", 1000000), + sdk.NewInt64Coin("uosmo", 1000000), + } + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultModAddr, coins) + suite.Require().NoError(err) + + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: "uatom1", + Symbol: "ATOM", + }) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: "uatom2", + Symbol: "ATOM", + }) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: "uosmo", + Symbol: "OSMO", + }) + + err = suite.app.YieldaggregatorKeeper.SendCoinsFromVault(suite.ctx, vault, recvAddr, sdk.NewInt(1500000)) + suite.Require().NoError(err) + balances := suite.app.BankKeeper.GetAllBalances(suite.ctx, recvAddr) + suite.Require().Equal(balances.String(), "1000000uatom1,500000uatom2") + + vault = types.Vault{ + Id: 1, + Symbol: "OSMO", + StrategyWeights: []types.StrategyWeight{ + { + Denom: "uosmo", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + }, + } + err = suite.app.YieldaggregatorKeeper.SendCoinsFromVault(suite.ctx, vault, recvAddr, sdk.NewInt(1000)) + suite.Require().NoError(err) + balances = suite.app.BankKeeper.GetAllBalances(suite.ctx, recvAddr) + suite.Require().Equal(balances.String(), "1000000uatom1,500000uatom2,1000uosmo") +} From 77e88e3badd172a6f6d8b189bf63cb23db448eda Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 18:18:47 +0800 Subject: [PATCH 33/59] MsgServerReinitVaultTransfer test --- x/yieldaggregator/keeper/msg_server_test.go | 96 +++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/x/yieldaggregator/keeper/msg_server_test.go b/x/yieldaggregator/keeper/msg_server_test.go index 942926490..6452a7d7d 100644 --- a/x/yieldaggregator/keeper/msg_server_test.go +++ b/x/yieldaggregator/keeper/msg_server_test.go @@ -1 +1,97 @@ package keeper_test + +import ( + "github.com/cometbft/cometbft/crypto/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/keeper" + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func (suite *KeeperTestSuite) TestMsgServerReinitVaultTransfer() { + vault := types.Vault{ + Id: 1, + Symbol: "ATOM", + StrategyWeights: []types.StrategyWeight{ + { + Denom: "uatom1", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + { + Denom: "uatom2", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + }, + } + + contractAddr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + contractAddr2 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + suite.app.YieldaggregatorKeeper.SetVault(suite.ctx, vault) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, types.Strategy{ + Denom: vault.StrategyWeights[0].Denom, + Id: vault.StrategyWeights[0].StrategyId, + ContractAddress: contractAddr1.String(), + Name: "", + Description: "", + GitUrl: "", + }) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, types.Strategy{ + Denom: vault.StrategyWeights[1].Denom, + Id: vault.StrategyWeights[1].StrategyId, + ContractAddress: contractAddr2.String(), + Name: "", + Description: "", + GitUrl: "", + }) + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + + coins := sdk.Coins{ + sdk.NewInt64Coin("uatom1", 1000000), + sdk.NewInt64Coin("uatom2", 1000000), + } + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultModAddr, coins) + suite.Require().NoError(err) + + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: "uatom1", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + ChainId: "osmosis-1", + ChannelId: "channel-1", + }, + }, + }) + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ + Denom: "uatom2", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + ChainId: "neutron-1", + ChannelId: "channel-2", + }, + }, + }) + + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "", 1) + msgServer := keeper.NewMsgServerImpl(suite.app.YieldaggregatorKeeper) + _, err = msgServer.ReinitVaultTransfer(sdk.WrapSDKContext(suite.ctx), &types.MsgReinitVaultTransfer{ + Sender: authtypes.NewModuleAddress(govtypes.ModuleName).String(), + VaultId: vault.Id, + StrategyDenom: vault.StrategyWeights[0].Denom, + StrategyId: vault.StrategyWeights[0].StrategyId, + Amount: sdk.NewInt64Coin("uatom1", 1000), + }) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") +} From 8cfe45a3bab1b35afbb95057497ee8cc6145861f Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 18:21:06 +0800 Subject: [PATCH 34/59] update strategy setter function and use --- x/yieldaggregator/genesis.go | 2 +- x/yieldaggregator/keeper/hooks_test.go | 2 +- x/yieldaggregator/keeper/lp_test.go | 8 ++++---- x/yieldaggregator/keeper/msg_server_update_strategy.go | 2 +- x/yieldaggregator/keeper/strategy.go | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/x/yieldaggregator/genesis.go b/x/yieldaggregator/genesis.go index 14422211b..2e5949bf7 100644 --- a/x/yieldaggregator/genesis.go +++ b/x/yieldaggregator/genesis.go @@ -16,7 +16,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) vaultCount := uint64(0) for _, strategy := range genState.Strategies { - k.SetStrategy(ctx, strategy.Denom, strategy) + k.SetStrategy(ctx, strategy) if strategy.Id+1 > strategyCountMap[strategy.Denom] { strategyCountMap[strategy.Denom] = strategy.Id + 1 diff --git a/x/yieldaggregator/keeper/hooks_test.go b/x/yieldaggregator/keeper/hooks_test.go index 66e62f46a..9c0c6be04 100644 --- a/x/yieldaggregator/keeper/hooks_test.go +++ b/x/yieldaggregator/keeper/hooks_test.go @@ -33,7 +33,7 @@ func (suite *KeeperTestSuite) TestBeforeEpochStart() { ContractAddress: "x/ibc-staking", Denom: atomIbcDenom, } - suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy) suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ Denom: atomIbcDenom, diff --git a/x/yieldaggregator/keeper/lp_test.go b/x/yieldaggregator/keeper/lp_test.go index 944b54fa6..b4a127c32 100644 --- a/x/yieldaggregator/keeper/lp_test.go +++ b/x/yieldaggregator/keeper/lp_test.go @@ -23,7 +23,7 @@ func (suite *KeeperTestSuite) TestVaultAmountUnbondingAmountInStrategies() { ContractAddress: "x/ibc-staking", Denom: atomIbcDenom, } - suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy) vault := types.Vault{ Id: 1, @@ -123,7 +123,7 @@ func (suite *KeeperTestSuite) TestVaultAmountTotal() { ContractAddress: "x/ibc-staking", Denom: atomIbcDenom, } - suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy) vault := types.Vault{ Id: 1, @@ -184,7 +184,7 @@ func (suite *KeeperTestSuite) TestEstimateMintRedeemAmountInternal() { ContractAddress: "x/ibc-staking", Denom: atomIbcDenom, } - suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy) suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ Denom: atomIbcDenom, @@ -244,7 +244,7 @@ func (suite *KeeperTestSuite) TestMintBurnLPToken() { ContractAddress: "x/ibc-staking", Denom: atomIbcDenom, } - suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy.Denom, strategy) + suite.app.YieldaggregatorKeeper.SetStrategy(suite.ctx, strategy) suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, types.DenomInfo{ Denom: atomIbcDenom, diff --git a/x/yieldaggregator/keeper/msg_server_update_strategy.go b/x/yieldaggregator/keeper/msg_server_update_strategy.go index 53e33afd3..f7ea182a5 100644 --- a/x/yieldaggregator/keeper/msg_server_update_strategy.go +++ b/x/yieldaggregator/keeper/msg_server_update_strategy.go @@ -23,7 +23,7 @@ func (k msgServer) UpdateStrategy(goCtx context.Context, msg *types.MsgUpdateStr strategy.Name = msg.Name strategy.Description = msg.Description strategy.GitUrl = msg.GitUrl - k.SetStrategy(ctx, msg.Denom, strategy) + k.SetStrategy(ctx, strategy) return &types.MsgUpdateStrategyResponse{}, nil } diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 7b523eade..7d286acae 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -104,10 +104,10 @@ func (k Keeper) AppendStrategy( } // SetStrategy set a specific Strategy in the store -func (k Keeper) SetStrategy(ctx sdk.Context, vaultDenom string, Strategy types.Strategy) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixStrategy(vaultDenom)) - b := k.cdc.MustMarshal(&Strategy) - store.Set(GetStrategyIDBytes(Strategy.Id), b) +func (k Keeper) SetStrategy(ctx sdk.Context, strategy types.Strategy) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixStrategy(strategy.Denom)) + b := k.cdc.MustMarshal(&strategy) + store.Set(GetStrategyIDBytes(strategy.Id), b) } // GetStrategy returns a Strategy from its id @@ -149,7 +149,7 @@ func (k Keeper) MigrateAllLegacyStrategies(ctx sdk.Context) { Description: "", GitUrl: legacyStrategy.GitUrl, } - k.SetStrategy(ctx, strategy.Denom, strategy) + k.SetStrategy(ctx, strategy) } } From 9e1439cc9354e7ad8954f5c113dce9ecdb6837ac Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 17 Oct 2023 20:03:11 +0800 Subject: [PATCH 35/59] StrategyDenoms unit test --- x/yieldaggregator/types/vault_test.go | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 x/yieldaggregator/types/vault_test.go diff --git a/x/yieldaggregator/types/vault_test.go b/x/yieldaggregator/types/vault_test.go new file mode 100644 index 000000000..d92568d17 --- /dev/null +++ b/x/yieldaggregator/types/vault_test.go @@ -0,0 +1,48 @@ +package types + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func TestStrategyDenoms(t *testing.T) { + tests := []struct { + name string + vault Vault + denoms []string + }{ + { + name: "invalid address", + vault: Vault{ + Id: 1, + Symbol: "ATOM", + StrategyWeights: []StrategyWeight{ + { + Denom: "uatom1", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + { + Denom: "uatom2", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + { + Denom: "uatom1", + StrategyId: 1, + Weight: sdk.OneDec(), + }, + }, + }, + denoms: []string{"uatom1", "uatom2"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + denoms := tt.vault.StrategyDenoms() + require.Equal(t, denoms, tt.denoms) + }) + } +} From b8abb0c7caeec7a06bbad1e52d9334033fada188 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 18 Oct 2023 09:57:03 +0800 Subject: [PATCH 36/59] Add unit test for VaultTransfer --- .../submodules/records/keeper/keeper.go | 12 +-- .../submodules/records/keeper/keeper_test.go | 85 +++++++++++++++++++ 2 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 x/yieldaggregator/submodules/records/keeper/keeper_test.go diff --git a/x/yieldaggregator/submodules/records/keeper/keeper.go b/x/yieldaggregator/submodules/records/keeper/keeper.go index 79e012052..d3d5afc43 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper.go @@ -182,12 +182,6 @@ func (k Keeper) VaultTransfer(ctx sdk.Context, vaultId uint64, contractAddr sdk. return err } - // trigger transfer - _, err = k.TransferKeeper.Transfer(goCtx, msg) - if err != nil { - return err - } - // Store the callback data callback := icacallbackstypes.CallbackData{ CallbackKey: icacallbackstypes.PacketID(msg.SourcePort, msg.SourceChannel, sequence), @@ -199,5 +193,11 @@ func (k Keeper) VaultTransfer(ctx sdk.Context, vaultId uint64, contractAddr sdk. } k.Logger(ctx).Info(fmt.Sprintf("Storing callback data: %v", callback)) k.ICACallbacksKeeper.SetCallbackData(ctx, callback) + + // trigger transfer + _, err = k.TransferKeeper.Transfer(goCtx, msg) + if err != nil { + return err + } return nil } diff --git a/x/yieldaggregator/submodules/records/keeper/keeper_test.go b/x/yieldaggregator/submodules/records/keeper/keeper_test.go new file mode 100644 index 000000000..0f48ff70c --- /dev/null +++ b/x/yieldaggregator/submodules/records/keeper/keeper_test.go @@ -0,0 +1,85 @@ +package keeper_test + +import ( + "testing" + + "github.com/cometbft/cometbft/crypto/ed25519" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/suite" + + "github.com/CosmWasm/wasmd/x/wasm" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + + simapp "github.com/UnUniFi/chain/app" + icacallbackstypes "github.com/UnUniFi/chain/x/yieldaggregator/submodules/icacallbacks/types" + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/keeper" + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" +) + +type KeeperTestSuite struct { + suite.Suite + + ctx sdk.Context + app *simapp.App +} + +func (suite *KeeperTestSuite) SetupTest() { + isCheckTx := false + app := simapp.Setup(suite.T(), ([]wasm.Option{})...) + suite.ctx = app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) + suite.app = app +} + +func TestKeeperSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} + +func (suite *KeeperTestSuite) TestVaultTransfer() { + vaultAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + recvAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + coin := sdk.NewInt64Coin("uatom1", 1000000) + coins := sdk.Coins{coin} + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultAddr, coins) + suite.Require().NoError(err) + + contractAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "channel-0", 1) + + timeoutTimestamp := uint64(suite.ctx.BlockTime().UnixNano()) + 60000000000 + err = suite.app.RecordsKeeper.VaultTransfer(suite.ctx, 1, contractAddr, transfertypes.NewMsgTransfer( + transfertypes.PortID, + "channel-0", + coin, + vaultAddr.String(), + recvAddr.String(), + clienttypes.Height{}, + timeoutTimestamp, + "", + )) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") + transferCallback := types.VaultTransferCallback{ + VaultId: 1, + StrategyContract: contractAddr.String(), + } + marshalledCallbackArgs, err := proto.Marshal(&transferCallback) + suite.Require().NoError(err) + + callbacks := suite.app.IcacallbacksKeeper.GetAllCallbackData(suite.ctx) + suite.Require().Len(callbacks, 1) + suite.Require().Equal(callbacks[0], icacallbackstypes.CallbackData{ + CallbackKey: icacallbackstypes.PacketID(transfertypes.ModuleName, "channel-0", 1), + PortId: transfertypes.ModuleName, + ChannelId: "channel-0", + Sequence: 1, + CallbackId: keeper.CONTRACT_TRANSFER, + CallbackArgs: marshalledCallbackArgs, + }) +} From 001af0f6ccc6dd5827827cd29aae553cc3fc3cf8 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 18 Oct 2023 10:07:34 +0800 Subject: [PATCH 37/59] add test for VaultPendingDeposit --- .../records/keeper/pending_deposit_test.go | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 x/yieldaggregator/submodules/records/keeper/pending_deposit_test.go diff --git a/x/yieldaggregator/submodules/records/keeper/pending_deposit_test.go b/x/yieldaggregator/submodules/records/keeper/pending_deposit_test.go new file mode 100644 index 000000000..aa52ab8b1 --- /dev/null +++ b/x/yieldaggregator/submodules/records/keeper/pending_deposit_test.go @@ -0,0 +1,40 @@ +package keeper_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" +) + +func (suite *KeeperTestSuite) TestVaultPendingDepositStore() { + deposits := []types.PendingDeposit{ + { + VaultId: 1, + Amount: sdk.OneInt(), + }, + { + VaultId: 2, + Amount: sdk.NewInt(2), + }, + } + + for _, deposit := range deposits { + suite.app.RecordsKeeper.SetVaultPendingDeposit(suite.ctx, deposit.VaultId, deposit.Amount) + } + + for _, deposit := range deposits { + r := suite.app.RecordsKeeper.GetVaultPendingDeposit(suite.ctx, deposit.VaultId) + suite.Require().Equal(r, deposit.Amount) + } + + storedInfos := suite.app.RecordsKeeper.GetAllVaultPendingDeposits(suite.ctx) + suite.Require().Len(storedInfos, 2) + + suite.app.RecordsKeeper.IncreaseVaultPendingDeposit(suite.ctx, 1, sdk.NewInt(100)) + r := suite.app.RecordsKeeper.GetVaultPendingDeposit(suite.ctx, 1) + suite.Require().Equal(r, sdk.NewInt(101)) + + suite.app.RecordsKeeper.DecreaseVaultPendingDeposit(suite.ctx, 1, sdk.NewInt(50)) + r = suite.app.RecordsKeeper.GetVaultPendingDeposit(suite.ctx, 1) + suite.Require().Equal(r, sdk.NewInt(51)) +} From 30e9cf394e19aaea9ed9def79116f53be0dc5c3a Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 18 Oct 2023 10:37:13 +0800 Subject: [PATCH 38/59] add test for IntermediaryAccountStore --- .../keeper/pfm_intermediary_test.go | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 x/yieldaggregator/keeper/pfm_intermediary_test.go diff --git a/x/yieldaggregator/keeper/pfm_intermediary_test.go b/x/yieldaggregator/keeper/pfm_intermediary_test.go new file mode 100644 index 000000000..ffd6e0172 --- /dev/null +++ b/x/yieldaggregator/keeper/pfm_intermediary_test.go @@ -0,0 +1,26 @@ +package keeper_test + +import "github.com/UnUniFi/chain/x/yieldaggregator/types" + +func (suite *KeeperTestSuite) TestIntermediaryAccountStore() { + interAcc := types.IntermediaryAccountInfo{ + Addrs: []types.ChainAddress{ + { + ChainId: "osmosis-1", + Address: "osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk", + }, + { + ChainId: "cosmoshub-4", + Address: "cosmos1q7q90qsl9g0gl2zz0njxwv2a649yqrtyxtnv3v", + }, + }, + } + + suite.app.YieldaggregatorKeeper.SetIntermediaryAccountInfo(suite.ctx, interAcc.Addrs) + + r := suite.app.YieldaggregatorKeeper.GetIntermediaryAccountInfo(suite.ctx) + suite.Require().Equal(r, interAcc) + + hubAddress := suite.app.YieldaggregatorKeeper.GetIntermediaryReceiver(suite.ctx, "cosmoshub-4") + suite.Require().Equal(hubAddress, "cosmos1q7q90qsl9g0gl2zz0njxwv2a649yqrtyxtnv3v") +} From 4fbd7cc59b8dd2778a8e052f9603d84874392488 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 18 Oct 2023 11:08:00 +0800 Subject: [PATCH 39/59] VaultTransferCallback unit test --- .../records/keeper/callback_transfer.go | 12 ++-- .../records/keeper/callback_transfer_test.go | 65 +++++++++++++++++++ 2 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 x/yieldaggregator/submodules/records/keeper/callback_transfer_test.go diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index 944d27811..ba5960c25 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -178,17 +178,17 @@ func VaultTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet return fmt.Errorf("failed to marshal MessageDepositCallback: %v", err) } - _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) - if err != nil { - k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) - return fmt.Errorf("failed to Sudo: %v", err) - } - amount, ok := sdk.NewIntFromString(data.Amount) if !ok { return fmt.Errorf("failed to parse transfer amount: %s", data.Amount) } k.DecreaseVaultPendingDeposit(ctx, unmarshalledTransferCallback.VaultId, amount) + _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) + if err != nil { + k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) + return fmt.Errorf("failed to Sudo: %v", err) + } + return nil } diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer_test.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer_test.go new file mode 100644 index 000000000..f88945d11 --- /dev/null +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer_test.go @@ -0,0 +1,65 @@ +package keeper_test + +import ( + "github.com/cometbft/cometbft/crypto/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + "github.com/gogo/protobuf/proto" + + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/keeper" + "github.com/UnUniFi/chain/x/yieldaggregator/submodules/records/types" +) + +func (suite *KeeperTestSuite) TestVaultTransferCallback() { + vaultAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + recvAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + coin := sdk.NewInt64Coin("uatom1", 1000000) + coins := sdk.Coins{coin} + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultAddr, coins) + suite.Require().NoError(err) + + contractAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "channel-0", 1) + + timeoutTimestamp := uint64(suite.ctx.BlockTime().UnixNano()) + 60000000000 + err = suite.app.RecordsKeeper.VaultTransfer(suite.ctx, 1, contractAddr, transfertypes.NewMsgTransfer( + transfertypes.PortID, + "channel-0", + coin, + vaultAddr.String(), + recvAddr.String(), + clienttypes.Height{}, + timeoutTimestamp, + "", + )) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") + + data := transfertypes.FungibleTokenPacketData{ + Denom: "uatom1", + Amount: coin.Amount.String(), + Receiver: recvAddr.String(), + Sender: vaultAddr.String(), + Memo: "", + } + ftpdBz, err := transfertypes.ModuleCdc.MarshalJSON(&data) + suite.Require().NoError(err) + + callbackData := types.VaultTransferCallback{ + VaultId: 1, + StrategyContract: contractAddr.String(), + } + callbackBz, err := proto.Marshal(&callbackData) + suite.Require().NoError(err) + + err = keeper.VaultTransferCallback(suite.app.RecordsKeeper, suite.ctx, channeltypes.Packet{ + Data: ftpdBz, + }, &channeltypes.Acknowledgement{}, callbackBz) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "failed to Sudo") +} From 7afa8a2e92562666330b348f0cabaf7754ea8ba4 Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 19 Oct 2023 10:59:30 +0800 Subject: [PATCH 40/59] Modify TransferChannel struct for accurate TransferRoute calculation & make the following changes --- .../yieldaggregator/yieldaggregator.proto | 5 +- x/yieldaggregator/keeper/denom_info_test.go | 20 +- x/yieldaggregator/keeper/msg_server_test.go | 10 +- x/yieldaggregator/keeper/strategy.go | 7 +- x/yieldaggregator/keeper/symbol_info_test.go | 10 +- x/yieldaggregator/types/yieldaggregator.pb.go | 187 +++++++++++------- 6 files changed, 151 insertions(+), 88 deletions(-) diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 1d5efebe1..1e3454a4a 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -48,8 +48,9 @@ message Strategy { } message TransferChannel { - string chain_id = 1; - string channel_id = 2; + string send_chain_id = 1; + string recv_chain_id = 2; + string channel_id = 3; } message SymbolInfo { string symbol = 1; diff --git a/x/yieldaggregator/keeper/denom_info_test.go b/x/yieldaggregator/keeper/denom_info_test.go index beaad76cb..fc33b3954 100644 --- a/x/yieldaggregator/keeper/denom_info_test.go +++ b/x/yieldaggregator/keeper/denom_info_test.go @@ -9,8 +9,9 @@ func (suite *KeeperTestSuite) TestDenomInfoStore() { Symbol: "ATOM", Channels: []types.TransferChannel{ { - ChainId: "cosmoshub-4", - ChannelId: "channel-1", + RecvChainId: "cosmoshub-4", + SendChainId: "neutron-1", + ChannelId: "channel-1", }, }, }, @@ -19,8 +20,9 @@ func (suite *KeeperTestSuite) TestDenomInfoStore() { Symbol: "ATOM", Channels: []types.TransferChannel{ { - ChainId: "cosmoshub-4", - ChannelId: "channel-2", + RecvChainId: "cosmoshub-4", + SendChainId: "osmosis-1", + ChannelId: "channel-2", }, }, }, @@ -29,12 +31,14 @@ func (suite *KeeperTestSuite) TestDenomInfoStore() { Symbol: "ATOM", Channels: []types.TransferChannel{ { - ChainId: "osmosis-1", - ChannelId: "channel-1", + RecvChainId: "cosmoshub-4", + SendChainId: "neutron-1", + ChannelId: "channel-1", }, { - ChainId: "cosmoshub-4", - ChannelId: "channel-2", + RecvChainId: "neutron-1", + SendChainId: "osmosis-1", + ChannelId: "channel-1", }, }, }, diff --git a/x/yieldaggregator/keeper/msg_server_test.go b/x/yieldaggregator/keeper/msg_server_test.go index 6452a7d7d..458e71387 100644 --- a/x/yieldaggregator/keeper/msg_server_test.go +++ b/x/yieldaggregator/keeper/msg_server_test.go @@ -67,8 +67,9 @@ func (suite *KeeperTestSuite) TestMsgServerReinitVaultTransfer() { Symbol: "ATOM", Channels: []types.TransferChannel{ { - ChainId: "osmosis-1", - ChannelId: "channel-1", + SendChainId: "cosmoshub-4", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", }, }, }) @@ -77,8 +78,9 @@ func (suite *KeeperTestSuite) TestMsgServerReinitVaultTransfer() { Symbol: "ATOM", Channels: []types.TransferChannel{ { - ChainId: "neutron-1", - ChannelId: "channel-2", + SendChainId: "cosmoshub-4", + RecvChainId: "neutron-1", + ChannelId: "channel-2", }, }, }) diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 7d286acae..fde215240 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -186,9 +186,10 @@ func CalculateTransferRoute(currChannels, tarChannels []types.TransferChannel) [ for index, currChan := range currChannels { if len(tarChannels) <= index { diffStartIndex = index + break } tarChan := tarChannels[index] - if currChan.ChainId != tarChan.ChainId { + if currChan.RecvChainId != tarChan.SendChainId { diffStartIndex = index break } @@ -224,7 +225,7 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T return "", nil } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos - return k.GetIntermediaryReceiver(ctx, channels[0].ChainId), &PacketMetadata{ + return k.GetIntermediaryReceiver(ctx, channels[0].RecvChainId), &PacketMetadata{ Forward: &ForwardMetadata{ Receiver: receiver, Port: ibctransfertypes.PortID, @@ -306,7 +307,7 @@ func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strateg symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) tarChannel := types.TransferChannel{} for _, channel := range symbolInfo.Channels { - if channel.ChainId == info.TargetChainId { + if channel.RecvChainId == info.TargetChainId { tarChannel = channel } } diff --git a/x/yieldaggregator/keeper/symbol_info_test.go b/x/yieldaggregator/keeper/symbol_info_test.go index 3e2a7a270..f96cd80b3 100644 --- a/x/yieldaggregator/keeper/symbol_info_test.go +++ b/x/yieldaggregator/keeper/symbol_info_test.go @@ -9,8 +9,9 @@ func (suite *KeeperTestSuite) TestSymbolInfoStore() { NativeChainId: "cosmoshub-4", Channels: []types.TransferChannel{ { - ChainId: "osmosis-1", - ChannelId: "channel-1", + SendChainId: "cosmoshut-4", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", }, }, }, @@ -19,8 +20,9 @@ func (suite *KeeperTestSuite) TestSymbolInfoStore() { NativeChainId: "osmosis-1", Channels: []types.TransferChannel{ { - ChainId: "cosmoshub-4", - ChannelId: "channel-2", + SendChainId: "osmosis-1", + RecvChainId: "cosmoshub-4", + ChannelId: "channel-2", }, }, }, diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index 5c0af0a40..b61df245f 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -266,8 +266,9 @@ func (m *Strategy) GetGitUrl() string { } type TransferChannel struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + SendChainId string `protobuf:"bytes,1,opt,name=send_chain_id,json=sendChainId,proto3" json:"send_chain_id,omitempty"` + RecvChainId string `protobuf:"bytes,2,opt,name=recv_chain_id,json=recvChainId,proto3" json:"recv_chain_id,omitempty"` + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` } func (m *TransferChannel) Reset() { *m = TransferChannel{} } @@ -303,9 +304,16 @@ func (m *TransferChannel) XXX_DiscardUnknown() { var xxx_messageInfo_TransferChannel proto.InternalMessageInfo -func (m *TransferChannel) GetChainId() string { +func (m *TransferChannel) GetSendChainId() string { if m != nil { - return m.ChainId + return m.SendChainId + } + return "" +} + +func (m *TransferChannel) GetRecvChainId() string { + if m != nil { + return m.RecvChainId } return "" } @@ -793,62 +801,64 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 880 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xaf, 0x13, 0x3b, 0x69, 0x5e, 0x76, 0xdb, 0x95, 0xdb, 0xdd, 0xba, 0x8b, 0x48, 0x23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 0xb5, 0xa4, 0x3e, 0x7f, 0x1a, 0xb0, 0xf3, 0x35, - 0x67, 0x53, 0x26, 0x50, 0x7a, 0x12, 0xc7, 0x8b, 0xa8, 0x24, 0x91, 0x29, 0x2e, 0x51, 0x29, 0xe3, - 0xa6, 0xcc, 0xd5, 0x6e, 0xcb, 0x5c, 0xf5, 0x9a, 0xfa, 0xe2, 0x6b, 0x56, 0xa1, 0x37, 0xdf, 0x8e, - 0xde, 0x5a, 0x8d, 0x7e, 0x49, 0x3b, 0x4f, 0x9f, 0xbd, 0xbc, 0xea, 0x18, 0xaf, 0xae, 0x3a, 0xc6, - 0x7f, 0x57, 0x1d, 0xe3, 0xd7, 0xeb, 0xce, 0xc6, 0xab, 0xeb, 0xce, 0xc6, 0x3f, 0xd7, 0x9d, 0x8d, - 0x1f, 0x3e, 0x4b, 0x88, 0x9c, 0xcc, 0x46, 0x5e, 0xc4, 0x32, 0xff, 0x9c, 0x9e, 0x53, 0xf2, 0x05, - 0xf1, 0xd5, 0x5a, 0xfb, 0x3f, 0xdd, 0xfa, 0x07, 0x93, 0xf3, 0x29, 0x16, 0xa3, 0x86, 0xfa, 0x21, - 0xfa, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x56, 0x2c, 0xbf, 0xab, 0x09, 0x00, 0x00, + // 900 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x6e, 0x23, 0x45, + 0x17, 0x4e, 0xfb, 0x1a, 0x1f, 0x4f, 0x92, 0x51, 0x27, 0x33, 0xe9, 0xcc, 0xaf, 0xdf, 0xb1, 0x5a, + 0x02, 0xcc, 0x22, 0x6d, 0x12, 0x9e, 0x20, 0xb1, 0x85, 0xe4, 0x11, 0x0b, 0xd4, 0x21, 0x80, 0x10, + 0x52, 0xab, 0xdc, 0x55, 0x6e, 0x97, 0xa6, 0x5d, 0x65, 0x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x3b, 0x41, 0x6a, 0x1c, 0x7c, 0x4e, 0x12, 0x14, 0xcf, 0xfb, 0x24, 0x7e, 0xfb, 0xea, 0x08, 0x2c, + 0xdc, 0x3e, 0x89, 0x43, 0x1b, 0xc0, 0xff, 0xad, 0x02, 0xd5, 0xaf, 0xd0, 0x2c, 0x55, 0xee, 0x36, + 0x94, 0x28, 0xd6, 0x40, 0x2a, 0x61, 0x89, 0x62, 0xf7, 0x29, 0xd4, 0xe4, 0x7c, 0x32, 0xe4, 0xa9, + 0x06, 0xd0, 0x08, 0xad, 0xe4, 0xba, 0x50, 0x61, 0x68, 0x42, 0x4c, 0xea, 0x50, 0x7f, 0xbb, 0x6d, + 0x68, 0x62, 0x22, 0x63, 0x41, 0xa7, 0x8a, 0x72, 0xe6, 0x55, 0xf4, 0xd3, 0xa2, 0xca, 0x0d, 0xa0, + 0xca, 0xaf, 0x18, 0x11, 0x5e, 0x55, 0x23, 0xf6, 0xde, 0xbe, 0x3a, 0xda, 0xb3, 0x70, 0x4e, 0x31, + 0x16, 0x44, 0xca, 0x73, 0x25, 0x28, 0x4b, 0x42, 0x63, 0xe6, 0xf6, 0x61, 0x4b, 0x7f, 0x44, 0x98, + 0x4c, 0xb9, 0xa4, 0xca, 0xab, 0xb5, 0x9d, 0x4e, 0xf3, 0xe4, 0x20, 0xb0, 0x4e, 0x59, 0x93, 0x03, + 0xdb, 0xe4, 0xa0, 0xc7, 0x29, 0x3b, 0xab, 0x64, 0x4d, 0x08, 0x1f, 0x69, 0xaf, 0xbe, 0x71, 0x72, + 0x5f, 0x80, 0x77, 0x45, 0xd5, 0x18, 0x0b, 0x74, 0x15, 0xc5, 0x7c, 0x32, 0xa1, 0x52, 0x52, 0xce, + 0xa2, 0xac, 0x91, 0x5e, 0xfd, 0xbe, 0xad, 0x7b, 0x9a, 0x87, 0xec, 0x15, 0x11, 0x43, 0xa4, 0x88, + 0x4b, 0xe0, 0x49, 0x91, 0x4c, 0x10, 0x49, 0xc4, 0x25, 0x31, 0x99, 0x36, 0xef, 0x9b, 0x69, 0x37, + 0x8f, 0x17, 0x9a, 0x70, 0x3a, 0xcd, 0x37, 0xf0, 0xb8, 0xd8, 0x0e, 0x33, 0x44, 0xe9, 0x35, 0xda, + 0xe5, 0x4e, 0xf3, 0xe4, 0xa3, 0x60, 0xcd, 0x2e, 0x07, 0xcb, 0x6b, 0x67, 0x5b, 0xb5, 0x23, 0x97, + 0xb4, 0xd2, 0x3d, 0x81, 0x27, 0x23, 0x42, 0xa2, 0x98, 0xa7, 0x29, 0x89, 0x15, 0x17, 0x11, 0x32, + 0x93, 0xf1, 0x40, 0xcf, 0x73, 0x77, 0x44, 0x48, 0x2f, 0x7f, 0xb3, 0x43, 0xf3, 0x7f, 0x71, 0x60, + 0x33, 0x8f, 0xbe, 0x66, 0x9d, 0xcd, 0x62, 0x95, 0x8a, 0xc5, 0xfa, 0x18, 0x1e, 0xc7, 0x9c, 0x29, + 0x81, 0x62, 0x55, 0x64, 0x30, 0xcb, 0xb4, 0x93, 0xeb, 0x6d, 0xf4, 0x62, 0xd7, 0x2a, 0xeb, 0x77, + 0xad, 0x7a, 0x7b, 0xd7, 0xf6, 0xa1, 0x9e, 0x50, 0x15, 0xcd, 0x44, 0xaa, 0xb7, 0xa6, 0x11, 0xd6, + 0x12, 0xaa, 0x2e, 0x44, 0xea, 0xbf, 0x84, 0x9d, 0x2f, 0x05, 0x62, 0x72, 0x44, 0x44, 0x6f, 0x8c, + 0x18, 0x23, 0xa9, 0xeb, 0xc3, 0x96, 0x24, 0x0c, 0x47, 0xf1, 0x18, 0x51, 0x16, 0xd9, 0x03, 0x68, + 0x84, 0xcd, 0x4c, 0xd9, 0xcb, 0x74, 0x03, 0x9c, 0xd9, 0x08, 0x12, 0x5f, 0xfe, 0x63, 0x63, 0x0e, + 0xa2, 0x99, 0x29, 0x73, 0x9b, 0xff, 0x03, 0xc4, 0x26, 0x64, 0x66, 0x60, 0xca, 0x69, 0x58, 0xcd, + 0x00, 0xfb,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2e, 0x51, 0x7a, 0x8a, 0xf1, 0x22, 0x2a, 0x45, 0x55, 0x4a, + 0x72, 0x54, 0x5a, 0x58, 0xe5, 0xc4, 0xd2, 0x6d, 0x4e, 0x2c, 0xaa, 0x29, 0x2f, 0x56, 0x73, 0x17, + 0xfa, 0xca, 0xbf, 0xa3, 0xaf, 0xde, 0x8d, 0x7e, 0x89, 0x68, 0xcf, 0x9e, 0xbf, 0xbe, 0x6e, 0x39, + 0x6f, 0xae, 0x5b, 0xce, 0x5f, 0xd7, 0x2d, 0xe7, 0xc7, 0x9b, 0xd6, 0xc6, 0x9b, 0x9b, 0xd6, 0xc6, + 0x1f, 0x37, 0xad, 0x8d, 0x6f, 0x3f, 0x49, 0xa8, 0x1a, 0xcf, 0x86, 0x41, 0xcc, 0x27, 0xdd, 0x0b, + 0x76, 0xc1, 0xe8, 0x67, 0xb4, 0xab, 0xcf, 0xba, 0xfb, 0xf2, 0xd6, 0x0f, 0x9b, 0x9a, 0x4f, 0x89, + 0x1c, 0xd6, 0xf4, 0xdf, 0xd3, 0xa7, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x82, 0x45, 0xc0, + 0xd8, 0x09, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -1091,12 +1101,19 @@ func (m *TransferChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.ChannelId) i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.ChannelId))) i-- + dAtA[i] = 0x1a + } + if len(m.RecvChainId) > 0 { + i -= len(m.RecvChainId) + copy(dAtA[i:], m.RecvChainId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.RecvChainId))) + i-- dAtA[i] = 0x12 } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.ChainId))) + if len(m.SendChainId) > 0 { + i -= len(m.SendChainId) + copy(dAtA[i:], m.SendChainId) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.SendChainId))) i-- dAtA[i] = 0xa } @@ -1597,7 +1614,11 @@ func (m *TransferChannel) Size() (n int) { } var l int _ = l - l = len(m.ChainId) + l = len(m.SendChainId) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.RecvChainId) if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) } @@ -2544,7 +2565,7 @@ func (m *TransferChannel) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SendChainId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2572,9 +2593,41 @@ func (m *TransferChannel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainId = string(dAtA[iNdEx:postIndex]) + m.SendChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RecvChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RecvChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) } From 1363c5f92c6079a1e4ffdda8d149b1b36592c233 Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 19 Oct 2023 20:16:57 +0800 Subject: [PATCH 41/59] add unit test for CalculateTransferRoute, ComposePacketForwardMetadata, ExecuteVaultTransfer --- .../msg_server_reinit_vault_transfer.go | 2 +- x/yieldaggregator/keeper/msg_server_test.go | 2 +- x/yieldaggregator/keeper/strategy.go | 19 +- x/yieldaggregator/keeper/strategy_test.go | 227 ++++++++++++++++++ 4 files changed, 241 insertions(+), 9 deletions(-) diff --git a/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go b/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go index 71934684d..6e3aebb85 100644 --- a/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go +++ b/x/yieldaggregator/keeper/msg_server_reinit_vault_transfer.go @@ -25,7 +25,7 @@ func (k msgServer) ReinitVaultTransfer(ctx context.Context, msg *types.MsgReinit return nil, types.ErrStrategyNotFound } - err := k.Keeper.ExecuteVaultTransfer(sdkCtx, vault, strategy, msg.Amount) + _, err := k.Keeper.ExecuteVaultTransfer(sdkCtx, vault, strategy, msg.Amount) if err != nil { return nil, err } diff --git a/x/yieldaggregator/keeper/msg_server_test.go b/x/yieldaggregator/keeper/msg_server_test.go index 458e71387..fe7aa1263 100644 --- a/x/yieldaggregator/keeper/msg_server_test.go +++ b/x/yieldaggregator/keeper/msg_server_test.go @@ -85,7 +85,7 @@ func (suite *KeeperTestSuite) TestMsgServerReinitVaultTransfer() { }, }) - suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "", 1) + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "channel-1", 1) msgServer := keeper.NewMsgServerImpl(suite.app.YieldaggregatorKeeper) _, err = msgServer.ReinitVaultTransfer(sdk.WrapSDKContext(suite.ctx), &types.MsgReinitVaultTransfer{ Sender: authtypes.NewModuleAddress(govtypes.ModuleName).String(), diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index fde215240..69a78a250 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -229,7 +229,7 @@ func (k Keeper) ComposePacketForwardMetadata(ctx sdk.Context, channels []types.T Forward: &ForwardMetadata{ Receiver: receiver, Port: ibctransfertypes.PortID, - Channel: channels[0].ChannelId, + Channel: channels[1].ChannelId, Timeout: Duration(ibcTransferTimeoutNanos), Retries: &retries, Next: NewJSONObject(false, nextForwardBz, orderedmap.OrderedMap{}), @@ -279,7 +279,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ if balance.Amount.LT(remaining) { stakeAmount = balance.Amount } - err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) + _, err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) if err != nil { return err } @@ -292,18 +292,18 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ } } -func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strategy types.Strategy, stakeCoin sdk.Coin) error { +func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strategy types.Strategy, stakeCoin sdk.Coin) (*ibctypes.MsgTransfer, error) { vaultModName := types.GetVaultModuleAccountName(vault.Id) vaultModAddr := authtypes.NewModuleAddress(vaultModName) contractAddr := sdk.MustAccAddressFromBech32(strategy.ContractAddress) info := k.GetStrategyDepositInfo(ctx, strategy) params, err := k.GetParams(ctx) if err != nil { - return err + return nil, err } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - denomInfo := k.GetDenomInfo(ctx, info.Denom) + denomInfo := k.GetDenomInfo(ctx, strategy.Denom) symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) tarChannel := types.TransferChannel{} for _, channel := range symbolInfo.Channels { @@ -314,7 +314,12 @@ func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strateg transferRoute := CalculateTransferRoute(denomInfo.Channels, []types.TransferChannel{tarChannel}) initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) memo, err := json.Marshal(metadata) - + if err != nil { + return nil, err + } + if metadata == nil { + memo = []byte{} + } msg := ibctypes.NewMsgTransfer( ibctransfertypes.PortID, transferRoute[0].ChannelId, @@ -326,7 +331,7 @@ func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strateg string(memo), ) err = k.recordsKeeper.VaultTransfer(ctx, vault.Id, contractAddr, msg) - return err + return msg, err } // unstake worth of withdrawal amount from the strategy diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 84c85f9b4..3fed38dad 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "encoding/json" "time" "github.com/cometbft/cometbft/crypto/ed25519" @@ -321,3 +322,229 @@ func (suite *KeeperTestSuite) TestGetAmountAndUnbondingAmountFromStrategy() { suite.Require().NoError(err) suite.Require().Equal(amount.String(), "1000000"+atomIbcDenom) } + +func (suite *KeeperTestSuite) TestCalculateTransferRoute() { + currChannels := []types.TransferChannel{} + tarChannels := []types.TransferChannel{} + + route := keeper.CalculateTransferRoute(currChannels, tarChannels) + suite.Require().Equal(route, []types.TransferChannel{}) + + // ATOM + currChannels = []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-2", // back channel + }, + } + tarChannels = []types.TransferChannel{ + { + SendChainId: "cosmoshub-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", // forward channel + }, + } + route = keeper.CalculateTransferRoute(currChannels, tarChannels) + suite.Require().Equal(route, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-2", // back channel + }, + { + SendChainId: "cosmoshub-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", // forward channel + }, + }) + + // ATOM.osmo + currChannels = []types.TransferChannel{ + { + SendChainId: "osmosis-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-3", // back channel + }, + { + SendChainId: "ununifi-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-3", // back channel + }, + } + tarChannels = []types.TransferChannel{ + { + SendChainId: "cosmoshub-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", // forward channel + }, + } + route = keeper.CalculateTransferRoute(currChannels, tarChannels) + suite.Require().Equal(route, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-3", // back channel + }, + }) +} + +func (suite *KeeperTestSuite) TestComposePacketForwardMetadata() { + suite.app.YieldaggregatorKeeper.SetIntermediaryAccountInfo(suite.ctx, []types.ChainAddress{ + { + ChainId: "cosmoshub-1", + Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "osmosis-1", + Address: "osmo1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "neutron-1", + Address: "neutron1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + }) + + receiver, metadata := suite.app.YieldaggregatorKeeper.ComposePacketForwardMetadata(suite.ctx, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-3", // back channel + }, + }, "osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk") + suite.Require().Equal(receiver, "osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk") + metadataJson, err := json.Marshal(metadata) + suite.Require().NoError(err) + suite.Require().Equal(string(metadataJson), "null") + + receiver, metadata = suite.app.YieldaggregatorKeeper.ComposePacketForwardMetadata(suite.ctx, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-2", // back channel + }, + { + SendChainId: "cosmoshub-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", // forward channel + }, + }, "osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk") + suite.Require().Equal(receiver, "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") + metadataJson, err = json.Marshal(metadata) + suite.Require().NoError(err) + suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","retries":2,"next":null}}`) + + receiver, metadata = suite.app.YieldaggregatorKeeper.ComposePacketForwardMetadata(suite.ctx, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "neutron-1", + ChannelId: "channel-2", // back channel + }, + { + SendChainId: "neutron-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-3", // back channel + }, + { + SendChainId: "cosmoshub-1", + RecvChainId: "osmosis-1", + ChannelId: "channel-1", // forward channel + }, + }, "osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk") + suite.Require().Equal(receiver, "neutron1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") + metadataJson, err = json.Marshal(metadata) + suite.Require().NoError(err) + suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t","port":"transfer","channel":"channel-3","retries":2,"next":{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","retries":2,"next":null}}}}`) +} + +func (suite *KeeperTestSuite) TestExecuteVaultTransfer() { + suite.app.YieldaggregatorKeeper.SetIntermediaryAccountInfo(suite.ctx, []types.ChainAddress{ + { + ChainId: "cosmoshub-1", + Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "osmosis-1", + Address: "osmo1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "neutron-1", + Address: "neutron1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + }) + + denomInfos := []types.DenomInfo{ + { + Denom: "ibc/01AAFF", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "ununifi-1", + ChannelId: "channel-2", + }, + }, + }, + } + + symbolInfos := []types.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []types.TransferChannel{ + { + SendChainId: "cosmoshub-4", + RecvChainId: "", // osmosis-1 (since contract is not mocked target chain id is set as "") + ChannelId: "channel-1", + }, + }, + }, + } + + for _, denomInfo := range denomInfos { + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, denomInfo) + } + + for _, symbolInfo := range symbolInfos { + suite.app.YieldaggregatorKeeper.SetSymbolInfo(suite.ctx, symbolInfo) + } + + addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + vault := types.Vault{ + Id: 1, + Symbol: "ATOM", + Owner: addr1.String(), + OwnerDeposit: sdk.NewInt64Coin("uguu", 100), + WithdrawCommissionRate: sdk.ZeroDec(), + WithdrawReserveRate: sdk.ZeroDec(), + StrategyWeights: []types.StrategyWeight{ + {Denom: denomInfos[0].Denom, StrategyId: 1, Weight: sdk.OneDec()}, + }, + } + + contractAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + strategy := types.Strategy{ + Id: 1, + Name: "AtomStaking", + ContractAddress: contractAddr.String(), + Denom: denomInfos[0].Denom, + } + + coin := sdk.NewInt64Coin(denomInfos[0].Denom, 1000) + + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.Coins{coin}) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultModAddr, sdk.Coins{coin}) + suite.Require().NoError(err) + + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, denomInfos[0].Channels[0].ChannelId, 1) + msg, err := suite.app.YieldaggregatorKeeper.ExecuteVaultTransfer(suite.ctx, vault, strategy, coin) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") + + msgBz, err := suite.app.AppCodec().MarshalJSON(msg) + suite.Require().NoError(err) + suite.Require().Equal(string(msgBz), `{"source_port":"transfer","source_channel":"channel-2","token":{"denom":"ibc/01AAFF","amount":"1000"},"sender":"cosmos1rrxq3fae4jksmnmtd0k5z744am9hp307m8t429","receiver":"","timeout_height":{"revision_number":"0","revision_height":"0"},"timeout_timestamp":"11651379494838206464","memo":"{\"forward\":{\"port\":\"transfer\",\"channel\":\"channel-1\",\"retries\":2,\"next\":null}}"}`) +} From 68c2c23d84beb72127b1832c84a1a127b7b9fa2f Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 19 Oct 2023 20:26:30 +0800 Subject: [PATCH 42/59] resolve existing unit test --- x/yieldaggregator/keeper/strategy_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 3fed38dad..85dcf692b 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -186,7 +186,7 @@ func (suite *KeeperTestSuite) TestStakeToStrategy() { // check the changes record, found := suite.app.RecordsKeeper.GetDepositRecord(suite.ctx, 1) suite.Require().True(found) - suite.Require().Equal(record.Amount, int64(1000_100)) + suite.Require().Equal(record.Amount.String(), "1000100") balance := suite.app.BankKeeper.GetAllBalances(suite.ctx, vaultModAddr) suite.Require().Equal(balance.String(), "1000000stuatom") @@ -247,9 +247,9 @@ func (suite *KeeperTestSuite) TestUnstakeFromStrategy() { unbondingRecord, found := suite.app.RecordsKeeper.GetEpochUnbondingRecord(suite.ctx, 1) suite.Require().True(found) suite.Require().Len(unbondingRecord.HostZoneUnbondings, 1) - suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].StTokenAmount, uint64(1000_000)) + suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].StTokenAmount.String(), "1000000") suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].Status, recordstypes.HostZoneUnbonding_UNBONDING_QUEUE) - suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].NativeTokenAmount, uint64(1000_000)) + suite.Require().Equal(unbondingRecord.HostZoneUnbondings[0].NativeTokenAmount.String(), "1000000") suite.Require().Len(unbondingRecord.HostZoneUnbondings[0].UserRedemptionRecords, 1) } From c0d27b1639763f58c136c454985299c67a3eb6d0 Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 19 Oct 2023 21:11:04 +0800 Subject: [PATCH 43/59] Resolve issue on StakeToStrategy function and add unit test for MultipleDenomsVaultStakeStrategy --- x/yieldaggregator/keeper/strategy.go | 5 +- x/yieldaggregator/keeper/strategy_test.go | 101 ++++++++++++++++++++++ 2 files changed, 104 insertions(+), 2 deletions(-) diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 69a78a250..0df19a458 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -279,7 +279,8 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ if balance.Amount.LT(remaining) { stakeAmount = balance.Amount } - _, err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) + msg, err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) + k.Logger(ctx).Info("transfer_memo", msg.Memo) if err != nil { return err } @@ -303,7 +304,7 @@ func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strateg } ibcTransferTimeoutNanos := params.IbcTransferTimeoutNanos timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - denomInfo := k.GetDenomInfo(ctx, strategy.Denom) + denomInfo := k.GetDenomInfo(ctx, stakeCoin.Denom) symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) tarChannel := types.TransferChannel{} for _, channel := range symbolInfo.Channels { diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 85dcf692b..ea802cad1 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -141,6 +141,107 @@ func (suite *KeeperTestSuite) SetupZoneAndEpoch(hostDenom, ibcDenom string) stak return zone } +// stake into strategy +func (suite *KeeperTestSuite) TestMultipleDenomsVaultStakeStrategy() { + suite.SetupTest() + addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + atomHostDenom := "uatom" + prefixedDenom := transfertypes.GetPrefixedDenom("transfer", "channel-3", atomHostDenom) + atomIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() + atomOsmosisDenom := "uatom/osmosis" + prefixedDenom = transfertypes.GetPrefixedDenom("transfer", "channel-2", atomOsmosisDenom) + atomOsmosisIbcDenom := transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom() + + denomInfos := []types.DenomInfo{ + { + Denom: atomOsmosisIbcDenom, + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "", + ChannelId: "channel-1", + }, + { + RecvChainId: "", + SendChainId: "ununifi-1", + ChannelId: "channel-2", + }, + }, + }, + { + Denom: atomIbcDenom, + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "ununifi-1", + ChannelId: "channel-3", + }, + }, + }, + } + + symbolInfos := []types.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []types.TransferChannel{ + { + SendChainId: "cosmoshub-4", + RecvChainId: "", // osmosis-1 (since contract is not mocked target chain id is set as "") + ChannelId: "channel-4", + }, + }, + }, + } + + for _, denomInfo := range denomInfos { + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, denomInfo) + } + + for _, symbolInfo := range symbolInfos { + suite.app.YieldaggregatorKeeper.SetSymbolInfo(suite.ctx, symbolInfo) + } + + contractAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + strategy := types.Strategy{ + Id: 1, + Name: "AtomStakingOnOsmosis", + ContractAddress: contractAddr.String(), + Denom: atomOsmosisIbcDenom, + } + + vault := types.Vault{ + Id: 1, + Symbol: "ATOM", + Owner: addr1.String(), + OwnerDeposit: sdk.NewInt64Coin("uguu", 100), + WithdrawCommissionRate: sdk.ZeroDec(), + WithdrawReserveRate: sdk.ZeroDec(), + StrategyWeights: []types.StrategyWeight{ + {Denom: atomIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, + {Denom: atomOsmosisIbcDenom, StrategyId: 1, Weight: sdk.OneDec()}, + }, + } + + // mint coins to be spent on strategy deposit + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + coins := sdk.Coins{sdk.NewInt64Coin(atomIbcDenom, 1000000)} + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultModAddr, coins) + suite.Require().NoError(err) + + // stake to strategy + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, "channel-3", 1) + err = suite.app.YieldaggregatorKeeper.StakeToStrategy(suite.ctx, vault, strategy, sdk.NewInt(1000_000)) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") +} + // stake into strategy func (suite *KeeperTestSuite) TestStakeToStrategy() { suite.SetupTest() From 5bed64e93891177ea0ecedd79c9c14024eb04156 Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 24 Oct 2023 23:40:17 +0800 Subject: [PATCH 44/59] update HooksICS4Wrapper initialization --- app/keepers/keepers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index a7b061dd9..5eda50c75 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -382,6 +382,10 @@ func NewAppKeeper( appKeepers.keys[ibchookstypes.StoreKey], ) appKeepers.Ics20WasmHooks = ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later + appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( + appKeepers.IBCKeeper.ChannelKeeper, + &appKeepers.Ics20WasmHooks, + ) // Create Transfer Keepers appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( @@ -460,10 +464,6 @@ func NewAppKeeper( // Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper) appKeepers.Ics20WasmHooks.ContractKeeper = &appKeepers.WasmKeeper - appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( - appKeepers.IBCKeeper.ChannelKeeper, - appKeepers.Ics20WasmHooks, - ) // Instantiate the builder keeper, store keys, and module manager appKeepers.BuilderKeeper = builderkeeper.NewKeeper( From 818edbf8286a06f1d8d79858065ade6aea94031f Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 24 Oct 2023 23:40:17 +0800 Subject: [PATCH 45/59] update HooksICS4Wrapper initialization --- app/keepers/keepers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index a9c394b5c..933e055b9 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -382,6 +382,10 @@ func NewAppKeeper( appKeepers.keys[ibchookstypes.StoreKey], ) appKeepers.Ics20WasmHooks = ibchooks.NewWasmHooks(&appKeepers.IBCHooksKeeper, nil, accountAddressPrefix) // The contract keeper needs to be set later + appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( + appKeepers.IBCKeeper.ChannelKeeper, + &appKeepers.Ics20WasmHooks, + ) // Create Transfer Keepers appKeepers.TransferKeeper = ibctransferkeeper.NewKeeper( @@ -454,10 +458,6 @@ func NewAppKeeper( // Pass the contract keeper to all the structs (generally ICS4Wrappers for ibc middlewares) that need it appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper) appKeepers.Ics20WasmHooks.ContractKeeper = &appKeepers.WasmKeeper - appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( - appKeepers.IBCKeeper.ChannelKeeper, - appKeepers.Ics20WasmHooks, - ) // Instantiate the builder keeper, store keys, and module manager appKeepers.BuilderKeeper = builderkeeper.NewKeeper( From 72dbdcab01d226e6d9b00df4378b127bd59926c8 Mon Sep 17 00:00:00 2001 From: jununifi Date: Thu, 26 Oct 2023 11:08:31 +0800 Subject: [PATCH 46/59] Modification on VaultWithdrawalAmount to consider non-strategy denoms & Resolve invalid callback id registration on vault transfer --- x/yieldaggregator/client/cli/query.go | 3 ++ .../client/cli/query_denom_info.go | 36 +++++++++++++++++++ .../client/cli/query_intermediary_accounts.go | 36 +++++++++++++++++++ .../client/cli/query_symbol_info.go | 36 +++++++++++++++++++ x/yieldaggregator/keeper/lp.go | 8 +++-- x/yieldaggregator/keeper/strategy.go | 2 +- .../submodules/records/keeper/keeper.go | 2 +- x/yieldaggregator/types/params.go | 14 +++++--- 8 files changed, 127 insertions(+), 10 deletions(-) create mode 100644 x/yieldaggregator/client/cli/query_denom_info.go create mode 100644 x/yieldaggregator/client/cli/query_intermediary_accounts.go create mode 100644 x/yieldaggregator/client/cli/query_symbol_info.go diff --git a/x/yieldaggregator/client/cli/query.go b/x/yieldaggregator/client/cli/query.go index d56b58d1b..8b378cbf3 100644 --- a/x/yieldaggregator/client/cli/query.go +++ b/x/yieldaggregator/client/cli/query.go @@ -33,6 +33,9 @@ func GetQueryCmd(queryRoute string) *cobra.Command { CmdVaultAllByShareHolder(), CmdVaultEstimatedMintAmount(), CmdVaultEstimatedRedeemAmount(), + CmdQuerySymbolInfo(), + CmdQueryDenomInfo(), + CmdQueryIntermediaryAccounts(), ) return cmd diff --git a/x/yieldaggregator/client/cli/query_denom_info.go b/x/yieldaggregator/client/cli/query_denom_info.go new file mode 100644 index 000000000..9abbf779c --- /dev/null +++ b/x/yieldaggregator/client/cli/query_denom_info.go @@ -0,0 +1,36 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func CmdQueryDenomInfo() *cobra.Command { + cmd := &cobra.Command{ + Use: "denom-infos", + Short: "list denom infos", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryDenomInfosRequest{} + + res, err := queryClient.DenomInfos(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/yieldaggregator/client/cli/query_intermediary_accounts.go b/x/yieldaggregator/client/cli/query_intermediary_accounts.go new file mode 100644 index 000000000..5e1949205 --- /dev/null +++ b/x/yieldaggregator/client/cli/query_intermediary_accounts.go @@ -0,0 +1,36 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func CmdQueryIntermediaryAccounts() *cobra.Command { + cmd := &cobra.Command{ + Use: "intermediary-accounts", + Short: "list intermediary accounts infos", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryIntermediaryAccountInfoRequest{} + + res, err := queryClient.IntermediaryAccountInfo(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/yieldaggregator/client/cli/query_symbol_info.go b/x/yieldaggregator/client/cli/query_symbol_info.go new file mode 100644 index 000000000..9c52104b5 --- /dev/null +++ b/x/yieldaggregator/client/cli/query_symbol_info.go @@ -0,0 +1,36 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func CmdQuerySymbolInfo() *cobra.Command { + cmd := &cobra.Command{ + Use: "symbol-infos", + Short: "list symbol infos", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QuerySymbolInfosRequest{} + + res, err := queryClient.SymbolInfos(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index 0a745c42a..9a2506fee 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -53,11 +53,13 @@ func (k Keeper) VaultBalances(ctx sdk.Context, vault types.Vault) sdk.Coins { } func (k Keeper) VaultWithdrawalAmount(ctx sdk.Context, vault types.Vault) sdk.Int { - denoms := vault.StrategyDenoms() amount := sdk.ZeroInt() vaultBalances := k.VaultBalances(ctx, vault) - for _, denom := range denoms { - amount = amount.Add(vaultBalances.AmountOf(denom)) + for _, balance := range vaultBalances { + denomInfo := k.GetDenomInfo(ctx, balance.Denom) + if denomInfo.Symbol == vault.Symbol { + amount = amount.Add(balance.Amount) + } } return amount } diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index 0df19a458..ae4029b6b 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -280,7 +280,7 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ stakeAmount = balance.Amount } msg, err := k.ExecuteVaultTransfer(ctx, vault, strategy, sdk.NewCoin(balance.Denom, stakeAmount)) - k.Logger(ctx).Info("transfer_memo", msg.Memo) + k.Logger(ctx).Info("transfer_memo " + msg.Memo) if err != nil { return err } diff --git a/x/yieldaggregator/submodules/records/keeper/keeper.go b/x/yieldaggregator/submodules/records/keeper/keeper.go index d3d5afc43..5ff3b24bf 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper.go @@ -188,7 +188,7 @@ func (k Keeper) VaultTransfer(ctx sdk.Context, vaultId uint64, contractAddr sdk. PortId: msg.SourcePort, ChannelId: msg.SourceChannel, Sequence: sequence, - CallbackId: CONTRACT_TRANSFER, + CallbackId: VAULT_TRANSFER, CallbackArgs: marshalledCallbackArgs, } k.Logger(ctx).Info(fmt.Sprintf("Storing callback data: %v", callback)) diff --git a/x/yieldaggregator/types/params.go b/x/yieldaggregator/types/params.go index 98197541e..0aa5f32f9 100644 --- a/x/yieldaggregator/types/params.go +++ b/x/yieldaggregator/types/params.go @@ -10,7 +10,8 @@ import ( ) var ( - DefaultFeeCollectorAddress = "" + DefaultFeeCollectorAddress = "" + DefaultIBCTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes ) // NewParams creates a new Params instance @@ -19,12 +20,14 @@ func NewParams( vaultCreationFee sdk.Coin, vaultCreationDeposit sdk.Coin, feeCollectorAddress string, + ibcTransferTimeoutNanos uint64, ) Params { return Params{ - CommissionRate: withdrawCommissionRate, - VaultCreationFee: vaultCreationFee, - VaultCreationDeposit: vaultCreationDeposit, - FeeCollectorAddress: feeCollectorAddress, + CommissionRate: withdrawCommissionRate, + VaultCreationFee: vaultCreationFee, + VaultCreationDeposit: vaultCreationDeposit, + FeeCollectorAddress: feeCollectorAddress, + IbcTransferTimeoutNanos: ibcTransferTimeoutNanos, } } @@ -35,6 +38,7 @@ func DefaultParams() Params { sdk.NewInt64Coin("stake", 1000), sdk.NewInt64Coin("stake", 1000), DefaultFeeCollectorAddress, + DefaultIBCTransferTimeoutNanos, ) } From 6a05ed75a0c02428d41b27b0e4c54367b3de58ea Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 27 Oct 2023 09:04:41 +0800 Subject: [PATCH 47/59] fix VaultWithdrawalAmount considering denom info not registered & resolve unit tests --- x/yieldaggregator/keeper/lp.go | 7 ++++++- x/yieldaggregator/keeper/strategy_test.go | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/x/yieldaggregator/keeper/lp.go b/x/yieldaggregator/keeper/lp.go index 9a2506fee..78d5d5fa6 100644 --- a/x/yieldaggregator/keeper/lp.go +++ b/x/yieldaggregator/keeper/lp.go @@ -55,9 +55,14 @@ func (k Keeper) VaultBalances(ctx sdk.Context, vault types.Vault) sdk.Coins { func (k Keeper) VaultWithdrawalAmount(ctx sdk.Context, vault types.Vault) sdk.Int { amount := sdk.ZeroInt() vaultBalances := k.VaultBalances(ctx, vault) + denoms := vault.StrategyDenoms() + denomsMap := make(map[string]bool) + for _, denom := range denoms { + denomsMap[denom] = true + } for _, balance := range vaultBalances { denomInfo := k.GetDenomInfo(ctx, balance.Denom) - if denomInfo.Symbol == vault.Symbol { + if denomInfo.Symbol == vault.Symbol || denomsMap[balance.Denom] { amount = amount.Add(balance.Amount) } } diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index ea802cad1..544e5774e 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -533,7 +533,7 @@ func (suite *KeeperTestSuite) TestComposePacketForwardMetadata() { suite.Require().Equal(receiver, "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") metadataJson, err = json.Marshal(metadata) suite.Require().NoError(err) - suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","retries":2,"next":null}}`) + suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","timeout":1800000000000,"retries":2,"next":null}}`) receiver, metadata = suite.app.YieldaggregatorKeeper.ComposePacketForwardMetadata(suite.ctx, []types.TransferChannel{ { @@ -555,7 +555,7 @@ func (suite *KeeperTestSuite) TestComposePacketForwardMetadata() { suite.Require().Equal(receiver, "neutron1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t") metadataJson, err = json.Marshal(metadata) suite.Require().NoError(err) - suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t","port":"transfer","channel":"channel-3","retries":2,"next":{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","retries":2,"next":null}}}}`) + suite.Require().Equal(string(metadataJson), `{"forward":{"receiver":"cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t","port":"transfer","channel":"channel-3","timeout":1800000000000,"retries":2,"next":{"forward":{"receiver":"osmo1aqvlxpk8dc4m2nkmxkf63a5zez9jkzgm6amkgddhfk0qj9j4rw3q662wuk","port":"transfer","channel":"channel-1","timeout":1800000000000,"retries":2,"next":null}}}}`) } func (suite *KeeperTestSuite) TestExecuteVaultTransfer() { @@ -647,5 +647,5 @@ func (suite *KeeperTestSuite) TestExecuteVaultTransfer() { msgBz, err := suite.app.AppCodec().MarshalJSON(msg) suite.Require().NoError(err) - suite.Require().Equal(string(msgBz), `{"source_port":"transfer","source_channel":"channel-2","token":{"denom":"ibc/01AAFF","amount":"1000"},"sender":"cosmos1rrxq3fae4jksmnmtd0k5z744am9hp307m8t429","receiver":"","timeout_height":{"revision_number":"0","revision_height":"0"},"timeout_timestamp":"11651379494838206464","memo":"{\"forward\":{\"port\":\"transfer\",\"channel\":\"channel-1\",\"retries\":2,\"next\":null}}"}`) + suite.Require().Equal(string(msgBz), `{"source_port":"transfer","source_channel":"channel-2","token":{"denom":"ibc/01AAFF","amount":"1000"},"sender":"cosmos1rrxq3fae4jksmnmtd0k5z744am9hp307m8t429","receiver":"","timeout_height":{"revision_number":"0","revision_height":"0"},"timeout_timestamp":"11651381294838206464","memo":"{\"forward\":{\"port\":\"transfer\",\"channel\":\"channel-1\",\"timeout\":1800000000000,\"retries\":2,\"next\":null}}"}`) } From 2238b89d79f6d37e6f2420e2e50fa9bea6f47dd3 Mon Sep 17 00:00:00 2001 From: jununifi Date: Mon, 30 Oct 2023 21:36:13 +0800 Subject: [PATCH 48/59] Handle edge case on transfer channel calculation & error acknowledgement on vault transfer callback --- x/yieldaggregator/keeper/strategy.go | 31 +++--- x/yieldaggregator/keeper/strategy_test.go | 104 ++++++++++++++++++ .../records/keeper/callback_transfer.go | 20 ++-- 3 files changed, 128 insertions(+), 27 deletions(-) diff --git a/x/yieldaggregator/keeper/strategy.go b/x/yieldaggregator/keeper/strategy.go index ae4029b6b..ced682cf9 100644 --- a/x/yieldaggregator/keeper/strategy.go +++ b/x/yieldaggregator/keeper/strategy.go @@ -284,7 +284,6 @@ func (k Keeper) StakeToStrategy(ctx sdk.Context, vault types.Vault, strategy typ if err != nil { return err } - k.recordsKeeper.IncreaseVaultPendingDeposit(ctx, vault.Id, stakeAmount) remaining = remaining.Sub(stakeAmount) } } @@ -306,13 +305,18 @@ func (k Keeper) ExecuteVaultTransfer(ctx sdk.Context, vault types.Vault, strateg timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos denomInfo := k.GetDenomInfo(ctx, stakeCoin.Denom) symbolInfo := k.GetSymbolInfo(ctx, vault.Symbol) - tarChannel := types.TransferChannel{} + tarChannels := []types.TransferChannel{} for _, channel := range symbolInfo.Channels { if channel.RecvChainId == info.TargetChainId { - tarChannel = channel + tarChannels = []types.TransferChannel{channel} + break } } - transferRoute := CalculateTransferRoute(denomInfo.Channels, []types.TransferChannel{tarChannel}) + // increase vault pending deposit + k.recordsKeeper.IncreaseVaultPendingDeposit(ctx, vault.Id, stakeCoin.Amount) + + // calculate transfer route and execute the transfer + transferRoute := CalculateTransferRoute(denomInfo.Channels, tarChannels) initialReceiver, metadata := k.ComposePacketForwardMetadata(ctx, transferRoute, info.TargetChainAddr) memo, err := json.Marshal(metadata) if err != nil { @@ -344,19 +348,12 @@ func (k Keeper) UnstakeFromStrategy(ctx sdk.Context, vault types.Vault, strategy } switch strategy.ContractAddress { case "x/ibc-staking": - { - err := k.stakeibcKeeper.RedeemStake( - ctx, - vaultModAddr, - sdk.NewCoin(strategy.Denom, amount), - recipient, - ) - if err != nil { - return err - } - - return nil - } + return k.stakeibcKeeper.RedeemStake( + ctx, + vaultModAddr, + sdk.NewCoin(strategy.Denom, amount), + recipient, + ) default: version := k.GetStrategyVersion(ctx, strategy) wasmMsg := "" diff --git a/x/yieldaggregator/keeper/strategy_test.go b/x/yieldaggregator/keeper/strategy_test.go index 544e5774e..0fac317e9 100644 --- a/x/yieldaggregator/keeper/strategy_test.go +++ b/x/yieldaggregator/keeper/strategy_test.go @@ -488,6 +488,24 @@ func (suite *KeeperTestSuite) TestCalculateTransferRoute() { ChannelId: "channel-3", // back channel }, }) + + // ATOM.atom + currChannels = []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-2", // back channel + }, + } + tarChannels = []types.TransferChannel{} + route = keeper.CalculateTransferRoute(currChannels, tarChannels) + suite.Require().Equal(route, []types.TransferChannel{ + { + SendChainId: "ununifi-1", + RecvChainId: "cosmoshub-1", + ChannelId: "channel-2", // back channel + }, + }) } func (suite *KeeperTestSuite) TestComposePacketForwardMetadata() { @@ -649,3 +667,89 @@ func (suite *KeeperTestSuite) TestExecuteVaultTransfer() { suite.Require().NoError(err) suite.Require().Equal(string(msgBz), `{"source_port":"transfer","source_channel":"channel-2","token":{"denom":"ibc/01AAFF","amount":"1000"},"sender":"cosmos1rrxq3fae4jksmnmtd0k5z744am9hp307m8t429","receiver":"","timeout_height":{"revision_number":"0","revision_height":"0"},"timeout_timestamp":"11651381294838206464","memo":"{\"forward\":{\"port\":\"transfer\",\"channel\":\"channel-1\",\"timeout\":1800000000000,\"retries\":2,\"next\":null}}"}`) } + +func (suite *KeeperTestSuite) TestExecuteVaultTransferDepositToHubVault() { + suite.app.YieldaggregatorKeeper.SetIntermediaryAccountInfo(suite.ctx, []types.ChainAddress{ + { + ChainId: "cosmoshub-1", + Address: "cosmos1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "osmosis-1", + Address: "osmo1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + { + ChainId: "neutron-1", + Address: "neutron1yq8lgssgxlx9smjhes6ryjasmqmd3ts2559g0t", + }, + }) + + denomInfos := []types.DenomInfo{ + { + Denom: "ibc/01AAFF", + Symbol: "ATOM", + Channels: []types.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "ununifi-1", + ChannelId: "channel-2", + }, + }, + }, + } + + symbolInfos := []types.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []types.TransferChannel{}, + }, + } + + for _, denomInfo := range denomInfos { + suite.app.YieldaggregatorKeeper.SetDenomInfo(suite.ctx, denomInfo) + } + + for _, symbolInfo := range symbolInfos { + suite.app.YieldaggregatorKeeper.SetSymbolInfo(suite.ctx, symbolInfo) + } + + addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + vault := types.Vault{ + Id: 1, + Symbol: "ATOM", + Owner: addr1.String(), + OwnerDeposit: sdk.NewInt64Coin("uguu", 100), + WithdrawCommissionRate: sdk.ZeroDec(), + WithdrawReserveRate: sdk.ZeroDec(), + StrategyWeights: []types.StrategyWeight{ + {Denom: denomInfos[0].Denom, StrategyId: 1, Weight: sdk.OneDec()}, + }, + } + + contractAddr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + strategy := types.Strategy{ + Id: 1, + Name: "AtomStaking", + ContractAddress: contractAddr.String(), + Denom: denomInfos[0].Denom, + } + + coin := sdk.NewInt64Coin(denomInfos[0].Denom, 1000) + + vaultModName := types.GetVaultModuleAccountName(vault.Id) + vaultModAddr := authtypes.NewModuleAddress(vaultModName) + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, sdk.Coins{coin}) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, vaultModAddr, sdk.Coins{coin}) + suite.Require().NoError(err) + + suite.app.IBCKeeper.ChannelKeeper.SetNextSequenceSend(suite.ctx, transfertypes.ModuleName, denomInfos[0].Channels[0].ChannelId, 1) + msg, err := suite.app.YieldaggregatorKeeper.ExecuteVaultTransfer(suite.ctx, vault, strategy, coin) + suite.Require().Error(err) + suite.Require().Contains(err.Error(), "channel not found") + + msgBz, err := suite.app.AppCodec().MarshalJSON(msg) + suite.Require().NoError(err) + suite.Require().Equal(string(msgBz), `{"source_port":"transfer","source_channel":"channel-2","token":{"denom":"ibc/01AAFF","amount":"1000"},"sender":"cosmos1rrxq3fae4jksmnmtd0k5z744am9hp307m8t429","receiver":"","timeout_height":{"revision_number":"0","revision_height":"0"},"timeout_timestamp":"11651381294838206464","memo":""}`) +} diff --git a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go index ba5960c25..7fa00e1b3 100644 --- a/x/yieldaggregator/submodules/records/keeper/callback_transfer.go +++ b/x/yieldaggregator/submodules/records/keeper/callback_transfer.go @@ -134,16 +134,6 @@ func ContractTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Pac func VaultTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error { k.Logger(ctx).Info("VaultTransferCallback executing", "packet", packet) - if ack.GetError() != "" { - k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback does not handle errors %s", ack.GetError())) - return sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "VaultTransferCallback does not handle errors: %s", ack.GetError()) - } - if ack == nil { - // timeout - k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback timeout, ack is nil, packet %v", packet)) - return nil - } - var data ibctransfertypes.FungibleTokenPacketData if err := ibctransfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { k.Logger(ctx).Error(fmt.Sprintf("Error unmarshalling packet %v", err.Error())) @@ -184,6 +174,16 @@ func VaultTransferCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet } k.DecreaseVaultPendingDeposit(ctx, unmarshalledTransferCallback.VaultId, amount) + if ack.GetError() != "" { + k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback does not handle errors %s", ack.GetError())) + return nil + } + if ack == nil { + // timeout + k.Logger(ctx).Error(fmt.Sprintf("VaultTransferCallback timeout, ack is nil, packet %v", packet)) + return nil + } + _, err = k.wasmKeeper.Sudo(ctx, contractAddress, callbackBytes) if err != nil { k.Logger(ctx).Info("SudoTxQueryResult: failed to Sudo", string(callbackBytes), "error", err, "contract_address", contractAddress) From e573ab6c5a0af2541f1d3f98c00338f2394fed81 Mon Sep 17 00:00:00 2001 From: jununifi Date: Wed, 1 Nov 2023 20:36:16 +0800 Subject: [PATCH 49/59] resolve records module unit test --- x/yieldaggregator/submodules/records/keeper/keeper_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/yieldaggregator/submodules/records/keeper/keeper_test.go b/x/yieldaggregator/submodules/records/keeper/keeper_test.go index 0f48ff70c..e0b1015b4 100644 --- a/x/yieldaggregator/submodules/records/keeper/keeper_test.go +++ b/x/yieldaggregator/submodules/records/keeper/keeper_test.go @@ -79,7 +79,7 @@ func (suite *KeeperTestSuite) TestVaultTransfer() { PortId: transfertypes.ModuleName, ChannelId: "channel-0", Sequence: 1, - CallbackId: keeper.CONTRACT_TRANSFER, + CallbackId: keeper.VAULT_TRANSFER, CallbackArgs: marshalledCallbackArgs, }) } From 2a820cf070ecbc8ce55f4f68da05ca9900e56222 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 3 Nov 2023 00:56:55 +0800 Subject: [PATCH 50/59] Remove not required fields on records module --- proto/ununifi/records/genesis.proto | 3 +- proto/ununifi/records/records.proto | 22 - .../submodules/records/types/genesis.pb.go | 123 +-- .../submodules/records/types/records.pb.go | 728 ++---------------- 4 files changed, 87 insertions(+), 789 deletions(-) diff --git a/proto/ununifi/records/genesis.proto b/proto/ununifi/records/genesis.proto index fa06b88c8..b0fbbf69f 100644 --- a/proto/ununifi/records/genesis.proto +++ b/proto/ununifi/records/genesis.proto @@ -16,6 +16,5 @@ message GenesisState { repeated EpochUnbondingRecord epoch_unbonding_record_list = 5 [(gogoproto.nullable) = false]; repeated DepositRecord deposit_record_list = 7 [(gogoproto.nullable) = false]; uint64 deposit_record_count = 8; - repeated LSMTokenDeposit lsm_token_deposit_list = 9 [(gogoproto.nullable) = false]; - repeated PendingDeposit pending_deposits = 10 [(gogoproto.nullable) = false]; + repeated PendingDeposit pending_deposits = 9 [(gogoproto.nullable) = false]; } diff --git a/proto/ununifi/records/records.proto b/proto/ununifi/records/records.proto index 0139c8545..3108bd5a5 100644 --- a/proto/ununifi/records/records.proto +++ b/proto/ununifi/records/records.proto @@ -71,28 +71,6 @@ message EpochUnbondingRecord { reserved 2; } -message LSMTokenDeposit { - enum Status { - DEPOSIT_PENDING = 0; - TRANSFER_QUEUE = 1; - TRANSFER_IN_PROGRESS = 2; - TRANSFER_FAILED = 3; - DETOKENIZATION_QUEUE = 4; - DETOKENIZATION_IN_PROGRESS = 5; - DETOKENIZATION_FAILED = 6; - } - - string deposit_id = 1; - string chain_id = 2; - string denom = 3; - string ibc_denom = 4; - string staker_address = 5; - string validator_address = 6; - string amount = 7 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - cosmos.base.v1beta1.Coin st_token = 8 [(gogoproto.nullable) = false]; - Status status = 9; -} - message PendingDeposit { uint64 vault_id = 1; string amount = 2 [ diff --git a/x/yieldaggregator/submodules/records/types/genesis.pb.go b/x/yieldaggregator/submodules/records/types/genesis.pb.go index 1c4aca5d3..0b0572883 100644 --- a/x/yieldaggregator/submodules/records/types/genesis.pb.go +++ b/x/yieldaggregator/submodules/records/types/genesis.pb.go @@ -32,8 +32,7 @@ type GenesisState struct { EpochUnbondingRecordList []EpochUnbondingRecord `protobuf:"bytes,5,rep,name=epoch_unbonding_record_list,json=epochUnbondingRecordList,proto3" json:"epoch_unbonding_record_list"` DepositRecordList []DepositRecord `protobuf:"bytes,7,rep,name=deposit_record_list,json=depositRecordList,proto3" json:"deposit_record_list"` DepositRecordCount uint64 `protobuf:"varint,8,opt,name=deposit_record_count,json=depositRecordCount,proto3" json:"deposit_record_count,omitempty"` - LsmTokenDepositList []LSMTokenDeposit `protobuf:"bytes,9,rep,name=lsm_token_deposit_list,json=lsmTokenDepositList,proto3" json:"lsm_token_deposit_list"` - PendingDeposits []PendingDeposit `protobuf:"bytes,10,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` + PendingDeposits []PendingDeposit `protobuf:"bytes,9,rep,name=pending_deposits,json=pendingDeposits,proto3" json:"pending_deposits"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -118,13 +117,6 @@ func (m *GenesisState) GetDepositRecordCount() uint64 { return 0 } -func (m *GenesisState) GetLsmTokenDepositList() []LSMTokenDeposit { - if m != nil { - return m.LsmTokenDepositList - } - return nil -} - func (m *GenesisState) GetPendingDeposits() []PendingDeposit { if m != nil { return m.PendingDeposits @@ -139,37 +131,34 @@ func init() { func init() { proto.RegisterFile("ununifi/records/genesis.proto", fileDescriptor_fd3c6e654df38706) } var fileDescriptor_fd3c6e654df38706 = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x6a, 0xd4, 0x40, - 0x14, 0xc6, 0x37, 0xb6, 0xdd, 0xda, 0xa9, 0x50, 0x4d, 0x8b, 0x8d, 0xb5, 0xa6, 0x41, 0x10, 0xf6, - 0x2a, 0x23, 0x15, 0xaf, 0x85, 0xd6, 0x3f, 0x08, 0x15, 0x4a, 0xda, 0xbd, 0x51, 0x24, 0x64, 0x33, - 0xc7, 0xec, 0x68, 0x32, 0x33, 0xcc, 0x1f, 0xb0, 0x6f, 0xe1, 0x93, 0xf8, 0x1c, 0xbd, 0xec, 0xa5, - 0x57, 0x22, 0xbb, 0x2f, 0x22, 0x99, 0x99, 0x96, 0x66, 0xb3, 0xbd, 0xca, 0xe4, 0x9c, 0xef, 0x7c, - 0xdf, 0xef, 0x84, 0x0c, 0x7a, 0x66, 0x98, 0x61, 0xf4, 0x1b, 0xc5, 0x12, 0x4a, 0x2e, 0x89, 0xc2, - 0x15, 0x30, 0x50, 0x54, 0xa5, 0x42, 0x72, 0xcd, 0xc3, 0x2d, 0xdf, 0x4e, 0x7d, 0x7b, 0x6f, 0x7f, - 0x51, 0x2f, 0x0a, 0x59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0xb6, 0x63, 0xfe, 0x88, 0xdc, 0x2e, - 0x5a, 0xd7, 0x97, 0x68, 0x67, 0xc1, 0xd5, 0xad, 0x7e, 0xdf, 0xae, 0x1e, 0x76, 0x06, 0xdc, 0xce, - 0x5f, 0xd0, 0xe3, 0x5a, 0x35, 0xb9, 0xe6, 0x3f, 0x80, 0xe5, 0xd7, 0xb3, 0x16, 0x65, 0xc3, 0xa2, - 0x24, 0x3d, 0x94, 0x93, 0xb3, 0x4f, 0xe7, 0xad, 0xda, 0x23, 0x79, 0x98, 0xed, 0x5a, 0x35, 0xb7, - 0xcb, 0x16, 0xe7, 0x14, 0x3d, 0x14, 0xe0, 0x3e, 0xa4, 0xb7, 0x56, 0x11, 0xb2, 0xb6, 0x07, 0xfd, - 0xff, 0xca, 0x09, 0xbb, 0xae, 0x5b, 0xa2, 0x53, 0x55, 0x47, 0x5f, 0x2f, 0x67, 0x71, 0x70, 0x35, - 0x8b, 0x83, 0x7f, 0xb3, 0x38, 0xf8, 0x35, 0x8f, 0x07, 0x57, 0xf3, 0x78, 0xf0, 0x67, 0x1e, 0x0f, - 0x3e, 0x1f, 0x57, 0x54, 0x4f, 0xcd, 0x24, 0x2d, 0x79, 0x83, 0xc7, 0x6c, 0xcc, 0xe8, 0x7b, 0x8a, - 0xcb, 0x69, 0x41, 0x19, 0xfe, 0x89, 0x2f, 0x28, 0xd4, 0xa4, 0xa8, 0x2a, 0x09, 0x55, 0xa1, 0xb9, - 0xc4, 0xca, 0x4c, 0x1a, 0x4e, 0x4c, 0x0d, 0x37, 0xb7, 0x04, 0xeb, 0x0b, 0x01, 0x6a, 0x32, 0xb4, - 0xd7, 0xe2, 0xd5, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x1b, 0x84, 0xde, 0x9b, 0x03, 0x00, - 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0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70, 0x33, 0xaf, 0x18, 0xc7, 0x3f, 0xf0, 0x05, 0x83, + 0x05, 0xa9, 0x28, 0x55, 0x40, 0x2b, 0x23, 0x14, 0xd6, 0xb6, 0x6e, 0x05, 0xb1, 0x0b, 0xb8, 0x7e, + 0xc8, 0xd8, 0x5c, 0x48, 0xd0, 0xf5, 0xc4, 0xbd, 0xdc, 0x97, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x42, 0x53, 0x26, 0x90, 0x3e, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -203,20 +192,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 - } - } - if len(m.LsmTokenDepositList) > 0 { - for iNdEx := len(m.LsmTokenDepositList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LsmTokenDepositList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x4a } } @@ -339,12 +314,6 @@ func (m *GenesisState) Size() (n int) { if m.DepositRecordCount != 0 { n += 1 + sovGenesis(uint64(m.DepositRecordCount)) } - if len(m.LsmTokenDepositList) > 0 { - for _, e := range m.LsmTokenDepositList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } if len(m.PendingDeposits) > 0 { for _, e := range m.PendingDeposits { l = e.Size() @@ -595,40 +564,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } } case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmTokenDepositList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LsmTokenDepositList = append(m.LsmTokenDepositList, LSMTokenDeposit{}) - if err := m.LsmTokenDepositList[len(m.LsmTokenDepositList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PendingDeposits", wireType) } diff --git a/x/yieldaggregator/submodules/records/types/records.pb.go b/x/yieldaggregator/submodules/records/types/records.pb.go index 7a3acc187..845ea8c35 100644 --- a/x/yieldaggregator/submodules/records/types/records.pb.go +++ b/x/yieldaggregator/submodules/records/types/records.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -122,46 +122,6 @@ func (HostZoneUnbonding_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor_053f6b4b66254fb3, []int{2, 0} } -type LSMTokenDeposit_Status int32 - -const ( - LSMTokenDeposit_DEPOSIT_PENDING LSMTokenDeposit_Status = 0 - LSMTokenDeposit_TRANSFER_QUEUE LSMTokenDeposit_Status = 1 - LSMTokenDeposit_TRANSFER_IN_PROGRESS LSMTokenDeposit_Status = 2 - LSMTokenDeposit_TRANSFER_FAILED LSMTokenDeposit_Status = 3 - LSMTokenDeposit_DETOKENIZATION_QUEUE LSMTokenDeposit_Status = 4 - LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS LSMTokenDeposit_Status = 5 - LSMTokenDeposit_DETOKENIZATION_FAILED LSMTokenDeposit_Status = 6 -) - -var LSMTokenDeposit_Status_name = map[int32]string{ - 0: "DEPOSIT_PENDING", - 1: "TRANSFER_QUEUE", - 2: "TRANSFER_IN_PROGRESS", - 3: "TRANSFER_FAILED", - 4: "DETOKENIZATION_QUEUE", - 5: "DETOKENIZATION_IN_PROGRESS", - 6: "DETOKENIZATION_FAILED", -} - -var LSMTokenDeposit_Status_value = map[string]int32{ - "DEPOSIT_PENDING": 0, - "TRANSFER_QUEUE": 1, - "TRANSFER_IN_PROGRESS": 2, - "TRANSFER_FAILED": 3, - "DETOKENIZATION_QUEUE": 4, - "DETOKENIZATION_IN_PROGRESS": 5, - "DETOKENIZATION_FAILED": 6, -} - -func (x LSMTokenDeposit_Status) String() string { - return proto.EnumName(LSMTokenDeposit_Status_name, int32(x)) -} - -func (LSMTokenDeposit_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_053f6b4b66254fb3, []int{4, 0} -} - type UserRedemptionRecord struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` @@ -470,107 +430,6 @@ func (m *EpochUnbondingRecord) GetHostZoneUnbondings() []*HostZoneUnbonding { return nil } -type LSMTokenDeposit struct { - DepositId string `protobuf:"bytes,1,opt,name=deposit_id,json=depositId,proto3" json:"deposit_id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - IbcDenom string `protobuf:"bytes,4,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - StakerAddress string `protobuf:"bytes,5,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` - StToken types.Coin `protobuf:"bytes,8,opt,name=st_token,json=stToken,proto3" json:"st_token"` - Status LSMTokenDeposit_Status `protobuf:"varint,9,opt,name=status,proto3,enum=ununifi.records.LSMTokenDeposit_Status" json:"status,omitempty"` -} - -func (m *LSMTokenDeposit) Reset() { *m = LSMTokenDeposit{} } -func (m *LSMTokenDeposit) String() string { return proto.CompactTextString(m) } -func (*LSMTokenDeposit) ProtoMessage() {} -func (*LSMTokenDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_053f6b4b66254fb3, []int{4} -} -func (m *LSMTokenDeposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LSMTokenDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LSMTokenDeposit.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 *LSMTokenDeposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_LSMTokenDeposit.Merge(m, src) -} -func (m *LSMTokenDeposit) XXX_Size() int { - return m.Size() -} -func (m *LSMTokenDeposit) XXX_DiscardUnknown() { - xxx_messageInfo_LSMTokenDeposit.DiscardUnknown(m) -} - -var xxx_messageInfo_LSMTokenDeposit proto.InternalMessageInfo - -func (m *LSMTokenDeposit) GetDepositId() string { - if m != nil { - return m.DepositId - } - return "" -} - -func (m *LSMTokenDeposit) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *LSMTokenDeposit) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *LSMTokenDeposit) GetIbcDenom() string { - if m != nil { - return m.IbcDenom - } - return "" -} - -func (m *LSMTokenDeposit) GetStakerAddress() string { - if m != nil { - return m.StakerAddress - } - return "" -} - -func (m *LSMTokenDeposit) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *LSMTokenDeposit) GetStToken() types.Coin { - if m != nil { - return m.StToken - } - return types.Coin{} -} - -func (m *LSMTokenDeposit) GetStatus() LSMTokenDeposit_Status { - if m != nil { - return m.Status - } - return LSMTokenDeposit_DEPOSIT_PENDING -} - type PendingDeposit struct { VaultId uint64 `protobuf:"varint,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"` @@ -580,7 +439,7 @@ func (m *PendingDeposit) Reset() { *m = PendingDeposit{} } func (m *PendingDeposit) String() string { return proto.CompactTextString(m) } func (*PendingDeposit) ProtoMessage() {} func (*PendingDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_053f6b4b66254fb3, []int{5} + return fileDescriptor_053f6b4b66254fb3, []int{4} } func (m *PendingDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,86 +479,71 @@ func init() { proto.RegisterEnum("ununifi.records.DepositRecord_Status", DepositRecord_Status_name, DepositRecord_Status_value) proto.RegisterEnum("ununifi.records.DepositRecord_Source", DepositRecord_Source_name, DepositRecord_Source_value) proto.RegisterEnum("ununifi.records.HostZoneUnbonding_Status", HostZoneUnbonding_Status_name, HostZoneUnbonding_Status_value) - proto.RegisterEnum("ununifi.records.LSMTokenDeposit_Status", LSMTokenDeposit_Status_name, LSMTokenDeposit_Status_value) proto.RegisterType((*UserRedemptionRecord)(nil), "ununifi.records.UserRedemptionRecord") proto.RegisterType((*DepositRecord)(nil), "ununifi.records.DepositRecord") proto.RegisterType((*HostZoneUnbonding)(nil), "ununifi.records.HostZoneUnbonding") proto.RegisterType((*EpochUnbondingRecord)(nil), "ununifi.records.EpochUnbondingRecord") - proto.RegisterType((*LSMTokenDeposit)(nil), "ununifi.records.LSMTokenDeposit") proto.RegisterType((*PendingDeposit)(nil), "ununifi.records.PendingDeposit") } func init() { proto.RegisterFile("ununifi/records/records.proto", fileDescriptor_053f6b4b66254fb3) } var fileDescriptor_053f6b4b66254fb3 = []byte{ - // 1066 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x17, 0x15, 0x25, 0x5a, 0x3f, 0xd7, 0x91, 0xac, 0x8c, 0x95, 0x44, 0xf6, 0x87, 0xc8, 0xfa, 0x08, - 0xb8, 0x55, 0x50, 0x94, 0x6a, 0x5c, 0xa0, 0x8b, 0x00, 0x45, 0x40, 0x5b, 0xb4, 0xc3, 0x54, 0x91, - 0x5d, 0x4a, 0xaa, 0x0b, 0x03, 0x2d, 0x41, 0x91, 0x53, 0x69, 0x60, 0x91, 0x23, 0x70, 0x48, 0xa3, - 0xee, 0xa6, 0x9b, 0x3e, 0x40, 0x37, 0x7d, 0x85, 0xf6, 0x09, 0xfa, 0x0e, 0xd9, 0x35, 0xcb, 0xa2, - 0x0b, 0xa3, 0xb0, 0x77, 0x5d, 0xf6, 0x09, 0x0a, 0x0e, 0x29, 0x5a, 0xa6, 0x92, 0xfe, 0xb8, 0x5d, - 0x91, 0x73, 0xce, 0xdc, 0x3b, 0x9c, 0x3b, 0xe7, 0x9e, 0x21, 0x3c, 0x0c, 0xdc, 0xc0, 0x25, 0x5f, - 0x90, 0xb6, 0x87, 0x2d, 0xea, 0xd9, 0x6c, 0xfe, 0x94, 0x67, 0x1e, 0xf5, 0x29, 0x5a, 0x8b, 0x69, - 0x39, 0x86, 0x37, 0x1b, 0x16, 0x65, 0x0e, 0x65, 0xed, 0x91, 0xc9, 0x70, 0xfb, 0xec, 0xf1, 0x08, - 0xfb, 0xe6, 0xe3, 0xb6, 0x45, 0x89, 0x1b, 0x05, 0x6c, 0xd6, 0xc6, 0x74, 0x4c, 0xf9, 0x6b, 0x3b, - 0x7c, 0x8b, 0x50, 0xe9, 0x87, 0x2c, 0xd4, 0x86, 0x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, - 0xf9, 0x66, 0x2f, 0x5c, 0x87, 0xb5, 0x84, 0xd9, 0x57, 0xb4, 0xae, 0xda, 0xa9, 0xe6, 0xc2, 0xe9, - 0x1d, 0x75, 0x70, 0xf8, 0x91, 0xda, 0xd3, 0x4e, 0x16, 0x4d, 0x52, 0x44, 0x0d, 0xd8, 0x4c, 0x31, - 0x8b, 0xe9, 0x56, 0xc2, 0x86, 0x49, 0xf1, 0x71, 0xd2, 0xbc, 0xf4, 0x8d, 0x00, 0x95, 0xf8, 0x2e, - 0x9c, 0x0b, 0x6a, 0x03, 0x8a, 0x67, 0x66, 0x30, 0x4d, 0xe4, 0x24, 0xea, 0x05, 0x3e, 0xd6, 0x6c, - 0x74, 0x9c, 0xba, 0x0b, 0x9f, 0xfe, 0xb3, 0xa3, 0xfa, 0xfd, 0x62, 0xab, 0x7c, 0x6e, 0x3a, 0xd3, - 0x27, 0x52, 0x94, 0x45, 0x9a, 0x9f, 0xdd, 0xee, 0x67, 0x2f, 0x2f, 0x1b, 0xc2, 0xab, 0xcb, 0x86, - 0xf0, 0xeb, 0x65, 0x43, 0xf8, 0xf6, 0xaa, 0x91, 0x79, 0x75, 0xd5, 0xc8, 0xfc, 0x7c, 0xd5, 0xc8, - 0x9c, 0xec, 0x2d, 0xa4, 0x1e, 0xba, 0x43, 0x97, 0xec, 0x93, 0x36, 0x17, 0x70, 0xfb, 0xcb, 0xf6, - 0x39, 0xc1, 0x53, 0xdb, 0x1c, 0x8f, 0x3d, 0x3c, 0x0e, 0x05, 0xd5, 0x66, 0xc1, 0xc8, 0xa1, 0x76, - 0x30, 0xc5, 0xc9, 0x6f, 0x55, 0xb4, 0xf6, 0x28, 0xcf, 0x7f, 0x8b, 0xde, 0xff, 0x23, 0x00, 0x00, - 0xff, 0xff, 0x4f, 0xfb, 0x39, 0xf8, 0x7e, 0x09, 0x00, 0x00, + // 855 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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30, 0x1b, 0x8b, 0xa0, 0x34, 0xad, 0x65, 0xb9, 0x76, 0x62, 0x74, 0x32, 0xe7, 0x5c, 0x9f, + 0xfd, 0x3f, 0xcd, 0xfd, 0x75, 0xbe, 0xbd, 0x76, 0x16, 0x26, 0xe3, 0x4f, 0x8c, 0xbc, 0x8a, 0x71, + 0x65, 0x65, 0x3b, 0x5f, 0xbf, 0xbe, 0x68, 0x2b, 0x6f, 0x2e, 0xda, 0xca, 0x1f, 0x17, 0x6d, 0xe5, + 0xa7, 0xcb, 0x76, 0xe5, 0xcd, 0x65, 0xbb, 0xf2, 0xdb, 0x65, 0xbb, 0xf2, 0x72, 0x77, 0xa6, 0xb4, + 0x4f, 0x7d, 0x4a, 0xf6, 0x89, 0x19, 0x8d, 0x42, 0x42, 0xcd, 0xef, 0xcc, 0x33, 0x82, 0xc7, 0x71, + 0x38, 0x1c, 0xa6, 0x78, 0x18, 0x0a, 0x96, 0x9a, 0x3c, 0x1b, 0x24, 0x2c, 0xce, 0xc6, 0xb8, 0xfc, + 0x09, 0xe6, 0xbd, 0x07, 0x75, 0xf9, 0x13, 0xfb, 0xe8, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4a, + 0x3c, 0xd9, 0xa2, 0x2c, 0x07, 0x00, 0x00, } func (m *UserRedemptionRecord) Marshal() (dAtA []byte, err error) { @@ -970,96 +814,6 @@ func (m *EpochUnbondingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *LSMTokenDeposit) 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 *LSMTokenDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LSMTokenDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x48 - } - { - size, err := m.StToken.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintRecords(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - if len(m.StakerAddress) > 0 { - i -= len(m.StakerAddress) - copy(dAtA[i:], m.StakerAddress) - i = encodeVarintRecords(dAtA, i, uint64(len(m.StakerAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.IbcDenom) > 0 { - i -= len(m.IbcDenom) - copy(dAtA[i:], m.IbcDenom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.IbcDenom))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.DepositId) > 0 { - i -= len(m.DepositId) - copy(dAtA[i:], m.DepositId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.DepositId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *PendingDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1228,46 +982,6 @@ func (m *EpochUnbondingRecord) Size() (n int) { return n } -func (m *LSMTokenDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DepositId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.IbcDenom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.StakerAddress) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = m.StToken.Size() - n += 1 + l + sovRecords(uint64(l)) - if m.Status != 0 { - n += 1 + sovRecords(uint64(m.Status)) - } - return n -} - func (m *PendingDeposit) Size() (n int) { if m == nil { return 0 @@ -2150,334 +1864,6 @@ func (m *EpochUnbondingRecord) Unmarshal(dAtA []byte) error { } return nil } -func (m *LSMTokenDeposit) 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 ErrIntOverflowRecords - } - 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: LSMTokenDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LSMTokenDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - 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 ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= LSMTokenDeposit_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *PendingDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From fa6d6394a24087f84c4c3e782761844418ba17af Mon Sep 17 00:00:00 2001 From: jununifi Date: Tue, 7 Nov 2023 21:43:47 +0800 Subject: [PATCH 51/59] upgrade handler for yieldaggregator --- app/app.go | 3 +- app/upgrades/v4/constants.go | 18 + app/upgrades/v4/upgrades.go | 108 ++++ .../yieldaggregator/yieldaggregator.proto | 25 +- x/yieldaggregator/keeper/vault.go | 18 +- x/yieldaggregator/types/yieldaggregator.pb.go | 510 +++++++++++++++--- 6 files changed, 594 insertions(+), 88 deletions(-) create mode 100644 app/upgrades/v4/constants.go create mode 100644 app/upgrades/v4/upgrades.go diff --git a/app/app.go b/app/app.go index 7fcc301f0..be13f3de9 100644 --- a/app/app.go +++ b/app/app.go @@ -64,6 +64,7 @@ import ( v3_2 "github.com/UnUniFi/chain/app/upgrades/v3.2" v3_2_1 "github.com/UnUniFi/chain/app/upgrades/v3.2.1" v3_2_2 "github.com/UnUniFi/chain/app/upgrades/v3.2.2" + v4 "github.com/UnUniFi/chain/app/upgrades/v4" ) const Name = "ununifi" @@ -106,7 +107,7 @@ var ( stakeibctypes.ModuleName: true, } - Upgrades = []upgrades.Upgrade{v3.Upgrade, v3_1.Upgrade, v3_2.Upgrade, v3_2_1.Upgrade, v3_2_2.Upgrade} + Upgrades = []upgrades.Upgrade{v3.Upgrade, v3_1.Upgrade, v3_2.Upgrade, v3_2_1.Upgrade, v3_2_2.Upgrade, v4.Upgrade} ) var ( diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go new file mode 100644 index 000000000..6099db3c2 --- /dev/null +++ b/app/upgrades/v4/constants.go @@ -0,0 +1,18 @@ +package v4 + +import ( + store "github.com/cosmos/cosmos-sdk/store/types" + + "github.com/UnUniFi/chain/app/upgrades" +) + +const UpgradeName string = "v4" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + }, +} diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go new file mode 100644 index 000000000..36e6b1504 --- /dev/null +++ b/app/upgrades/v4/upgrades.go @@ -0,0 +1,108 @@ +package v4 + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/UnUniFi/chain/app/keepers" + "github.com/UnUniFi/chain/app/upgrades" + yieldaggregatortypes "github.com/UnUniFi/chain/x/yieldaggregator/types" +) + +func CreateUpgradeHandler(mm *module.Manager, + configurator module.Configurator, + _ upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info(fmt.Sprintf("update start:%s", UpgradeName)) + + // yieldaggregator params upgrade + iyaParam, err := keepers.YieldaggregatorKeeper.GetParams(ctx) + if err != nil { + return vm, err + } + iyaParam.IbcTransferTimeoutNanos = 1800000000000 // 3min + _ = keepers.YieldaggregatorKeeper.SetParams(ctx, iyaParam) + + // initialize DenomInfos, SymbolInfos, IntermediaryAccountInfo + denomInfos := []yieldaggregatortypes.DenomInfo{ + { // ATOM.osmosis.ununifi + Denom: "ibc/20D06D04E1BC1FAC482FECC06C2E2879A596904D64D8BA3285B4A3789DEAF910", + Symbol: "ATOM", + Channels: []yieldaggregatortypes.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "osmosis-1", + ChannelId: "channel-0", + }, + { + RecvChainId: "osmosis-1", + SendChainId: "ununifi-beta-v1", + ChannelId: "channel-4", + }, + }, + }, + { // ATOM.ununifi + Denom: "ibc/25418646C017D377ADF3202FF1E43590D0DAE3346E594E8D78176A139A928F88", + Symbol: "ATOM", + Channels: []yieldaggregatortypes.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "ununifi-beta-v1", + ChannelId: "channel-7", + }, + }, + }, + } + + symbolInfos := []yieldaggregatortypes.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []yieldaggregatortypes.TransferChannel{ + { + SendChainId: "cosmoshub-4", + RecvChainId: "osmosis-1", + ChannelId: "channel-141", + }, + { + SendChainId: "cosmoshub-4", + RecvChainId: "ununifi-beta-v1", + ChannelId: "channel-683", + }, + }, + }, + } + + interAcc := yieldaggregatortypes.IntermediaryAccountInfo{ + Addrs: []yieldaggregatortypes.ChainAddress{ + { + ChainId: "cosmoshub-4", + Address: "cosmos1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs60ggw8", + }, + { + ChainId: "osmosis-1", + Address: "osmo1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs0jssep", + }, + }, + } + + for _, denomInfo := range denomInfos { + keepers.YieldaggregatorKeeper.SetDenomInfo(ctx, denomInfo) + } + + for _, symbolInfo := range symbolInfos { + keepers.YieldaggregatorKeeper.SetSymbolInfo(ctx, symbolInfo) + } + + keepers.YieldaggregatorKeeper.SetIntermediaryAccountInfo(ctx, interAcc.Addrs) + + // migrate vaults + keepers.YieldaggregatorKeeper.MigrateAllLegacyVaults(ctx) + + return mm.RunMigrations(ctx, configurator, vm) + } +} diff --git a/proto/ununifi/yieldaggregator/yieldaggregator.proto b/proto/ununifi/yieldaggregator/yieldaggregator.proto index 1e3454a4a..3760a3faf 100644 --- a/proto/ununifi/yieldaggregator/yieldaggregator.proto +++ b/proto/ununifi/yieldaggregator/yieldaggregator.proto @@ -74,23 +74,36 @@ message IntermediaryAccountInfo { repeated ChainAddress addrs = 1 [(gogoproto.nullable) = false]; } -// Deprecated: Just for v3.2.2 upgrade handler +// Deprecated: Just for v4 upgrade handler +message LegacyStrategyWeight { + uint64 strategy_id = 1; + string weight = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + +// Deprecated: Just for v4 upgrade handler message LegacyVault { uint64 id = 1; string denom = 2; - string owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - cosmos.base.v1beta1.Coin owner_deposit = 4 [(gogoproto.nullable) = false]; - string withdraw_commission_rate = 5 [ + string name = 3; + string description = 4; + string owner = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.v1beta1.Coin owner_deposit = 6 [(gogoproto.nullable) = false]; + string withdraw_commission_rate = 7 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - string withdraw_reserve_rate = 6 [ + string withdraw_reserve_rate = 8 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; - repeated StrategyWeight strategy_weights = 7 [(gogoproto.nullable) = false]; + repeated LegacyStrategyWeight strategy_weights = 9 [(gogoproto.nullable) = false]; + string fee_collector_address = 10; } // Deprecated: Just for v3.2.2 upgrade handler diff --git a/x/yieldaggregator/keeper/vault.go b/x/yieldaggregator/keeper/vault.go index 9c115725c..320a0e1e0 100644 --- a/x/yieldaggregator/keeper/vault.go +++ b/x/yieldaggregator/keeper/vault.go @@ -97,17 +97,27 @@ func (k Keeper) MigrateAllLegacyVaults(ctx sdk.Context) { for _, di := range denomInfo { denomSymbolMap[di.Denom] = di.Symbol } + for _, legacyVault := range legacyVaults { + strategyWeights := []types.StrategyWeight{} + + for _, weight := range legacyVault.StrategyWeights { + strategyWeights = append(strategyWeights, types.StrategyWeight{ + Denom: legacyVault.Denom, + StrategyId: weight.StrategyId, + Weight: weight.Weight, + }) + } vault := types.Vault{ Id: legacyVault.Id, - Symbol: denomSymbolMap[legacyVault.Denom], - Name: "", - Description: "", + Symbol: denomSymbolMap[legacyVault.Denom], // modification of vault.Denom to vault.Symbol + Name: legacyVault.Name, + Description: legacyVault.Description, Owner: legacyVault.Owner, OwnerDeposit: legacyVault.OwnerDeposit, WithdrawCommissionRate: legacyVault.WithdrawCommissionRate, WithdrawReserveRate: legacyVault.WithdrawReserveRate, - StrategyWeights: legacyVault.StrategyWeights, + StrategyWeights: strategyWeights, // addition of denom on Vault.StrategyWeight FeeCollectorAddress: legacyVault.Owner, } k.SetVault(ctx, vault) diff --git a/x/yieldaggregator/types/yieldaggregator.pb.go b/x/yieldaggregator/types/yieldaggregator.pb.go index b61df245f..4e9f95f50 100644 --- a/x/yieldaggregator/types/yieldaggregator.pb.go +++ b/x/yieldaggregator/types/yieldaggregator.pb.go @@ -541,22 +541,71 @@ func (m *IntermediaryAccountInfo) GetAddrs() []ChainAddress { return nil } -// Deprecated: Just for v3.2.2 upgrade handler +// Deprecated: Just for v4 upgrade handler +type LegacyStrategyWeight struct { + StrategyId uint64 `protobuf:"varint,1,opt,name=strategy_id,json=strategyId,proto3" json:"strategy_id,omitempty"` + Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"` +} + +func (m *LegacyStrategyWeight) Reset() { *m = LegacyStrategyWeight{} } +func (m *LegacyStrategyWeight) String() string { return proto.CompactTextString(m) } +func (*LegacyStrategyWeight) ProtoMessage() {} +func (*LegacyStrategyWeight) Descriptor() ([]byte, []int) { + return fileDescriptor_7877bd9c4573997d, []int{8} +} +func (m *LegacyStrategyWeight) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LegacyStrategyWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LegacyStrategyWeight.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 *LegacyStrategyWeight) XXX_Merge(src proto.Message) { + xxx_messageInfo_LegacyStrategyWeight.Merge(m, src) +} +func (m *LegacyStrategyWeight) XXX_Size() int { + return m.Size() +} +func (m *LegacyStrategyWeight) XXX_DiscardUnknown() { + xxx_messageInfo_LegacyStrategyWeight.DiscardUnknown(m) +} + +var xxx_messageInfo_LegacyStrategyWeight proto.InternalMessageInfo + +func (m *LegacyStrategyWeight) GetStrategyId() uint64 { + if m != nil { + return m.StrategyId + } + return 0 +} + +// Deprecated: Just for v4 upgrade handler type LegacyVault struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - OwnerDeposit types.Coin `protobuf:"bytes,4,opt,name=owner_deposit,json=ownerDeposit,proto3" json:"owner_deposit"` - WithdrawCommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=withdraw_commission_rate,json=withdrawCommissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_commission_rate"` - WithdrawReserveRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=withdraw_reserve_rate,json=withdrawReserveRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_reserve_rate"` - StrategyWeights []StrategyWeight `protobuf:"bytes,7,rep,name=strategy_weights,json=strategyWeights,proto3" json:"strategy_weights"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` + OwnerDeposit types.Coin `protobuf:"bytes,6,opt,name=owner_deposit,json=ownerDeposit,proto3" json:"owner_deposit"` + WithdrawCommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=withdraw_commission_rate,json=withdrawCommissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_commission_rate"` + WithdrawReserveRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=withdraw_reserve_rate,json=withdrawReserveRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_reserve_rate"` + StrategyWeights []LegacyStrategyWeight `protobuf:"bytes,9,rep,name=strategy_weights,json=strategyWeights,proto3" json:"strategy_weights"` + FeeCollectorAddress string `protobuf:"bytes,10,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` } func (m *LegacyVault) Reset() { *m = LegacyVault{} } func (m *LegacyVault) String() string { return proto.CompactTextString(m) } func (*LegacyVault) ProtoMessage() {} func (*LegacyVault) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{8} + return fileDescriptor_7877bd9c4573997d, []int{9} } func (m *LegacyVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -599,6 +648,20 @@ func (m *LegacyVault) GetDenom() string { return "" } +func (m *LegacyVault) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *LegacyVault) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + func (m *LegacyVault) GetOwner() string { if m != nil { return m.Owner @@ -613,13 +676,20 @@ func (m *LegacyVault) GetOwnerDeposit() types.Coin { return types.Coin{} } -func (m *LegacyVault) GetStrategyWeights() []StrategyWeight { +func (m *LegacyVault) GetStrategyWeights() []LegacyStrategyWeight { if m != nil { return m.StrategyWeights } return nil } +func (m *LegacyVault) GetFeeCollectorAddress() string { + if m != nil { + return m.FeeCollectorAddress + } + return "" +} + // Deprecated: Just for v3.2.2 upgrade handler type LegacyStrategy struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` @@ -633,7 +703,7 @@ func (m *LegacyStrategy) Reset() { *m = LegacyStrategy{} } func (m *LegacyStrategy) String() string { return proto.CompactTextString(m) } func (*LegacyStrategy) ProtoMessage() {} func (*LegacyStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{9} + return fileDescriptor_7877bd9c4573997d, []int{10} } func (m *LegacyStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -711,7 +781,7 @@ func (m *ProposalAddStrategy) Reset() { *m = ProposalAddStrategy{} } func (m *ProposalAddStrategy) String() string { return proto.CompactTextString(m) } func (*ProposalAddStrategy) ProtoMessage() {} func (*ProposalAddStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_7877bd9c4573997d, []int{10} + return fileDescriptor_7877bd9c4573997d, []int{11} } func (m *ProposalAddStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -791,6 +861,7 @@ func init() { proto.RegisterType((*DenomInfo)(nil), "ununifi.yieldaggregator.DenomInfo") proto.RegisterType((*ChainAddress)(nil), "ununifi.yieldaggregator.ChainAddress") proto.RegisterType((*IntermediaryAccountInfo)(nil), "ununifi.yieldaggregator.IntermediaryAccountInfo") + proto.RegisterType((*LegacyStrategyWeight)(nil), "ununifi.yieldaggregator.LegacyStrategyWeight") proto.RegisterType((*LegacyVault)(nil), "ununifi.yieldaggregator.LegacyVault") proto.RegisterType((*LegacyStrategy)(nil), "ununifi.yieldaggregator.LegacyStrategy") proto.RegisterType((*ProposalAddStrategy)(nil), "ununifi.yieldaggregator.ProposalAddStrategy") @@ -801,64 +872,65 @@ func init() { } var fileDescriptor_7877bd9c4573997d = []byte{ - // 900 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x6e, 0x23, 0x45, - 0x17, 0x4e, 0xfb, 0x1a, 0x1f, 0x4f, 0x92, 0x51, 0x27, 0x33, 0xe9, 0xcc, 0xaf, 0xdf, 0xb1, 0x5a, - 0x02, 0xcc, 0x22, 0x6d, 0x12, 0x9e, 0x20, 0xb1, 0x85, 0xe4, 0x11, 0x0b, 0xd4, 0x21, 0x80, 0x10, - 0x52, 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 0xff, 0x67, 0x10, 0x48, 0xfc, 0x22, 0xa0, 0xbc, - 0x3b, 0x41, 0x6a, 0x1c, 0x7c, 0x4e, 0x12, 0x14, 0xcf, 0xfb, 0x24, 0x7e, 0xfb, 0xea, 0x08, 0x2c, - 0xdc, 0x3e, 0x89, 0x43, 0x1b, 0xc0, 0xff, 0xad, 0x02, 0xd5, 0xaf, 0xd0, 0x2c, 0x55, 0xee, 0x36, - 0x94, 0x28, 0xd6, 0x40, 0x2a, 0x61, 0x89, 0x62, 0xf7, 0x29, 0xd4, 0xe4, 0x7c, 0x32, 0xe4, 0xa9, - 0x06, 0xd0, 0x08, 0xad, 0xe4, 0xba, 0x50, 0x61, 0x68, 0x42, 0x4c, 0xea, 0x50, 0x7f, 0xbb, 0x6d, - 0x68, 0x62, 0x22, 0x63, 0x41, 0xa7, 0x8a, 0x72, 0xe6, 0x55, 0xf4, 0xd3, 0xa2, 0xca, 0x0d, 0xa0, - 0xca, 0xaf, 0x18, 0x11, 0x5e, 0x55, 0x23, 0xf6, 0xde, 0xbe, 0x3a, 0xda, 0xb3, 0x70, 0x4e, 0x31, - 0x16, 0x44, 0xca, 0x73, 0x25, 0x28, 0x4b, 0x42, 0x63, 0xe6, 0xf6, 0x61, 0x4b, 0x7f, 0x44, 0x98, - 0x4c, 0xb9, 0xa4, 0xca, 0xab, 0xb5, 0x9d, 0x4e, 0xf3, 0xe4, 0x20, 0xb0, 0x4e, 0x59, 0x93, 0x03, - 0xdb, 0xe4, 0xa0, 0xc7, 0x29, 0x3b, 0xab, 0x64, 0x4d, 0x08, 0x1f, 0x69, 0xaf, 0xbe, 0x71, 0x72, - 0x5f, 0x80, 0x77, 0x45, 0xd5, 0x18, 0x0b, 0x74, 0x15, 0xc5, 0x7c, 0x32, 0xa1, 0x52, 0x52, 0xce, - 0xa2, 0xac, 0x91, 0x5e, 0xfd, 0xbe, 0xad, 0x7b, 0x9a, 0x87, 0xec, 0x15, 0x11, 0x43, 0xa4, 0x88, - 0x4b, 0xe0, 0x49, 0x91, 0x4c, 0x10, 0x49, 0xc4, 0x25, 0x31, 0x99, 0x36, 0xef, 0x9b, 0x69, 0x37, - 0x8f, 0x17, 0x9a, 0x70, 0x3a, 0xcd, 0x37, 0xf0, 0xb8, 0xd8, 0x0e, 0x33, 0x44, 0xe9, 0x35, 0xda, - 0xe5, 0x4e, 0xf3, 0xe4, 0xa3, 0x60, 0xcd, 0x2e, 0x07, 0xcb, 0x6b, 0x67, 0x5b, 0xb5, 0x23, 0x97, - 0xb4, 0xd2, 0x3d, 0x81, 0x27, 0x23, 0x42, 0xa2, 0x98, 0xa7, 0x29, 0x89, 0x15, 0x17, 0x11, 0x32, - 0x93, 0xf1, 0x40, 0xcf, 0x73, 0x77, 0x44, 0x48, 0x2f, 0x7f, 0xb3, 0x43, 0xf3, 0x7f, 0x71, 0x60, - 0x33, 0x8f, 0xbe, 0x66, 0x9d, 0xcd, 0x62, 0x95, 0x8a, 0xc5, 0xfa, 0x18, 0x1e, 0xc7, 0x9c, 0x29, - 0x81, 0x62, 0x55, 0x64, 0x30, 0xcb, 0xb4, 0x93, 0xeb, 0x6d, 0xf4, 0x62, 0xd7, 0x2a, 0xeb, 0x77, - 0xad, 0x7a, 0x7b, 0xd7, 0xf6, 0xa1, 0x9e, 0x50, 0x15, 0xcd, 0x44, 0xaa, 0xb7, 0xa6, 0x11, 0xd6, - 0x12, 0xaa, 0x2e, 0x44, 0xea, 0xbf, 0x84, 0x9d, 0x2f, 0x05, 0x62, 0x72, 0x44, 0x44, 0x6f, 0x8c, - 0x18, 0x23, 0xa9, 0xeb, 0xc3, 0x96, 0x24, 0x0c, 0x47, 0xf1, 0x18, 0x51, 0x16, 0xd9, 0x03, 0x68, - 0x84, 0xcd, 0x4c, 0xd9, 0xcb, 0x74, 0x03, 0x9c, 0xd9, 0x08, 0x12, 0x5f, 0xfe, 0x63, 0x63, 0x0e, - 0xa2, 0x99, 0x29, 0x73, 0x9b, 0xff, 0x03, 0xc4, 0x26, 0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55, 0xbf, - 0x3a, 0xb0, 0xfb, 0x85, 0xe0, 0x53, 0x2e, 0x51, 0x7a, 0x8a, 0xf1, 0x22, 0x2a, 0x45, 0x55, 0x4a, - 0x72, 0x54, 0x5a, 0x58, 0xe5, 0xc4, 0xd2, 0x6d, 0x4e, 0x2c, 0xaa, 0x29, 0x2f, 0x56, 0x73, 0x17, - 0xfa, 0xca, 0xbf, 0xa3, 0xaf, 0xde, 0x8d, 0x7e, 0x89, 0x68, 0xcf, 0x9e, 0xbf, 0xbe, 0x6e, 0x39, - 0x6f, 0xae, 0x5b, 0xce, 0x5f, 0xd7, 0x2d, 0xe7, 0xc7, 0x9b, 0xd6, 0xc6, 0x9b, 0x9b, 0xd6, 0xc6, - 0x1f, 0x37, 0xad, 0x8d, 0x6f, 0x3f, 0x49, 0xa8, 0x1a, 0xcf, 0x86, 0x41, 0xcc, 0x27, 0xdd, 0x0b, - 0x76, 0xc1, 0xe8, 0x67, 0xb4, 0xab, 0xcf, 0xba, 0xfb, 0xf2, 0xd6, 0x0f, 0x9b, 0x9a, 0x4f, 0x89, - 0x1c, 0xd6, 0xf4, 0xdf, 0xd3, 0xa7, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x82, 0x45, 0xc0, - 0xd8, 0x09, 0x00, 0x00, + // 918 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x3a, 0xb6, 0x13, 0x3f, 0x37, 0x49, 0xb5, 0x49, 0x9b, 0x4d, 0x11, 0x8e, 0x65, 0x09, + 0x30, 0x87, 0xac, 0x49, 0xf8, 0x05, 0x89, 0x2d, 0x24, 0x57, 0x1c, 0xd0, 0x86, 0x00, 0x42, 0x88, + 0xd5, 0x78, 0x66, 0xbc, 0x1e, 0x75, 0x3d, 0x63, 0xcd, 0x8c, 0x93, 0xfa, 0x8a, 0xc4, 0x15, 0x21, + 0x4e, 0xfc, 0x06, 0xce, 0xbd, 0x21, 0xce, 0xf4, 0x58, 0xf5, 0x84, 0x38, 0x54, 0x28, 0xf9, 0x23, + 0x68, 0x67, 0x66, 0x8d, 0xed, 0xd8, 0x3d, 0x94, 0x08, 0x2e, 0xbd, 0xed, 0x7b, 0xf3, 0xe6, 0xbd, + 0xef, 0xbd, 0xf7, 0xcd, 0x67, 0xc3, 0xd1, 0x98, 0x8f, 0x39, 0xeb, 0xb3, 0xd6, 0x84, 0xd1, 0x94, + 0xa0, 0x24, 0x91, 0x34, 0x41, 0x5a, 0xc8, 0x45, 0x3b, 0x1c, 0x49, 0xa1, 0x85, 0xbf, 0xef, 0xc2, + 0xc3, 0x85, 0xe3, 0x47, 0x7b, 0x89, 0x48, 0x84, 0x89, 0x69, 0x65, 0x5f, 0x36, 0xfc, 0xd1, 0x01, + 0x16, 0x6a, 0x28, 0x54, 0x6c, 0x0f, 0xac, 0xe1, 0x8e, 0x6a, 0xd6, 0x6a, 0xf5, 0x90, 0xa2, 0xad, + 0xcb, 0xe3, 0x1e, 0xd5, 0xe8, 0xb8, 0x85, 0x05, 0xe3, 0xf6, 0xbc, 0xf1, 0x93, 0x07, 0xdb, 0xe7, + 0x5a, 0x22, 0x4d, 0x93, 0xc9, 0x97, 0x94, 0x25, 0x03, 0xed, 0xef, 0x41, 0x89, 0x50, 0x2e, 0x86, + 0x81, 0x57, 0xf7, 0x9a, 0x95, 0xc8, 0x1a, 0xfe, 0x21, 0x54, 0x95, 0x8b, 0x8b, 0x19, 0x09, 0x0a, + 0x75, 0xaf, 0x59, 0x8c, 0x20, 0x77, 0x75, 0x89, 0xdf, 0x85, 0xf2, 0x95, 0x49, 0x10, 0xac, 0x67, + 0xf7, 0xce, 0x8e, 0x9f, 0xbf, 0x3a, 0x5c, 0xfb, 0xf3, 0xd5, 0xe1, 0x3b, 0x16, 0x81, 0x22, 0x4f, + 0x42, 0x26, 0x5a, 0x43, 0xa4, 0x07, 0xe1, 0xa7, 0x34, 0x41, 0x78, 0xd2, 0xa1, 0xf8, 0xe5, 0xb3, + 0x23, 0x70, 0x70, 0x3b, 0x14, 0x47, 0x2e, 0x41, 0xe3, 0xb7, 0x22, 0x94, 0xbe, 0x40, 0xe3, 0x54, + 0xfb, 0xdb, 0x50, 0x60, 0xc4, 0x00, 0x29, 0x46, 0x05, 0x46, 0xfc, 0x87, 0x50, 0x56, 0x93, 0x61, + 0x4f, 0xa4, 0x06, 0x40, 0x25, 0x72, 0x96, 0xef, 0x43, 0x91, 0xa3, 0x21, 0xb5, 0xa5, 0x23, 0xf3, + 0xed, 0xd7, 0xa1, 0x4a, 0xa8, 0xc2, 0x92, 0x8d, 0x34, 0x13, 0x3c, 0x28, 0x9a, 0xa3, 0x59, 0x97, + 0x1f, 0x42, 0x49, 0x5c, 0x71, 0x2a, 0x83, 0x92, 0x41, 0x1c, 0xbc, 0x7c, 0x76, 0xb4, 0xe7, 0xe0, + 0x9c, 0x12, 0x22, 0xa9, 0x52, 0xe7, 0x5a, 0x32, 0x9e, 0x44, 0x36, 0xcc, 0xef, 0xc0, 0x96, 0xf9, + 0x88, 0x09, 0x1d, 0x09, 0xc5, 0x74, 0x50, 0xae, 0x7b, 0xcd, 0xea, 0xc9, 0x41, 0xe8, 0x2e, 0x65, + 0x43, 0x0e, 0xdd, 0x90, 0xc3, 0xb6, 0x60, 0xfc, 0xac, 0x98, 0x0d, 0x21, 0xba, 0x67, 0x6e, 0x75, + 0xec, 0x25, 0xff, 0x09, 0x04, 0x57, 0x4c, 0x0f, 0x88, 0x44, 0x57, 0x31, 0x16, 0xc3, 0x21, 0x53, + 0x8a, 0x09, 0x1e, 0x67, 0x83, 0x0c, 0x36, 0xde, 0x74, 0x74, 0x0f, 0xf3, 0x94, 0xed, 0x69, 0xc6, + 0x08, 0x69, 0xea, 0x53, 0x78, 0x30, 0x2d, 0x26, 0xa9, 0xa2, 0xf2, 0x92, 0xda, 0x4a, 0x9b, 0x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 0xa3, 0xcf, 0xa5, 0x39, 0x7d, + 0xfe, 0xd5, 0x83, 0xdd, 0xcf, 0xa4, 0x18, 0x09, 0x85, 0xd2, 0x53, 0x42, 0x66, 0x51, 0x69, 0xa6, + 0x53, 0x9a, 0xa3, 0x32, 0xc6, 0x22, 0x7d, 0x0b, 0xb7, 0xe9, 0x3b, 0xed, 0x66, 0x7d, 0xb6, 0x9b, + 0x65, 0xe8, 0x8b, 0xaf, 0x47, 0x5f, 0x5a, 0x8e, 0x7e, 0xee, 0xd7, 0xe5, 0xec, 0xf1, 0xf3, 0xeb, + 0x9a, 0xf7, 0xe2, 0xba, 0xe6, 0xfd, 0x75, 0x5d, 0xf3, 0x7e, 0xbc, 0xa9, 0xad, 0xbd, 0xb8, 0xa9, + 0xad, 0xfd, 0x71, 0x53, 0x5b, 0xfb, 0xfa, 0xa3, 0x84, 0xe9, 0xc1, 0xb8, 0x17, 0x62, 0x31, 0x6c, + 0x5d, 0xf0, 0x0b, 0xce, 0x3e, 0x61, 0x2d, 0xa3, 0x65, 0xad, 0xa7, 0xb7, 0xfe, 0xa5, 0xea, 0xc9, + 0x88, 0xaa, 0x5e, 0xd9, 0xfc, 0x65, 0xfc, 0xf8, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x75, + 0xed, 0x9b, 0xcd, 0x0a, 0x00, 0x00, } func (m *StrategyWeight) Marshal() (dAtA []byte, err error) { @@ -1296,6 +1368,44 @@ func (m *IntermediaryAccountInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *LegacyStrategyWeight) 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 *LegacyStrategyWeight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LegacyStrategyWeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Weight.Size() + i -= size + if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.StrategyId != 0 { + i = encodeVarintYieldaggregator(dAtA, i, uint64(m.StrategyId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *LegacyVault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1316,6 +1426,13 @@ func (m *LegacyVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.FeeCollectorAddress) > 0 { + i -= len(m.FeeCollectorAddress) + copy(dAtA[i:], m.FeeCollectorAddress) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.FeeCollectorAddress))) + i-- + dAtA[i] = 0x52 + } if len(m.StrategyWeights) > 0 { for iNdEx := len(m.StrategyWeights) - 1; iNdEx >= 0; iNdEx-- { { @@ -1327,7 +1444,7 @@ func (m *LegacyVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x4a } } { @@ -1339,7 +1456,7 @@ func (m *LegacyVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 { size := m.WithdrawCommissionRate.Size() i -= size @@ -1349,7 +1466,7 @@ func (m *LegacyVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a { size, err := m.OwnerDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1359,12 +1476,26 @@ func (m *LegacyVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintYieldaggregator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 if len(m.Owner) > 0 { i -= len(m.Owner) copy(dAtA[i:], m.Owner) i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Owner))) i-- + dAtA[i] = 0x2a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintYieldaggregator(dAtA, i, uint64(len(m.Name))) + i-- dAtA[i] = 0x1a } if len(m.Denom) > 0 { @@ -1707,6 +1838,20 @@ func (m *IntermediaryAccountInfo) Size() (n int) { return n } +func (m *LegacyStrategyWeight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StrategyId != 0 { + n += 1 + sovYieldaggregator(uint64(m.StrategyId)) + } + l = m.Weight.Size() + n += 1 + l + sovYieldaggregator(uint64(l)) + return n +} + func (m *LegacyVault) Size() (n int) { if m == nil { return 0 @@ -1720,6 +1865,14 @@ func (m *LegacyVault) Size() (n int) { if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } l = len(m.Owner) if l > 0 { n += 1 + l + sovYieldaggregator(uint64(l)) @@ -1736,6 +1889,10 @@ func (m *LegacyVault) Size() (n int) { n += 1 + l + sovYieldaggregator(uint64(l)) } } + l = len(m.FeeCollectorAddress) + if l > 0 { + n += 1 + l + sovYieldaggregator(uint64(l)) + } return n } @@ -3174,6 +3331,109 @@ func (m *IntermediaryAccountInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *LegacyStrategyWeight) 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 ErrIntOverflowYieldaggregator + } + 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: LegacyStrategyWeight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LegacyStrategyWeight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StrategyId", wireType) + } + m.StrategyId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StrategyId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipYieldaggregator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthYieldaggregator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *LegacyVault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3255,6 +3515,70 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } @@ -3286,7 +3610,7 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { } m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerDeposit", wireType) } @@ -3319,7 +3643,7 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WithdrawCommissionRate", wireType) } @@ -3353,7 +3677,7 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WithdrawReserveRate", wireType) } @@ -3387,7 +3711,7 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StrategyWeights", wireType) } @@ -3416,11 +3740,43 @@ func (m *LegacyVault) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.StrategyWeights = append(m.StrategyWeights, StrategyWeight{}) + m.StrategyWeights = append(m.StrategyWeights, LegacyStrategyWeight{}) if err := m.StrategyWeights[len(m.StrategyWeights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeCollectorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowYieldaggregator + } + 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 ErrInvalidLengthYieldaggregator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthYieldaggregator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeCollectorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipYieldaggregator(dAtA[iNdEx:]) From 09f4a63062321d84ae42bafb5364abcb0639e8f6 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 10 Nov 2023 08:51:41 +0800 Subject: [PATCH 52/59] update MigrateAllLegacyVaults function --- x/yieldaggregator/keeper/vault.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/yieldaggregator/keeper/vault.go b/x/yieldaggregator/keeper/vault.go index 320a0e1e0..517274a57 100644 --- a/x/yieldaggregator/keeper/vault.go +++ b/x/yieldaggregator/keeper/vault.go @@ -118,7 +118,7 @@ func (k Keeper) MigrateAllLegacyVaults(ctx sdk.Context) { WithdrawCommissionRate: legacyVault.WithdrawCommissionRate, WithdrawReserveRate: legacyVault.WithdrawReserveRate, StrategyWeights: strategyWeights, // addition of denom on Vault.StrategyWeight - FeeCollectorAddress: legacyVault.Owner, + FeeCollectorAddress: legacyVault.FeeCollectorAddress, } k.SetVault(ctx, vault) } From 2e30c5cd91e50df6643b7da74a7c6b3ce75b0d52 Mon Sep 17 00:00:00 2001 From: jununifi Date: Fri, 10 Nov 2023 09:03:23 +0800 Subject: [PATCH 53/59] Add different upgrade route for mainnet and testnet --- app/upgrades/v4/upgrades.go | 103 +++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index 36e6b1504..d9d09171c 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -28,66 +28,71 @@ func CreateUpgradeHandler(mm *module.Manager, _ = keepers.YieldaggregatorKeeper.SetParams(ctx, iyaParam) // initialize DenomInfos, SymbolInfos, IntermediaryAccountInfo - denomInfos := []yieldaggregatortypes.DenomInfo{ - { // ATOM.osmosis.ununifi - Denom: "ibc/20D06D04E1BC1FAC482FECC06C2E2879A596904D64D8BA3285B4A3789DEAF910", - Symbol: "ATOM", - Channels: []yieldaggregatortypes.TransferChannel{ - { - RecvChainId: "cosmoshub-4", - SendChainId: "osmosis-1", - ChannelId: "channel-0", + denomInfos := []yieldaggregatortypes.DenomInfo{} + symbolInfos := []yieldaggregatortypes.SymbolInfo{} + interAcc := yieldaggregatortypes.IntermediaryAccountInfo{} + if ctx.ChainID() == "ununifi-beta-v1" { // mainnet + denomInfos = []yieldaggregatortypes.DenomInfo{ + { // ATOM.osmosis.ununifi + Denom: "ibc/20D06D04E1BC1FAC482FECC06C2E2879A596904D64D8BA3285B4A3789DEAF910", + Symbol: "ATOM", + Channels: []yieldaggregatortypes.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "osmosis-1", + ChannelId: "channel-0", + }, + { + RecvChainId: "osmosis-1", + SendChainId: "ununifi-beta-v1", + ChannelId: "channel-4", + }, }, - { - RecvChainId: "osmosis-1", - SendChainId: "ununifi-beta-v1", - ChannelId: "channel-4", + }, + { // ATOM.ununifi + Denom: "ibc/25418646C017D377ADF3202FF1E43590D0DAE3346E594E8D78176A139A928F88", + Symbol: "ATOM", + Channels: []yieldaggregatortypes.TransferChannel{ + { + RecvChainId: "cosmoshub-4", + SendChainId: "ununifi-beta-v1", + ChannelId: "channel-7", + }, }, }, - }, - { // ATOM.ununifi - Denom: "ibc/25418646C017D377ADF3202FF1E43590D0DAE3346E594E8D78176A139A928F88", - Symbol: "ATOM", - Channels: []yieldaggregatortypes.TransferChannel{ - { - RecvChainId: "cosmoshub-4", - SendChainId: "ununifi-beta-v1", - ChannelId: "channel-7", + } + + symbolInfos = []yieldaggregatortypes.SymbolInfo{ + { + Symbol: "ATOM", + NativeChainId: "cosmoshub-4", + Channels: []yieldaggregatortypes.TransferChannel{ + { + SendChainId: "cosmoshub-4", + RecvChainId: "osmosis-1", + ChannelId: "channel-141", + }, + { + SendChainId: "cosmoshub-4", + RecvChainId: "ununifi-beta-v1", + ChannelId: "channel-683", + }, }, }, - }, - } + } - symbolInfos := []yieldaggregatortypes.SymbolInfo{ - { - Symbol: "ATOM", - NativeChainId: "cosmoshub-4", - Channels: []yieldaggregatortypes.TransferChannel{ + interAcc = yieldaggregatortypes.IntermediaryAccountInfo{ + Addrs: []yieldaggregatortypes.ChainAddress{ { - SendChainId: "cosmoshub-4", - RecvChainId: "osmosis-1", - ChannelId: "channel-141", + ChainId: "cosmoshub-4", + Address: "cosmos1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs60ggw8", }, { - SendChainId: "cosmoshub-4", - RecvChainId: "ununifi-beta-v1", - ChannelId: "channel-683", + ChainId: "osmosis-1", + Address: "osmo1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs0jssep", }, }, - }, - } - - interAcc := yieldaggregatortypes.IntermediaryAccountInfo{ - Addrs: []yieldaggregatortypes.ChainAddress{ - { - ChainId: "cosmoshub-4", - Address: "cosmos1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs60ggw8", - }, - { - ChainId: "osmosis-1", - Address: "osmo1fvhcnyddukcqfnt7nlwv3thm5we22lyxyxylr9h77cvgkcn43xfs0jssep", - }, - }, + } } for _, denomInfo := range denomInfos { From 1b62c25a64033762067282bb889279a8740845cc Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Sat, 11 Nov 2023 01:27:48 +0900 Subject: [PATCH 54/59] fix: swagger --- docs/client/swagger.yaml | 678 +++++++++++++++++++-------------------- 1 file changed, 338 insertions(+), 340 deletions(-) diff --git a/docs/client/swagger.yaml b/docs/client/swagger.yaml index 75cc414e1..93dc7f4cb 100644 --- a/docs/client/swagger.yaml +++ b/docs/client/swagger.yaml @@ -4,7 +4,7 @@ info: description: A REST interface for state queries, legacy transactions version: 1.0.0 paths: - /ununifi/derivatives/estimate-dlp-token-amount/{mint_denom}/{amount}: + /ununifi/derivatives/estimate-dlp-token-amount: get: operationId: EstimateDLPTokenAmount responses: @@ -236,16 +236,16 @@ paths: } parameters: - name: mint_denom - in: path - required: true + in: query + required: false type: string - name: amount - in: path - required: true + in: query + required: false type: string tags: - Query - /ununifi/derivatives/estimate-redeem-amount/{redeem_denom}/{lpt_amount}: + /ununifi/derivatives/estimate-redeem-amount: get: operationId: EstimateRedeemTokenAmount responses: @@ -477,12 +477,12 @@ paths: } parameters: - name: redeem_denom - in: path - required: true + in: query + required: false type: string - name: lpt_amount - in: path - required: true + in: query + required: false type: string tags: - Query @@ -1865,7 +1865,7 @@ paths: } tags: - Query - /ununifi/derivatives/perpetual-futures/{base_denom}/{quote_denom}: + /ununifi/derivatives/perpetual-futures/market: get: operationId: PerpetualFuturesMarket responses: @@ -2075,12 +2075,12 @@ paths: } parameters: - name: base_denom - in: path - required: true + in: query + required: false type: string - name: quote_denom - in: path - required: true + in: query + required: false type: string tags: - Query @@ -2285,7 +2285,7 @@ paths: } tags: - Query - /ununifi/derivatives/perpetual-options/{base_denom}/{quote_denom}: + /ununifi/derivatives/perpetual-options/market: get: operationId: PerpetualOptionsMarket responses: @@ -2486,12 +2486,12 @@ paths: } parameters: - name: base_denom - in: path - required: true + in: query + required: false type: string - name: quote_denom - in: path - required: true + in: query + required: false type: string tags: - Query @@ -2720,228 +2720,6 @@ paths: } tags: - Query - /ununifi/derivatives/pools/available-asset/{denom}: - get: - operationId: AvailableAssetInPoolByDenom - responses: - '200': - description: A successful response. - schema: - type: object - properties: - available_asset: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - default: - description: An unexpected error response. - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: denom - in: path - required: true - type: string - tags: - - Query /ununifi/derivatives/pools/available-assets: get: operationId: AvailableAssetsInPool @@ -3159,6 +2937,11 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: denom + in: query + required: false + type: string tags: - Query /ununifi/derivatives/pools/dlp: @@ -6952,6 +6735,101 @@ paths: type: boolean tags: - Query + /ununifi/yieldaggregator/denom-infos: + get: + operationId: DenomInfos + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: array + items: + type: object + properties: + denom: + type: string + symbol: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /ununifi/yieldaggregator/intermediary-account-info: + get: + operationId: IntermediaryAccountInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + addrs: + type: array + items: + type: object + properties: + chain_id: + type: string + address: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query /ununifi/yieldaggregator/params: get: summary: Parameters queries the parameters of the module. @@ -7004,6 +6882,9 @@ paths: signatures required by gogoproto. fee_collector_address: type: string + ibc_transfer_timeout_nanos: + type: string + format: uint64 description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -7237,6 +7118,59 @@ paths: type: string tags: - Query + /ununifi/yieldaggregator/symbol-infos: + get: + operationId: SymbolInfos + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: array + items: + type: object + properties: + symbol: + type: string + native_chain_id: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query /ununifi/yieldaggregator/vaults: get: summary: 'this line is used by starport scaffolding # 2' @@ -7258,7 +7192,7 @@ paths: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -7291,6 +7225,8 @@ paths: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -7304,6 +7240,8 @@ paths: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string pagination: type: object properties: @@ -7422,7 +7360,7 @@ paths: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -7455,6 +7393,8 @@ paths: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -7468,6 +7408,8 @@ paths: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string default: description: An unexpected error response. schema: @@ -7512,7 +7454,7 @@ paths: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -7544,6 +7486,8 @@ paths: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -7557,6 +7501,8 @@ paths: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string strategies: type: array items: @@ -7688,50 +7634,11 @@ paths: signatures required by gogoproto. fee: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. + type: string redeem_amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. + type: string total_amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. + type: string default: description: An unexpected error response. schema: @@ -9434,21 +9341,6 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - ununifi.derivatives.QueryAvailableAssetInPoolByDenomResponse: - type: object - properties: - available_asset: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. ununifi.derivatives.QueryAvailableAssetsInPoolResponse: type: object properties: @@ -11417,6 +11309,31 @@ definitions: type: string active: type: boolean + ununifi.yieldaggregator.ChainAddress: + type: object + properties: + chain_id: + type: string + address: + type: string + ununifi.yieldaggregator.DenomInfo: + type: object + properties: + denom: + type: string + symbol: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string ununifi.yieldaggregator.Params: type: object properties: @@ -11452,6 +11369,9 @@ definitions: signatures required by gogoproto. fee_collector_address: type: string + ibc_transfer_timeout_nanos: + type: string + format: uint64 ununifi.yieldaggregator.QueryAllStrategyResponse: type: object properties: @@ -11521,7 +11441,7 @@ definitions: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -11553,6 +11473,8 @@ definitions: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -11566,6 +11488,8 @@ definitions: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string ununifi.yieldaggregator.QueryAllVaultResponse: type: object properties: @@ -11580,7 +11504,7 @@ definitions: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -11612,6 +11536,8 @@ definitions: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -11625,6 +11551,8 @@ definitions: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string pagination: type: object properties: @@ -11650,6 +11578,29 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } + ununifi.yieldaggregator.QueryDenomInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + denom: + type: string + symbol: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string ununifi.yieldaggregator.QueryEstimateMintAmountResponse: type: object properties: @@ -11681,41 +11632,11 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. fee: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + type: string redeem_amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + type: string total_amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + type: string ununifi.yieldaggregator.QueryGetStrategyResponse: type: object properties: @@ -11753,7 +11674,7 @@ definitions: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -11785,6 +11706,8 @@ definitions: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -11798,6 +11721,8 @@ definitions: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string strategies: type: array items: @@ -11816,6 +11741,18 @@ definitions: type: string git_url: type: string + ununifi.yieldaggregator.QueryIntermediaryAccountInfoResponse: + type: object + properties: + addrs: + type: array + items: + type: object + properties: + chain_id: + type: string + address: + type: string ununifi.yieldaggregator.QueryParamsResponse: type: object properties: @@ -11861,7 +11798,33 @@ definitions: signatures required by gogoproto. fee_collector_address: type: string + ibc_transfer_timeout_nanos: + type: string + format: uint64 description: QueryParamsResponse is response type for the Query/Params RPC method. + ununifi.yieldaggregator.QuerySymbolInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + symbol: + type: string + native_chain_id: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string ununifi.yieldaggregator.Strategy: type: object properties: @@ -11906,18 +11869,47 @@ definitions: ununifi.yieldaggregator.StrategyWeight: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 weight: type: string + ununifi.yieldaggregator.SymbolInfo: + type: object + properties: + symbol: + type: string + native_chain_id: + type: string + channels: + type: array + items: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string + ununifi.yieldaggregator.TransferChannel: + type: object + properties: + send_chain_id: + type: string + recv_chain_id: + type: string + channel_id: + type: string ununifi.yieldaggregator.Vault: type: object properties: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -11946,6 +11938,8 @@ definitions: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -11962,7 +11956,7 @@ definitions: id: type: string format: uint64 - denom: + symbol: type: string name: type: string @@ -11994,6 +11988,8 @@ definitions: items: type: object properties: + denom: + type: string strategy_id: type: string format: uint64 @@ -12007,3 +12003,5 @@ definitions: type: string withdraw_reserve: type: string + total_pending_deposit: + type: string From 8e4d6179006ce91fa5954887184077e0cd5a8884 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:19:18 +0900 Subject: [PATCH 55/59] fix: add vault creation error --- x/yieldaggregator/keeper/msg_server_create_vault.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x/yieldaggregator/keeper/msg_server_create_vault.go b/x/yieldaggregator/keeper/msg_server_create_vault.go index 2cbc4fc9e..bfc32c52c 100644 --- a/x/yieldaggregator/keeper/msg_server_create_vault.go +++ b/x/yieldaggregator/keeper/msg_server_create_vault.go @@ -52,10 +52,14 @@ func (k msgServer) CreateVault(goCtx context.Context, msg *types.MsgCreateVault) } for _, strategyWeight := range msg.StrategyWeights { - _, found := k.Keeper.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) + val, found := k.Keeper.GetStrategy(ctx, strategyWeight.Denom, strategyWeight.StrategyId) if !found { return nil, types.ErrInvalidStrategyInvolved } + denomInfo := k.GetDenomInfo(ctx, val.Denom) + if denomInfo.Symbol != msg.Symbol { + return nil, types.ErrDenomDoesNotMatchVaultSymbol + } } vault := types.Vault{ From b5929e62f4ae2bf91a66a413a94aceae960d7c9a Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:20:25 +0900 Subject: [PATCH 56/59] feat: add symbol field to some queries --- proto/ununifi/yieldaggregator/query.proto | 2 + .../grpc_query_estimate_redeem_amount.go | 1 + .../keeper/grpc_query_strategy.go | 6 + x/yieldaggregator/types/query.pb.go | 291 ++++++++++++------ 4 files changed, 206 insertions(+), 94 deletions(-) diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index 87e8ba55a..9d9d0599d 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -173,6 +173,7 @@ message StrategyContainer { (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false ]; + string symbol =5; } message QueryGetStrategyResponse { @@ -210,6 +211,7 @@ message QueryEstimateRedeemAmountResponse { (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + string symbol = 5; } message QueryDenomInfosRequest {} diff --git a/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go b/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go index 588032e92..5fa4e52b5 100644 --- a/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go +++ b/x/yieldaggregator/keeper/grpc_query_estimate_redeem_amount.go @@ -61,5 +61,6 @@ func (k Keeper) EstimateRedeemAmount(c context.Context, req *types.QueryEstimate Fee: fee, RedeemAmount: withdrawAmountWithoutCommission, TotalAmount: principal, + Symbol: vault.Symbol, }, nil } diff --git a/x/yieldaggregator/keeper/grpc_query_strategy.go b/x/yieldaggregator/keeper/grpc_query_strategy.go index 063c939e7..2d2b709fc 100644 --- a/x/yieldaggregator/keeper/grpc_query_strategy.go +++ b/x/yieldaggregator/keeper/grpc_query_strategy.go @@ -50,12 +50,14 @@ func (k Keeper) StrategyAll(c context.Context, req *types.QueryAllStrategyReques func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) (types.StrategyContainer, error) { strategyAddr, err := sdk.AccAddressFromBech32(strategy.ContractAddress) + denomInfo := k.GetDenomInfo(ctx, strategy.Denom) if err != nil { return types.StrategyContainer{ Strategy: strategy, DepositFeeRate: math.LegacyZeroDec(), WithdrawFeeRate: math.LegacyZeroDec(), PerformanceFeeRate: math.LegacyZeroDec(), + Symbol: denomInfo.Symbol, }, nil } @@ -67,6 +69,7 @@ func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) ( DepositFeeRate: math.LegacyZeroDec(), WithdrawFeeRate: math.LegacyZeroDec(), PerformanceFeeRate: math.LegacyZeroDec(), + Symbol: denomInfo.Symbol, }, nil } @@ -78,6 +81,7 @@ func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) ( DepositFeeRate: math.LegacyZeroDec(), WithdrawFeeRate: math.LegacyZeroDec(), PerformanceFeeRate: math.LegacyZeroDec(), + Symbol: denomInfo.Symbol, }, nil } @@ -102,6 +106,7 @@ func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) ( DepositFeeRate: depositFeeRate, WithdrawFeeRate: withdrawFeeRate, PerformanceFeeRate: performanceFeeRate, + Symbol: denomInfo.Symbol, }, nil default: // case 1+ depositFeeRate, err := math.LegacyNewDecFromStr(jsonMap["deposit_fee_rate"]) @@ -122,6 +127,7 @@ func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) ( DepositFeeRate: depositFeeRate, WithdrawFeeRate: withdrawFeeRate, PerformanceFeeRate: performanceFeeRate, + Symbol: denomInfo.Symbol, }, nil } } diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 6900eef09..6b148f7bb 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -609,6 +609,7 @@ type StrategyContainer struct { DepositFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=deposit_fee_rate,json=depositFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"deposit_fee_rate"` WithdrawFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=withdraw_fee_rate,json=withdrawFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_fee_rate"` PerformanceFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=performance_fee_rate,json=performanceFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"performance_fee_rate"` + Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` } func (m *StrategyContainer) Reset() { *m = StrategyContainer{} } @@ -651,6 +652,13 @@ func (m *StrategyContainer) GetStrategy() Strategy { return Strategy{} } +func (m *StrategyContainer) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + type QueryGetStrategyResponse struct { Strategy StrategyContainer `protobuf:"bytes,1,opt,name=strategy,proto3" json:"strategy"` } @@ -848,6 +856,7 @@ type QueryEstimateRedeemAmountResponse struct { Fee cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=fee,proto3,customtype=cosmossdk.io/math.Int" json:"fee"` RedeemAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=redeem_amount,json=redeemAmount,proto3,customtype=cosmossdk.io/math.Int" json:"redeem_amount"` TotalAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=total_amount,json=totalAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_amount"` + Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"` } func (m *QueryEstimateRedeemAmountResponse) Reset() { *m = QueryEstimateRedeemAmountResponse{} } @@ -890,6 +899,13 @@ func (m *QueryEstimateRedeemAmountResponse) GetShareAmount() types.Coin { return types.Coin{} } +func (m *QueryEstimateRedeemAmountResponse) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + type QueryDenomInfosRequest struct { } @@ -1162,100 +1178,101 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1479 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x3a, 0x1f, 0x6a, 0x9f, 0xfb, 0x39, 0x75, 0x5a, 0xd7, 0x20, 0xa7, 0xd9, 0x34, 0x4d, - 0xd4, 0xd6, 0xde, 0x24, 0x20, 0x41, 0xd3, 0x06, 0x70, 0x92, 0xa6, 0x04, 0x15, 0x14, 0x1c, 0xda, - 0x0a, 0x2a, 0xb0, 0xc6, 0xde, 0x89, 0x3d, 0xaa, 0x3d, 0xe3, 0xee, 0x8e, 0x5b, 0xac, 0xaa, 0x17, - 0xce, 0x1c, 0x10, 0x1f, 0x37, 0x10, 0xea, 0x89, 0x7f, 0x00, 0xfe, 0x04, 0xa4, 0x8a, 0x53, 0x55, - 0x24, 0x84, 0x38, 0x54, 0xa8, 0xe1, 0x9f, 0xe0, 0x86, 0x76, 0x66, 0x76, 0xe3, 0xb5, 0xb3, 0xfe, - 0xa2, 0x17, 0x24, 0x6e, 0xf1, 0xee, 0x7b, 0xbf, 0xf7, 0x7b, 0x6f, 0x7e, 0x6f, 0xde, 0xdb, 0xc0, - 0x4c, 0x83, 0x35, 0x18, 0xdd, 0xa1, 0x56, 0x93, 0x92, 0xaa, 0x8d, 0xcb, 0x65, 0x87, 0x94, 0xb1, - 0xe0, 0x8e, 0x75, 0xb7, 0x41, 0x9c, 0x66, 0xb6, 0xee, 0x70, 0xc1, 0xd1, 0x29, 0x6d, 0x94, 0x6d, - 0x33, 0x4a, 0x25, 0xca, 0xbc, 0xcc, 0xa5, 0x8d, 0xe5, 0xfd, 0xa5, 0xcc, 0x53, 0xa7, 0x4b, 0xdc, - 0xad, 0x71, 0xb7, 0xa0, 0x5e, 0xa8, 0x1f, 0xfa, 0xd5, 0xcb, 0x65, 0xce, 0xcb, 0x55, 0x62, 0xe1, - 0x3a, 0xb5, 0x30, 0x63, 0x5c, 0x60, 0x41, 0x39, 0xf3, 0xdf, 0x9e, 0x57, 0xb6, 0x56, 0x11, 0xbb, - 0x44, 0x11, 0xb0, 0xee, 0x2d, 0x16, 0x89, 0xc0, 0x8b, 0x56, 0x1d, 0x97, 0x29, 0x93, 0xc6, 0xda, - 0x36, 0xdd, 0x6a, 0xeb, 0x5b, 0x95, 0x38, 0xf5, 0xdf, 0x9f, 0x8d, 0x4a, 0xac, 0x8e, 0x1d, 0x5c, - 0xf3, 0x23, 0x66, 0xa2, 0xac, 0xda, 0x7e, 0x2b, 0x73, 0x33, 0x01, 0xe8, 0x7d, 0x8f, 0xd6, 0x96, - 0xc4, 0xc8, 0x93, 0xbb, 0x0d, 0xe2, 0x0a, 0xf3, 0x03, 0x38, 0x11, 0x7a, 0xea, 0xd6, 0x39, 0x73, - 0x09, 0x5a, 0x81, 0x09, 0x15, 0x2b, 0x69, 0x9c, 0x31, 0xe6, 0xe3, 0x4b, 0x53, 0xd9, 0x88, 0x32, - 0x66, 0x95, 0xe3, 0xea, 0xd8, 0xe3, 0x67, 0x53, 0x23, 0x79, 0xed, 0x64, 0x7e, 0x02, 0x09, 0x89, - 0x9a, 0xab, 0x56, 0x6f, 0xe2, 0x46, 0x55, 0xe8, 0x68, 0x68, 0x03, 0x60, 0xaf, 0x18, 0x1a, 0xfa, - 0x5c, 0x56, 0x57, 0xd9, 0xab, 0x46, 0x56, 0x1d, 0x9d, 0xae, 0x49, 0x76, 0x0b, 0x97, 0x89, 0xf6, - 0xcd, 0xb7, 0x78, 0x9a, 0x3f, 0x8f, 0xc2, 0x11, 0x09, 0xbc, 0xc6, 0x99, 0xc0, 0x94, 0x11, 0x07, - 0x2d, 0xc3, 0xf8, 0x3d, 0xef, 0x89, 0x46, 0x4d, 0x47, 0x12, 0x96, 0x7e, 0x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, 0x5e, - 0xb3, 0x6e, 0xb0, 0x1b, 0x8c, 0x6e, 0x50, 0xab, 0xe4, 0x8d, 0x79, 0xeb, 0xd3, 0x0e, 0x7c, 0xd1, - 0xac, 0x13, 0xb7, 0x38, 0x21, 0xff, 0xab, 0xfa, 0xca, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, - 0xab, 0xe3, 0x51, 0x85, 0x16, 0x00, 0x00, + // 1491 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x5d, 0x6f, 0x1b, 0x45, + 0x17, 0xce, 0x3a, 0x1f, 0x6a, 0x8f, 0xfb, 0x39, 0x75, 0x5a, 0xd7, 0xef, 0x2b, 0xa7, 0xd9, 0x34, + 0x4d, 0xd4, 0xd6, 0xde, 0x24, 0x20, 0x41, 0xd3, 0x06, 0x70, 0x92, 0xa6, 0x04, 0x15, 0x14, 0x1c, + 0xda, 0x0a, 0x2a, 0xb0, 0xc6, 0xde, 0x89, 0x3d, 0xaa, 0x3d, 0xe3, 0xee, 0x8e, 0x5b, 0xac, 0xaa, + 0x37, 0x5c, 0x73, 0xc1, 0xe7, 0x1d, 0x08, 0xf5, 0x8a, 0x3f, 0x00, 0x3f, 0x01, 0xa9, 0xe2, 0xaa, + 0x2a, 0x12, 0x42, 0x5c, 0x54, 0x55, 0xc3, 0x0f, 0x41, 0x3b, 0x33, 0xbb, 0xf1, 0xda, 0x59, 0x7f, + 0xd1, 0x1b, 0x24, 0xee, 0xe2, 0xd9, 0x73, 0x9e, 0xf3, 0x9c, 0x33, 0xcf, 0x99, 0x33, 0x13, 0x98, + 0x69, 0xb0, 0x06, 0xa3, 0x3b, 0xd4, 0x6a, 0x52, 0x52, 0xb5, 0x71, 0xb9, 0xec, 0x90, 0x32, 0x16, + 0xdc, 0xb1, 0xee, 0x36, 0x88, 0xd3, 0xcc, 0xd6, 0x1d, 0x2e, 0x38,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 0x16, 0x4f, 0xf3, 0x97, 0x51, 0x38, 0x22, 0x81, 0xd7, 0x38, 0x13, 0x98, 0x32, 0xe2, 0xa0, + 0x65, 0x18, 0xbf, 0xe7, 0xad, 0x68, 0xd4, 0x74, 0x24, 0x61, 0xe9, 0xa7, 0xf9, 0x2a, 0x17, 0x74, + 0x1b, 0x4e, 0x08, 0x2e, 0x70, 0xb5, 0x50, 0xe4, 0xcc, 0x26, 0x76, 0x01, 0xd7, 0x78, 0x83, 0x89, + 0x64, 0xec, 0x8c, 0x31, 0x7f, 0x70, 0xf5, 0x82, 0x67, 0xf9, 0xe7, 0xb3, 0xa9, 0x49, 0x45, 0xd3, + 0xb5, 0xef, 0x64, 0x29, 0xb7, 0x6a, 0x58, 0x54, 0xb2, 0x9b, 0x4c, 0x3c, 0xfd, 0x29, 0x03, 0x9a, + 0xff, 0x26, 0x13, 0xf9, 0xe3, 0x12, 0x67, 0x55, 0xc2, 0xe4, 0x24, 0x0a, 0xc2, 0x70, 0x52, 0x81, + 0x37, 0x98, 0x07, 0x4f, 0x59, 0xd9, 0xc7, 0x1f, 0x1d, 0x1c, 0x3f, 0x21, 0xa1, 0x6e, 0xf8, 0x48, + 0x3a, 0xc4, 0x4d, 0x38, 0x76, 0x9f, 0x8a, 0x8a, 0xed, 0xe0, 0xfb, 0x05, 0x87, 0xb8, 0xc4, 0xb9, + 0x47, 0x92, 0x63, 0x83, 0x83, 0x1f, 0xf5, 0x41, 0xf2, 0x0a, 0x03, 0x15, 0x60, 0x52, 0x51, 0xaf, + 0x13, 0x45, 0xdc, 0x26, 0x75, 0xee, 0x52, 0x91, 0x1c, 0x1f, 0x1c, 0x5c, 0x55, 0x78, 0x4b, 0x01, + 0xad, 0x2b, 0x1c, 0xf3, 0x47, 0x03, 0x26, 0xdb, 0x84, 0xa2, 0x05, 0x78, 0x15, 0x26, 0xe4, 0xde, + 0x78, 0x02, 0x1c, 0x9d, 0x8f, 0x2f, 0xcd, 0x75, 0xdf, 0xcf, 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15, 0x84, 0xcc, 0x6a, 0xf5, 0x9d, 0xc7, 0x2f, 0xd2, 0xc6, 0x93, + 0x17, 0x69, 0xe3, 0xf9, 0x8b, 0xb4, 0xf1, 0xc5, 0x6e, 0x7a, 0xe4, 0xc9, 0x6e, 0x7a, 0xe4, 0x8f, + 0xdd, 0xf4, 0xc8, 0x47, 0x0b, 0x65, 0x2a, 0x2a, 0x8d, 0x62, 0xb6, 0xc4, 0x6b, 0xd6, 0x0d, 0x76, + 0x83, 0xd1, 0x0d, 0x6a, 0x95, 0xbc, 0x31, 0x6f, 0x7d, 0xda, 0x81, 0x2f, 0x9a, 0x75, 0xe2, 0x16, + 0x27, 0xe4, 0x7f, 0x61, 0x5f, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x0e, 0x6f, 0xbc, 0xb5, + 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2243,6 +2260,13 @@ func (m *StrategyContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x2a + } { size := m.PerformanceFeeRate.Size() i -= size @@ -2442,6 +2466,13 @@ func (m *QueryEstimateRedeemAmountResponse) MarshalToSizedBuffer(dAtA []byte) (i _ = i var l int _ = l + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x2a + } { size := m.TotalAmount.Size() i -= size @@ -2878,6 +2909,10 @@ func (m *StrategyContainer) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) l = m.PerformanceFeeRate.Size() n += 1 + l + sovQuery(uint64(l)) + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -2949,6 +2984,10 @@ func (m *QueryEstimateRedeemAmountResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) l = m.TotalAmount.Size() n += 1 + l + sovQuery(uint64(l)) + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -4579,6 +4618,38 @@ func (m *StrategyContainer) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5132,6 +5203,38 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From e000e5bee766d87082b335c86edbc8eea38339bb Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:25:50 +0900 Subject: [PATCH 57/59] feat: new swagger --- docs/client/swagger.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/client/swagger.yaml b/docs/client/swagger.yaml index 93dc7f4cb..ef26eaac4 100644 --- a/docs/client/swagger.yaml +++ b/docs/client/swagger.yaml @@ -6948,6 +6948,8 @@ paths: type: string performance_fee_rate: type: string + symbol: + type: string pagination: type: object properties: @@ -7084,6 +7086,8 @@ paths: type: string performance_fee_rate: type: string + symbol: + type: string default: description: An unexpected error response. schema: @@ -7639,6 +7643,8 @@ paths: type: string total_amount: type: string + symbol: + type: string default: description: An unexpected error response. schema: @@ -11402,6 +11408,8 @@ definitions: type: string performance_fee_rate: type: string + symbol: + type: string pagination: type: object properties: @@ -11637,6 +11645,8 @@ definitions: type: string total_amount: type: string + symbol: + type: string ununifi.yieldaggregator.QueryGetStrategyResponse: type: object properties: @@ -11665,6 +11675,8 @@ definitions: type: string performance_fee_rate: type: string + symbol: + type: string ununifi.yieldaggregator.QueryGetVaultResponse: type: object properties: @@ -11866,6 +11878,8 @@ definitions: type: string performance_fee_rate: type: string + symbol: + type: string ununifi.yieldaggregator.StrategyWeight: type: object properties: From 950740e1c2eb945dfdb8af08861d7ba9aeebfd8c Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:51:04 +0900 Subject: [PATCH 58/59] feat: add osmo denom --- app/upgrades/v4/upgrades.go | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index d9d09171c..a6da0c869 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -33,7 +33,7 @@ func CreateUpgradeHandler(mm *module.Manager, interAcc := yieldaggregatortypes.IntermediaryAccountInfo{} if ctx.ChainID() == "ununifi-beta-v1" { // mainnet denomInfos = []yieldaggregatortypes.DenomInfo{ - { // ATOM.osmosis.ununifi + { // ATOM.osmosis Denom: "ibc/20D06D04E1BC1FAC482FECC06C2E2879A596904D64D8BA3285B4A3789DEAF910", Symbol: "ATOM", Channels: []yieldaggregatortypes.TransferChannel{ @@ -49,7 +49,7 @@ func CreateUpgradeHandler(mm *module.Manager, }, }, }, - { // ATOM.ununifi + { // ATOM.cosmoshub Denom: "ibc/25418646C017D377ADF3202FF1E43590D0DAE3346E594E8D78176A139A928F88", Symbol: "ATOM", Channels: []yieldaggregatortypes.TransferChannel{ @@ -60,6 +60,17 @@ func CreateUpgradeHandler(mm *module.Manager, }, }, }, + { // OSMO.osmosis + Denom: "ibc/05AC4BBA78C5951339A47DD1BC1E7FC922A9311DF81C85745B1C162F516FF2F1", + Symbol: "OSMO", + Channels: []yieldaggregatortypes.TransferChannel{ + { + RecvChainId: "osmosis-1", + SendChainId: "ununifi-beta-v1", + ChannelId: "channel-4", + }, + }, + }, } symbolInfos = []yieldaggregatortypes.SymbolInfo{ @@ -79,6 +90,17 @@ func CreateUpgradeHandler(mm *module.Manager, }, }, }, + { + Symbol: "OSMO", + NativeChainId: "osmosis-1", + Channels: []yieldaggregatortypes.TransferChannel{ + { + SendChainId: "cosmoshub-4", + RecvChainId: "ununifi-beta-v1", + ChannelId: "channel-683", + }, + }, + }, } interAcc = yieldaggregatortypes.IntermediaryAccountInfo{ From c45a9d95c1eb80cd5f85d708e73aa1d8ab4d2000 Mon Sep 17 00:00:00 2001 From: Senna46 <29295263+Senna46@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:12:19 +0900 Subject: [PATCH 59/59] fix: osmo info --- app/upgrades/v4/upgrades.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index a6da0c869..98b51a7df 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -95,9 +95,9 @@ func CreateUpgradeHandler(mm *module.Manager, NativeChainId: "osmosis-1", Channels: []yieldaggregatortypes.TransferChannel{ { - SendChainId: "cosmoshub-4", + SendChainId: "osmosis-1", RecvChainId: "ununifi-beta-v1", - ChannelId: "channel-683", + ChannelId: "channel-2638", }, }, },