mirror of
https://github.com/cerc-io/watcher-ts
synced 2025-01-06 19:38:05 +00:00
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:
parent
ac5e030b13
commit
9e53b1a498
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -8,12 +8,12 @@ import { Trace } from './Trace';
|
||||
@Entity()
|
||||
export class Account {
|
||||
@PrimaryColumn('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
|
||||
@ManyToMany(() => Trace, trace => trace.accounts)
|
||||
@JoinTable()
|
||||
appearances: Trace[];
|
||||
appearances: Trace[];
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class BlockProgress {
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
numTx!: number;
|
||||
numTx!: number;
|
||||
|
||||
@Column('integer')
|
||||
numTracedTx!: number;
|
||||
numTracedTx!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
}
|
||||
|
@ -11,17 +11,17 @@ import { Account } from './Account';
|
||||
@Index(['blockNumber'])
|
||||
export class Trace {
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('text')
|
||||
trace!: string;
|
||||
trace!: string;
|
||||
|
||||
@ManyToMany(() => Account, account => account.appearances, { eager: true, cascade: ['insert'] })
|
||||
accounts: Account[];
|
||||
accounts: Account[];
|
||||
}
|
||||
|
2
packages/cache/.eslintrc.json
vendored
2
packages/cache/.eslintrc.json
vendored
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"error",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -16,6 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -10,20 +10,20 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Account {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalClaimed!: bigint;
|
||||
totalClaimed!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalSlashed!: bigint;
|
||||
totalSlashed!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,59 +9,59 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Block {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('boolean')
|
||||
fromActiveProducer!: boolean;
|
||||
fromActiveProducer!: boolean;
|
||||
|
||||
@Column('varchar')
|
||||
hash!: string;
|
||||
hash!: string;
|
||||
|
||||
@Column('varchar')
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('varchar')
|
||||
unclesHash!: string;
|
||||
unclesHash!: string;
|
||||
|
||||
@Column('varchar')
|
||||
author!: string;
|
||||
author!: string;
|
||||
|
||||
@Column('varchar')
|
||||
stateRoot!: string;
|
||||
stateRoot!: string;
|
||||
|
||||
@Column('varchar')
|
||||
transactionsRoot!: string;
|
||||
transactionsRoot!: string;
|
||||
|
||||
@Column('varchar')
|
||||
receiptsRoot!: string;
|
||||
receiptsRoot!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
number!: bigint;
|
||||
number!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
gasUsed!: bigint;
|
||||
gasUsed!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
gasLimit!: bigint;
|
||||
gasLimit!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
timestamp!: bigint;
|
||||
timestamp!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
difficulty!: bigint;
|
||||
difficulty!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalDifficulty!: bigint;
|
||||
totalDifficulty!: bigint;
|
||||
|
||||
@Column('numeric', { nullable: true, transformer: bigintTransformer })
|
||||
size!: bigint;
|
||||
size!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Claim {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
timestamp!: bigint;
|
||||
timestamp!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
index!: bigint;
|
||||
index!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
account!: string;
|
||||
account!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalEarned!: bigint;
|
||||
totalEarned!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
claimed!: bigint;
|
||||
claimed!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Distribution {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar')
|
||||
distributor!: string;
|
||||
distributor!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
timestamp!: bigint;
|
||||
timestamp!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
distributionNumber!: bigint;
|
||||
distributionNumber!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
merkleRoot!: string;
|
||||
merkleRoot!: string;
|
||||
|
||||
@Column('varchar')
|
||||
metadataURI!: string;
|
||||
metadataURI!: string;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class Distributor {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
currentDistribution!: string;
|
||||
currentDistribution!: string;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Epoch {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('boolean')
|
||||
finalized!: boolean;
|
||||
finalized!: boolean;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
epochNumber!: bigint;
|
||||
epochNumber!: bigint;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
startBlock!: string;
|
||||
startBlock!: string;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
endBlock!: string;
|
||||
endBlock!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
producerBlocks!: bigint;
|
||||
producerBlocks!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
allBlocks!: bigint;
|
||||
allBlocks!: bigint;
|
||||
|
||||
@Column('numeric', { default: 0, transformer: decimalTransformer })
|
||||
producerBlocksRatio!: Decimal;
|
||||
producerBlocksRatio!: Decimal;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class FrothyEntity {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar')
|
||||
name!: string;
|
||||
name!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
}
|
||||
|
@ -10,36 +10,36 @@ import { bigintArrayTransformer, bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Network {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
slot0!: string;
|
||||
slot0!: string;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
slot1!: string;
|
||||
slot1!: string;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
slot2!: string;
|
||||
slot2!: string;
|
||||
|
||||
@Column('varchar', { array: true })
|
||||
stakers!: string[];
|
||||
stakers!: string[];
|
||||
|
||||
@Column('numeric', { nullable: true, transformer: bigintTransformer })
|
||||
numStakers!: bigint;
|
||||
numStakers!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalStaked!: bigint;
|
||||
totalStaked!: bigint;
|
||||
|
||||
// https://github.com/brianc/node-postgres/issues/1943#issuecomment-520500053
|
||||
@Column('varchar', { transformer: bigintArrayTransformer, array: true })
|
||||
stakedPercentiles!: bigint[];
|
||||
stakedPercentiles!: bigint[];
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,29 +9,29 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Producer {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('boolean')
|
||||
active!: boolean;
|
||||
active!: boolean;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
rewardCollector!: string;
|
||||
rewardCollector!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
rewards!: bigint;
|
||||
rewards!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
confirmedBlocks!: bigint;
|
||||
confirmedBlocks!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
pendingEpochBlocks!: bigint;
|
||||
pendingEpochBlocks!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,29 +11,29 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class ProducerEpoch {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar')
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
epoch!: string;
|
||||
epoch!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
totalRewards!: bigint;
|
||||
totalRewards!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
blocksProduced!: bigint;
|
||||
blocksProduced!: bigint;
|
||||
|
||||
@Column('numeric', { default: 0, transformer: decimalTransformer })
|
||||
blocksProducedRatio!: Decimal;
|
||||
blocksProducedRatio!: Decimal;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class ProducerRewardCollectorChange {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
_blockNumber!: bigint;
|
||||
_blockNumber!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
producer!: string;
|
||||
producer!: string;
|
||||
|
||||
@Column('varchar')
|
||||
rewardCollector!: string;
|
||||
rewardCollector!: string;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class ProducerSet {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { array: true })
|
||||
producers!: string[];
|
||||
producers!: string[];
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -14,26 +14,26 @@ enum ProducerSetChangeType {
|
||||
@Index(['blockNumber'])
|
||||
export class ProducerSetChange {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
_blockNumber!: bigint;
|
||||
_blockNumber!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
producer!: string;
|
||||
producer!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: ProducerSetChangeType
|
||||
})
|
||||
changeType!: ProducerSetChangeType;
|
||||
changeType!: ProducerSetChangeType;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -8,26 +8,26 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class RewardSchedule {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { array: true })
|
||||
rewardScheduleEntries!: string[];
|
||||
rewardScheduleEntries!: string[];
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
lastEpoch!: string;
|
||||
lastEpoch!: string;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
pendingEpoch!: string;
|
||||
pendingEpoch!: string;
|
||||
|
||||
@Column('varchar', { nullable: true })
|
||||
activeRewardScheduleEntry!: string;
|
||||
activeRewardScheduleEntry!: string;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class RewardScheduleEntry {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
startTime!: bigint;
|
||||
startTime!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
epochDuration!: bigint;
|
||||
epochDuration!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
rewardsPerEpoch!: bigint;
|
||||
rewardsPerEpoch!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -10,23 +10,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Slash {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
timestamp!: bigint;
|
||||
timestamp!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
account!: string;
|
||||
account!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
slashed!: bigint;
|
||||
slashed!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Slot {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar')
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('varchar')
|
||||
delegate!: string;
|
||||
delegate!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
winningBid!: bigint;
|
||||
winningBid!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
oldBid!: bigint;
|
||||
oldBid!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
startTime!: bigint;
|
||||
startTime!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
expirationTime!: bigint;
|
||||
expirationTime!: bigint;
|
||||
|
||||
@Column('numeric', { default: 0, transformer: decimalTransformer })
|
||||
taxRatePerDay!: Decimal;
|
||||
taxRatePerDay!: Decimal;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,35 +11,35 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class SlotClaim {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar')
|
||||
slot!: string;
|
||||
slot!: string;
|
||||
|
||||
@Column('varchar')
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
winningBid!: bigint;
|
||||
winningBid!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
oldBid!: bigint;
|
||||
oldBid!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
startTime!: bigint;
|
||||
startTime!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
expirationTime!: bigint;
|
||||
expirationTime!: bigint;
|
||||
|
||||
@Column('numeric', { default: 0, transformer: decimalTransformer })
|
||||
taxRatePerDay!: Decimal;
|
||||
taxRatePerDay!: Decimal;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,20 +9,20 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Staker {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
staked!: bigint;
|
||||
staked!: bigint;
|
||||
|
||||
@Column('numeric', { nullable: true, transformer: bigintTransformer })
|
||||
rank!: bigint;
|
||||
rank!: bigint;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contractAddress', 'kind'], { unique: true })
|
||||
export class State {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StateKind
|
||||
})
|
||||
kind!: StateKind;
|
||||
kind!: StateKind;
|
||||
|
||||
@Column('bytea')
|
||||
data!: Buffer;
|
||||
data!: Buffer;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class StateSyncStatus {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
latestCheckpointBlockNumber!: number;
|
||||
latestCheckpointBlockNumber!: number;
|
||||
}
|
||||
|
@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
|
||||
@Entity()
|
||||
export class SyncStatus implements SyncStatusInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
chainHeadBlockHash!: string;
|
||||
chainHeadBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
chainHeadBlockNumber!: number;
|
||||
chainHeadBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestIndexedBlockHash!: string;
|
||||
latestIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestCanonicalBlockHash!: string;
|
||||
latestCanonicalBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestCanonicalBlockNumber!: number;
|
||||
latestCanonicalBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
initialIndexedBlockHash!: string;
|
||||
initialIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
initialIndexedBlockNumber!: number;
|
||||
initialIndexedBlockNumber!: number;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -9,26 +9,26 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'blockNumber', 'token', 'owner', 'spender'], { unique: true })
|
||||
export class Allowance {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
token!: string;
|
||||
token!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
spender!: string;
|
||||
spender!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'blockNumber', 'token', 'owner'], { unique: true })
|
||||
export class Balance {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
token!: string;
|
||||
token!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -12,38 +12,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar', { length: 8 })
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -12,30 +12,30 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
// Index of the log in the block.
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contractAddress', 'kind'], { unique: true })
|
||||
export class State {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StateKind
|
||||
})
|
||||
kind!: StateKind;
|
||||
kind!: StateKind;
|
||||
|
||||
@Column('bytea')
|
||||
data!: Buffer;
|
||||
data!: Buffer;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class StateSyncStatus {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
latestCheckpointBlockNumber!: number;
|
||||
latestCheckpointBlockNumber!: number;
|
||||
}
|
||||
|
@ -9,35 +9,35 @@ import { SyncStatusInterface } from '@cerc-io/util';
|
||||
@Entity()
|
||||
export class SyncStatus implements SyncStatusInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
// Latest block hash and number from the chain itself.
|
||||
@Column('varchar', { length: 66 })
|
||||
chainHeadBlockHash!: string;
|
||||
chainHeadBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
chainHeadBlockNumber!: number;
|
||||
chainHeadBlockNumber!: number;
|
||||
|
||||
// Most recent block hash that's been indexed.
|
||||
@Column('varchar', { length: 66 })
|
||||
latestIndexedBlockHash!: string;
|
||||
latestIndexedBlockHash!: string;
|
||||
|
||||
// Most recent block number that's been indexed.
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
// Most recent block hash and number that we can consider as part
|
||||
// of the canonical/finalized chain. Reorgs older than this block
|
||||
// cannot be processed and processing will halt.
|
||||
@Column('varchar', { length: 66 })
|
||||
latestCanonicalBlockHash!: string;
|
||||
latestCanonicalBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestCanonicalBlockNumber!: number;
|
||||
latestCanonicalBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
initialIndexedBlockHash!: string;
|
||||
initialIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
initialIndexedBlockNumber!: number;
|
||||
initialIndexedBlockNumber!: number;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -17,7 +17,7 @@ import './test/tasks/account';
|
||||
* @type import('hardhat/config').HardhatUserConfig
|
||||
*/
|
||||
export default {
|
||||
solidity: '0.8.0',
|
||||
solidity: '0.8.1',
|
||||
networks: {
|
||||
docker: {
|
||||
url: process.env.ETH_RPC_URL
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'owner'], { unique: true })
|
||||
export class BalanceOf {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
|
||||
export class GetApproved {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
tokenId!: bigint;
|
||||
tokenId!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,26 +8,26 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'owner', 'operator'], { unique: true })
|
||||
export class IsApprovedForAll {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
owner!: string;
|
||||
owner!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
operator!: string;
|
||||
operator!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class Name {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
|
||||
export class OwnerOf {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
tokenId!: bigint;
|
||||
tokenId!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contractAddress', 'kind'], { unique: true })
|
||||
export class State {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StateKind
|
||||
})
|
||||
kind!: StateKind;
|
||||
kind!: StateKind;
|
||||
|
||||
@Column('bytea')
|
||||
data!: Buffer;
|
||||
data!: Buffer;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class StateSyncStatus {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
latestCheckpointBlockNumber!: number;
|
||||
latestCheckpointBlockNumber!: number;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'interfaceId'], { unique: true })
|
||||
export class SupportsInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
interfaceId!: string;
|
||||
interfaceId!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class Symbol {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
|
||||
@Entity()
|
||||
export class SyncStatus implements SyncStatusInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
chainHeadBlockHash!: string;
|
||||
chainHeadBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
chainHeadBlockNumber!: number;
|
||||
chainHeadBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestIndexedBlockHash!: string;
|
||||
latestIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestCanonicalBlockHash!: string;
|
||||
latestCanonicalBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestCanonicalBlockNumber!: number;
|
||||
latestCanonicalBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
initialIndexedBlockHash!: string;
|
||||
initialIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
initialIndexedBlockNumber!: number;
|
||||
initialIndexedBlockNumber!: number;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'tokenId'], { unique: true })
|
||||
export class TokenURI {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
tokenId!: bigint;
|
||||
tokenId!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -7,17 +7,17 @@ import { Entity, PrimaryColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class TransferCount {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
count!: number;
|
||||
count!: number;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class _Balances {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class _Name {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,26 +8,26 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true })
|
||||
export class _OperatorApprovals {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
key1!: string;
|
||||
key1!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class _Owners {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
key0!: bigint;
|
||||
key0!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class _Symbol {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class _TokenApprovals {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
key0!: bigint;
|
||||
key0!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off"
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -11,32 +11,32 @@ import { bigintTransformer, decimalTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Author {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
blogCount!: bigint;
|
||||
blogCount!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
name!: string;
|
||||
name!: string;
|
||||
|
||||
@Column('integer')
|
||||
paramInt!: number;
|
||||
paramInt!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
paramBigInt!: bigint;
|
||||
paramBigInt!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
paramBytes!: string;
|
||||
paramBytes!: string;
|
||||
|
||||
@Column('numeric', { default: 0, transformer: decimalTransformer })
|
||||
rating!: Decimal;
|
||||
rating!: Decimal;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -15,33 +15,33 @@ enum BlogType {
|
||||
@Index(['blockNumber'])
|
||||
export class Blog {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: BlogType,
|
||||
default: BlogType.short
|
||||
})
|
||||
kind!: BlogType;
|
||||
kind!: BlogType;
|
||||
|
||||
@Column('boolean')
|
||||
isActive!: boolean;
|
||||
isActive!: boolean;
|
||||
|
||||
@Column('numeric', { transformer: bigintArrayTransformer, array: true })
|
||||
reviews!: bigint[];
|
||||
reviews!: bigint[];
|
||||
|
||||
@Column('varchar')
|
||||
author!: string;
|
||||
author!: string;
|
||||
|
||||
@Column('varchar', { array: true })
|
||||
categories!: string[];
|
||||
categories!: string[];
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -10,20 +10,20 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockNumber'])
|
||||
export class Category {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
count!: bigint;
|
||||
count!: bigint;
|
||||
|
||||
@Column('varchar')
|
||||
name!: string;
|
||||
name!: string;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockNumber'])
|
||||
export class FrothyEntity {
|
||||
@PrimaryColumn('varchar')
|
||||
id!: string;
|
||||
id!: string;
|
||||
|
||||
@PrimaryColumn('varchar')
|
||||
name!: string;
|
||||
name!: string;
|
||||
|
||||
@PrimaryColumn('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class GetMethod {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contractAddress', 'kind'], { unique: true })
|
||||
export class State {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StateKind
|
||||
})
|
||||
kind!: StateKind;
|
||||
kind!: StateKind;
|
||||
|
||||
@Column('bytea')
|
||||
data!: Buffer;
|
||||
data!: Buffer;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class StateSyncStatus {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
latestCheckpointBlockNumber!: number;
|
||||
latestCheckpointBlockNumber!: number;
|
||||
}
|
||||
|
@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
|
||||
@Entity()
|
||||
export class SyncStatus implements SyncStatusInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
chainHeadBlockHash!: string;
|
||||
chainHeadBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
chainHeadBlockNumber!: number;
|
||||
chainHeadBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestIndexedBlockHash!: string;
|
||||
latestIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestCanonicalBlockHash!: string;
|
||||
latestCanonicalBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestCanonicalBlockNumber!: number;
|
||||
latestCanonicalBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
initialIndexedBlockHash!: string;
|
||||
initialIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
initialIndexedBlockNumber!: number;
|
||||
initialIndexedBlockNumber!: number;
|
||||
}
|
||||
|
@ -9,20 +9,20 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class _Test {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsMember {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsPhisher {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsRevoked {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -9,26 +9,26 @@ import { bigintTransformer } from '@cerc-io/util';
|
||||
@Index(['blockHash', 'contractAddress', 'key0', 'key1'], { unique: true })
|
||||
export class MultiNonce {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
key1!: bigint;
|
||||
key1!: bigint;
|
||||
|
||||
@Column('numeric', { transformer: bigintTransformer })
|
||||
value!: bigint;
|
||||
value!: bigint;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -14,23 +14,23 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contractAddress', 'kind'], { unique: true })
|
||||
export class State {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: StateKind
|
||||
})
|
||||
kind!: StateKind;
|
||||
kind!: StateKind;
|
||||
|
||||
@Column('bytea')
|
||||
data!: Buffer;
|
||||
data!: Buffer;
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
||||
@Entity()
|
||||
export class StateSyncStatus {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
latestCheckpointBlockNumber!: number;
|
||||
latestCheckpointBlockNumber!: number;
|
||||
}
|
||||
|
@ -8,29 +8,29 @@ import { SyncStatusInterface } from '@cerc-io/util';
|
||||
@Entity()
|
||||
export class SyncStatus implements SyncStatusInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
chainHeadBlockHash!: string;
|
||||
chainHeadBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
chainHeadBlockNumber!: number;
|
||||
chainHeadBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestIndexedBlockHash!: string;
|
||||
latestIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestIndexedBlockNumber!: number;
|
||||
latestIndexedBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
latestCanonicalBlockHash!: string;
|
||||
latestCanonicalBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
latestCanonicalBlockNumber!: number;
|
||||
latestCanonicalBlockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
initialIndexedBlockHash!: string;
|
||||
initialIndexedBlockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
initialIndexedBlockNumber!: number;
|
||||
initialIndexedBlockNumber!: number;
|
||||
}
|
||||
|
@ -8,20 +8,20 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress'], { unique: true })
|
||||
export class _Owner {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
value!: string;
|
||||
value!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": [
|
||||
"warn",
|
||||
|
@ -11,38 +11,38 @@ import { BlockProgressInterface } from '@cerc-io/util';
|
||||
@Index(['parentHash'])
|
||||
export class BlockProgress implements BlockProgressInterface {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar')
|
||||
cid!: string;
|
||||
cid!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
parentHash!: string;
|
||||
parentHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('integer')
|
||||
blockTimestamp!: number;
|
||||
blockTimestamp!: number;
|
||||
|
||||
@Column('integer')
|
||||
numEvents!: number;
|
||||
numEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
numProcessedEvents!: number;
|
||||
numProcessedEvents!: number;
|
||||
|
||||
@Column('integer')
|
||||
lastProcessedEventIndex!: number;
|
||||
lastProcessedEventIndex!: number;
|
||||
|
||||
@Column('boolean')
|
||||
isComplete!: boolean;
|
||||
isComplete!: boolean;
|
||||
|
||||
@Column('boolean', { default: false })
|
||||
isPruned!: boolean;
|
||||
isPruned!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
createdAt!: Date;
|
||||
}
|
||||
|
@ -8,17 +8,17 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['address'], { unique: true })
|
||||
export class Contract {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
address!: string;
|
||||
address!: string;
|
||||
|
||||
@Column('varchar')
|
||||
kind!: string;
|
||||
kind!: string;
|
||||
|
||||
@Column('boolean')
|
||||
checkpoint!: boolean;
|
||||
checkpoint!: boolean;
|
||||
|
||||
@Column('integer')
|
||||
startingBlock!: number;
|
||||
startingBlock!: number;
|
||||
}
|
||||
|
@ -10,29 +10,29 @@ import { BlockProgress } from './BlockProgress';
|
||||
@Index(['block', 'contract', 'eventName'])
|
||||
export class Event {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@ManyToOne(() => BlockProgress, { onDelete: 'CASCADE' })
|
||||
block!: BlockProgress;
|
||||
block!: BlockProgress;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
txHash!: string;
|
||||
txHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
index!: number;
|
||||
index!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contract!: string;
|
||||
contract!: string;
|
||||
|
||||
@Column('varchar', { length: 256 })
|
||||
eventName!: string;
|
||||
eventName!: string;
|
||||
|
||||
@Column('text')
|
||||
eventInfo!: string;
|
||||
eventInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
extraInfo!: string;
|
||||
extraInfo!: string;
|
||||
|
||||
@Column('text')
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsMember {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsPhisher {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
@ -8,23 +8,23 @@ import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';
|
||||
@Index(['blockHash', 'contractAddress', 'key0'], { unique: true })
|
||||
export class IsRevoked {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
id!: number;
|
||||
|
||||
@Column('varchar', { length: 66 })
|
||||
blockHash!: string;
|
||||
blockHash!: string;
|
||||
|
||||
@Column('integer')
|
||||
blockNumber!: number;
|
||||
blockNumber!: number;
|
||||
|
||||
@Column('varchar', { length: 42 })
|
||||
contractAddress!: string;
|
||||
contractAddress!: string;
|
||||
|
||||
@Column('varchar')
|
||||
key0!: string;
|
||||
key0!: string;
|
||||
|
||||
@Column('boolean')
|
||||
value!: boolean;
|
||||
value!: boolean;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
proof!: string;
|
||||
proof!: string;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user