Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Ktl-XV committed Jan 17, 2024
1 parent 7044e58 commit 16441c0
Show file tree
Hide file tree
Showing 52 changed files with 88 additions and 137 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true
"bracketSpacing": true,
"importOrderParserPlugins": ["typescript", "decorators-legacy"]
}
3 changes: 1 addition & 2 deletions src/entities/block.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/entities/cancel_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
7 changes: 3 additions & 4 deletions src/entities/cancel_up_to_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
2 changes: 1 addition & 1 deletion src/entities/current_epoch_info.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/epoch_ended_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/epoch_finalized_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/erc1155_order_cancelled_event.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc1155_order_filled_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc1155_order_presigned_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc20_bridge_transfer_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc721_order_cancelled_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc721_order_filled_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/erc721_order_presigned_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/event.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/entities/event_backfill.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
7 changes: 3 additions & 4 deletions src/entities/expired_rfq_order_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/fill_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/last_block_processed.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/log_transfer_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/maker_staking_pool_set_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/meta_transaction_executed_event.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/entities/move_stake_event.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/entities/native_fill.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/entities/onchain_governance_call_scheduled_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/onchain_governance_proposal_created_event.ts
Original file line number Diff line number Diff line change
@@ -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 })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/operator_share_decreased_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/otc_order_filled_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/params_set_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/rewards_paid_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/socket_bridge_event.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/entities/stake_event.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions src/entities/staking_pool_created_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
5 changes: 2 additions & 3 deletions src/entities/staking_pool_earned_rewards_in_epoch_event.ts
Original file line number Diff line number Diff line change
@@ -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' })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/staking_proxy_deployment.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/entities/token_metadata.ts
Original file line number Diff line number Diff line change
@@ -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 })
Expand Down
3 changes: 1 addition & 2 deletions src/entities/token_registry.ts
Original file line number Diff line number Diff line change
@@ -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 })
Expand Down
Loading

0 comments on commit 16441c0

Please sign in to comment.