Skip to content

Commit

Permalink
Remove open interest handler (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill authored Sep 23, 2024
1 parent 9144e78 commit 06eeb77
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 291 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const HANDLER_SCRIPTS: string[] = [
'dydx_market_create_handler.sql',
'dydx_market_modify_handler.sql',
'dydx_market_price_update_handler.sql',
'dydx_open_interest_update_handler.sql',
'dydx_perpetual_market_v1_handler.sql',
'dydx_perpetual_market_v2_handler.sql',
'dydx_register_affiliate_handler.sql',
Expand Down
2 changes: 0 additions & 2 deletions indexer/services/ender/src/lib/block-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { DeleveragingValidator } from '../validators/deleveraging-validator';
import { FundingValidator } from '../validators/funding-validator';
import { LiquidityTierValidatorV2, LiquidityTierValidator } from '../validators/liquidity-tier-validator';
import { MarketValidator } from '../validators/market-validator';
import { OpenInterestUpdateValidator } from '../validators/open-interest-update-validator';
import { OrderFillValidator } from '../validators/order-fill-validator';
import { PerpetualMarketValidator } from '../validators/perpetual-market-validator';
import { RegisterAffiliateValidator } from '../validators/register-affiliate-validator';
Expand Down Expand Up @@ -63,7 +62,6 @@ const BLOCK_EVENT_SUBTYPE_VERSION_TO_VALIDATOR_MAPPING: Record<string, Validator
[serializeSubtypeAndVersion(DydxIndexerSubtypes.FUNDING.toString(), 1)]: FundingValidator,
[serializeSubtypeAndVersion(DydxIndexerSubtypes.TRADING_REWARD.toString(), 1)]: TradingRewardsValidator,
[serializeSubtypeAndVersion(DydxIndexerSubtypes.STATEFUL_ORDER.toString(), 1)]: StatefulOrderValidator,
[serializeSubtypeAndVersion(DydxIndexerSubtypes.OPEN_INTEREST_UPDATE.toString(), 1)]: OpenInterestUpdateValidator,
[serializeSubtypeAndVersion(DydxIndexerSubtypes.UPSERT_VAULT.toString(), 1)]: UpsertVaultValidator,
};

Expand Down
10 changes: 0 additions & 10 deletions indexer/services/ender/src/lib/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
UpdateClobPairEventV1,
SubaccountMessage,
DeleveragingEventV1,
OpenInterestUpdateEventV1,
TradingRewardsEventV1,
RegisterAffiliateEventV1,
UpsertVaultEventV1,
Expand Down Expand Up @@ -234,15 +233,6 @@ export function indexerTendermintEventToEventProtoWithType(
blockEventIndex,
};
}
case (DydxIndexerSubtypes.OPEN_INTEREST_UPDATE.toString()): {
return {
type: DydxIndexerSubtypes.OPEN_INTEREST_UPDATE,
eventProto: OpenInterestUpdateEventV1.decode(eventDataBinary),
indexerTendermintEvent: event,
version,
blockEventIndex,
};
}
case (DydxIndexerSubtypes.REGISTER_AFFILIATE.toString()): {
return {
type: DydxIndexerSubtypes.REGISTER_AFFILIATE,
Expand Down
8 changes: 0 additions & 8 deletions indexer/services/ender/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
UpdateClobPairEventV1,
DeleveragingEventV1,
TradingRewardsEventV1,
OpenInterestUpdateEventV1,
BlockHeightMessage,
RegisterAffiliateEventV1,
UpsertVaultEventV1,
Expand All @@ -58,7 +57,6 @@ export enum DydxIndexerSubtypes {
UPDATE_CLOB_PAIR = 'update_clob_pair',
DELEVERAGING = 'deleveraging',
TRADING_REWARD = 'trading_reward',
OPEN_INTEREST_UPDATE = 'open_interest_update',
REGISTER_AFFILIATE = 'register_affiliate',
UPSERT_VAULT = 'upsert_vault',
}
Expand Down Expand Up @@ -163,12 +161,6 @@ export type EventProtoWithTypeAndVersion = {
indexerTendermintEvent: IndexerTendermintEvent,
version: number,
blockEventIndex: number,
} | {
type: DydxIndexerSubtypes.OPEN_INTEREST_UPDATE,
eventProto: OpenInterestUpdateEventV1,
indexerTendermintEvent: IndexerTendermintEvent,
version: number,
blockEventIndex: number,
} | {
type: DydxIndexerSubtypes.REGISTER_AFFILIATE,
eventProto: RegisterAffiliateEventV1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ BEGIN
rval[i] = dydx_update_clob_pair_handler(event_data);
WHEN '"funding_values"'::jsonb THEN
rval[i] = dydx_funding_handler(block_height, block_time, event_data, event_index, transaction_index);
WHEN '"open_interest_update"'::jsonb THEN
rval[i] = dydx_open_interest_update_handler(event_data);
WHEN '"upsert_vault"'::jsonb THEN
rval[i] = dydx_vault_upsert_handler(block_time, event_data);
ELSE
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 06eeb77

Please sign in to comment.