From ec43748c22bf97fe339e7e99b9b65892b658b4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sedl=C3=A1=C4=8Dek?= Date: Wed, 9 Oct 2024 18:36:18 +0200 Subject: [PATCH] indexer a2a0b2e --- indexer/indexer.gen.go | 69 +++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/indexer/indexer.gen.go b/indexer/indexer.gen.go index 2e4d2e9..aa5a089 100644 --- a/indexer/indexer.gen.go +++ b/indexer/indexer.gen.go @@ -1,4 +1,4 @@ -// sequence-indexer v0.4.0 42a988bcb0871f1249450f0d92967db5b47ff33e +// sequence-indexer v0.4.0 4a22eceb25b79f11a96cfd7416e0e5e3150b8f77 // -- // Code generated by webrpc-gen@v0.20.0 with golang generator. DO NOT EDIT. // @@ -33,7 +33,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "42a988bcb0871f1249450f0d92967db5b47ff33e" + return "4a22eceb25b79f11a96cfd7416e0e5e3150b8f77" } // @@ -711,14 +711,23 @@ type OrderbookOrder struct { CreatedAt uint64 `json:"createdAt" cbor:"14,extension"` } +// Pass this object to 'filter' and not to 'filters' parameter in GetOrderbookOrders() +// 'filters' are deprecated +// use 'filter' and these fields instead +// - userAddresses +// - excludeUserAddress' type OrderbookOrderFilter struct { - IsListing *bool `json:"isListing" cbor:"1,extension"` - UserAddresses []string `json:"userAddresses" cbor:"2,extension"` - TokenIDs []string `json:"tokenIds" cbor:"3,extension"` + IsListing *bool `json:"isListing" cbor:"1,extension"` + // deprecated + UserAddresses []string `json:"userAddresses" cbor:"2,extension"` + TokenIDs []string `json:"tokenIds" cbor:"3,extension"` + // deprecated ExcludeUserAddresses []string `json:"excludeUserAddresses" cbor:"4,extension"` AfterBlockNumber uint64 `json:"afterBlockNumber" cbor:"5,extension"` AfterCreatedAt int64 `json:"afterCreatedAt" cbor:"6,extension"` BeforeExpiry int64 `json:"beforeExpiry" cbor:"7,extension"` + UserAddress *string `json:"userAddress" cbor:"8,extension"` + ExcludeUserAddress *string `json:"excludeUserAddress" cbor:"9,extension"` } // Token History @@ -1163,8 +1172,19 @@ type Indexer interface { SyncBalance(ctx context.Context, accountAddress string, contractAddress string, tokenID *string) error // Fetches a single receipt and then will stop the subscription FetchTransactionReceipt(ctx context.Context, txnHash string, maxBlockWait *int) (*TransactionReceipt, error) - // Fetch orderbook orders - GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus) (*Page, []*OrderbookOrder, error) + // These parameters are depracated, please don't use them: + // - filters + // - beforeExpiryTimestamp + // - blockNumberAfter + // - createdAtAfter + // and in OrderbookOrderFilter these fields are depracated: + // - userAddress + // - excludeUserAddress + // + // Use 'filter' and these fields instead + // - userAddresses + // - excludeUserAddress' + GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus, filters []*OrderbookOrderFilter, beforeExpiryTimestamp int64, blockNumberAfter int64, createdAtAfter int64) (*Page, []*OrderbookOrder, error) GetTopOrders(ctx context.Context, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, tokenIDs []string, isListing bool, priceSort SortOrder, excludeUser *string) ([]*OrderbookOrder, error) // Fetches a single receipt with filter and then will stop the subscription FetchTransactionReceiptWithFilter(ctx context.Context, filter *TransactionFilter, maxBlockWait *int) (*TransactionReceipt, error) @@ -1356,8 +1376,19 @@ type IndexerClient interface { SyncBalance(ctx context.Context, accountAddress string, contractAddress string, tokenID *string) error // Fetches a single receipt and then will stop the subscription FetchTransactionReceipt(ctx context.Context, txnHash string, maxBlockWait *int) (*TransactionReceipt, error) - // Fetch orderbook orders - GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus) (*Page, []*OrderbookOrder, error) + // These parameters are depracated, please don't use them: + // - filters + // - beforeExpiryTimestamp + // - blockNumberAfter + // - createdAtAfter + // and in OrderbookOrderFilter these fields are depracated: + // - userAddress + // - excludeUserAddress + // + // Use 'filter' and these fields instead + // - userAddresses + // - excludeUserAddress' + GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus, filters []*OrderbookOrderFilter, beforeExpiryTimestamp int64, blockNumberAfter int64, createdAtAfter int64) (*Page, []*OrderbookOrder, error) GetTopOrders(ctx context.Context, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, tokenIDs []string, isListing bool, priceSort SortOrder, excludeUser *string) ([]*OrderbookOrder, error) // Fetches a single receipt with filter and then will stop the subscription FetchTransactionReceiptWithFilter(ctx context.Context, filter *TransactionFilter, maxBlockWait *int) (*TransactionReceipt, error) @@ -1762,15 +1793,19 @@ func (c *indexerClient) FetchTransactionReceipt(ctx context.Context, txnHash str return out.Ret0, err } -func (c *indexerClient) GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus) (*Page, []*OrderbookOrder, error) { +func (c *indexerClient) GetOrderbookOrders(ctx context.Context, page *Page, orderbookContractAddress string, collectionAddress string, currencyAddresses []string, filter *OrderbookOrderFilter, orderStatuses []OrderStatus, filters []*OrderbookOrderFilter, beforeExpiryTimestamp int64, blockNumberAfter int64, createdAtAfter int64) (*Page, []*OrderbookOrder, error) { in := struct { - Arg0 *Page `json:"page"` - Arg1 string `json:"orderbookContractAddress"` - Arg2 string `json:"collectionAddress"` - Arg3 []string `json:"currencyAddresses"` - Arg4 *OrderbookOrderFilter `json:"filter"` - Arg5 []OrderStatus `json:"orderStatuses"` - }{page, orderbookContractAddress, collectionAddress, currencyAddresses, filter, orderStatuses} + Arg0 *Page `json:"page"` + Arg1 string `json:"orderbookContractAddress"` + Arg2 string `json:"collectionAddress"` + Arg3 []string `json:"currencyAddresses"` + Arg4 *OrderbookOrderFilter `json:"filter"` + Arg5 []OrderStatus `json:"orderStatuses"` + Arg6 []*OrderbookOrderFilter `json:"filters"` + Arg7 int64 `json:"beforeExpiryTimestamp"` + Arg8 int64 `json:"blockNumberAfter"` + Arg9 int64 `json:"createdAtAfter"` + }{page, orderbookContractAddress, collectionAddress, currencyAddresses, filter, orderStatuses, filters, beforeExpiryTimestamp, blockNumberAfter, createdAtAfter} out := struct { Ret0 *Page `json:"page"` Ret1 []*OrderbookOrder `json:"orders"`