Upgrade dependency versions to remove vulnerabilities from dependabot (#343)

* Dependency patch updates

* Minor update @apollo/client 3.3.19 -> 3.7.10

* Minor update @nomiclabs/hardhat-ethers 2.0.2 -> 2.2.2

* Minor update @openzeppelin/contracts 4.3.2 -> 4.8.2

* Minor update @types/chai 4.2.19 -> 4.3.4

* Minor update decimal 10.3.1 -> 10.4.3

* Minor update @graphql-tools/utils 9.1.1 -> 9.2.1

* Minor update @graphql, graphql-ws, graphql-request

* Minor update yargs

* Minor update @types/node

* Minor update graph-ts

* Minor updates graphql-tools, multiaddr

* Update dependencies with minor updates

* Minor updates to eslint and related dependencies

* Update solidity compiler version for erc721-watcher

* Fix ESLint indent rule

---------

Co-authored-by: Dhruv Srivastava <dhruvdhs.ds@gmail.com>
This commit is contained in:
Nabarun Gogoi 2023-03-28 13:17:53 +05:30 committed by GitHub
parent ac5e030b13
commit 9e53b1a498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 2659 additions and 3018 deletions

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -8,12 +8,12 @@ import { Trace } from './Trace';
@Entity() @Entity()
export class Account { export class Account {
@PrimaryColumn('varchar', { length: 42 }) @PrimaryColumn('varchar', { length: 42 })
address!: string; address!: string;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
@ManyToMany(() => Trace, trace => trace.accounts) @ManyToMany(() => Trace, trace => trace.accounts)
@JoinTable() @JoinTable()
appearances: Trace[]; appearances: Trace[];
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class BlockProgress { export class BlockProgress {
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
numTx!: number; numTx!: number;
@Column('integer') @Column('integer')
numTracedTx!: number; numTracedTx!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
} }

View File

@ -11,17 +11,17 @@ import { Account } from './Account';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Trace { export class Trace {
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('text') @Column('text')
trace!: string; trace!: string;
@ManyToMany(() => Account, account => account.appearances, { eager: true, cascade: ['insert'] }) @ManyToMany(() => Account, account => account.appearances, { eager: true, cascade: ['insert'] })
accounts: Account[]; accounts: Account[];
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"error", "error",

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -16,6 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -10,20 +10,20 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Account { export class Account {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalClaimed!: bigint; totalClaimed!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalSlashed!: bigint; totalSlashed!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,59 +9,59 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Block { export class Block {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('boolean') @Column('boolean')
fromActiveProducer!: boolean; fromActiveProducer!: boolean;
@Column('varchar') @Column('varchar')
hash!: string; hash!: string;
@Column('varchar') @Column('varchar')
parentHash!: string; parentHash!: string;
@Column('varchar') @Column('varchar')
unclesHash!: string; unclesHash!: string;
@Column('varchar') @Column('varchar')
author!: string; author!: string;
@Column('varchar') @Column('varchar')
stateRoot!: string; stateRoot!: string;
@Column('varchar') @Column('varchar')
transactionsRoot!: string; transactionsRoot!: string;
@Column('varchar') @Column('varchar')
receiptsRoot!: string; receiptsRoot!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
number!: bigint; number!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
gasUsed!: bigint; gasUsed!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
gasLimit!: bigint; gasLimit!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
timestamp!: bigint; timestamp!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
difficulty!: bigint; difficulty!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalDifficulty!: bigint; totalDifficulty!: bigint;
@Column('numeric', { nullable: true, transformer: bigintTransformer }) @Column('numeric', { nullable: true, transformer: bigintTransformer })
size!: bigint; size!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -10,29 +10,29 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Claim { export class Claim {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
timestamp!: bigint; timestamp!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
index!: bigint; index!: bigint;
@Column('varchar') @Column('varchar')
account!: string; account!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalEarned!: bigint; totalEarned!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
claimed!: bigint; claimed!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar') @Column('varchar')
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -10,29 +10,29 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Distribution { export class Distribution {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar') @Column('varchar')
distributor!: string; distributor!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
timestamp!: bigint; timestamp!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
distributionNumber!: bigint; distributionNumber!: bigint;
@Column('varchar') @Column('varchar')
merkleRoot!: string; merkleRoot!: string;
@Column('varchar') @Column('varchar')
metadataURI!: string; metadataURI!: string;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Distributor { export class Distributor {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
currentDistribution!: string; currentDistribution!: string;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Epoch { export class Epoch {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('boolean') @Column('boolean')
finalized!: boolean; finalized!: boolean;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
epochNumber!: bigint; epochNumber!: bigint;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
startBlock!: string; startBlock!: string;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
endBlock!: string; endBlock!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
producerBlocks!: bigint; producerBlocks!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
allBlocks!: bigint; allBlocks!: bigint;
@Column('numeric', { default: 0, transformer: decimalTransformer }) @Column('numeric', { default: 0, transformer: decimalTransformer })
producerBlocksRatio!: Decimal; producerBlocksRatio!: Decimal;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -8,14 +8,14 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class FrothyEntity { export class FrothyEntity {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
name!: string; name!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
} }

View File

@ -10,36 +10,36 @@ import { bigintArrayTransformer, bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Network { export class Network {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
slot0!: string; slot0!: string;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
slot1!: string; slot1!: string;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
slot2!: string; slot2!: string;
@Column('varchar', { array: true }) @Column('varchar', { array: true })
stakers!: string[]; stakers!: string[];
@Column('numeric', { nullable: true, transformer: bigintTransformer }) @Column('numeric', { nullable: true, transformer: bigintTransformer })
numStakers!: bigint; numStakers!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalStaked!: bigint; totalStaked!: bigint;
// https://github.com/brianc/node-postgres/issues/1943#issuecomment-520500053 // https://github.com/brianc/node-postgres/issues/1943#issuecomment-520500053
@Column('varchar', { transformer: bigintArrayTransformer, array: true }) @Column('varchar', { transformer: bigintArrayTransformer, array: true })
stakedPercentiles!: bigint[]; stakedPercentiles!: bigint[];
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,29 +9,29 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Producer { export class Producer {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('boolean') @Column('boolean')
active!: boolean; active!: boolean;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
rewardCollector!: string; rewardCollector!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
rewards!: bigint; rewards!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
confirmedBlocks!: bigint; confirmedBlocks!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
pendingEpochBlocks!: bigint; pendingEpochBlocks!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,29 +11,29 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class ProducerEpoch { export class ProducerEpoch {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar') @Column('varchar')
address!: string; address!: string;
@Column('varchar') @Column('varchar')
epoch!: string; epoch!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
totalRewards!: bigint; totalRewards!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
blocksProduced!: bigint; blocksProduced!: bigint;
@Column('numeric', { default: 0, transformer: decimalTransformer }) @Column('numeric', { default: 0, transformer: decimalTransformer })
blocksProducedRatio!: Decimal; blocksProducedRatio!: Decimal;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class ProducerRewardCollectorChange { export class ProducerRewardCollectorChange {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
_blockNumber!: bigint; _blockNumber!: bigint;
@Column('varchar') @Column('varchar')
producer!: string; producer!: string;
@Column('varchar') @Column('varchar')
rewardCollector!: string; rewardCollector!: string;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class ProducerSet { export class ProducerSet {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { array: true }) @Column('varchar', { array: true })
producers!: string[]; producers!: string[];
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -14,26 +14,26 @@ enum ProducerSetChangeType {
@Index(['blockNumber']) @Index(['blockNumber'])
export class ProducerSetChange { export class ProducerSetChange {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
_blockNumber!: bigint; _blockNumber!: bigint;
@Column('varchar') @Column('varchar')
producer!: string; producer!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: ProducerSetChangeType enum: ProducerSetChangeType
}) })
changeType!: ProducerSetChangeType; changeType!: ProducerSetChangeType;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -8,26 +8,26 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class RewardSchedule { export class RewardSchedule {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { array: true }) @Column('varchar', { array: true })
rewardScheduleEntries!: string[]; rewardScheduleEntries!: string[];
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
lastEpoch!: string; lastEpoch!: string;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
pendingEpoch!: string; pendingEpoch!: string;
@Column('varchar', { nullable: true }) @Column('varchar', { nullable: true })
activeRewardScheduleEntry!: string; activeRewardScheduleEntry!: string;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class RewardScheduleEntry { export class RewardScheduleEntry {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
startTime!: bigint; startTime!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
epochDuration!: bigint; epochDuration!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
rewardsPerEpoch!: bigint; rewardsPerEpoch!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -10,23 +10,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Slash { export class Slash {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
timestamp!: bigint; timestamp!: bigint;
@Column('varchar') @Column('varchar')
account!: string; account!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
slashed!: bigint; slashed!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Slot { export class Slot {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar') @Column('varchar')
owner!: string; owner!: string;
@Column('varchar') @Column('varchar')
delegate!: string; delegate!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
winningBid!: bigint; winningBid!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
oldBid!: bigint; oldBid!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
startTime!: bigint; startTime!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
expirationTime!: bigint; expirationTime!: bigint;
@Column('numeric', { default: 0, transformer: decimalTransformer }) @Column('numeric', { default: 0, transformer: decimalTransformer })
taxRatePerDay!: Decimal; taxRatePerDay!: Decimal;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class SlotClaim { export class SlotClaim {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar') @Column('varchar')
slot!: string; slot!: string;
@Column('varchar') @Column('varchar')
owner!: string; owner!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
winningBid!: bigint; winningBid!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
oldBid!: bigint; oldBid!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
startTime!: bigint; startTime!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
expirationTime!: bigint; expirationTime!: bigint;
@Column('numeric', { default: 0, transformer: decimalTransformer }) @Column('numeric', { default: 0, transformer: decimalTransformer })
taxRatePerDay!: Decimal; taxRatePerDay!: Decimal;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,20 +9,20 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Staker { export class Staker {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
staked!: bigint; staked!: bigint;
@Column('numeric', { nullable: true, transformer: bigintTransformer }) @Column('numeric', { nullable: true, transformer: bigintTransformer })
rank!: bigint; rank!: bigint;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contractAddress', 'kind'], { unique: true }) @Index(['block', 'contractAddress', 'kind'], { unique: true })
export class State { export class State {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: StateKind enum: StateKind
}) })
kind!: StateKind; kind!: StateKind;
@Column('bytea') @Column('bytea')
data!: Buffer; data!: Buffer;
} }

View File

@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity() @Entity()
export class StateSyncStatus { export class StateSyncStatus {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('integer', { nullable: true }) @Column('integer', { nullable: true })
latestCheckpointBlockNumber!: number; latestCheckpointBlockNumber!: number;
} }

View File

@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
@Entity() @Entity()
export class SyncStatus implements SyncStatusInterface { export class SyncStatus implements SyncStatusInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
chainHeadBlockHash!: string; chainHeadBlockHash!: string;
@Column('integer') @Column('integer')
chainHeadBlockNumber!: number; chainHeadBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestIndexedBlockHash!: string; latestIndexedBlockHash!: string;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestCanonicalBlockHash!: string; latestCanonicalBlockHash!: string;
@Column('integer') @Column('integer')
latestCanonicalBlockNumber!: number; latestCanonicalBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
initialIndexedBlockHash!: string; initialIndexedBlockHash!: string;
@Column('integer') @Column('integer')
initialIndexedBlockNumber!: number; initialIndexedBlockNumber!: number;
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -9,26 +9,26 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'blockNumber', 'token', 'owner', 'spender'], { unique: true }) @Index(['blockHash', 'blockNumber', 'token', 'owner', 'spender'], { unique: true })
export class Allowance { export class Allowance {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
token!: string; token!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
owner!: string; owner!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
spender!: string; spender!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'blockNumber', 'token', 'owner'], { unique: true }) @Index(['blockHash', 'blockNumber', 'token', 'owner'], { unique: true })
export class Balance { export class Balance {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
token!: string; token!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
owner!: string; owner!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -12,38 +12,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar', { length: 8 }) @Column('varchar', { length: 8 })
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -12,30 +12,30 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
// Index of the log in the block. // Index of the log in the block.
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contractAddress', 'kind'], { unique: true }) @Index(['block', 'contractAddress', 'kind'], { unique: true })
export class State { export class State {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: StateKind enum: StateKind
}) })
kind!: StateKind; kind!: StateKind;
@Column('bytea') @Column('bytea')
data!: Buffer; data!: Buffer;
} }

View File

@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity() @Entity()
export class StateSyncStatus { export class StateSyncStatus {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('integer', { nullable: true }) @Column('integer', { nullable: true })
latestCheckpointBlockNumber!: number; latestCheckpointBlockNumber!: number;
} }

View File

@ -9,35 +9,35 @@ import { SyncStatusInterface } from '@cerc-io/util';
@Entity() @Entity()
export class SyncStatus implements SyncStatusInterface { export class SyncStatus implements SyncStatusInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
// Latest block hash and number from the chain itself. // Latest block hash and number from the chain itself.
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
chainHeadBlockHash!: string; chainHeadBlockHash!: string;
@Column('integer') @Column('integer')
chainHeadBlockNumber!: number; chainHeadBlockNumber!: number;
// Most recent block hash that's been indexed. // Most recent block hash that's been indexed.
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestIndexedBlockHash!: string; latestIndexedBlockHash!: string;
// Most recent block number that's been indexed. // Most recent block number that's been indexed.
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
// Most recent block hash and number that we can consider as part // Most recent block hash and number that we can consider as part
// of the canonical/finalized chain. Reorgs older than this block // of the canonical/finalized chain. Reorgs older than this block
// cannot be processed and processing will halt. // cannot be processed and processing will halt.
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestCanonicalBlockHash!: string; latestCanonicalBlockHash!: string;
@Column('integer') @Column('integer')
latestCanonicalBlockNumber!: number; latestCanonicalBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
initialIndexedBlockHash!: string; initialIndexedBlockHash!: string;
@Column('integer') @Column('integer')
initialIndexedBlockNumber!: number; initialIndexedBlockNumber!: number;
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -17,7 +17,7 @@ import './test/tasks/account';
* @type import('hardhat/config').HardhatUserConfig * @type import('hardhat/config').HardhatUserConfig
*/ */
export default { export default {
solidity: '0.8.0', solidity: '0.8.1',
networks: { networks: {
docker: { docker: {
url: process.env.ETH_RPC_URL url: process.env.ETH_RPC_URL

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'owner'], { unique: true }) @Index(['blockHash', 'contractAddress', 'owner'], { unique: true })
export class BalanceOf { export class BalanceOf {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
owner!: string; owner!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar') @Column('varchar')
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true }) @Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
export class GetApproved { export class GetApproved {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
tokenId!: bigint; tokenId!: bigint;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,26 +8,26 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'owner', 'operator'], { unique: true }) @Index(['blockHash', 'contractAddress', 'owner', 'operator'], { unique: true })
export class IsApprovedForAll { export class IsApprovedForAll {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
owner!: string; owner!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
operator!: string; operator!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class Name { export class Name {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true }) @Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
export class OwnerOf { export class OwnerOf {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
tokenId!: bigint; tokenId!: bigint;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contractAddress', 'kind'], { unique: true }) @Index(['block', 'contractAddress', 'kind'], { unique: true })
export class State { export class State {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: StateKind enum: StateKind
}) })
kind!: StateKind; kind!: StateKind;
@Column('bytea') @Column('bytea')
data!: Buffer; data!: Buffer;
} }

View File

@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity() @Entity()
export class StateSyncStatus { export class StateSyncStatus {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('integer', { nullable: true }) @Column('integer', { nullable: true })
latestCheckpointBlockNumber!: number; latestCheckpointBlockNumber!: number;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'interfaceId'], { unique: true }) @Index(['blockHash', 'contractAddress', 'interfaceId'], { unique: true })
export class SupportsInterface { export class SupportsInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
interfaceId!: string; interfaceId!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class Symbol { export class Symbol {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
@Entity() @Entity()
export class SyncStatus implements SyncStatusInterface { export class SyncStatus implements SyncStatusInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
chainHeadBlockHash!: string; chainHeadBlockHash!: string;
@Column('integer') @Column('integer')
chainHeadBlockNumber!: number; chainHeadBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestIndexedBlockHash!: string; latestIndexedBlockHash!: string;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestCanonicalBlockHash!: string; latestCanonicalBlockHash!: string;
@Column('integer') @Column('integer')
latestCanonicalBlockNumber!: number; latestCanonicalBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
initialIndexedBlockHash!: string; initialIndexedBlockHash!: string;
@Column('integer') @Column('integer')
initialIndexedBlockNumber!: number; initialIndexedBlockNumber!: number;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true }) @Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
export class TokenURI { export class TokenURI {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
tokenId!: bigint; tokenId!: bigint;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -7,17 +7,17 @@ import { Entity, PrimaryColumn, Column } from 'typeorm';
@Entity() @Entity()
export class TransferCount { export class TransferCount {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
count!: number; count!: number;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class _Balances { export class _Balances {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
key0!: string; key0!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class _Name { export class _Name {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,26 +8,26 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true })
export class _OperatorApprovals { export class _OperatorApprovals {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
key0!: string; key0!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
key1!: string; key1!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class _Owners { export class _Owners {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
key0!: bigint; key0!: bigint;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class _Symbol { export class _Symbol {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class _TokenApprovals { export class _TokenApprovals {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
key0!: bigint; key0!: bigint;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off" "@typescript-eslint/explicit-module-boundary-types": "off"
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -11,32 +11,32 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Author { export class Author {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
blogCount!: bigint; blogCount!: bigint;
@Column('varchar') @Column('varchar')
name!: string; name!: string;
@Column('integer') @Column('integer')
paramInt!: number; paramInt!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
paramBigInt!: bigint; paramBigInt!: bigint;
@Column('varchar') @Column('varchar')
paramBytes!: string; paramBytes!: string;
@Column('numeric', { default: 0, transformer: decimalTransformer }) @Column('numeric', { default: 0, transformer: decimalTransformer })
rating!: Decimal; rating!: Decimal;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -15,33 +15,33 @@ enum BlogType {
@Index(['blockNumber']) @Index(['blockNumber'])
export class Blog { export class Blog {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: BlogType, enum: BlogType,
default: BlogType.short default: BlogType.short
}) })
kind!: BlogType; kind!: BlogType;
@Column('boolean') @Column('boolean')
isActive!: boolean; isActive!: boolean;
@Column('numeric', { transformer: bigintArrayTransformer, array: true }) @Column('numeric', { transformer: bigintArrayTransformer, array: true })
reviews!: bigint[]; reviews!: bigint[];
@Column('varchar') @Column('varchar')
author!: string; author!: string;
@Column('varchar', { array: true }) @Column('varchar', { array: true })
categories!: string[]; categories!: string[];
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -10,20 +10,20 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockNumber']) @Index(['blockNumber'])
export class Category { export class Category {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
count!: bigint; count!: bigint;
@Column('varchar') @Column('varchar')
name!: string; name!: string;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar') @Column('varchar')
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -8,14 +8,14 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Index(['blockNumber']) @Index(['blockNumber'])
export class FrothyEntity { export class FrothyEntity {
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
id!: string; id!: string;
@PrimaryColumn('varchar') @PrimaryColumn('varchar')
name!: string; name!: string;
@PrimaryColumn('varchar', { length: 66 }) @PrimaryColumn('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class GetMethod { export class GetMethod {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contractAddress', 'kind'], { unique: true }) @Index(['block', 'contractAddress', 'kind'], { unique: true })
export class State { export class State {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: StateKind enum: StateKind
}) })
kind!: StateKind; kind!: StateKind;
@Column('bytea') @Column('bytea')
data!: Buffer; data!: Buffer;
} }

View File

@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity() @Entity()
export class StateSyncStatus { export class StateSyncStatus {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('integer', { nullable: true }) @Column('integer', { nullable: true })
latestCheckpointBlockNumber!: number; latestCheckpointBlockNumber!: number;
} }

View File

@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
@Entity() @Entity()
export class SyncStatus implements SyncStatusInterface { export class SyncStatus implements SyncStatusInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
chainHeadBlockHash!: string; chainHeadBlockHash!: string;
@Column('integer') @Column('integer')
chainHeadBlockNumber!: number; chainHeadBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestIndexedBlockHash!: string; latestIndexedBlockHash!: string;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestCanonicalBlockHash!: string; latestCanonicalBlockHash!: string;
@Column('integer') @Column('integer')
latestCanonicalBlockNumber!: number; latestCanonicalBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
initialIndexedBlockHash!: string; initialIndexedBlockHash!: string;
@Column('integer') @Column('integer')
initialIndexedBlockNumber!: number; initialIndexedBlockNumber!: number;
} }

View File

@ -9,20 +9,20 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class _Test { export class _Test {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar') @Column('varchar')
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsMember { export class IsMember {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsPhisher { export class IsPhisher {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsRevoked { export class IsRevoked {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -9,26 +9,26 @@ import { bigintTransformer } from '@cerc-io/util';
@Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true })
export class MultiNonce { export class MultiNonce {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
key0!: string; key0!: string;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
key1!: bigint; key1!: bigint;
@Column('numeric', { transformer: bigintTransformer }) @Column('numeric', { transformer: bigintTransformer })
value!: bigint; value!: bigint;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contractAddress', 'kind'], { unique: true }) @Index(['block', 'contractAddress', 'kind'], { unique: true })
export class State { export class State {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column({ @Column({
type: 'enum', type: 'enum',
enum: StateKind enum: StateKind
}) })
kind!: StateKind; kind!: StateKind;
@Column('bytea') @Column('bytea')
data!: Buffer; data!: Buffer;
} }

View File

@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
@Entity() @Entity()
export class StateSyncStatus { export class StateSyncStatus {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('integer', { nullable: true }) @Column('integer', { nullable: true })
latestCheckpointBlockNumber!: number; latestCheckpointBlockNumber!: number;
} }

View File

@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
@Entity() @Entity()
export class SyncStatus implements SyncStatusInterface { export class SyncStatus implements SyncStatusInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
chainHeadBlockHash!: string; chainHeadBlockHash!: string;
@Column('integer') @Column('integer')
chainHeadBlockNumber!: number; chainHeadBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestIndexedBlockHash!: string; latestIndexedBlockHash!: string;
@Column('integer') @Column('integer')
latestIndexedBlockNumber!: number; latestIndexedBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
latestCanonicalBlockHash!: string; latestCanonicalBlockHash!: string;
@Column('integer') @Column('integer')
latestCanonicalBlockNumber!: number; latestCanonicalBlockNumber!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
initialIndexedBlockHash!: string; initialIndexedBlockHash!: string;
@Column('integer') @Column('integer')
initialIndexedBlockNumber!: number; initialIndexedBlockNumber!: number;
} }

View File

@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress'], { unique: true }) @Index(['blockHash', 'contractAddress'], { unique: true })
export class _Owner { export class _Owner {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
value!: string; value!: string;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -16,7 +16,7 @@
"@typescript-eslint" "@typescript-eslint"
], ],
"rules": { "rules": {
"indent": "off", "indent": ["error", 2, { "SwitchCase": 1 }],
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": [ "@typescript-eslint/explicit-module-boundary-types": [
"warn", "warn",

View File

@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
@Index(['parentHash']) @Index(['parentHash'])
export class BlockProgress implements BlockProgressInterface { export class BlockProgress implements BlockProgressInterface {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar') @Column('varchar')
cid!: string; cid!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
parentHash!: string; parentHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('integer') @Column('integer')
blockTimestamp!: number; blockTimestamp!: number;
@Column('integer') @Column('integer')
numEvents!: number; numEvents!: number;
@Column('integer') @Column('integer')
numProcessedEvents!: number; numProcessedEvents!: number;
@Column('integer') @Column('integer')
lastProcessedEventIndex!: number; lastProcessedEventIndex!: number;
@Column('boolean') @Column('boolean')
isComplete!: boolean; isComplete!: boolean;
@Column('boolean', { default: false }) @Column('boolean', { default: false })
isPruned!: boolean; isPruned!: boolean;
@CreateDateColumn() @CreateDateColumn()
createdAt!: Date; createdAt!: Date;
} }

View File

@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['address'], { unique: true }) @Index(['address'], { unique: true })
export class Contract { export class Contract {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
address!: string; address!: string;
@Column('varchar') @Column('varchar')
kind!: string; kind!: string;
@Column('boolean') @Column('boolean')
checkpoint!: boolean; checkpoint!: boolean;
@Column('integer') @Column('integer')
startingBlock!: number; startingBlock!: number;
} }

View File

@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
@Index(['block', 'contract', 'eventName']) @Index(['block', 'contract', 'eventName'])
export class Event { export class Event {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' }) @ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
block!: BlockProgress; block!: BlockProgress;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
txHash!: string; txHash!: string;
@Column('integer') @Column('integer')
index!: number; index!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contract!: string; contract!: string;
@Column('varchar', { length: 256 }) @Column('varchar', { length: 256 })
eventName!: string; eventName!: string;
@Column('text') @Column('text')
eventInfo!: string; eventInfo!: string;
@Column('text') @Column('text')
extraInfo!: string; extraInfo!: string;
@Column('text') @Column('text')
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsMember { export class IsMember {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsPhisher { export class IsPhisher {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

View File

@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true }) @Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
export class IsRevoked { export class IsRevoked {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id!: number; id!: number;
@Column('varchar', { length: 66 }) @Column('varchar', { length: 66 })
blockHash!: string; blockHash!: string;
@Column('integer') @Column('integer')
blockNumber!: number; blockNumber!: number;
@Column('varchar', { length: 42 }) @Column('varchar', { length: 42 })
contractAddress!: string; contractAddress!: string;
@Column('varchar') @Column('varchar')
key0!: string; key0!: string;
@Column('boolean') @Column('boolean')
value!: boolean; value!: boolean;
@Column('text', { nullable: true }) @Column('text', { nullable: true })
proof!: string; proof!: string;
} }

Some files were not shown because too many files have changed in this diff Show More