diff --git a/modules/apps/100-atomic-swap/keeper/msg_server.go b/modules/apps/100-atomic-swap/keeper/msg_server.go index 834d85d4..920f0fe1 100644 --- a/modules/apps/100-atomic-swap/keeper/msg_server.go +++ b/modules/apps/100-atomic-swap/keeper/msg_server.go @@ -158,6 +158,8 @@ func (k Keeper) OnReceivedMake(ctx sdk.Context, packet channeltypes.Packet, orde // OnReceivedTake is step 7.1 (Transfer Make Token) of the atomic swap: https://github.com/cosmos/ibc/tree/main/spec/app/ics-100-atomic-swap // The step is executed on the Maker chain. func (k Keeper) OnReceivedTake(ctx sdk.Context, packet channeltypes.Packet, msg *types.TakeSwapMsg) (string, error) { + + escrowAddr := types.GetEscrowAddress(packet.GetDestPort(), packet.GetDestChannel()) // check order status diff --git a/modules/apps/100-atomic-swap/keeper/msg_server_take_swap.go b/modules/apps/100-atomic-swap/keeper/msg_server_take_swap.go index 83368426..054dae34 100644 --- a/modules/apps/100-atomic-swap/keeper/msg_server_take_swap.go +++ b/modules/apps/100-atomic-swap/keeper/msg_server_take_swap.go @@ -56,6 +56,11 @@ func (k Keeper) TakeSwap(goCtx context.Context, msg *types.TakeSwapMsg) (*types. return &types.MsgTakeSwapResponse{}, err } + _, err = sdk.AccAddressFromBech32(msg.TakerReceivingAddress) + if err == nil { + return &types.MsgTakeSwapResponse{}, types.ErrFailedMakeSwap + } + balance := k.bankKeeper.GetBalance(ctx, takerAddr, msg.SellToken.Denom) if balance.Amount.LT(msg.SellToken.Amount) { return &types.MsgTakeSwapResponse{}, errors.New("insufficient balance") diff --git a/modules/apps/100-atomic-swap/keeper/relay.go b/modules/apps/100-atomic-swap/keeper/relay.go index 0fcbd8c9..d5222c8c 100644 --- a/modules/apps/100-atomic-swap/keeper/relay.go +++ b/modules/apps/100-atomic-swap/keeper/relay.go @@ -160,6 +160,7 @@ func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Pac order, _ := k.GetAtomicOrder(ctx, takeMsg.OrderId) escrowAddr := types.GetEscrowAddress(types.PortID, packet.SourceChannel) + makerReceivingAddr, err := sdk.AccAddressFromBech32(order.Maker.MakerReceivingAddress) if err != nil { return err diff --git a/modules/apps/100-atomic-swap/types/errors.go b/modules/apps/100-atomic-swap/types/errors.go index 35e08121..56ca18cf 100644 --- a/modules/apps/100-atomic-swap/types/errors.go +++ b/modules/apps/100-atomic-swap/types/errors.go @@ -24,4 +24,5 @@ var ( ErrOrderPermissionIsNotAllowed = sdkerrors.Register(ModuleName, 17, "sender is not the owner of the order") ErrNotFoundChannel = sdkerrors.Register(ModuleName, 18, "did not find channel") ErrFailedMakeSwap = sdkerrors.Register(ModuleName, 19, "Failed to make swap") + ErrInvalidTakerReceiverAddress = sdkerrors.Register(ModuleName, 20, "Taker Address has counter party chain address") ) diff --git a/modules/apps/100-atomic-swap/types/msgs_test.go b/modules/apps/100-atomic-swap/types/msgs_test.go index 7bc8cfbe..0462ee17 100644 --- a/modules/apps/100-atomic-swap/types/msgs_test.go +++ b/modules/apps/100-atomic-swap/types/msgs_test.go @@ -60,7 +60,7 @@ func TestMsgSwapRoute(t *testing.T) { //}, { "new msg cancel swap route", - NewMsgCancelSwap(validPort, validChannel, addr1, "", timeoutHeight, 0).Route(), + NewMsgCancelSwap(addr1, "", timeoutHeight, 0).Route(), RouterKey, }, } @@ -105,7 +105,7 @@ func TestMsgSwapValidation(t *testing.T) { //}, { "new msg cancel swap message type", - NewMsgCancelSwap(validPort, validChannel, addr1, "", timeoutHeight, 0).Type(), + NewMsgCancelSwap(addr1, "", timeoutHeight, 0).Type(), "cancel_swap", }, } @@ -135,7 +135,7 @@ func TestMsgSwapGetSigners(t *testing.T) { //}, { "new msg cancel swap get signers", - NewMsgCancelSwap(validPort, validChannel, addr.String(), "", timeoutHeight, 0).GetSigners(), + NewMsgCancelSwap(addr.String(), "", timeoutHeight, 0).GetSigners(), []sdk.AccAddress{addr}, }, } diff --git a/modules/apps/101-interchain-swap/keeper/msg_server.go b/modules/apps/101-interchain-swap/keeper/msg_server.go index 80a61cd6..d99151e3 100644 --- a/modules/apps/101-interchain-swap/keeper/msg_server.go +++ b/modules/apps/101-interchain-swap/keeper/msg_server.go @@ -1,7 +1,6 @@ package keeper import ( - "github.com/btcsuite/btcutil/bech32" sdk "github.com/cosmos/cosmos-sdk/types" errorsmod "github.com/cosmos/cosmos-sdk/types/errors" "github.com/sideprotocol/ibcswap/v6/modules/apps/101-interchain-swap/types" @@ -95,7 +94,7 @@ func (k Keeper) OnSingleAssetDepositAcknowledged(ctx sdk.Context, req *types.Msg } // OnMultiAssetDepositAcknowledged processes a double deposit acknowledgement, mints voucher tokens, and updates the liquidity pool. -func (k Keeper) OnMakeMultiAssetDepositAcknowledged(ctx sdk.Context, req *types.MsgMakeMultiAssetDepositRequest, res *types.MsgMultiAssetDepositResponse) error { +func (k Keeper) OnMakeMultiAssetDepositAcknowledged(ctx sdk.Context, req *types.MsgMakeMultiAssetDepositRequest) error { // Retrieve the liquidity pool pool, found := k.GetInterchainLiquidityPool(ctx, req.PoolId) @@ -270,14 +269,10 @@ func (k Keeper) OnSingleAssetDepositReceived(ctx sdk.Context, msg *types.MsgSing func (k Keeper) OnMakeMultiAssetDepositReceived(ctx sdk.Context, msg *types.MsgMakeMultiAssetDepositRequest, stateChange *types.StateChange) (*types.MsgMultiAssetDepositResponse, error) { // Verify the sender's address - senderAcc := k.authKeeper.GetAccount(ctx, sdk.MustAccAddressFromBech32(msg.Deposits[1].Sender)) - senderPrefix, _, err := bech32.Decode(senderAcc.GetAddress().String()) + _, err := sdk.AccAddressFromBech32(msg.Deposits[1].Sender) if err != nil { return nil, err } - if sdk.GetConfig().GetBech32AccountAddrPrefix() != senderPrefix { - return nil, errorsmod.Wrapf(types.ErrFailedMultiAssetDeposit, "first address has to be this chain address (%s)", err) - } // Retrieve the liquidity pool pool, found := k.GetInterchainLiquidityPool(ctx, msg.PoolId) @@ -285,10 +280,6 @@ func (k Keeper) OnMakeMultiAssetDepositReceived(ctx sdk.Context, msg *types.MsgM return nil, errorsmod.Wrapf(types.ErrFailedMultiAssetDeposit, "%s", types.ErrNotFoundPool) } - if err != nil { - return nil, errorsmod.Wrapf(types.ErrFailedMultiAssetDeposit, ":%s", err) - } - // create order order := types.MultiAssetDepositOrder{ PoolId: msg.PoolId, diff --git a/modules/apps/101-interchain-swap/keeper/msg_server_make_multi_asset_deposit.go b/modules/apps/101-interchain-swap/keeper/msg_server_make_multi_asset_deposit.go index 08063772..19a4af02 100644 --- a/modules/apps/101-interchain-swap/keeper/msg_server_make_multi_asset_deposit.go +++ b/modules/apps/101-interchain-swap/keeper/msg_server_make_multi_asset_deposit.go @@ -29,21 +29,21 @@ func (k Keeper) MakeMultiAssetDeposit(ctx context.Context, msg *types.MsgMakeMul } // Check input ration of tokens - sourceAsset, err := pool.FindAssetBySide(types.PoolAssetSide_SOURCE) + sourceAsset, err := pool.FindAssetByDenom(msg.Deposits[0].Balance.Denom) if err != nil { return nil, errormod.Wrapf(types.ErrNotFoundDenomInPool, "%s", types.ErrFailedMultiAssetDeposit) } - destinationAsset, err := pool.FindAssetBySide(types.PoolAssetSide_DESTINATION) + destinationAsset, err := pool.FindAssetByDenom(msg.Deposits[1].Balance.Denom) if err != nil { return nil, errormod.Wrapf(types.ErrNotFoundDenomInPool, "%s:", types.ErrFailedMultiAssetDeposit) } - currentRatio := sourceAsset.Amount.Quo(destinationAsset.Amount) - inputRatio := msg.Deposits[0].Balance.Amount.Quo(msg.Deposits[1].Balance.Amount) + currentRatio := sdk.NewDecFromInt(sourceAsset.Balance.Amount).Quo(sdk.NewDecFromInt(destinationAsset.Balance.Amount)) + inputRatio := sdk.NewDecFromInt(msg.Deposits[0].Balance.Amount).Quo(sdk.NewDecFromInt(msg.Deposits[1].Balance.Amount)) if err := types.CheckSlippage(currentRatio, inputRatio, 10); err != nil { - return nil, errormod.Wrapf(types.ErrInvalidPairRatio, "%s", types.ErrFailedMultiAssetDeposit) + return nil, errormod.Wrapf(types.ErrInvalidPairRatio, "%d:%d:%s", currentRatio, inputRatio, types.ErrFailedMultiAssetDeposit) } // Create escrow module account here @@ -89,6 +89,9 @@ func (k Keeper) MakeMultiAssetDeposit(ctx context.Context, msg *types.MsgMakeMul packet := types.IBCSwapPacketData{ Type: types.MAKE_MULTI_DEPOSIT, Data: rawMsgData, + StateChange: &types.StateChange{ + MultiDepositOrderId: order.Id, + }, } timeoutHeight, timeoutStamp := types.GetDefaultTimeOut(&sdkCtx) diff --git a/modules/apps/101-interchain-swap/keeper/msg_server_multi_asset_withdraw.go b/modules/apps/101-interchain-swap/keeper/msg_server_multi_asset_withdraw.go index a19196b9..e156e2cf 100644 --- a/modules/apps/101-interchain-swap/keeper/msg_server_multi_asset_withdraw.go +++ b/modules/apps/101-interchain-swap/keeper/msg_server_multi_asset_withdraw.go @@ -18,12 +18,12 @@ func (k msgServer) MultiAssetWithdraw(goCtx context.Context, msg *types.MsgMulti // check out denom if !k.bankKeeper.HasSupply(ctx, msg.PoolToken.Denom) { - return nil, errorsmod.Wrapf(types.ErrFailedDeposit, "invalid denom in local withdraw message:%s", msg.PoolToken.Denom) + return nil, errorsmod.Wrapf(types.ErrFailedWithdraw, "invalid denom in local withdraw message:%s", msg.PoolToken.Denom) } - tokenBalance := k.bankKeeper.GetBalance(ctx, sdk.AccAddress(msg.Receiver), msg.PoolId) + tokenBalance := k.bankKeeper.GetBalance(ctx, sdk.MustAccAddressFromBech32(msg.Receiver), msg.PoolId) if tokenBalance.Amount.LT(msg.PoolToken.Amount) { - return nil, errorsmod.Wrapf(types.ErrFailedDeposit, "sender don't have enough pool token amount:%s", msg.PoolToken.Amount) + return nil, errorsmod.Wrapf(types.ErrFailedWithdraw, "sender don't have enough pool token amount:%s", msg.PoolToken.Amount) } // PoolCoin.Denom is just poolID. diff --git a/modules/apps/101-interchain-swap/keeper/msg_server_take_multi_asset_deposit.go b/modules/apps/101-interchain-swap/keeper/msg_server_take_multi_asset_deposit.go index a68f95dd..de5017f9 100644 --- a/modules/apps/101-interchain-swap/keeper/msg_server_take_multi_asset_deposit.go +++ b/modules/apps/101-interchain-swap/keeper/msg_server_take_multi_asset_deposit.go @@ -11,7 +11,7 @@ import ( func (k Keeper) TakeMultiAssetDeposit(ctx context.Context, msg *types.MsgTakeMultiAssetDepositRequest) (*types.MsgMultiAssetDepositResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) - + // Validate message err := msg.ValidateBasic() if err != nil { diff --git a/modules/apps/101-interchain-swap/keeper/multi_deposit_order.go b/modules/apps/101-interchain-swap/keeper/multi_deposit_order.go index 70d913b0..413d18aa 100644 --- a/modules/apps/101-interchain-swap/keeper/multi_deposit_order.go +++ b/modules/apps/101-interchain-swap/keeper/multi_deposit_order.go @@ -32,6 +32,28 @@ func (k Keeper) SetMultiDepositOrderCount(ctx sdk.Context, poolId string, count store.Set(byteKey, bz) } +// SetMultiDepositOrderCount set the total number of multiDepositOrder +func (k Keeper) SetMultiDepositOrderLatestOrderByCreators(ctx sdk.Context, poolId, sourceMaker, destinationMaker string, count uint64) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) + byteKey := types.KeyPrefix(poolId + sourceMaker + destinationMaker + types.MultiDepositOrderIDByCreatorsKeyPrefix) + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, count) + store.Set(byteKey, bz) +} + +// SetMultiDepositOrderCount set the total number of multiDepositOrder +func (k Keeper) GetMultiDepositOrderLatestOrderByCreators(ctx sdk.Context, poolId, sourceMaker, destinationMaker string) uint64 { + store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) + byteKey := types.KeyPrefix(poolId + sourceMaker + destinationMaker + types.MultiDepositOrderIDByCreatorsKeyPrefix) + bz := store.Get(byteKey) + // Count doesn't exist: no element + if bz == nil { + return 0 + } + // Parse bytes + return binary.BigEndian.Uint64(bz) +} + // AppendMultiDepositOrder appends a multiDepositOrder in the store with a new id and update the count func (k Keeper) AppendMultiDepositOrder( ctx sdk.Context, @@ -40,7 +62,6 @@ func (k Keeper) AppendMultiDepositOrder( ) uint64 { // Create the multiDepositOrder count := k.GetMultiDepositOrderCount(ctx, poolId) - // Set the ID of the appended value multiDepositOrder.Id = count @@ -50,7 +71,7 @@ func (k Keeper) AppendMultiDepositOrder( // Update multiDepositOrder count k.SetMultiDepositOrderCount(ctx, poolId, count+1) - + k.SetMultiDepositOrderLatestOrderByCreators(ctx, poolId, multiDepositOrder.SourceMaker, multiDepositOrder.DestinationTaker, count) return count } @@ -76,19 +97,24 @@ func (k Keeper) GetMultiDepositOrder(ctx sdk.Context, poolId string, id uint64) func (k Keeper) GetLatestMultiDepositOrder(ctx sdk.Context, poolId string) (val types.MultiAssetDepositOrder, found bool) { id := k.GetMultiDepositOrderCount(ctx, poolId) store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(poolId+types.MultiDepositOrderKeyPrefix)) - b := store.Get(GetMultiDepositOrderIDBytes(id-1)) + b := store.Get(GetMultiDepositOrderIDBytes(id - 1)) if b == nil { return val, false } k.cdc.MustUnmarshal(b, &val) + return val, true } // GetMultiDepositOrder returns a multiDepositOrder from its id func (k Keeper) RemoveLatestMultiDepositOrder(ctx sdk.Context, poolId string) { id := k.GetMultiDepositOrderCount(ctx, poolId) - k.RemoveMultiDepositOrder(ctx, poolId, id) - k.SetMultiDepositOrderCount(ctx, poolId, id-1) + order, found := k.GetMultiDepositOrder(ctx, poolId, id) + if found { + k.SetMultiDepositOrderLatestOrderByCreators(ctx, poolId, order.SourceMaker, order.DestinationTaker, id-1) + k.RemoveMultiDepositOrder(ctx, poolId, id) + k.SetMultiDepositOrderCount(ctx, poolId, id-1) + } } // RemoveMultiDepositOrder removes a multiDepositOrder from the store diff --git a/modules/apps/101-interchain-swap/keeper/query_interchain_multi_deposit_order.go b/modules/apps/101-interchain-swap/keeper/query_interchain_multi_deposit_order.go index f7f87a97..194118ad 100644 --- a/modules/apps/101-interchain-swap/keeper/query_interchain_multi_deposit_order.go +++ b/modules/apps/101-interchain-swap/keeper/query_interchain_multi_deposit_order.go @@ -44,3 +44,29 @@ func (k Keeper) InterchainLatestMultiDepositOrder(ctx context.Context, req *type Order: &order, }, nil } + +// You may need to adjust the function signature, return types, and parameter types based on your module's implementation +func (k Keeper) InterchainMyLatestMultiDepositOrder(ctx context.Context, req *types.QueryLatestInterchainMultiDepositOrderRequest) (*types.QueryGetInterchainMultiDepositOrderResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + order, found := k.GetLatestMultiDepositOrder(sdkCtx, req.PoolId) + if !found { + return nil, types.ErrNotFoundMultiDepositOrder + } + + return &types.QueryGetInterchainMultiDepositOrderResponse{ + Order: &order, + }, nil +} + +// You may need to adjust the function signature, return types, and parameter types based on your module's implementation +func (k Keeper) InterchainLatestMultiDepositOrderByCreators(ctx context.Context, req *types.QueryLatestInterchainMultiDepositOrderByCreatorsRequest) (*types.QueryGetInterchainMultiDepositOrderResponse, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + id := k.GetMultiDepositOrderLatestOrderByCreators(sdkCtx, req.PoolId, req.SourceMaker, req.DestinationMaker) + order, found := k.GetMultiDepositOrder(sdkCtx, req.PoolId, id) + if !found { + return nil, types.ErrNotFoundMultiDepositOrder + } + return &types.QueryGetInterchainMultiDepositOrderResponse{ + Order: &order, + }, nil +} diff --git a/modules/apps/101-interchain-swap/keeper/relay.go b/modules/apps/101-interchain-swap/keeper/relay.go index e652f453..5ce550f6 100644 --- a/modules/apps/101-interchain-swap/keeper/relay.go +++ b/modules/apps/101-interchain-swap/keeper/relay.go @@ -220,19 +220,13 @@ func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Pac return nil case types.MAKE_MULTI_DEPOSIT: - var msg types.MsgMakeMultiAssetDepositRequest - var res types.MsgMultiAssetDepositResponse if err := types.ModuleCdc.Unmarshal(data.Data, &msg); err != nil { logger.Debug("MakeMultiDeposit:packet:", err.Error()) return err } - if err := types.ModuleCdc.Unmarshal(ack.GetResult(), &res); err != nil { - logger.Debug("MakeMultiDeposit:ack:", err.Error()) - return err - } - if err := k.OnMakeMultiAssetDepositAcknowledged(ctx, &msg, &res); err != nil { + if err := k.OnMakeMultiAssetDepositAcknowledged(ctx, &msg); err != nil { logger.Debug("MakeMultiDeposit:Single", err.Error()) return err } @@ -242,10 +236,10 @@ func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Pac }, sdk.Attribute{ Key: "OrderId", - Value: data.StateChange.MutiDepositOrderId, + Value: fmt.Sprintf("%d", data.StateChange.MultiDepositOrderId), })) return nil - + case types.TAKE_MULTI_DEPOSIT: var msg types.MsgTakeMultiAssetDepositRequest var res types.MsgTakePoolResponse diff --git a/modules/apps/101-interchain-swap/types/key_multi_deposit_order.go b/modules/apps/101-interchain-swap/types/key_multi_deposit_order.go index 4fb36b53..ef90a5f1 100644 --- a/modules/apps/101-interchain-swap/types/key_multi_deposit_order.go +++ b/modules/apps/101-interchain-swap/types/key_multi_deposit_order.go @@ -6,8 +6,9 @@ var _ binary.ByteOrder const ( // MultiDepositOrderKeyPrefix is the prefix to retrieve all MultiDepositOrder - MultiDepositOrderKeyPrefix = "MultiDepositOrder/value/" - MultiDepositOrderCountKeyPrefix = "MultiDepositOrderCount/value/" + MultiDepositOrderKeyPrefix = "MultiDepositOrder/value/" + MultiDepositOrderCountKeyPrefix = "MultiDepositOrderCount/value/" + MultiDepositOrderIDByCreatorsKeyPrefix = "MultiDepositOrderIDByCreator/value/" ) // MultiDepositOrderPrefixKey returns the store key to retrieve a MultiDepositOrder from the index fields diff --git a/modules/apps/101-interchain-swap/types/market.go b/modules/apps/101-interchain-swap/types/market.go index 6cccc04a..04563ab4 100644 --- a/modules/apps/101-interchain-swap/types/market.go +++ b/modules/apps/101-interchain-swap/types/market.go @@ -23,7 +23,9 @@ func NewInterchainLiquidityPool( initialLiquidity := types.NewInt(0) liquidity := []*PoolAsset{} + for _, asset := range assets { + initialLiquidity = initialLiquidity.Add(asset.Balance.Amount) if store.HasSupply(ctx, asset.Balance.Denom) { asset.Side = PoolAssetSide_SOURCE diff --git a/modules/apps/101-interchain-swap/types/packet.pb.go b/modules/apps/101-interchain-swap/types/packet.pb.go index 1df7ccce..964e5644 100644 --- a/modules/apps/101-interchain-swap/types/packet.pb.go +++ b/modules/apps/101-interchain-swap/types/packet.pb.go @@ -74,12 +74,12 @@ func (SwapMessageType) EnumDescriptor() ([]byte, []int) { } type StateChange struct { - In []*types.Coin `protobuf:"bytes,1,rep,name=in,proto3" json:"in,omitempty"` - Out []*types.Coin `protobuf:"bytes,2,rep,name=out,proto3" json:"out,omitempty"` - PoolTokens []*types.Coin `protobuf:"bytes,3,rep,name=poolTokens,proto3" json:"poolTokens,omitempty"` - PoolId string `protobuf:"bytes,4,opt,name=poolId,proto3" json:"poolId,omitempty"` - MutiDepositOrderId string `protobuf:"bytes,5,opt,name=mutiDepositOrderId,proto3" json:"mutiDepositOrderId,omitempty"` - SourceChainId string `protobuf:"bytes,6,opt,name=sourceChainId,proto3" json:"sourceChainId,omitempty"` + In []*types.Coin `protobuf:"bytes,1,rep,name=in,proto3" json:"in,omitempty"` + Out []*types.Coin `protobuf:"bytes,2,rep,name=out,proto3" json:"out,omitempty"` + PoolTokens []*types.Coin `protobuf:"bytes,3,rep,name=poolTokens,proto3" json:"poolTokens,omitempty"` + PoolId string `protobuf:"bytes,4,opt,name=poolId,proto3" json:"poolId,omitempty"` + MultiDepositOrderId uint64 `protobuf:"varint,5,opt,name=multiDepositOrderId,proto3" json:"multiDepositOrderId,omitempty"` + SourceChainId string `protobuf:"bytes,6,opt,name=sourceChainId,proto3" json:"sourceChainId,omitempty"` } func (m *StateChange) Reset() { *m = StateChange{} } @@ -143,11 +143,11 @@ func (m *StateChange) GetPoolId() string { return "" } -func (m *StateChange) GetMutiDepositOrderId() string { +func (m *StateChange) GetMultiDepositOrderId() uint64 { if m != nil { - return m.MutiDepositOrderId + return m.MultiDepositOrderId } - return "" + return 0 } func (m *StateChange) GetSourceChainId() string { @@ -231,47 +231,47 @@ func init() { } var fileDescriptor_23c8ddc04cfb119f = []byte{ - // 635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x4f, 0xdb, 0x3c, - 0x1c, 0xc7, 0x9b, 0xb6, 0xf0, 0x3c, 0xb8, 0x0f, 0xa5, 0x8f, 0x37, 0xb1, 0x90, 0x43, 0x94, 0xc1, - 0x26, 0x75, 0x43, 0xc4, 0x14, 0xa6, 0x49, 0x3b, 0x42, 0x1b, 0x20, 0x5a, 0xa1, 0x55, 0x1a, 0x84, - 0xb6, 0x4b, 0xe5, 0x24, 0x5e, 0xb0, 0x68, 0xe3, 0xa8, 0x76, 0x41, 0xbc, 0x83, 0xa9, 0x87, 0x89, - 0x37, 0xd0, 0xd3, 0x5e, 0xcb, 0xa4, 0x1d, 0x39, 0xee, 0x38, 0xc1, 0x1b, 0x99, 0xe2, 0x54, 0x69, - 0x81, 0x49, 0x70, 0x73, 0xbe, 0xbf, 0xcf, 0xc7, 0x7f, 0xf4, 0x73, 0x0c, 0x36, 0xa9, 0xe7, 0x23, - 0x1c, 0xc7, 0x3d, 0xea, 0x63, 0x41, 0x59, 0xc4, 0x11, 0x8d, 0x04, 0x19, 0xf8, 0xa7, 0x98, 0x46, - 0x5d, 0x7e, 0x81, 0x63, 0x74, 0x5e, 0x43, 0x31, 0xf6, 0xcf, 0x88, 0x30, 0xe3, 0x01, 0x13, 0x0c, - 0xae, 0x51, 0xcf, 0x37, 0x67, 0x0d, 0xf3, 0x9e, 0x61, 0x9e, 0xd7, 0xb4, 0x95, 0x90, 0xb1, 0xb0, - 0x47, 0x90, 0x54, 0xbc, 0xe1, 0x17, 0x84, 0xa3, 0xcb, 0xd4, 0xd7, 0x9e, 0x87, 0x2c, 0x64, 0x72, - 0x88, 0x92, 0xd1, 0x24, 0xd5, 0x7d, 0xc6, 0xfb, 0x8c, 0x23, 0x0f, 0x73, 0x82, 0xce, 0x6b, 0x1e, - 0x11,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 0x89, 0x56, - 0xfc, 0xfa, 0x5d, 0xcf, 0xed, 0xfa, 0x3f, 0x6f, 0x74, 0xe5, 0xfa, 0x46, 0x57, 0x7e, 0xdf, 0xe8, - 0xca, 0xd5, 0xad, 0x9e, 0xbb, 0xbe, 0xd5, 0x73, 0xbf, 0x6e, 0xf5, 0xdc, 0x67, 0x3b, 0xa4, 0xe2, - 0x74, 0xe8, 0x99, 0x3e, 0xeb, 0x23, 0x4e, 0x03, 0x22, 0xff, 0x4d, 0x9f, 0xf5, 0x10, 0xf5, 0xfc, - 0xf4, 0xb1, 0x78, 0x8f, 0xfa, 0x2c, 0x18, 0xf6, 0x08, 0x4f, 0x1e, 0x15, 0x8e, 0x6a, 0x9b, 0xb5, - 0x8d, 0xe9, 0x6d, 0xd8, 0x90, 0x4c, 0x72, 0xbd, 0xb8, 0x37, 0x2f, 0xdd, 0xed, 0x3f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xb4, 0xf8, 0xaf, 0x3e, 0x81, 0x04, 0x00, 0x00, + // 637 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xc1, 0x4e, 0xdb, 0x40, + 0x10, 0x86, 0xe3, 0x24, 0xd0, 0xb2, 0x29, 0x21, 0x5d, 0x2a, 0x6a, 0x7c, 0xb0, 0x5c, 0x68, 0xa5, + 0xb4, 0x08, 0x6f, 0x02, 0x55, 0xa5, 0x1e, 0x21, 0x31, 0x60, 0x35, 0x90, 0xc8, 0x31, 0x42, 0xed, + 0x25, 0x5a, 0xdb, 0x5b, 0xb3, 0x22, 0xf1, 0x5a, 0xd9, 0x35, 0x88, 0x37, 0xa8, 0x72, 0xe2, 0x05, + 0x72, 0xea, 0xb3, 0x54, 0xea, 0x91, 0x63, 0x8f, 0x15, 0xbc, 0x48, 0x65, 0x3b, 0x72, 0x02, 0x54, + 0x82, 0xdb, 0xf8, 0x9f, 0xff, 0x9b, 0x9d, 0xd1, 0xac, 0x17, 0xd4, 0xa8, 0xe3, 0x22, 0x1c, 0x86, + 0x7d, 0xea, 0x62, 0x41, 0x59, 0xc0, 0x11, 0x0d, 0x04, 0x19, 0xba, 0xa7, 0x98, 0x06, 0x3d, 0x7e, + 0x81, 0x43, 0x74, 0x5e, 0x47, 0x21, 0x76, 0xcf, 0x88, 0xd0, 0xc3, 0x21, 0x13, 0x0c, 0xae, 0x53, + 0xc7, 0xd5, 0x67, 0x09, 0xfd, 0x1e, 0xa1, 0x9f, 0xd7, 0x95, 0x55, 0x9f, 0x31, 0xbf, 0x4f, 0x50, + 0x82, 0x38, 0xd1, 0x77, 0x84, 0x83, 0xcb, 0x94, 0x57, 0x5e, 0xf9, 0xcc, 0x67, 0x49, 0x88, 0xe2, + 0x68, 0xa2, 0xaa, 0x2e, 0xe3, 0x03, 0xc6, 0x91, 0x83, 0x39, 0x41, 0xe7, 0x75, 0x87, 0x08, 0x5c, + 0x47, 0x2e, 0xa3, 0x41, 0x9a, 0x5f, 0xbb, 0xca, 0x83, 0x52, 0x57, 0x60, 0x41, 0x1a, 0xa7, 0x38, + 0xf0, 0x09, 0x7c, 0x0f, 0xf2, 0x34, 0x90, 0x25, 0xad, 0x50, 0x2d, 0x6d, 0xad, 0xea, 0x29, 0xac, + 0xc7, 0xb0, 0x3e, 0x81, 0xf5, 0x06, 0xa3, 0x81, 0x95, 0xa7, 0x01, 0xdc, 0x00, 0x05, 0x16, 0x09, + 0x39, 0xff, 0x98, 0x37, 0x76, 0xc1, 0xcf, 0x00, 0x84, 0x8c, 0xf5, 0x6d, 0x76, 0x46, 0x02, 0x2e, + 0x17, 0x1e, 0x63, 0x66, 0xcc, 0x70, 0x05, 0xcc, 0xc7, 0x5f, 0xa6, 0x27, 0x17, 0x35, 0xa9, 0xba, + 0x60, 0x4d, 0xbe, 0x60, 0x0d, 0x2c, 0x0f, 0xa2, 0xbe, 0xa0, 0x4d, 0x12, 0x32, 0x4e, 0x45, 0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0x00, 0x00, } func (m *StateChange) Marshal() (dAtA []byte, err error) { @@ -301,12 +301,10 @@ func (m *StateChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if len(m.MutiDepositOrderId) > 0 { - i -= len(m.MutiDepositOrderId) - copy(dAtA[i:], m.MutiDepositOrderId) - i = encodeVarintPacket(dAtA, i, uint64(len(m.MutiDepositOrderId))) + if m.MultiDepositOrderId != 0 { + i = encodeVarintPacket(dAtA, i, uint64(m.MultiDepositOrderId)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x28 } if len(m.PoolId) > 0 { i -= len(m.PoolId) @@ -446,9 +444,8 @@ func (m *StateChange) Size() (n int) { if l > 0 { n += 1 + l + sovPacket(uint64(l)) } - l = len(m.MutiDepositOrderId) - if l > 0 { - n += 1 + l + sovPacket(uint64(l)) + if m.MultiDepositOrderId != 0 { + n += 1 + sovPacket(uint64(m.MultiDepositOrderId)) } l = len(m.SourceChainId) if l > 0 { @@ -647,10 +644,10 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { m.PoolId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MutiDepositOrderId", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MultiDepositOrderId", wireType) } - var stringLen uint64 + m.MultiDepositOrderId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPacket @@ -660,24 +657,11 @@ func (m *StateChange) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.MultiDepositOrderId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthPacket - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPacket - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MutiDepositOrderId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SourceChainId", wireType) diff --git a/modules/apps/101-interchain-swap/types/query.pb.go b/modules/apps/101-interchain-swap/types/query.pb.go index 0223c48c..6dec07fd 100644 --- a/modules/apps/101-interchain-swap/types/query.pb.go +++ b/modules/apps/101-interchain-swap/types/query.pb.go @@ -249,7 +249,7 @@ func (m *QueryAllInterchainMultiDepositOrdersResponse) GetPagination() *query.Pa // Query latest interchain multi-deposit order type QueryLatestInterchainMultiDepositOrderRequest struct { PoolId string `protobuf:"bytes,1,opt,name=poolId,proto3" json:"poolId,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryLatestInterchainMultiDepositOrderRequest) Reset() { @@ -303,6 +303,71 @@ func (m *QueryLatestInterchainMultiDepositOrderRequest) GetPagination() *query.P return nil } +// Query latest interchain multi-deposit order by creators +type QueryLatestInterchainMultiDepositOrderByCreatorsRequest struct { + PoolId string `protobuf:"bytes,1,opt,name=poolId,proto3" json:"poolId,omitempty"` + SourceMaker string `protobuf:"bytes,2,opt,name=sourceMaker,proto3" json:"sourceMaker,omitempty"` + DestinationMaker string `protobuf:"bytes,3,opt,name=destinationMaker,proto3" json:"destinationMaker,omitempty"` +} + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) Reset() { + *m = QueryLatestInterchainMultiDepositOrderByCreatorsRequest{} +} +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryLatestInterchainMultiDepositOrderByCreatorsRequest) ProtoMessage() {} +func (*QueryLatestInterchainMultiDepositOrderByCreatorsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ef062c56032354e0, []int{5} +} +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLatestInterchainMultiDepositOrderByCreatorsRequest.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 *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLatestInterchainMultiDepositOrderByCreatorsRequest.Merge(m, src) +} +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLatestInterchainMultiDepositOrderByCreatorsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLatestInterchainMultiDepositOrderByCreatorsRequest proto.InternalMessageInfo + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) GetPoolId() string { + if m != nil { + return m.PoolId + } + return "" +} + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) GetSourceMaker() string { + if m != nil { + return m.SourceMaker + } + return "" +} + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) GetDestinationMaker() string { + if m != nil { + return m.DestinationMaker + } + return "" +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -311,7 +376,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_ef062c56032354e0, []int{5} + return fileDescriptor_ef062c56032354e0, []int{6} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -350,7 +415,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_ef062c56032354e0, []int{6} + return fileDescriptor_ef062c56032354e0, []int{7} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -398,7 +463,7 @@ func (m *QueryEscrowAddressRequest) Reset() { *m = QueryEscrowAddressReq func (m *QueryEscrowAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryEscrowAddressRequest) ProtoMessage() {} func (*QueryEscrowAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{7} + return fileDescriptor_ef062c56032354e0, []int{8} } func (m *QueryEscrowAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -451,7 +516,7 @@ func (m *QueryEscrowAddressResponse) Reset() { *m = QueryEscrowAddressRe func (m *QueryEscrowAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryEscrowAddressResponse) ProtoMessage() {} func (*QueryEscrowAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{8} + return fileDescriptor_ef062c56032354e0, []int{9} } func (m *QueryEscrowAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +562,7 @@ func (m *QueryGetInterchainLiquidityPoolRequest) Reset() { func (m *QueryGetInterchainLiquidityPoolRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetInterchainLiquidityPoolRequest) ProtoMessage() {} func (*QueryGetInterchainLiquidityPoolRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{9} + return fileDescriptor_ef062c56032354e0, []int{10} } func (m *QueryGetInterchainLiquidityPoolRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -543,7 +608,7 @@ func (m *QueryGetInterchainLiquidityPoolResponse) Reset() { func (m *QueryGetInterchainLiquidityPoolResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetInterchainLiquidityPoolResponse) ProtoMessage() {} func (*QueryGetInterchainLiquidityPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{10} + return fileDescriptor_ef062c56032354e0, []int{11} } func (m *QueryGetInterchainLiquidityPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -589,7 +654,7 @@ func (m *QueryAllInterchainLiquidityPoolRequest) Reset() { func (m *QueryAllInterchainLiquidityPoolRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllInterchainLiquidityPoolRequest) ProtoMessage() {} func (*QueryAllInterchainLiquidityPoolRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{11} + return fileDescriptor_ef062c56032354e0, []int{12} } func (m *QueryAllInterchainLiquidityPoolRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -636,7 +701,7 @@ func (m *QueryAllInterchainLiquidityPoolResponse) Reset() { func (m *QueryAllInterchainLiquidityPoolResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllInterchainLiquidityPoolResponse) ProtoMessage() {} func (*QueryAllInterchainLiquidityPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{12} + return fileDescriptor_ef062c56032354e0, []int{13} } func (m *QueryAllInterchainLiquidityPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -687,7 +752,7 @@ func (m *QueryGetInterchainMarketMakerRequest) Reset() { *m = QueryGetIn func (m *QueryGetInterchainMarketMakerRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetInterchainMarketMakerRequest) ProtoMessage() {} func (*QueryGetInterchainMarketMakerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{13} + return fileDescriptor_ef062c56032354e0, []int{14} } func (m *QueryGetInterchainMarketMakerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -731,7 +796,7 @@ func (m *QueryGetInterchainMarketMakerResponse) Reset() { *m = QueryGetI func (m *QueryGetInterchainMarketMakerResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetInterchainMarketMakerResponse) ProtoMessage() {} func (*QueryGetInterchainMarketMakerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{14} + return fileDescriptor_ef062c56032354e0, []int{15} } func (m *QueryGetInterchainMarketMakerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -775,7 +840,7 @@ func (m *QueryAllInterchainMarketMakerRequest) Reset() { *m = QueryAllIn func (m *QueryAllInterchainMarketMakerRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllInterchainMarketMakerRequest) ProtoMessage() {} func (*QueryAllInterchainMarketMakerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{15} + return fileDescriptor_ef062c56032354e0, []int{16} } func (m *QueryAllInterchainMarketMakerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -820,7 +885,7 @@ func (m *QueryAllInterchainMarketMakerResponse) Reset() { *m = QueryAllI func (m *QueryAllInterchainMarketMakerResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllInterchainMarketMakerResponse) ProtoMessage() {} func (*QueryAllInterchainMarketMakerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef062c56032354e0, []int{16} + return fileDescriptor_ef062c56032354e0, []int{17} } func (m *QueryAllInterchainMarketMakerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -869,6 +934,7 @@ func init() { proto.RegisterType((*QueryAllInterchainMultiDepositOrdersRequest)(nil), "ibc.applications.interchain_swap.v1.QueryAllInterchainMultiDepositOrdersRequest") proto.RegisterType((*QueryAllInterchainMultiDepositOrdersResponse)(nil), "ibc.applications.interchain_swap.v1.QueryAllInterchainMultiDepositOrdersResponse") proto.RegisterType((*QueryLatestInterchainMultiDepositOrderRequest)(nil), "ibc.applications.interchain_swap.v1.QueryLatestInterchainMultiDepositOrderRequest") + proto.RegisterType((*QueryLatestInterchainMultiDepositOrderByCreatorsRequest)(nil), "ibc.applications.interchain_swap.v1.QueryLatestInterchainMultiDepositOrderByCreatorsRequest") proto.RegisterType((*QueryParamsRequest)(nil), "ibc.applications.interchain_swap.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ibc.applications.interchain_swap.v1.QueryParamsResponse") proto.RegisterType((*QueryEscrowAddressRequest)(nil), "ibc.applications.interchain_swap.v1.QueryEscrowAddressRequest") @@ -888,75 +954,80 @@ func init() { } var fileDescriptor_ef062c56032354e0 = []byte{ - // 1081 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0xad, 0xab, 0xbe, 0xaa, 0x48, 0x0c, 0x2d, 0x31, 0x0b, 0xb8, 0x61, 0xe9, 0x2f, - 0xa5, 0xcd, 0x6e, 0x9d, 0xaa, 0x14, 0xd1, 0x12, 0x92, 0x34, 0xa4, 0x18, 0x52, 0xea, 0xb8, 0x12, - 0x42, 0x3d, 0x60, 0x8d, 0x77, 0x47, 0xce, 0xa8, 0xeb, 0x9d, 0xcd, 0xce, 0x38, 0x25, 0x0a, 0x91, - 0x10, 0x77, 0x04, 0x52, 0x39, 0x70, 0xe3, 0xd8, 0xff, 0x04, 0xf5, 0xc0, 0x21, 0x12, 0x17, 0x4e, - 0x08, 0x25, 0x1c, 0x10, 0x07, 0xc4, 0x01, 0x71, 0xe2, 0x80, 0x76, 0x76, 0x9c, 0xd8, 0xf5, 0xda, - 0xbb, 0x71, 0x9c, 0x5b, 0xbc, 0x33, 0xef, 0x7b, 0xef, 0xfb, 0xde, 0x9b, 0xf7, 0x66, 0x02, 0x36, - 0xab, 0x3b, 0x36, 0x09, 0x02, 0x8f, 0x39, 0x44, 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1f, 0xab, 0xb6, - 0x7f, 0x9a, 0x5f, 0x22, 0xb8, 0x92, 0xc9, 0x81, 0x08, 0xb8, 0x2f, 0x28, 0x5e, 0x81, 0xe3, 0xca, - 0x54, 0x39, 0x38, 0x35, 0x73, 0xcb, 0xca, 0x90, 0x55, 0x4b, 0xc1, 0xcd, 0x0b, 0x41, 0x65, 0x17, - 0x66, 0x8c, 0x64, 0x7e, 0xdd, 0x0e, 0x61, 0xde, 0xf3, 0x06, 0x84, 0x20, 0xd2, 0x48, 0x2e, 0x01, - 0xec, 0x57, 0x83, 0xe2, 0x79, 0x6a, 0xe6, 0xa2, 0x15, 0xeb, 0x6b, 0x45, 0xfa, 0x5a, 0x71, 0x39, - 0x6a, 0x95, 0xad, 0x0a, 0x69, 0x50, 0x8d, 0x59, 0xed, 0xb0, 0x34, 0x7f, 0x42, 0x70, 0x35, 0x5b, - 0x3c, 0x5a, 0x93, 0x07, 0x90, 0x57, 0x4c, 0x44, 0x01, 0x4d, 0x8e, 0x1f, 0x56, 0x14, 0x0d, 0x85, - 0xef, 0x26, 0xb0, 0xb9, 0x94, 0xca, 0x26, 0x8e, 0xa8, 0x8b, 0xce, 0x37, 0x08, 0xa6, 0x15, 0x9d, - 0x65, 0x22, 0xa9, 0x38, 0x4c, 0x15, 0x8d, 0x4a, 0xe0, 0x33, 0x80, 0x55, 0x40, 0x95, 0xe8, 0x14, - 0xb6, 0xd3, 0x6a, 0x3e, 0x84, 0x97, 0xba, 0xbe, 0x6a, 0x71, 0xef, 0x40, 0x5e, 0x9d, 0x56, 0xa1, - 0x2b, 0xee, 0x4a, 0x26, 0x71, 0x35, 0x88, 0x36, 0x35, 0x1f, 0xc0, 0x2b, 0x0a, 0xfb, 0x7d, 0xe1, - 0x84, 0xfc, 0xf1, 0xbc, 0xeb, 0x86, 0x54, 0xec, 0xd5, 0xd3, 0x04, 0x9c, 0x08, 0x78, 0x28, 0x6b, - 0xac, 0x83, 0x6f, 0x28, 0xcb, 0x2e, 0x7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55, 0xff, 0x66, 0x71, 0xb8, 0x17, 0xb9, 0x8d, - 0xdd, 0xbc, 0x65, 0x37, 0xb9, 0xdb, 0xf2, 0xa8, 0x88, 0xa3, 0x28, 0x5d, 0x2b, 0x4d, 0xef, 0xfb, - 0x9d, 0x56, 0x7b, 0xe4, 0x46, 0x40, 0x45, 0x3d, 0xaf, 0x6c, 0xaf, 0xff, 0x1f, 0x00, 0x00, 0xff, - 0xff, 0x63, 0x17, 0x68, 0x51, 0x0b, 0x13, 0x00, 0x00, + // 1167 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0xce, 0x6c, 0xda, 0x54, 0x7d, 0x51, 0x11, 0x1a, 0x52, 0x12, 0x0c, 0x6c, 0x83, 0xe9, 0x2f, + 0x25, 0x8d, 0xdd, 0x4d, 0x55, 0x82, 0x68, 0x09, 0xf9, 0x45, 0xca, 0x42, 0x4a, 0x37, 0x5b, 0x09, + 0xa1, 0x0a, 0xb1, 0xf2, 0xda, 0xa3, 0x8d, 0xa9, 0xd7, 0xe3, 0x78, 0x66, 0x53, 0xa2, 0xb0, 0x12, + 0xe2, 0x8e, 0x40, 0x2a, 0x07, 0xc4, 0xa5, 0xc7, 0xfe, 0x2b, 0x3d, 0x70, 0x28, 0xe2, 0xc2, 0x09, + 0xa1, 0x84, 0x03, 0xe2, 0x80, 0x38, 0x20, 0x4e, 0x1c, 0x90, 0xc7, 0xb3, 0x89, 0xdd, 0xf5, 0xae, + 0x9d, 0x8d, 0x73, 0x4b, 0xec, 0xf7, 0xbe, 0xf7, 0xbe, 0xef, 0xcd, 0xbc, 0xe7, 0xb7, 0xa0, 0xdb, + 0x75, 0x53, 0x37, 0x3c, 0xcf, 0xb1, 0x4d, 0x83, 0xdb, 0xd4, 0x65, 0xba, 0xed, 0x72, 0xe2, 0x9b, + 0x1b, 0x86, 0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0xc9, 0x40, 0xd6, 0xeb, 0xad, 0x43, 0xca, 0x15, 0x41, 0x90, 0x62, 0x25, + 0xc3, 0xab, 0xae, 0x64, 0x18, 0x1f, 0x20, 0xdd, 0x0c, 0xf3, 0x3a, 0x44, 0x7f, 0x74, 0x14, 0xe9, + 0x1d, 0x30, 0x5d, 0x91, 0xe1, 0x63, 0x54, 0x24, 0xb7, 0xc3, 0x33, 0xfb, 0xc3, 0x18, 0x9c, 0x14, + 0x54, 0xf1, 0x63, 0x04, 0x23, 0x61, 0x13, 0xc5, 0x73, 0x99, 0xd2, 0xee, 0xee, 0xe8, 0xca, 0x9b, + 0x87, 0x77, 0x0c, 0x73, 0x52, 0xa7, 0xbe, 0xfa, 0xf9, 0xf7, 0x87, 0x85, 0xf3, 0x58, 0xed, 0x7c, + 0x6f, 0x46, 0x3f, 0x02, 0x63, 0x9f, 0x99, 0x0c, 0xff, 0x89, 0xe0, 0x4c, 0xac, 0x05, 0xe3, 0xf9, + 0xec, 0x71, 0x93, 0x06, 0x82, 0xf2, 0xce, 0xc0, 0xfe, 0x32, 0xfd, 0x8f, 0x45, 0xfa, 0x55, 0x5c, + 0xe9, 0x97, 0xbe, 0x1c, 0x24, 0x4c, 0xdf, 0x39, 0x18, 0x32, 0x6d, 0x3d, 0x18, 0x3d, 0x4c, 0xdf, + 0x91, 0x03, 0xa9, 0xad, 0xc7, 0x67, 0x08, 0xfe, 0x0f, 0xc1, 0x78, 0x8f, 0x0e, 0x83, 0x3f, 0xc8, + 0x9e, 0x76, 0xea, 0xb4, 0x51, 0xd6, 0xf2, 0x01, 0x93, 0x82, 0xac, 0x0a, 0x41, 0x16, 0xf0, 0x7c, + 0x3f, 0x41, 0x22, 0xf8, 0x4e, 0x07, 0xa5, 0x16, 0x74, 0xa5, 0x40, 0x8e, 0xa0, 0x37, 0xb5, 0xf1, + 0xbf, 0x08, 0x94, 0x1e, 0xb1, 0x16, 0x9d, 0x43, 0x29, 0x90, 0x3a, 0x83, 0x0e, 0xa3, 0x40, 0xfa, + 0x74, 0x51, 0xdf, 0x16, 0x0a, 0xcc, 0xe1, 0xeb, 0x03, 0x29, 0x80, 0xff, 0x41, 0x70, 0x36, 0xb1, + 0x31, 0xe0, 0xf2, 0x80, 0x85, 0xea, 0x6e, 0x98, 0xca, 0xfb, 0x79, 0x40, 0x49, 0xbe, 0x2b, 0x82, + 0xef, 0x3c, 0xbe, 0x99, 0x91, 0x6f, 0xb8, 0x02, 0xd6, 0x9a, 0x01, 0xc8, 0x41, 0xbd, 0xff, 0x42, + 0x30, 0x91, 0x18, 0x27, 0xa8, 0x76, 0x79, 0xc0, 0x02, 0x1d, 0x8d, 0x79, 0xda, 0x10, 0x50, 0x6f, + 0x08, 0xe6, 0xd7, 0xf1, 0xb5, 0x01, 0x98, 0xe3, 0xef, 0x0b, 0xf0, 0x72, 0x9f, 0x2f, 0x76, 0x7c, + 0x67, 0xd0, 0x12, 0xf5, 0xd8, 0x46, 0x94, 0x4a, 0x7e, 0x80, 0x92, 0xff, 0x47, 0x82, 0x7f, 0x05, + 0x7f, 0x98, 0x95, 0x7f, 0x80, 0x54, 0xb3, 0x42, 0xa8, 0x5a, 0xb8, 0x9f, 0xed, 0x9f, 0x00, 0x7d, + 0x47, 0xae, 0xd2, 0x6d, 0xfc, 0xb0, 0x00, 0xaf, 0x45, 0x6e, 0x99, 0x58, 0x6e, 0xba, 0x05, 0xaa, + 0x66, 0xe7, 0x93, 0x75, 0x63, 0x3b, 0x06, 0x8d, 0xde, 0x13, 0x1a, 0x2d, 0xe1, 0x85, 0xa3, 0x68, + 0xe4, 0x18, 0x8c, 0xe3, 0x9f, 0x0a, 0x30, 0x9d, 0xaa, 0xca, 0xc1, 0xa2, 0x87, 0x3f, 0xc9, 0x51, + 0x9f, 0xae, 0xfd, 0xf1, 0x18, 0x94, 0xf2, 0x85, 0x52, 0x0e, 0xfe, 0x2c, 0x9f, 0xd3, 0x14, 0x59, + 0x59, 0xdb, 0xfa, 0xce, 0xb3, 0x9b, 0x69, 0x3b, 0xd4, 0xf4, 0xbb, 0x02, 0x9c, 0xeb, 0xf7, 0xd3, + 0x44, 0xd0, 0x7c, 0x2a, 0x83, 0x76, 0x8c, 0x5e, 0x3f, 0xbc, 0x28, 0xeb, 0x39, 0x22, 0x4a, 0xf1, + 0xd6, 0x84, 0x78, 0xab, 0x78, 0x25, 0x0f, 0xf1, 0x96, 0xcc, 0x27, 0xbb, 0x45, 0xf4, 0x74, 0xb7, + 0x88, 0x7e, 0xdb, 0x2d, 0xa2, 0x6f, 0xf7, 0x8a, 0x43, 0x4f, 0xf7, 0x8a, 0x43, 0xbf, 0xec, 0x15, + 0x87, 0xee, 0x95, 0x1b, 0x36, 0xdf, 0x68, 0xd5, 0x35, 0x93, 0x36, 0x75, 0x66, 0x5b, 0x44, 0xfc, + 0xb8, 0x66, 0x52, 0x27, 0x08, 0x1b, 0x86, 0x79, 0x43, 0x6f, 0x52, 0xab, 0xe5, 0x10, 0x16, 0x66, + 0x51, 0xba, 0x5a, 0x9a, 0x39, 0x88, 0x3b, 0x23, 0x6c, 0xf8, 0xb6, 0x47, 0x58, 0x7d, 0x44, 0xf8, + 0x5e, 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x66, 0x71, 0xdc, 0x06, 0x01, 0x15, 0x00, 0x00, } func (m *QueryGetInterchainMultiDepositOrderRequest) Marshal() (dAtA []byte, err error) { @@ -1150,6 +1221,50 @@ func (m *QueryLatestInterchainMultiDepositOrderRequest) MarshalToSizedBuffer(dAt i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.PoolId) > 0 { + i -= len(m.PoolId) + copy(dAtA[i:], m.PoolId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.PoolId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) 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 *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationMaker) > 0 { + i -= len(m.DestinationMaker) + copy(dAtA[i:], m.DestinationMaker) + i = encodeVarintQuery(dAtA, i, uint64(len(m.DestinationMaker))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceMaker) > 0 { + i -= len(m.SourceMaker) + copy(dAtA[i:], m.SourceMaker) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SourceMaker))) + i-- dAtA[i] = 0x12 } if len(m.PoolId) > 0 { @@ -1674,6 +1789,27 @@ func (m *QueryLatestInterchainMultiDepositOrderRequest) Size() (n int) { return n } +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PoolId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.SourceMaker) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.DestinationMaker) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -2330,7 +2466,7 @@ func (m *QueryLatestInterchainMultiDepositOrderRequest) Unmarshal(dAtA []byte) e } m.PoolId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -2387,6 +2523,152 @@ func (m *QueryLatestInterchainMultiDepositOrderRequest) Unmarshal(dAtA []byte) e } return nil } +func (m *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) 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: QueryLatestInterchainMultiDepositOrderByCreatorsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLatestInterchainMultiDepositOrderByCreatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", 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.PoolId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceMaker", 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.SourceMaker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationMaker", 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.DestinationMaker = 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 *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/modules/apps/101-interchain-swap/types/query.pb.gw.go b/modules/apps/101-interchain-swap/types/query.pb.gw.go index 65a0b22f..9efaadab 100644 --- a/modules/apps/101-interchain-swap/types/query.pb.gw.go +++ b/modules/apps/101-interchain-swap/types/query.pb.gw.go @@ -419,6 +419,104 @@ func local_request_Query_InterchainLatestMultiDepositOrder_0(ctx context.Context } +func request_Query_InterchainLatestMultiDepositOrderByCreators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLatestInterchainMultiDepositOrderByCreatorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["poolId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "poolId") + } + + protoReq.PoolId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "poolId", err) + } + + val, ok = pathParams["sourceMaker"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sourceMaker") + } + + protoReq.SourceMaker, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sourceMaker", err) + } + + val, ok = pathParams["destinationMaker"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "destinationMaker") + } + + protoReq.DestinationMaker, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "destinationMaker", err) + } + + msg, err := client.InterchainLatestMultiDepositOrderByCreators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_InterchainLatestMultiDepositOrderByCreators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLatestInterchainMultiDepositOrderByCreatorsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["poolId"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "poolId") + } + + protoReq.PoolId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "poolId", err) + } + + val, ok = pathParams["sourceMaker"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "sourceMaker") + } + + protoReq.SourceMaker, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "sourceMaker", err) + } + + val, ok = pathParams["destinationMaker"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "destinationMaker") + } + + protoReq.DestinationMaker, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "destinationMaker", err) + } + + msg, err := server.InterchainLatestMultiDepositOrderByCreators(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_InterchainMultiDepositOrdersAll_0 = &utilities.DoubleArray{Encoding: map[string]int{"poolId": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -681,6 +779,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_InterchainLatestMultiDepositOrderByCreators_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_InterchainLatestMultiDepositOrderByCreators_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_InterchainLatestMultiDepositOrderByCreators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_InterchainMultiDepositOrdersAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -905,6 +1026,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_InterchainLatestMultiDepositOrderByCreators_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_InterchainLatestMultiDepositOrderByCreators_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_InterchainLatestMultiDepositOrderByCreators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_InterchainMultiDepositOrdersAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -945,6 +1086,8 @@ var ( pattern_Query_InterchainLatestMultiDepositOrder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"ibc", "apps", "interchainswap", "v1", "interchain_multi_deposit_orders", "last"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_InterchainLatestMultiDepositOrderByCreators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "interchainswap", "v1", "interchain_multi_deposit_orders", "poolId", "sourceMaker", "destinationMaker", "last"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_InterchainMultiDepositOrdersAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "interchainswap", "v1", "interchain_multi_deposit_orders", "poolId"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -965,5 +1108,7 @@ var ( forward_Query_InterchainLatestMultiDepositOrder_0 = runtime.ForwardResponseMessage + forward_Query_InterchainLatestMultiDepositOrderByCreators_0 = runtime.ForwardResponseMessage + forward_Query_InterchainMultiDepositOrdersAll_0 = runtime.ForwardResponseMessage ) diff --git a/modules/apps/101-interchain-swap/types/query_grpc.pb.go b/modules/apps/101-interchain-swap/types/query_grpc.pb.go index 5aa57394..642cdec6 100644 --- a/modules/apps/101-interchain-swap/types/query_grpc.pb.go +++ b/modules/apps/101-interchain-swap/types/query_grpc.pb.go @@ -30,6 +30,7 @@ type QueryClient interface { InterchainMarketMakerAll(ctx context.Context, in *QueryAllInterchainMarketMakerRequest, opts ...grpc.CallOption) (*QueryAllInterchainMarketMakerResponse, error) InterchainMultiDepositOrder(ctx context.Context, in *QueryGetInterchainMultiDepositOrderRequest, opts ...grpc.CallOption) (*QueryGetInterchainMultiDepositOrderResponse, error) InterchainLatestMultiDepositOrder(ctx context.Context, in *QueryLatestInterchainMultiDepositOrderRequest, opts ...grpc.CallOption) (*QueryGetInterchainMultiDepositOrderResponse, error) + InterchainLatestMultiDepositOrderByCreators(ctx context.Context, in *QueryLatestInterchainMultiDepositOrderByCreatorsRequest, opts ...grpc.CallOption) (*QueryGetInterchainMultiDepositOrderResponse, error) InterchainMultiDepositOrdersAll(ctx context.Context, in *QueryAllInterchainMultiDepositOrdersRequest, opts ...grpc.CallOption) (*QueryAllInterchainMultiDepositOrdersResponse, error) } @@ -113,6 +114,15 @@ func (c *queryClient) InterchainLatestMultiDepositOrder(ctx context.Context, in return out, nil } +func (c *queryClient) InterchainLatestMultiDepositOrderByCreators(ctx context.Context, in *QueryLatestInterchainMultiDepositOrderByCreatorsRequest, opts ...grpc.CallOption) (*QueryGetInterchainMultiDepositOrderResponse, error) { + out := new(QueryGetInterchainMultiDepositOrderResponse) + err := c.cc.Invoke(ctx, "/ibc.applications.interchain_swap.v1.Query/InterchainLatestMultiDepositOrderByCreators", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) InterchainMultiDepositOrdersAll(ctx context.Context, in *QueryAllInterchainMultiDepositOrdersRequest, opts ...grpc.CallOption) (*QueryAllInterchainMultiDepositOrdersResponse, error) { out := new(QueryAllInterchainMultiDepositOrdersResponse) err := c.cc.Invoke(ctx, "/ibc.applications.interchain_swap.v1.Query/InterchainMultiDepositOrdersAll", in, out, opts...) @@ -138,6 +148,7 @@ type QueryServer interface { InterchainMarketMakerAll(context.Context, *QueryAllInterchainMarketMakerRequest) (*QueryAllInterchainMarketMakerResponse, error) InterchainMultiDepositOrder(context.Context, *QueryGetInterchainMultiDepositOrderRequest) (*QueryGetInterchainMultiDepositOrderResponse, error) InterchainLatestMultiDepositOrder(context.Context, *QueryLatestInterchainMultiDepositOrderRequest) (*QueryGetInterchainMultiDepositOrderResponse, error) + InterchainLatestMultiDepositOrderByCreators(context.Context, *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) (*QueryGetInterchainMultiDepositOrderResponse, error) InterchainMultiDepositOrdersAll(context.Context, *QueryAllInterchainMultiDepositOrdersRequest) (*QueryAllInterchainMultiDepositOrdersResponse, error) } @@ -169,6 +180,9 @@ func (UnimplementedQueryServer) InterchainMultiDepositOrder(context.Context, *Qu func (UnimplementedQueryServer) InterchainLatestMultiDepositOrder(context.Context, *QueryLatestInterchainMultiDepositOrderRequest) (*QueryGetInterchainMultiDepositOrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InterchainLatestMultiDepositOrder not implemented") } +func (UnimplementedQueryServer) InterchainLatestMultiDepositOrderByCreators(context.Context, *QueryLatestInterchainMultiDepositOrderByCreatorsRequest) (*QueryGetInterchainMultiDepositOrderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InterchainLatestMultiDepositOrderByCreators not implemented") +} func (UnimplementedQueryServer) InterchainMultiDepositOrdersAll(context.Context, *QueryAllInterchainMultiDepositOrdersRequest) (*QueryAllInterchainMultiDepositOrdersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InterchainMultiDepositOrdersAll not implemented") } @@ -328,6 +342,24 @@ func _Query_InterchainLatestMultiDepositOrder_Handler(srv interface{}, ctx conte return interceptor(ctx, in, info, handler) } +func _Query_InterchainLatestMultiDepositOrderByCreators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLatestInterchainMultiDepositOrderByCreatorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).InterchainLatestMultiDepositOrderByCreators(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ibc.applications.interchain_swap.v1.Query/InterchainLatestMultiDepositOrderByCreators", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InterchainLatestMultiDepositOrderByCreators(ctx, req.(*QueryLatestInterchainMultiDepositOrderByCreatorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_InterchainMultiDepositOrdersAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllInterchainMultiDepositOrdersRequest) if err := dec(in); err != nil { @@ -385,6 +417,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "InterchainLatestMultiDepositOrder", Handler: _Query_InterchainLatestMultiDepositOrder_Handler, }, + { + MethodName: "InterchainLatestMultiDepositOrderByCreators", + Handler: _Query_InterchainLatestMultiDepositOrderByCreators_Handler, + }, { MethodName: "InterchainMultiDepositOrdersAll", Handler: _Query_InterchainMultiDepositOrdersAll_Handler, diff --git a/modules/apps/101-interchain-swap/types/utils.go b/modules/apps/101-interchain-swap/types/utils.go index 851ab53b..5043e9ad 100644 --- a/modules/apps/101-interchain-swap/types/utils.go +++ b/modules/apps/101-interchain-swap/types/utils.go @@ -12,7 +12,6 @@ import ( "strings" "time" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" @@ -121,21 +120,21 @@ func UintToBytes(num uint) ([]byte, error) { } // slippage value have to be in 0~10000 -func CheckSlippage(expect, result math.Int, desireSlippage int64) error { +func CheckSlippage(expect, result sdk.Dec, desireSlippage int64) error { if desireSlippage > 10000 { return ErrInvalidSlippage } // Define the slippage tolerance (1% in this example) - slippageTolerance := sdk.NewInt(desireSlippage) + slippageTolerance := sdk.NewDec(desireSlippage) // Calculate the absolute difference between the ratios ratioDiff := expect.Sub(result).Abs() - // Calculate slippage percentage (slippage = ratioDiff/expect * 100) - slippage := ratioDiff.Mul(sdk.NewInt(10000)).Quo(expect) + // Calculate slippage percentage (slippage = ratioDiff/expect * 10000) + slippage := ratioDiff.Mul(sdk.NewDec(10000)).Quo(expect) // Check if the slippage is within the tolerance - if slippage.GTE(slippageTolerance) { + if slippage.GT(slippageTolerance) { return ErrInvalidPairRatio } return nil diff --git a/proto/ibc/applications/interchain_swap/v1/packet.proto b/proto/ibc/applications/interchain_swap/v1/packet.proto index 57039540..c011416e 100644 --- a/proto/ibc/applications/interchain_swap/v1/packet.proto +++ b/proto/ibc/applications/interchain_swap/v1/packet.proto @@ -30,7 +30,7 @@ message StateChange { repeated cosmos.base.v1beta1.Coin out = 2; repeated cosmos.base.v1beta1.Coin poolTokens = 3; string poolId = 4; - string mutiDepositOrderId = 5; + uint64 multiDepositOrderId = 5; string sourceChainId = 6; } diff --git a/proto/ibc/applications/interchain_swap/v1/query.proto b/proto/ibc/applications/interchain_swap/v1/query.proto index 08798ffc..d281d1c0 100644 --- a/proto/ibc/applications/interchain_swap/v1/query.proto +++ b/proto/ibc/applications/interchain_swap/v1/query.proto @@ -50,6 +50,11 @@ service Query { option (google.api.http).get = "/ibc/apps/interchainswap/v1/interchain_multi_deposit_orders/last"; } + rpc InterchainLatestMultiDepositOrderByCreators(QueryLatestInterchainMultiDepositOrderByCreatorsRequest) returns (QueryGetInterchainMultiDepositOrderResponse) { + option (google.api.http).get = "/ibc/apps/interchainswap/v1/interchain_multi_deposit_orders/{poolId}/{sourceMaker}/{destinationMaker}/last"; + } + + rpc InterchainMultiDepositOrdersAll(QueryAllInterchainMultiDepositOrdersRequest) returns (QueryAllInterchainMultiDepositOrdersResponse) { option (google.api.http).get = "/ibc/apps/interchainswap/v1/interchain_multi_deposit_orders/{poolId}"; } @@ -79,9 +84,14 @@ message QueryAllInterchainMultiDepositOrdersResponse { // Query latest interchain multi-deposit order message QueryLatestInterchainMultiDepositOrderRequest { string poolId = 1; - cosmos.base.query.v1beta1.PageRequest pagination = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} +// Query latest interchain multi-deposit order by creators +message QueryLatestInterchainMultiDepositOrderByCreatorsRequest { + string poolId = 1; + string sourceMaker = 2; + string destinationMaker = 3; } - // QueryParamsRequest is the request type for the Query/Params RPC method.