From 1cab98eaf8d76154a94df7e62fc5b220976b50ad Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 14 Oct 2024 12:54:34 +0000 Subject: [PATCH] Regenerate watcher to backfill event data (#20) Part of [Watcher ETH JSON-RPC wrapper](https://www.notion.so/Watcher-ETH-JSON-RPC-wrapper-ba817da117c643779538aee6e2ebae0f) Reviewed-on: https://git.vdb.to/cerc-io/ajna-watcher-ts/pulls/20 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- environments/local.toml | 10 +- package.json | 15 +-- src/cli/backfill-events-data.ts | 26 +++++ src/database.ts | 6 ++ src/entity/Event.ts | 15 +++ src/indexer.ts | 12 +++ src/schema.gql | 68 ++++++------ yarn.lock | 177 +++++++++++++++++++++++--------- 8 files changed, 239 insertions(+), 90 deletions(-) create mode 100644 src/cli/backfill-events-data.ts diff --git a/environments/local.toml b/environments/local.toml index 9365fbd..c031fce 100644 --- a/environments/local.toml +++ b/environments/local.toml @@ -23,7 +23,7 @@ # Flag to specify whether RPC endpoint supports block hash as block tag parameter rpcSupportsBlockHashParam = false - # Server GQL config + # GQL server config [server.gql] path = "/graphql" @@ -45,6 +45,14 @@ maxAge = 15 timeTravelMaxAge = 86400 # 1 day + # ETH RPC server config + [server.ethRPC] + enabled = true + path = "/rpc" + + # Max number of logs that can be returned in a single getLogs request (default: 10000) + getLogsResultLimit = 10000 + [metrics] host = "127.0.0.1" port = 9000 diff --git a/package.json b/package.json index 83ee273..f3f4c3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/ajna-watcher-ts", - "version": "0.1.16", + "version": "0.1.17", "description": "ajna-watcher-ts", "private": true, "main": "dist/index.js", @@ -25,7 +25,8 @@ "import-state": "DEBUG=vulcanize:* node --enable-source-maps dist/cli/import-state.js", "import-state:dev": "DEBUG=vulcanize:* ts-node src/cli/import-state.ts", "inspect-cid": "DEBUG=vulcanize:* ts-node src/cli/inspect-cid.ts", - "index-block": "DEBUG=vulcanize:* ts-node src/cli/index-block.ts" + "index-block": "DEBUG=vulcanize:* ts-node src/cli/index-block.ts", + "backfill-events-data": "DEBUG=vulcanize:* YARN_CHILD_PROCESS=true node --enable-source-maps dist/cli/backfill-events-data.js" }, "repository": { "type": "git", @@ -39,11 +40,11 @@ "homepage": "https://github.com/cerc-io/watcher-ts#readme", "dependencies": { "@apollo/client": "^3.3.19", - "@cerc-io/cli": "^0.2.103", - "@cerc-io/ipld-eth-client": "^0.2.103", - "@cerc-io/solidity-mapper": "^0.2.103", - "@cerc-io/util": "^0.2.103", - "@cerc-io/graph-node": "^0.2.103", + "@cerc-io/cli": "^0.2.108", + "@cerc-io/ipld-eth-client": "^0.2.108", + "@cerc-io/solidity-mapper": "^0.2.108", + "@cerc-io/util": "^0.2.108", + "@cerc-io/graph-node": "^0.2.108", "@ethersproject/providers": "^5.4.4", "debug": "^4.3.1", "decimal.js": "^10.3.1", diff --git a/src/cli/backfill-events-data.ts b/src/cli/backfill-events-data.ts new file mode 100644 index 0000000..1f3d996 --- /dev/null +++ b/src/cli/backfill-events-data.ts @@ -0,0 +1,26 @@ +// +// Copyright 2024 Vulcanize, Inc. +// + +import 'reflect-metadata'; +import debug from 'debug'; + +import { BackfillEventsDataCmd } from '@cerc-io/cli'; + +import { Database } from '../database'; +import { Event } from '../entity/Event'; + +const log = debug('vulcanize:backfill-events-data'); + +const main = async (): Promise => { + const backFillCmd = new BackfillEventsDataCmd(); + await backFillCmd.init(Database); + + await backFillCmd.exec(Event); +}; + +main().catch(err => { + log(err); +}).finally(() => { + process.exit(0); +}); diff --git a/src/database.ts b/src/database.ts index 9986c68..7614555 100644 --- a/src/database.ts +++ b/src/database.ts @@ -214,6 +214,12 @@ export class Database implements DatabaseInterface { return this._baseDatabase.getEventsInRange(repo, fromBlockNumber, toBlockNumber); } + async getEvents (options: FindManyOptions): Promise> { + const repo = this._conn.getRepository(Event); + + return this._baseDatabase.getEvents(repo, options); + } + async saveEventEntity (queryRunner: QueryRunner, entity: Event): Promise { const repo = queryRunner.manager.getRepository(Event); return this._baseDatabase.saveEventEntity(repo, entity); diff --git a/src/entity/Event.ts b/src/entity/Event.ts index 91f1e6d..7de5631 100644 --- a/src/entity/Event.ts +++ b/src/entity/Event.ts @@ -27,6 +27,21 @@ export class Event { @Column('varchar', { length: 256 }) eventName!: string; + @Column('varchar', { length: 66 }) + topic0!: string; + + @Column('varchar', { length: 66, nullable: true }) + topic1!: string | null; + + @Column('varchar', { length: 66, nullable: true }) + topic2!: string | null; + + @Column('varchar', { length: 66, nullable: true }) + topic3!: string | null; + + @Column('varchar') + data!: string; + @Column('text') eventInfo!: string; diff --git a/src/indexer.ts b/src/indexer.ts index 00c35cd..a51f39e 100644 --- a/src/indexer.ts +++ b/src/indexer.ts @@ -317,6 +317,10 @@ export class Indexer implements IndexerInterface { return this._storageLayoutMap; } + get contractMap (): Map { + return this._contractMap; + } + get graphWatcher (): GraphWatcher { return this._graphWatcher; } @@ -628,6 +632,10 @@ export class Indexer implements IndexerInterface { return this._baseIndexer.watchContract(address, kind, checkpoint, startingBlock, context); } + async removeContract (address: string, kind: string): Promise { + return this._baseIndexer.removeContract(address, kind); + } + updateStateStatusMap (address: string, stateStatus: StateStatus): void { this._baseIndexer.updateStateStatusMap(address, stateStatus); } @@ -668,6 +676,10 @@ export class Indexer implements IndexerInterface { return this._baseIndexer.getEventsInRange(fromBlockNumber, toBlockNumber, this._serverConfig.gql.maxEventsBlockRange); } + async getEvents (options: FindManyOptions): Promise> { + return this._db.getEvents(options); + } + async getSyncStatus (): Promise { return this._baseIndexer.getSyncStatus(); } diff --git a/src/schema.gql b/src/schema.gql index 7a84551..55c2133 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -10080,7 +10080,7 @@ type Token { decimals: Int tokenType: String! poolCount: BigInt! - pools: [Pool!]! + pools(where: Pool_filter, orderBy: Pool_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Pool!]! totalSupply: BigInt txCount: BigInt! } @@ -10117,12 +10117,12 @@ type Pool { claimableReservesRemaining: BigDecimal! burnEpoch: BigInt! totalAjnaBurned: BigDecimal! - reserveAuctions: [ReserveAuction!]! + reserveAuctions(where: ReserveAuction_filter, orderBy: ReserveAuction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [ReserveAuction!]! minDebtAmount: BigDecimal! actualUtilization: BigDecimal! targetUtilization: BigDecimal! totalBondEscrowed: BigDecimal! - liquidationAuctions: [LiquidationAuction!]! + liquidationAuctions(where: LiquidationAuction_filter, orderBy: LiquidationAuction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [LiquidationAuction!]! quoteTokenBalance: BigDecimal! collateralBalance: BigDecimal! subsetHash: Bytes! @@ -10138,7 +10138,7 @@ type ReserveAuction { lastTakePrice: BigDecimal! burnEpoch: BigInt! kick: ReserveAuctionKick! - takes: [ReserveAuctionTake!]! + takes(where: ReserveAuctionTake_filter, orderBy: ReserveAuctionTake_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [ReserveAuctionTake!]! ajnaBurned: BigDecimal! } @@ -10181,9 +10181,9 @@ type LiquidationAuction { kicker: Bytes! kick: Kick! kickTime: BigInt! - takes: [Take!]! - bucketTakes: [BucketTake!]! - settles: [Settle!]! + takes(where: Take_filter, orderBy: Take_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Take!]! + bucketTakes(where: BucketTake_filter, orderBy: BucketTake_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [BucketTake!]! + settles(where: Settle_filter, orderBy: Settle_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Settle!]! settle: AuctionSettle settleTime: BigInt settled: Boolean! @@ -10301,7 +10301,7 @@ type PoolFactory { id: Bytes! poolType: String! poolCount: BigInt! - pools: [Pool!]! + pools(where: Pool_filter, orderBy: Pool_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Pool!]! txCount: BigInt! } @@ -10315,8 +10315,8 @@ type Bucket { collateral: BigDecimal! deposit: BigDecimal! lpb: BigDecimal! - lends: [Lend!]! - positionLends: [PositionLend!]! + lends(where: Lend_filter, orderBy: Lend_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Lend!]! + positionLends(where: PositionLend_filter, orderBy: PositionLend_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [PositionLend!]! } type Lend { @@ -10343,21 +10343,21 @@ type PositionLend { type Account { id: Bytes! - pools: [Pool!]! - kicks: [Kick!]! - lends: [Lend!]! - loans: [Loan!]! - settles: [Settle!]! - takes: [Take!]! - reserveAuctions: [ReserveAuction!]! - proposalsCreated: [Proposal!]! - proposalsExecuted: [Proposal!]! + pools(where: Pool_filter, orderBy: Pool_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Pool!]! + kicks(where: Kick_filter, orderBy: Kick_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Kick!]! + lends(where: Lend_filter, orderBy: Lend_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Lend!]! + loans(where: Loan_filter, orderBy: Loan_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Loan!]! + settles(where: Settle_filter, orderBy: Settle_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Settle!]! + takes(where: Take_filter, orderBy: Take_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Take!]! + reserveAuctions(where: ReserveAuction_filter, orderBy: ReserveAuction_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [ReserveAuction!]! + proposalsCreated(where: Proposal_filter, orderBy: Proposal_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Proposal!]! + proposalsExecuted(where: Proposal_filter, orderBy: Proposal_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Proposal!]! delegatedTo: Account - delegatedFrom: [Account!]! + delegatedFrom(where: Account_filter, orderBy: Account_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Account!]! rewardsClaimed: BigDecimal! - distributionPeriodVotes: [DistributionPeriodVote!]! + distributionPeriodVotes(where: DistributionPeriodVote_filter, orderBy: DistributionPeriodVote_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DistributionPeriodVote!]! tokensDelegated: BigDecimal! - positions: [Position!]! + positions(where: Position_filter, orderBy: Position_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Position!]! txCount: BigInt! } @@ -10372,7 +10372,7 @@ type Proposal { fundingVotesNegative: BigDecimal! fundingVotesPositive: BigDecimal! totalTokensRequested: BigDecimal! - params: [ProposalParams!]! + params(where: ProposalParams_filter, orderBy: ProposalParams_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [ProposalParams!]! } type DistributionPeriod { @@ -10381,20 +10381,20 @@ type DistributionPeriod { startBlock: BigInt! endBlock: BigInt! topSlate: FundedSlate - slatesSubmitted: [FundedSlate!]! + slatesSubmitted(where: FundedSlate_filter, orderBy: FundedSlate_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [FundedSlate!]! fundsAvailable: BigDecimal! delegationRewardsClaimed: BigDecimal! fundingVotePowerUsed: BigDecimal! screeningVotesCast: BigDecimal! - votes: [DistributionPeriodVote!]! - proposals: [Proposal!]! + votes(where: DistributionPeriodVote_filter, orderBy: DistributionPeriodVote_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DistributionPeriodVote!]! + proposals(where: Proposal_filter, orderBy: Proposal_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Proposal!]! totalTokensDistributed: BigDecimal! } type FundedSlate { id: Bytes! distribution: DistributionPeriod! - proposals: [Proposal!]! + proposals(where: Proposal_filter, orderBy: Proposal_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [Proposal!]! totalTokensRequested: BigDecimal! totalFundingVotesReceived: BigDecimal! updateBlock: BigInt! @@ -10408,8 +10408,8 @@ type DistributionPeriodVote { remainingFundingStageVotingPowerRecordedPostVote: BigDecimal! initialScreeningStageVotingPowerRecordedPostVote: BigDecimal! remainingScreeningStageVotingPowerRecordedPostVote: BigDecimal! - screeningVotes: [ScreeningVote!]! - fundingVotes: [FundingVote!]! + screeningVotes(where: ScreeningVote_filter, orderBy: ScreeningVote_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [ScreeningVote!]! + fundingVotes(where: FundingVote_filter, orderBy: FundingVote_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [FundingVote!]! } type ScreeningVote { @@ -10418,7 +10418,7 @@ type ScreeningVote { voter: Account! proposal: Proposal! totalVotesCast: BigDecimal! - votesCast: [VoteCast!]! + votesCast(where: VoteCast_filter, orderBy: VoteCast_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [VoteCast!]! } type VoteCast { @@ -10440,7 +10440,7 @@ type FundingVote { proposal: Proposal! totalVotesCast: BigDecimal! votingPowerUsed: BigDecimal! - votesCast: [VoteCast!]! + votesCast(where: VoteCast_filter, orderBy: VoteCast_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [VoteCast!]! } type ProposalParams { @@ -10455,7 +10455,7 @@ type ProposalParams { type Position { id: Bytes! tokenId: BigInt - indexes: [PositionLend!]! + indexes(where: PositionLend_filter, orderBy: PositionLend_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [PositionLend!]! owner: Bytes! pool: Pool! token: Token! @@ -10480,7 +10480,7 @@ type LPAllowanceList { pool: Pool! lender: Bytes! spender: Bytes! - allowances: [LPAllowance!]! + allowances(where: LPAllowance_filter, orderBy: LPAllowance_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [LPAllowance!]! } type AddCollateral { @@ -10797,7 +10797,7 @@ type RedeemPosition { type GrantFund { id: Bytes! treasury: BigDecimal! - distributionPeriods: [DistributionPeriod!]! + distributionPeriods(where: DistributionPeriod_filter, orderBy: DistributionPeriod_orderBy, orderDirection: OrderDirection, first: Int = 100, skip: Int = 0): [DistributionPeriod!]! totalDelegationRewardsClaimed: BigDecimal! } diff --git a/yarn.lock b/yarn.lock index a52c404..331448e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,10 @@ binaryen "101.0.0-nightly.20210723" long "^4.0.0" -"@cerc-io/cache@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.103/cache-0.2.103.tgz#fce1151f27dcdda9d2a54b922aee0e61d50a42ce" - integrity sha512-zgxxfsY86M6jpBaXvyJzmBhxCB06HiQVFtgnJ8gt5JE7ZNtAZeXyYX0R4/jfQkxFPPDLt7FlgFTFLbkqa44DMA== +"@cerc-io/cache@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcache/-/0.2.108/cache-0.2.108.tgz#92ed16720bbc542ce5101da5dcd6ad5f82848076" + integrity sha512-oIrIDn5161si5657F0GDyabx8IpUPngur5mplS1vlyVp6SwBzt+rlSM32S26CR0p8kJRwKFEgJDGxU1yxLUcwA== dependencies: canonical-json "^0.0.4" debug "^4.3.1" @@ -210,19 +210,19 @@ fs-extra "^10.0.0" level "^7.0.0" -"@cerc-io/cli@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.103/cli-0.2.103.tgz#daf6af4652928ca34624f49de0900b68dd57f42b" - integrity sha512-9uxJkgDl1nBLvwMUHngdG4fW0l13ZFw9I2Fl6F6s4vaP3LyutCYetipIUL6MNqRwxwSpSD0ARSF9l6h5aWICXA== +"@cerc-io/cli@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fcli/-/0.2.108/cli-0.2.108.tgz#28dd548114cffbf6bbfa268acafef712236a1948" + integrity sha512-x847X4+6k0JxRDXlkT8xgsBLuF7jDEhlUkEKoihVjQcGPcAAZQ8P1OkkXw56Mo3p/CaoP6oTTsd11CJxuLLN5Q== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.103" - "@cerc-io/ipld-eth-client" "^0.2.103" + "@cerc-io/cache" "^0.2.108" + "@cerc-io/ipld-eth-client" "^0.2.108" "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.103" - "@cerc-io/rpc-eth-client" "^0.2.103" - "@cerc-io/util" "^0.2.103" + "@cerc-io/peer" "^0.2.108" + "@cerc-io/rpc-eth-client" "^0.2.108" + "@cerc-io/util" "^0.2.108" "@ethersproject/providers" "^5.4.4" "@graphql-tools/utils" "^9.1.1" "@ipld/dag-cbor" "^8.0.0" @@ -243,16 +243,16 @@ typeorm "0.2.37" yargs "^17.0.1" -"@cerc-io/graph-node@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.103/graph-node-0.2.103.tgz#f6fa475faf9c43c33fde0bc4c7a2cde915b2d7f7" - integrity sha512-12QbYvFp2rU7lc6wefbk+7wtstcs1KHnaTRW7E7VLY+Rdo1X5LXBwxYYujHoiUHHF7q3wfjzuUEfgHF3TNTRtw== +"@cerc-io/graph-node@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fgraph-node/-/0.2.108/graph-node-0.2.108.tgz#75e4936e26989e075c1c9fb25e5162e384914a3f" + integrity sha512-sSZHfTtswGDOlMGo//ezCdinpZTqcDCdiLVhxCYL2i86xvmS8lir0ho93jmfqUSomHLNZkMODiwtkli+qW8pUg== dependencies: "@apollo/client" "^3.3.19" "@cerc-io/assemblyscript" "0.19.10-watcher-ts-0.1.2" - "@cerc-io/cache" "^0.2.103" - "@cerc-io/ipld-eth-client" "^0.2.103" - "@cerc-io/util" "^0.2.103" + "@cerc-io/cache" "^0.2.108" + "@cerc-io/ipld-eth-client" "^0.2.108" + "@cerc-io/util" "^0.2.108" "@types/json-diff" "^0.5.2" "@types/yargs" "^17.0.0" bn.js "^4.11.9" @@ -269,14 +269,14 @@ typeorm-naming-strategies "^2.0.0" yargs "^17.0.1" -"@cerc-io/ipld-eth-client@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.103/ipld-eth-client-0.2.103.tgz#e31e0610940e11b3d594329a7e1cf8b4a45c8968" - integrity sha512-FOJiRDKBI6PpDK9NZsnJcRR70qSC7QT8APoMEe3DXIs+PJbs3nFZlucgYDCYUD58hBz5HEbSHVfVUTpcZyWCgg== +"@cerc-io/ipld-eth-client@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fipld-eth-client/-/0.2.108/ipld-eth-client-0.2.108.tgz#455bd5d0cbe129ed266a7377246989d68d85a6a3" + integrity sha512-GwfPaWzhmYhPtu0S2vFQe8w9OTIMD007hhLl6myIsOTdHbVJtGj3RpzXQXmvs9NCpOj66YcFhGJ2YbV52hdUXg== dependencies: "@apollo/client" "^3.7.1" - "@cerc-io/cache" "^0.2.103" - "@cerc-io/util" "^0.2.103" + "@cerc-io/cache" "^0.2.108" + "@cerc-io/util" "^0.2.108" cross-fetch "^3.1.4" debug "^4.3.1" ethers "^5.4.4" @@ -399,10 +399,10 @@ lodash "^4.17.21" uint8arrays "^4.0.3" -"@cerc-io/peer@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.103/peer-0.2.103.tgz#ade3e10a9c290ca53f617f3712be3b17a8e788e0" - integrity sha512-CKULKLx0GysWX9qXGNDj7gTmhW+kxLHy/VuZbxv6y/v6W7D6QZq+8O5NZ2gcVPa16qiOHToa/W9He8/itm4nPw== +"@cerc-io/peer@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fpeer/-/0.2.108/peer-0.2.108.tgz#327b86581d6750f21bd22105be0ecb39dcde5b6e" + integrity sha512-ywXetDME6JmfPRiOEI6N1R7j2p0Eo0OWbmumeNVuDhmsrkENwFUDu32PsOp3oomBHndgmcFhGQlppPWFxwUggg== dependencies: "@cerc-io/libp2p" "^0.42.2-laconic-0.1.4" "@cerc-io/prometheus-metrics" "1.1.4" @@ -471,23 +471,23 @@ it-stream-types "^1.0.4" promjs "^0.4.2" -"@cerc-io/rpc-eth-client@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.103/rpc-eth-client-0.2.103.tgz#2a6fdb64a63780e04cfaf782c4af9e9854ee30b9" - integrity sha512-efEdgYuwXoTfcZWa5/EwUCAC/dUqk5yh4VYcVAt78CLUSoDc7Iw//flzhNrTetvekuo1vGN5JcO+m4QEfrsy+A== +"@cerc-io/rpc-eth-client@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Frpc-eth-client/-/0.2.108/rpc-eth-client-0.2.108.tgz#1cc68a9296cd21aa7578b89bea8886b46ef986ed" + integrity sha512-+gVTshn0fvEytYkYqwrrlsSQZadw48+vTWTLCx1tbUpMJkCfzFhj9dbzvYV/1FkTkKmAAbrG05Bf7r2elW5Hqw== dependencies: - "@cerc-io/cache" "^0.2.103" - "@cerc-io/ipld-eth-client" "^0.2.103" - "@cerc-io/util" "^0.2.103" + "@cerc-io/cache" "^0.2.108" + "@cerc-io/ipld-eth-client" "^0.2.108" + "@cerc-io/util" "^0.2.108" chai "^4.3.4" ethers "^5.4.4" left-pad "^1.3.0" mocha "^8.4.0" -"@cerc-io/solidity-mapper@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.103/solidity-mapper-0.2.103.tgz#37110d683c571ad9422dfcb524a8079621580a7f" - integrity sha512-9prQvpNEIXiGFoAVQkEUxrtFnLIYjGA+kxGGLcWob0NEUWnopzRTjsE1SS1i7/OKDRI/cfjOT1AEa0DtQwufzg== +"@cerc-io/solidity-mapper@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fsolidity-mapper/-/0.2.108/solidity-mapper-0.2.108.tgz#6a49da90afdcd096cf75ce8c8a15a97130f931eb" + integrity sha512-bT5X4ySqAwoOzMbN7Q+HgpJWTcTLcg2KHdiEbyFXO9jBA2ByKx2jQoCnb5BkDjvF9yGQ1fUiAv5oSVSw8DF4JA== dependencies: dotenv "^10.0.0" @@ -496,15 +496,15 @@ resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fts-channel/-/1.0.3-ts-nitro-0.1.1/ts-channel-1.0.3-ts-nitro-0.1.1.tgz#0768781313a167295c0bf21307f47e02dc17e936" integrity sha512-2jFICUSyffuZ+8+qRhXuLSJq4GJ6Y02wxiXoubH0Kzv2lIKkJtWICY1ZQQhtXAvP0ncAQB85WJHqtqwH8l7J3Q== -"@cerc-io/util@^0.2.103": - version "0.2.103" - resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.103/util-0.2.103.tgz#d28858a5e17cb4bd76194275030e6a0b72f92cc8" - integrity sha512-tzCKcvK5l/yogQalFxh0z4HxAEjM1KGdSfnIsV0Bxo3lwmTjXtOJu5yT3UJtv8swJNF9+YLNUp9DiWGNTk63XA== +"@cerc-io/util@^0.2.108": + version "0.2.108" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Futil/-/0.2.108/util-0.2.108.tgz#411aa58ca4694d38b13d8e619cf9707e3b50e073" + integrity sha512-ZslsRMaJ1EiDjy7GpK6iHjzq8a69QTzJe2TIeQBbWXRlsvZ2/Qca8Y39BzfVbgZ6cgnh+hclzwprtitzrqPvwQ== dependencies: "@apollo/utils.keyvaluecache" "^1.0.1" "@cerc-io/nitro-node" "^0.1.15" - "@cerc-io/peer" "^0.2.103" - "@cerc-io/solidity-mapper" "^0.2.103" + "@cerc-io/peer" "^0.2.108" + "@cerc-io/solidity-mapper" "^0.2.108" "@cerc-io/ts-channel" "1.0.3-ts-nitro-0.1.1" "@ethersproject/properties" "^5.7.0" "@ethersproject/providers" "^5.4.4" @@ -533,6 +533,7 @@ it-length-prefixed "^8.0.4" it-pipe "^2.0.5" it-pushable "^3.1.2" + jayson "^4.1.2" js-yaml "^4.1.0" json-bigint "^1.0.0" lodash "^4.17.21" @@ -2121,7 +2122,7 @@ "@types/connect" "*" "@types/node" "*" -"@types/connect@*": +"@types/connect@*", "@types/connect@^3.4.33": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== @@ -2245,6 +2246,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== +"@types/node@^12.12.54": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + "@types/normalize-package-data@^2.4.3": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -2287,6 +2293,13 @@ resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== +"@types/ws@^7.4.4": + version "7.4.7" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" + integrity sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -2433,6 +2446,14 @@ dependencies: tslib "^2.3.0" +JSONStream@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abortable-iterator@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/abortable-iterator/-/abortable-iterator-4.0.3.tgz#432570d8256dbad2cef4f129312b651c5ffcdd0f" @@ -3663,6 +3684,18 @@ es5-ext@0.8.x: resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.8.2.tgz#aba8d9e1943a895ac96837a62a39b3f55ecd94ab" integrity sha512-H19ompyhnKiBdjHR1DPHvf5RHgHPmJaY9JNzFGbMbPgdsUkvnUCN1Ke8J4Y0IMyTwFM2M9l4h2GoHwzwpSmXbA== +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== + dependencies: + es6-promise "^4.0.3" + escalade@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" @@ -4006,6 +4039,11 @@ express@^4.18.2: utils-merge "1.0.1" vary "~1.1.2" +eyes@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" + integrity sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -4996,6 +5034,11 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-ws@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" + integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== + it-all@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" @@ -5225,6 +5268,24 @@ iterall@^1.3.0: resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== +jayson@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.2.tgz#443c26a8658703e0b2e881117b09395d88b6982e" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + js-sha3@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" @@ -5285,6 +5346,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + json5@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -5301,6 +5367,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== + keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" @@ -7081,6 +7152,11 @@ through2@^2.0.1: readable-stream "~2.3.6" xtend "~4.0.1" +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + timeout-abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/timeout-abort-controller/-/timeout-abort-controller-3.0.0.tgz#dd57ffca041652c03769904f8d95afd93fb95595" @@ -7580,6 +7656,11 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + ws@^8.11.0, ws@^8.12.1, ws@^8.4.0: version "8.16.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4"