diff --git a/app/app.go b/app/app.go index 3acba52083..fd6ab63f6d 100644 --- a/app/app.go +++ b/app/app.go @@ -437,10 +437,24 @@ func New( panic(fmt.Sprintf("error while reading wasm config: %s", err)) } + app.EpochKeeper = *epochmodulekeeper.NewKeeper( + appCodec, + keys[epochmoduletypes.StoreKey], + keys[epochmoduletypes.MemStoreKey], + app.GetSubspace(epochmoduletypes.ModuleName), + ) + app.DexKeeper = *dexmodulekeeper.NewKeeper( + appCodec, + keys[dexmoduletypes.StoreKey], + keys[dexmoduletypes.MemStoreKey], + app.GetSubspace(dexmoduletypes.ModuleName), + app.EpochKeeper, + app.BankKeeper, + ) // The last arguments can contain custom message handlers, and custom query handlers, // if we want to allow any custom callbacks supportedFeatures := "iterator,staking,stargate" - wasmOpts = append(wasmbinding.RegisterCustomPlugins(&app.OracleKeeper), wasmOpts...) + wasmOpts = append(wasmbinding.RegisterCustomPlugins(&app.OracleKeeper, &app.DexKeeper), wasmOpts...) app.WasmKeeper = wasm.NewKeeper( appCodec, keys[wasm.StoreKey], @@ -460,22 +474,7 @@ func New( supportedFeatures, wasmOpts..., ) - - app.EpochKeeper = *epochmodulekeeper.NewKeeper( - appCodec, - keys[epochmoduletypes.StoreKey], - keys[epochmoduletypes.MemStoreKey], - app.GetSubspace(epochmoduletypes.ModuleName), - ) - app.DexKeeper = *dexmodulekeeper.NewKeeper( - appCodec, - keys[dexmoduletypes.StoreKey], - keys[dexmoduletypes.MemStoreKey], - app.GetSubspace(dexmoduletypes.ModuleName), - app.EpochKeeper, - app.BankKeeper, - app.WasmKeeper, - ) + app.DexKeeper.SetWasmKeeper(&app.WasmKeeper) dexModule := dexmodule.NewAppModule(appCodec, app.DexKeeper, app.AccountKeeper, app.BankKeeper, app.WasmKeeper, app.tracingInfo) epochModule := epochmodule.NewAppModule(appCodec, app.EpochKeeper, app.AccountKeeper, app.BankKeeper) diff --git a/app/test_helpers.go b/app/test_helpers.go index 5ab3d7733d..435adf0a2d 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -21,6 +21,8 @@ import ( dbm "github.com/tendermint/tm-db" ) +const TEST_CONTRACT = "TEST" + type TestWrapper struct { suite.Suite diff --git a/proto/dex/query.proto b/proto/dex/query.proto index 8dd319ea0e..1565f571aa 100644 --- a/proto/dex/query.proto +++ b/proto/dex/query.proto @@ -142,8 +142,12 @@ message QueryGetPricesResponse { } message QueryGetTwapsRequest { - string contractAddr = 1; - uint64 lookbackSeconds = 2; + string contractAddr = 1 [ + (gogoproto.jsontag) = "contract_address" + ]; + uint64 lookbackSeconds = 2 [ + (gogoproto.jsontag) = "lookback_seconds" + ]; } message QueryGetTwapsResponse { diff --git a/wasmbinding/queries.go b/wasmbinding/queries.go index e9220d2cb7..72a62c337f 100644 --- a/wasmbinding/queries.go +++ b/wasmbinding/queries.go @@ -6,18 +6,22 @@ import ( wasmvmtypes "github.com/CosmWasm/wasmvm/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + dexwasm "github.com/sei-protocol/sei-chain/x/dex/client/wasm" + dexbindings "github.com/sei-protocol/sei-chain/x/dex/client/wasm/bindings" oraclewasm "github.com/sei-protocol/sei-chain/x/oracle/client/wasm" oraclebindings "github.com/sei-protocol/sei-chain/x/oracle/client/wasm/bindings" ) type QueryPlugin struct { oracleHandler oraclewasm.OracleWasmQueryHandler + dexHandler dexwasm.DexWasmQueryHandler } // NewQueryPlugin returns a reference to a new QueryPlugin. -func NewQueryPlugin(oh *oraclewasm.OracleWasmQueryHandler) *QueryPlugin { +func NewQueryPlugin(oh *oraclewasm.OracleWasmQueryHandler, dh *dexwasm.DexWasmQueryHandler) *QueryPlugin { return &QueryPlugin{ oracleHandler: *oh, + dexHandler: *dh, } } @@ -53,3 +57,25 @@ func (qp QueryPlugin) HandleOracleQuery(ctx sdk.Context, queryData json.RawMessa return nil, wasmvmtypes.UnsupportedRequest{Kind: "Unknown Sei Oracle Query"} } } + +func (qp QueryPlugin) HandleDexQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error) { + var parsedQuery dexbindings.SeiDexQuery + if err := json.Unmarshal(queryData, &parsedQuery); err != nil { + return nil, sdkerrors.Wrap(err, "Error parsing SeiDexQuery") + } + switch { + case parsedQuery.DexTwaps != nil: + res, err := qp.dexHandler.GetDexTwap(ctx, parsedQuery.DexTwaps) + if err != nil { + return nil, sdkerrors.Wrap(err, "Error while getting dex Twaps") + } + bz, err := json.Marshal(res) + if err != nil { + return nil, sdkerrors.Wrap(err, "Error encoding dex twaps as JSON") + } + + return bz, nil + default: + return nil, wasmvmtypes.UnsupportedRequest{Kind: "Unknown Sei Dex Query"} + } +} diff --git a/wasmbinding/query_plugin.go b/wasmbinding/query_plugin.go index 9637408756..aa7e2e7aba 100644 --- a/wasmbinding/query_plugin.go +++ b/wasmbinding/query_plugin.go @@ -10,6 +10,7 @@ import ( const ( OracleRoute = "oracle" + DexRoute = "dex" ) type SeiQueryWrapper struct { @@ -28,6 +29,8 @@ func CustomQuerier(qp *QueryPlugin) func(ctx sdk.Context, request json.RawMessag switch contractQuery.Route { case OracleRoute: return qp.HandleOracleQuery(ctx, contractQuery.QueryData) + case DexRoute: + return qp.HandleDexQuery(ctx, contractQuery.QueryData) default: return nil, wasmvmtypes.UnsupportedRequest{Kind: "Unknown Sei Query Route"} } diff --git a/wasmbinding/test/query_test.go b/wasmbinding/test/query_test.go index ec5e43bca9..b338761387 100644 --- a/wasmbinding/test/query_test.go +++ b/wasmbinding/test/query_test.go @@ -9,6 +9,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/sei-protocol/sei-chain/app" "github.com/sei-protocol/sei-chain/wasmbinding" + dexwasm "github.com/sei-protocol/sei-chain/x/dex/client/wasm" + dexbinding "github.com/sei-protocol/sei-chain/x/dex/client/wasm/bindings" + dextypes "github.com/sei-protocol/sei-chain/x/dex/types" oraclewasm "github.com/sei-protocol/sei-chain/x/oracle/client/wasm" oraclebinding "github.com/sei-protocol/sei-chain/x/oracle/client/wasm/bindings" oracletypes "github.com/sei-protocol/sei-chain/x/oracle/types" @@ -24,7 +27,8 @@ func TestWasmGetOracleExchangeRates(t *testing.T) { testWrapper := app.NewTestWrapper(t, tm, valPub) oh := oraclewasm.NewOracleWasmQueryHandler(&testWrapper.App.OracleKeeper) - qp := wasmbinding.NewQueryPlugin(oh) + dh := dexwasm.NewDexWasmQueryHandler(&testWrapper.App.DexKeeper) + qp := wasmbinding.NewQueryPlugin(oh, dh) customQuerier := wasmbinding.CustomQuerier(qp) // END SETUP @@ -64,7 +68,8 @@ func TestWasmGetOracleTwaps(t *testing.T) { testWrapper := app.NewTestWrapper(t, tm, valPub) oh := oraclewasm.NewOracleWasmQueryHandler(&testWrapper.App.OracleKeeper) - qp := wasmbinding.NewQueryPlugin(oh) + dh := dexwasm.NewDexWasmQueryHandler(&testWrapper.App.DexKeeper) + qp := wasmbinding.NewQueryPlugin(oh, dh) customQuerier := wasmbinding.CustomQuerier(qp) // END SETUP @@ -101,3 +106,54 @@ func TestWasmGetOracleTwaps(t *testing.T) { oracletypes.OracleTwap{Denom: oracleutils.MicroAtomDenom, Twap: sdk.NewDec(20), LookbackSeconds: 100}, }}, parsedRes2) } + +func TestWasmGetDexTwaps(t *testing.T) { + // START SETUP + tm := time.Now().UTC() + valPub := secp256k1.GenPrivKey().PubKey() + + testWrapper := app.NewTestWrapper(t, tm, valPub) + + oh := oraclewasm.NewOracleWasmQueryHandler(&testWrapper.App.OracleKeeper) + dh := dexwasm.NewDexWasmQueryHandler(&testWrapper.App.DexKeeper) + qp := wasmbinding.NewQueryPlugin(oh, dh) + customQuerier := wasmbinding.CustomQuerier(qp) + // END SETUP + + req := dexbinding.SeiDexQuery{DexTwaps: &dextypes.QueryGetTwapsRequest{ + ContractAddr: app.TEST_CONTRACT, + LookbackSeconds: 200, + }} + queryData, err := json.Marshal(req) + require.NoError(t, err) + query := wasmbinding.SeiQueryWrapper{Route: wasmbinding.DexRoute, QueryData: queryData} + + rawQuery, err := json.Marshal(query) + require.NoError(t, err) + + testWrapper.Ctx = testWrapper.Ctx.WithBlockHeight(11).WithBlockTime(time.Unix(3600, 0)) + testWrapper.App.DexKeeper.AddRegisteredPair( + testWrapper.Ctx, + app.TEST_CONTRACT, + dextypes.Pair{PriceDenom: dextypes.Denom_SEI, AssetDenom: dextypes.Denom_ATOM}, + ) + testWrapper.App.DexKeeper.SetPriceState(testWrapper.Ctx, dextypes.Price{ + SnapshotTimestampInSeconds: 3600, + Price: sdk.NewDec(20), + Pair: &dextypes.Pair{PriceDenom: dextypes.Denom_SEI, AssetDenom: dextypes.Denom_ATOM}, + }, app.TEST_CONTRACT, 0) + testWrapper.App.OracleKeeper.SetBaseExchangeRate(testWrapper.Ctx, oracleutils.MicroAtomDenom, sdk.NewDec(12)) + testWrapper.Ctx = testWrapper.Ctx.WithBlockHeight(14).WithBlockTime(time.Unix(3700, 0)) + + res, err := customQuerier(testWrapper.Ctx, rawQuery) + require.NoError(t, err) + + var parsedRes dextypes.QueryGetTwapsResponse + err = json.Unmarshal(res, &parsedRes) + require.NoError(t, err) + require.Equal(t, 1, len(parsedRes.Twaps)) + twap := *parsedRes.Twaps[0] + require.Equal(t, dextypes.Denom_SEI, twap.Pair.PriceDenom) + require.Equal(t, dextypes.Denom_ATOM, twap.Pair.AssetDenom) + require.Equal(t, sdk.NewDec(20), twap.Twap) +} diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index 114f970bc4..3e9267abce 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -3,15 +3,19 @@ package wasmbinding import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + dexwasm "github.com/sei-protocol/sei-chain/x/dex/client/wasm" + dexkeeper "github.com/sei-protocol/sei-chain/x/dex/keeper" oraclewasm "github.com/sei-protocol/sei-chain/x/oracle/client/wasm" oraclekeeper "github.com/sei-protocol/sei-chain/x/oracle/keeper" ) func RegisterCustomPlugins( oracle *oraclekeeper.Keeper, + dex *dexkeeper.Keeper, ) []wasmkeeper.Option { + dexHandler := dexwasm.NewDexWasmQueryHandler(dex) oracleHandler := oraclewasm.NewOracleWasmQueryHandler(oracle) - wasmQueryPlugin := NewQueryPlugin(oracleHandler) + wasmQueryPlugin := NewQueryPlugin(oracleHandler, dexHandler) queryPluginOpt := wasmkeeper.WithQueryPlugins(&wasmkeeper.QueryPlugins{ Custom: CustomQuerier(wasmQueryPlugin), diff --git a/x/dex/client/wasm/bindings/queries.go b/x/dex/client/wasm/bindings/queries.go new file mode 100644 index 0000000000..799a3d1eee --- /dev/null +++ b/x/dex/client/wasm/bindings/queries.go @@ -0,0 +1,8 @@ +package bindings + +import "github.com/sei-protocol/sei-chain/x/dex/types" + +type SeiDexQuery struct { + // queries the dex TWAPs + DexTwaps *types.QueryGetTwapsRequest `json:"dex_twaps,omitempty"` +} diff --git a/x/dex/client/wasm/query.go b/x/dex/client/wasm/query.go new file mode 100644 index 0000000000..1c691545ca --- /dev/null +++ b/x/dex/client/wasm/query.go @@ -0,0 +1,22 @@ +package wasm + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/sei-protocol/sei-chain/x/dex/keeper" + "github.com/sei-protocol/sei-chain/x/dex/types" +) + +type DexWasmQueryHandler struct { + dexKeeper keeper.Keeper +} + +func NewDexWasmQueryHandler(keeper *keeper.Keeper) *DexWasmQueryHandler { + return &DexWasmQueryHandler{ + dexKeeper: *keeper, + } +} + +func (handler DexWasmQueryHandler) GetDexTwap(ctx sdk.Context, req *types.QueryGetTwapsRequest) (*types.QueryGetTwapsResponse, error) { + c := sdk.WrapSDKContext(ctx) + return handler.dexKeeper.GetTwaps(c, req) +} diff --git a/x/dex/keeper/keeper.go b/x/dex/keeper/keeper.go index bafe4bb76f..43e937f87a 100644 --- a/x/dex/keeper/keeper.go +++ b/x/dex/keeper/keeper.go @@ -62,7 +62,6 @@ func NewKeeper( ps paramtypes.Subspace, epochKeeper epochkeeper.Keeper, bankKeeper bankkeeper.Keeper, - wasmKeeper wasm.Keeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -80,7 +79,6 @@ func NewKeeper( BankKeeper: bankKeeper, OrderCancellations: map[string]map[string]*dexcache.OrderCancellations{}, LiquidationRequests: map[string]*dexcache.LiquidationRequests{}, - WasmKeeper: wasmKeeper, } } @@ -91,3 +89,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { func (k Keeper) GetStoreKey() sdk.StoreKey { return k.storeKey } + +func (k *Keeper) SetWasmKeeper(wasmKeeper *wasm.Keeper) { + k.WasmKeeper = *wasmKeeper +} diff --git a/x/dex/types/query.pb.go b/x/dex/types/query.pb.go index e11b0effb0..eb4bc69dc1 100644 --- a/x/dex/types/query.pb.go +++ b/x/dex/types/query.pb.go @@ -890,8 +890,8 @@ func (m *QueryGetPricesResponse) GetPrices() []*Price { } type QueryGetTwapsRequest struct { - ContractAddr string `protobuf:"bytes,1,opt,name=contractAddr,proto3" json:"contractAddr,omitempty"` - LookbackSeconds uint64 `protobuf:"varint,2,opt,name=lookbackSeconds,proto3" json:"lookbackSeconds,omitempty"` + ContractAddr string `protobuf:"bytes,1,opt,name=contractAddr,proto3" json:"contract_address"` + LookbackSeconds uint64 `protobuf:"varint,2,opt,name=lookbackSeconds,proto3" json:"lookback_seconds"` } func (m *QueryGetTwapsRequest) Reset() { *m = QueryGetTwapsRequest{} } @@ -1009,72 +1009,74 @@ func init() { func init() { proto.RegisterFile("dex/query.proto", fileDescriptor_d8e98105e6e08a59) } var fileDescriptor_d8e98105e6e08a59 = []byte{ - // 1033 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd8, 0x49, 0xd4, 0xbc, 0x44, 0x29, 0x9a, 0x1a, 0x30, 0x0b, 0x72, 0xc3, 0x54, 0xa5,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6a, 0xaa, 0x8f, 0x6f, - 0x2b, 0x7b, 0x70, 0x68, 0xc6, 0xc4, 0xf9, 0xc8, 0x62, 0x47, 0xb1, 0xa8, 0xd1, 0x37, 0xc7, 0xb0, - 0x50, 0xaf, 0xfe, 0x1c, 0x89, 0xbe, 0x93, 0xa6, 0xbb, 0x5d, 0x7b, 0x70, 0x52, 0x21, 0xc7, 0x27, - 0x15, 0xf2, 0xf7, 0x49, 0x85, 0xdc, 0x3f, 0xad, 0xcc, 0x1d, 0x9f, 0x56, 0xe6, 0xfe, 0x3c, 0xad, - 0xcc, 0x7d, 0x54, 0xb5, 0x1d, 0xb9, 0x7f, 0xd0, 0xd0, 0x2d, 0xd1, 0xce, 0x95, 0xaa, 0x46, 0xb5, - 0x0e, 0x55, 0x35, 0x79, 0xcf, 0xe7, 0x41, 0x63, 0x51, 0xad, 0x5f, 0xfd, 0x27, 0x00, 0x00, 0xff, - 0xff, 0x49, 0xf8, 0x5a, 0x39, 0x0f, 0x12, 0x00, 0x00, + // 1065 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xd8, 0x49, 0xd4, 0x4c, 0xa2, 0xb4, 0x9a, 0x1a, 0x30, 0x0b, 0x72, 0xc2, 0x54, 0xa5, + 0x05, 0xe1, 0x5d, 0x92, 0x16, 0xc1, 0xa9, 0x28, 0x51, 0xc1, 0x1c, 0x08, 0xa4, 0x5b, 0x52, 0x10, + 0x12, 0x84, 0xf5, 0xee, 0x68, 0xb3, 0xf2, 0x7a, 0x67, 0xeb, 0x99, 0xd0, 0x54, 0x91, 0x2f, 0x5c, + 0xe0, 0x18, 0x89, 0x13, 0x3f, 0x01, 0x09, 0x8e, 0x5c, 0x90, 0xb8, 0xa2, 0x4a, 0x1c, 0x88, 0xc4, + 0x87, 0x38, 0x55, 0x28, 0xe9, 0x89,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0xbb, 0x69, 0xba, 0x9b, 0x8d, 0x07, 0x27, 0x35, 0x70, 0x7c, 0x52, + 0x03, 0x7f, 0x9e, 0xd4, 0xc0, 0xd1, 0x69, 0x6d, 0xe6, 0xf8, 0xb4, 0x36, 0xf3, 0xc7, 0x69, 0x6d, + 0xe6, 0xc3, 0xba, 0xeb, 0xf1, 0xbd, 0xfd, 0xa6, 0x6e, 0xd3, 0x76, 0xae, 0x54, 0x5d, 0xd6, 0x3a, + 0x10, 0xd5, 0xf8, 0xfd, 0x90, 0xb0, 0xe6, 0xbc, 0x58, 0xbf, 0xf6, 0x77, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xe1, 0xbc, 0xae, 0x7c, 0x3c, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.