From 16441c073ffca5a8b85636e99fc5b743ed5f1894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20P=C3=A9rez?= Date: Wed, 17 Jan 2024 15:36:56 +0100 Subject: [PATCH] Prettier --- .prettierrc | 3 ++- src/entities/block.ts | 3 +-- src/entities/cancel_event.ts | 5 ++--- src/entities/cancel_up_to_event.ts | 7 +++---- src/entities/current_epoch_info.ts | 2 +- src/entities/epoch_ended_event.ts | 5 ++--- src/entities/epoch_finalized_event.ts | 5 ++--- src/entities/erc1155_order_cancelled_event.ts | 3 +-- src/entities/erc1155_order_filled_event.ts | 5 ++--- src/entities/erc1155_order_presigned_event.ts | 5 ++--- src/entities/erc20_bridge_transfer_event.ts | 5 ++--- src/entities/erc721_order_cancelled_event.ts | 5 ++--- src/entities/erc721_order_filled_event.ts | 5 ++--- src/entities/erc721_order_presigned_event.ts | 5 ++--- src/entities/event.ts | 3 +-- src/entities/event_backfill.ts | 3 +-- src/entities/expired_rfq_order_event.ts | 7 +++---- src/entities/fill_event.ts | 5 ++--- src/entities/last_block_processed.ts | 3 +-- src/entities/log_transfer_event.ts | 3 +-- src/entities/maker_staking_pool_set_event.ts | 3 +-- src/entities/meta_transaction_executed_event.ts | 5 ++--- src/entities/move_stake_event.ts | 5 ++--- src/entities/native_fill.ts | 5 ++--- src/entities/onchain_governance_call_scheduled_event.ts | 5 ++--- src/entities/onchain_governance_proposal_created_event.ts | 5 ++--- src/entities/operator_share_decreased_event.ts | 5 ++--- src/entities/otc_order_filled_event.ts | 3 +-- src/entities/params_set_event.ts | 5 ++--- src/entities/rewards_paid_event.ts | 5 ++--- src/entities/socket_bridge_event.ts | 5 ++--- src/entities/stake_event.ts | 5 ++--- src/entities/staking_pool_created_event.ts | 5 ++--- src/entities/staking_pool_earned_rewards_in_epoch_event.ts | 5 ++--- src/entities/staking_proxy_deployment.ts | 3 +-- src/entities/token_metadata.ts | 3 +-- src/entities/token_registry.ts | 3 +-- src/entities/transaction.ts | 3 +-- src/entities/transaction_execution_event.ts | 3 +-- src/entities/transaction_log.ts | 3 +-- src/entities/transaction_receipt.ts | 3 +-- src/entities/transformed_erc20_event.ts | 5 ++--- src/entities/uniswap_v2_pair_created_event.ts | 5 ++--- src/entities/uniswap_v2_sync_event.ts | 5 ++--- src/entities/uniswap_v3_pool_created_event.ts | 3 +-- src/entities/uniswap_v3_swap_event.ts | 5 ++--- src/entities/unstake_event.ts | 5 ++--- src/entities/unwrap_native_event.ts | 5 ++--- src/entities/v4_cancel_event.ts | 3 +-- src/entities/v4_limit_order_filled_event.ts | 5 ++--- src/entities/v4_rfq_order_filled_event.ts | 5 ++--- src/entities/wrap_native_event.ts | 5 ++--- 52 files changed, 88 insertions(+), 137 deletions(-) diff --git a/.prettierrc b/.prettierrc index 310eae0b..9bb52b3a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,6 @@ "tabWidth": 4, "singleQuote": true, "trailingComma": "all", - "bracketSpacing": true + "bracketSpacing": true, + "importOrderParserPlugins": ["typescript", "decorators-legacy"] } diff --git a/src/entities/block.ts b/src/entities/block.ts index 56701276..da090df2 100644 --- a/src/entities/block.ts +++ b/src/entities/block.ts @@ -1,6 +1,5 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; @Entity({ name: 'blocks' }) export class Block { diff --git a/src/entities/cancel_event.ts b/src/entities/cancel_event.ts index e1cf50df..9f525aa7 100644 --- a/src/entities/cancel_event.ts +++ b/src/entities/cancel_event.ts @@ -1,7 +1,6 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { ProxyType } from '../utils/proxyType'; +import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // These events come directly from the Exchange contract and are fired for meta transactions @Entity({ name: 'cancel_events' }) diff --git a/src/entities/cancel_up_to_event.ts b/src/entities/cancel_up_to_event.ts index f1f727c5..00f3fc6c 100644 --- a/src/entities/cancel_up_to_event.ts +++ b/src/entities/cancel_up_to_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; -import { BigNumber } from '@0x/utils'; - -import { Event } from './event'; import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; +import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // These events come directly from the Exchange contract and are fired for meta transactions @Entity({ name: 'cancel_up_to_events' }) diff --git a/src/entities/current_epoch_info.ts b/src/entities/current_epoch_info.ts index 955e875f..a82fabd5 100644 --- a/src/entities/current_epoch_info.ts +++ b/src/entities/current_epoch_info.ts @@ -1,6 +1,6 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers/big_number'; import { BigNumber } from '@0x/utils'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; // Event emitted when a staking pool's operator share is decreased. @Entity({ name: 'current_epoch_info' }) diff --git a/src/entities/epoch_ended_event.ts b/src/entities/epoch_ended_event.ts index d65cd430..62fe39c9 100644 --- a/src/entities/epoch_ended_event.ts +++ b/src/entities/epoch_ended_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinFinalizer when an epoch has ended. @Entity({ name: 'epoch_ended_events' }) diff --git a/src/entities/epoch_finalized_event.ts b/src/entities/epoch_finalized_event.ts index 386c2a72..10bbc38a 100644 --- a/src/entities/epoch_finalized_event.ts +++ b/src/entities/epoch_finalized_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinFinalizer when an epoch has ended. @Entity({ name: 'epoch_finalized_events' }) diff --git a/src/entities/erc1155_order_cancelled_event.ts b/src/entities/erc1155_order_cancelled_event.ts index 9e09186a..032c37a6 100644 --- a/src/entities/erc1155_order_cancelled_event.ts +++ b/src/entities/erc1155_order_cancelled_event.ts @@ -1,6 +1,5 @@ -import { Column, Entity } from 'typeorm'; - import { Event } from './event'; +import { Column, Entity } from 'typeorm'; @Entity({ name: 'erc1155_order_cancelled_events' }) export class Erc1155OrderCancelledEvent extends Event { diff --git a/src/entities/erc1155_order_filled_event.ts b/src/entities/erc1155_order_filled_event.ts index b9a3ec3b..33e8c28f 100644 --- a/src/entities/erc1155_order_filled_event.ts +++ b/src/entities/erc1155_order_filled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'erc1155_order_filled_events' }) export class Erc1155OrderFilledEvent extends Event { @Column({ name: 'is_sell', type: 'boolean' }) diff --git a/src/entities/erc1155_order_presigned_event.ts b/src/entities/erc1155_order_presigned_event.ts index fb048830..73b5ee0c 100644 --- a/src/entities/erc1155_order_presigned_event.ts +++ b/src/entities/erc1155_order_presigned_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'erc1155_order_presigned_events' }) export class Erc1155OrderPresignedEvent extends Event { @Column({ name: 'is_sell', type: 'boolean' }) diff --git a/src/entities/erc20_bridge_transfer_event.ts b/src/entities/erc20_bridge_transfer_event.ts index b05ff5b5..7392efb7 100644 --- a/src/entities/erc20_bridge_transfer_event.ts +++ b/src/entities/erc20_bridge_transfer_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'erc20_bridge_transfer_events' }) diff --git a/src/entities/erc721_order_cancelled_event.ts b/src/entities/erc721_order_cancelled_event.ts index d916c6c3..26312456 100644 --- a/src/entities/erc721_order_cancelled_event.ts +++ b/src/entities/erc721_order_cancelled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'erc721_order_cancelled_events' }) export class Erc721OrderCancelledEvent extends Event { @Column({ name: 'maker', type: 'varchar' }) diff --git a/src/entities/erc721_order_filled_event.ts b/src/entities/erc721_order_filled_event.ts index cd07815a..68902e67 100644 --- a/src/entities/erc721_order_filled_event.ts +++ b/src/entities/erc721_order_filled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'erc721_order_filled_events' }) export class Erc721OrderFilledEvent extends Event { @Column({ name: 'is_sell', type: 'boolean' }) diff --git a/src/entities/erc721_order_presigned_event.ts b/src/entities/erc721_order_presigned_event.ts index 5e85880a..b3e53f9d 100644 --- a/src/entities/erc721_order_presigned_event.ts +++ b/src/entities/erc721_order_presigned_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'erc721_order_presigned_events' }) export class Erc721OrderPresignedEvent extends Event { @Column({ name: 'is_sell', type: 'boolean' }) diff --git a/src/entities/event.ts b/src/entities/event.ts index 9d2ab45d..92397208 100644 --- a/src/entities/event.ts +++ b/src/entities/event.ts @@ -1,6 +1,5 @@ -import { Column, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers'; +import { Column, PrimaryColumn } from 'typeorm'; // Abstract class with common event fields export abstract class Event { diff --git a/src/entities/event_backfill.ts b/src/entities/event_backfill.ts index 19beb80c..773c2826 100644 --- a/src/entities/event_backfill.ts +++ b/src/entities/event_backfill.ts @@ -1,6 +1,5 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; @Entity({ name: 'events_backfill' }) export class EventBackfill { diff --git a/src/entities/expired_rfq_order_event.ts b/src/entities/expired_rfq_order_event.ts index 4efcb671..cc0d3482 100644 --- a/src/entities/expired_rfq_order_event.ts +++ b/src/entities/expired_rfq_order_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; -import { BigNumber } from '@0x/utils'; - -import { Event } from './event'; import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; +import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // These events come directly from the Exchange contract and are fired for meta transactions @Entity({ name: 'expired_rfq_order_events' }) diff --git a/src/entities/fill_event.ts b/src/entities/fill_event.ts index 058a1da9..2fb99bc4 100644 --- a/src/entities/fill_event.ts +++ b/src/entities/fill_event.ts @@ -1,10 +1,9 @@ import { bigNumberTransformer } from '../transformers/big_number'; +import { ProxyType } from '../utils/proxyType'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { ProxyType } from '../utils/proxyType'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'fill_events' }) diff --git a/src/entities/last_block_processed.ts b/src/entities/last_block_processed.ts index e98ba75a..60833ba9 100644 --- a/src/entities/last_block_processed.ts +++ b/src/entities/last_block_processed.ts @@ -1,6 +1,5 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; // Table of the block number for which an event was last updated @Entity({ name: 'last_block_processed' }) diff --git a/src/entities/log_transfer_event.ts b/src/entities/log_transfer_event.ts index f11398de..6a8910c1 100644 --- a/src/entities/log_transfer_event.ts +++ b/src/entities/log_transfer_event.ts @@ -1,9 +1,8 @@ import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'log_transfer_events' }) diff --git a/src/entities/maker_staking_pool_set_event.ts b/src/entities/maker_staking_pool_set_event.ts index e900b53b..0fe5861e 100644 --- a/src/entities/maker_staking_pool_set_event.ts +++ b/src/entities/maker_staking_pool_set_event.ts @@ -1,6 +1,5 @@ -import { Column, Entity } from 'typeorm'; - import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinStake when a pool starts earning rewards in an epoch. @Entity({ name: 'maker_staking_pool_set_events' }) diff --git a/src/entities/meta_transaction_executed_event.ts b/src/entities/meta_transaction_executed_event.ts index 3a59d76d..9424be17 100644 --- a/src/entities/meta_transaction_executed_event.ts +++ b/src/entities/meta_transaction_executed_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'meta_transaction_executed_events' }) export class MetaTransactionExecutedEvent extends Event { // The meta-transaction hash diff --git a/src/entities/move_stake_event.ts b/src/entities/move_stake_event.ts index 8849580e..b68785ea 100644 --- a/src/entities/move_stake_event.ts +++ b/src/entities/move_stake_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers/big_number'; - // Event emitted by MixinStake when the stake changes states. @Entity({ name: 'move_stake_events' }) export class MoveStakeEvent extends Event { diff --git a/src/entities/native_fill.ts b/src/entities/native_fill.ts index 8a844c12..179958c2 100644 --- a/src/entities/native_fill.ts +++ b/src/entities/native_fill.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // Emitted whenever a `LimitOrder` or `RfqOrder` is filled. @Entity({ name: 'native_fills' }) export class NativeFill extends Event { diff --git a/src/entities/onchain_governance_call_scheduled_event.ts b/src/entities/onchain_governance_call_scheduled_event.ts index b58e0d0b..73688369 100644 --- a/src/entities/onchain_governance_call_scheduled_event.ts +++ b/src/entities/onchain_governance_call_scheduled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; - @Entity({ name: 'onchain_governance_call_scheduled' }) export class OnchainGovernanceCallScheduledEvent extends Event { @Column({ name: 'id', type: 'varchar' }) diff --git a/src/entities/onchain_governance_proposal_created_event.ts b/src/entities/onchain_governance_proposal_created_event.ts index 94692086..d16febfa 100644 --- a/src/entities/onchain_governance_proposal_created_event.ts +++ b/src/entities/onchain_governance_proposal_created_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'onchain_governance_proposal_created' }) export class OnchainGovernanceProposalCreatedEvent extends Event { @Column({ name: 'proposal_id', type: 'bigint', transformer: bigNumberTransformer }) diff --git a/src/entities/operator_share_decreased_event.ts b/src/entities/operator_share_decreased_event.ts index 787073db..bff6ad26 100644 --- a/src/entities/operator_share_decreased_event.ts +++ b/src/entities/operator_share_decreased_event.ts @@ -1,7 +1,6 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // Event emitted when a staking pool's operator share is decreased. @Entity({ name: 'operator_share_decreased_events' }) diff --git a/src/entities/otc_order_filled_event.ts b/src/entities/otc_order_filled_event.ts index 6c41b028..9249568f 100644 --- a/src/entities/otc_order_filled_event.ts +++ b/src/entities/otc_order_filled_event.ts @@ -1,9 +1,8 @@ import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'otc_order_filled_events' }) diff --git a/src/entities/params_set_event.ts b/src/entities/params_set_event.ts index 375d6b8b..8ecfadc2 100644 --- a/src/entities/params_set_event.ts +++ b/src/entities/params_set_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinStake when a pool starts earning rewards in an epoch. @Entity({ name: 'params_set_events' }) diff --git a/src/entities/rewards_paid_event.ts b/src/entities/rewards_paid_event.ts index 27100db4..9c3bd673 100644 --- a/src/entities/rewards_paid_event.ts +++ b/src/entities/rewards_paid_event.ts @@ -1,8 +1,7 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinFinalizer when rewards are paid out to a pool. @Entity({ name: 'rewards_paid_events' }) diff --git a/src/entities/socket_bridge_event.ts b/src/entities/socket_bridge_event.ts index 2203bc2a..72861278 100644 --- a/src/entities/socket_bridge_event.ts +++ b/src/entities/socket_bridge_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - @Entity({ name: 'socket_bridge_events' }) export class SocketBridgeEvent extends Event { // The amount of the from token that was transfered diff --git a/src/entities/stake_event.ts b/src/entities/stake_event.ts index eecd0c2d..22a78463 100644 --- a/src/entities/stake_event.ts +++ b/src/entities/stake_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers/big_number'; - // Event emitted by MixinStake when ZRX is staked. @Entity({ name: 'stake_events' }) export class StakeEvent extends Event { diff --git a/src/entities/staking_pool_created_event.ts b/src/entities/staking_pool_created_event.ts index 74989518..3cb67d67 100644 --- a/src/entities/staking_pool_created_event.ts +++ b/src/entities/staking_pool_created_event.ts @@ -1,7 +1,6 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinStake when a new pool is created. @Entity({ name: 'staking_pool_created_events' }) diff --git a/src/entities/staking_pool_earned_rewards_in_epoch_event.ts b/src/entities/staking_pool_earned_rewards_in_epoch_event.ts index ff637635..f9841fc9 100644 --- a/src/entities/staking_pool_earned_rewards_in_epoch_event.ts +++ b/src/entities/staking_pool_earned_rewards_in_epoch_event.ts @@ -1,7 +1,6 @@ -import { Column, Entity } from 'typeorm'; - -import { Event } from './event'; import { numberToBigIntTransformer } from '../transformers/big_number'; +import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // Event emitted by MixinStake when a pool starts earning rewards in an epoch. @Entity({ name: 'staking_pool_earned_rewards_in_epoch_events' }) diff --git a/src/entities/staking_proxy_deployment.ts b/src/entities/staking_proxy_deployment.ts index 4bb14011..80e81b82 100644 --- a/src/entities/staking_proxy_deployment.ts +++ b/src/entities/staking_proxy_deployment.ts @@ -1,6 +1,5 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers/big_number'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; // Entity for when the staking proxy contract was deployed // Marks the beginning of Epoch 1 diff --git a/src/entities/token_metadata.ts b/src/entities/token_metadata.ts index a74deba9..acb020f4 100644 --- a/src/entities/token_metadata.ts +++ b/src/entities/token_metadata.ts @@ -1,8 +1,7 @@ +import { numberToBigIntTransformer } from '../transformers'; import { BigNumber } from '@0x/utils'; import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { numberToBigIntTransformer } from '../transformers'; - @Entity({ name: 'tokens_metadata' }) export class TokenMetadata { @Column({ name: 'observed_timestamp', type: 'bigint', transformer: numberToBigIntTransformer }) diff --git a/src/entities/token_registry.ts b/src/entities/token_registry.ts index 662a535c..e91609c2 100644 --- a/src/entities/token_registry.ts +++ b/src/entities/token_registry.ts @@ -1,8 +1,7 @@ +import { numberToBigIntTransformer } from '../transformers'; import { BigNumber } from '@0x/utils'; import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { numberToBigIntTransformer } from '../transformers'; - @Entity({ name: 'token_registry', schema: 'api' }) export class TokenRegistry { @PrimaryColumn({ name: 'address', type: 'varchar', readonly: true }) diff --git a/src/entities/transaction.ts b/src/entities/transaction.ts index ec74afe2..541309b5 100644 --- a/src/entities/transaction.ts +++ b/src/entities/transaction.ts @@ -1,8 +1,7 @@ +import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; import { BigNumber } from '@0x/utils'; import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; - // Transaction info for TX containing events @Entity({ name: 'transactions' }) export class Transaction { diff --git a/src/entities/transaction_execution_event.ts b/src/entities/transaction_execution_event.ts index bc763cb5..ee56c8e8 100644 --- a/src/entities/transaction_execution_event.ts +++ b/src/entities/transaction_execution_event.ts @@ -1,6 +1,5 @@ -import { Column, Entity } from 'typeorm'; - import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // These events come directly from the Exchange contract and are fired for meta transactions @Entity({ name: 'transaction_execution_events' }) diff --git a/src/entities/transaction_log.ts b/src/entities/transaction_log.ts index a8ad941a..1da9562d 100644 --- a/src/entities/transaction_log.ts +++ b/src/entities/transaction_log.ts @@ -1,6 +1,5 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; - import { numberToBigIntTransformer } from '../transformers'; +import { Column, Entity, PrimaryColumn } from 'typeorm'; // Transaction Receipt Logs for storage @Entity({ name: 'transaction_logs' }) diff --git a/src/entities/transaction_receipt.ts b/src/entities/transaction_receipt.ts index c6c7d622..73f99310 100644 --- a/src/entities/transaction_receipt.ts +++ b/src/entities/transaction_receipt.ts @@ -1,8 +1,7 @@ +import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; import { BigNumber } from '@0x/utils'; import { Column, Entity, PrimaryColumn } from 'typeorm'; -import { bigNumberTransformer, numberToBigIntTransformer } from '../transformers'; - // Transaction Receipt info for TX containing events @Entity({ name: 'transaction_receipts' }) export class TransactionReceipt { diff --git a/src/entities/transformed_erc20_event.ts b/src/entities/transformed_erc20_event.ts index cf1f5d7b..e00c3f5a 100644 --- a/src/entities/transformed_erc20_event.ts +++ b/src/entities/transformed_erc20_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // These events are fired when someone uses the exchange proxy to trade @Entity({ name: 'transformed_erc20_events' }) export class TransformedERC20Event extends Event { diff --git a/src/entities/uniswap_v2_pair_created_event.ts b/src/entities/uniswap_v2_pair_created_event.ts index 4b464c6b..9639927a 100644 --- a/src/entities/uniswap_v2_pair_created_event.ts +++ b/src/entities/uniswap_v2_pair_created_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'uniswap_v2_pair_created_events' }) diff --git a/src/entities/uniswap_v2_sync_event.ts b/src/entities/uniswap_v2_sync_event.ts index 5e8b82af..955fa820 100644 --- a/src/entities/uniswap_v2_sync_event.ts +++ b/src/entities/uniswap_v2_sync_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'uniswap_v2_sync_events' }) diff --git a/src/entities/uniswap_v3_pool_created_event.ts b/src/entities/uniswap_v3_pool_created_event.ts index df40c336..8197cc9f 100644 --- a/src/entities/uniswap_v3_pool_created_event.ts +++ b/src/entities/uniswap_v3_pool_created_event.ts @@ -1,6 +1,5 @@ -import { Column, Entity } from 'typeorm'; - import { Event } from './event'; +import { Column, Entity } from 'typeorm'; @Entity({ name: 'uniswap_v3_pool_created_events' }) export class UniswapV3PoolCreatedEvent extends Event { diff --git a/src/entities/uniswap_v3_swap_event.ts b/src/entities/uniswap_v3_swap_event.ts index c0b9e2eb..a155ac20 100644 --- a/src/entities/uniswap_v3_swap_event.ts +++ b/src/entities/uniswap_v3_swap_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // These events come directly from the Exchange contract and are fired whenever // someone fills an order. @Entity({ name: 'uniswap_v3_swap_events' }) diff --git a/src/entities/unstake_event.ts b/src/entities/unstake_event.ts index 7e0c9f92..e5e18bdb 100644 --- a/src/entities/unstake_event.ts +++ b/src/entities/unstake_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers/big_number'; - // Event emitted by MixinStake when ZRX is unstaked. @Entity({ name: 'unstake_events' }) export class UnstakeEvent extends Event { diff --git a/src/entities/unwrap_native_event.ts b/src/entities/unwrap_native_event.ts index 74969d0b..cefbee77 100644 --- a/src/entities/unwrap_native_event.ts +++ b/src/entities/unwrap_native_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers/big_number'; - @Entity({ name: 'unwrap_native_events' }) export class UnwrapNativeEvent extends Event { @Column({ name: 'src' }) diff --git a/src/entities/v4_cancel_event.ts b/src/entities/v4_cancel_event.ts index 4fe26076..f91e5fda 100644 --- a/src/entities/v4_cancel_event.ts +++ b/src/entities/v4_cancel_event.ts @@ -1,6 +1,5 @@ -import { Column, Entity } from 'typeorm'; - import { Event } from './event'; +import { Column, Entity } from 'typeorm'; // These events come directly from the Exchange contract and are fired for meta transactions @Entity({ name: 'v4_cancel_events' }) diff --git a/src/entities/v4_limit_order_filled_event.ts b/src/entities/v4_limit_order_filled_event.ts index b33e683b..f55c63c5 100644 --- a/src/entities/v4_limit_order_filled_event.ts +++ b/src/entities/v4_limit_order_filled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // Emitted whenever a `LimitOrder` is filled. @Entity({ name: 'v4_limit_order_filled_events' }) export class V4LimitOrderFilledEvent extends Event { diff --git a/src/entities/v4_rfq_order_filled_event.ts b/src/entities/v4_rfq_order_filled_event.ts index b9e8a5da..58e6c35f 100644 --- a/src/entities/v4_rfq_order_filled_event.ts +++ b/src/entities/v4_rfq_order_filled_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers'; - // Emitted whenever an `RfqOrder` is filled. @Entity({ name: 'v4_rfq_order_filled_events' }) export class V4RfqOrderFilledEvent extends Event { diff --git a/src/entities/wrap_native_event.ts b/src/entities/wrap_native_event.ts index 02d30942..c3eba729 100644 --- a/src/entities/wrap_native_event.ts +++ b/src/entities/wrap_native_event.ts @@ -1,9 +1,8 @@ +import { bigNumberTransformer } from '../transformers/big_number'; +import { Event } from './event'; import { BigNumber } from '@0x/utils'; import { Column, Entity } from 'typeorm'; -import { Event } from './event'; -import { bigNumberTransformer } from '../transformers/big_number'; - @Entity({ name: 'wrap_native_events' }) export class WrapNativeEvent extends Event { @Column({ name: 'dst' })