From 5baeec9c145d4f40a305975c6f88cd40c37f5442 Mon Sep 17 00:00:00 2001 From: EvgenKor Date: Thu, 10 Aug 2023 21:30:07 +0300 Subject: [PATCH 1/3] State updating progress (#160) * Code reorganizing[wip] * State sync improvements * Refactoring state update (making all in parallel) * Minor changes * Client state * Update state sync info * Estimating sync progress * Logging * Trying progress improvements * Sync database creation * Asymptotic sync progress * Bump version (5.3.0) * Update comments * Apply suggestions from code review Co-authored-by: Kirill Fedoseev * Saving state db progress * Writing state to the DB in the single batch * Minor refactor * Apply suggestions from code review Co-authored-by: Alexander Filippov --------- Co-authored-by: Kirill Fedoseev Co-authored-by: Alexander Filippov --- package.json | 2 +- src/client.ts | 243 ++++++++++++++++++++++-- src/index.ts | 4 +- src/state.ts | 502 +++++++++++++++++++++++++++++++------------------- src/worker.ts | 2 + 5 files changed, 554 insertions(+), 199 deletions(-) diff --git a/package.json b/package.json index acb3f2f0..91029924 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zkbob-client-js", - "version": "5.2.0", + "version": "5.3.0", "description": "zkBob integration library", "repository": "git@github.com:zkBob/libzkbob-client-js.git", "author": "Dmitry Vdovin ", diff --git a/src/client.ts b/src/client.ts index 7fb113b2..32c3e0f1 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,11 +1,11 @@ -import { Proof, ITransferData, IWithdrawData, StateUpdate, TreeNode, IAddressComponents } from 'libzkbob-rs-wasm-web'; +import { Proof, ITransferData, IWithdrawData, StateUpdate, TreeNode, IAddressComponents, IndexedTx } from 'libzkbob-rs-wasm-web'; import { Chains, Pools, SnarkConfigParams, ClientConfig, AccountConfig, accountId, ProverMode, DepositType } from './config'; import { ethAddrToBuf, toCompactSignature, truncateHexPrefix, - toTwosComplementHex, bufToHex + toTwosComplementHex, bufToHex, bigintToArrayLe } from './utils'; import { SyncStat, ZkBobState } from './state'; -import { CALLDATA_BASE_LENGTH, TxType, estimateCalldataLength, txTypeToString } from './tx'; +import { CALLDATA_BASE_LENGTH, CALLDATA_MEMO_NOTE_LENGTH, CALLDATA_MEMO_TRANSFER_BASE_LENGTH, TxType, estimateCalldataLength, txTypeToString } from './tx'; import { CONSTANTS } from './constants'; import { HistoryRecord, HistoryRecordState, HistoryTransactionType, ComplianceHistoryRecord } from './history' import { EphemeralAddress } from './ephemeral'; @@ -24,6 +24,8 @@ import { isHexPrefixed } from '@ethereumjs/util'; import { isAddress } from 'web3-utils'; import { wrap } from 'comlink'; import { PreparedTransaction } from './networks/network'; +import { Privkey } from 'hdwallet-babyjub'; +import { IDBPDatabase, openDB } from 'idb'; const OUTPLUSONE = CONSTANTS.OUT + 1; // number of leaves (account + notes) in a transaction const PARTIAL_TREE_USAGE_THRESHOLD = 500; // minimum tx count in Merkle tree to partial tree update using @@ -31,6 +33,13 @@ const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; const PERMIT_DEADLINE_INTERVAL = 1200; // permit deadline is current time + 20 min const PERMIT_DEADLINE_THRESHOLD = 300; // minimum time to deadline before tx proof calculation and sending (5 min) +const CONTINUOUS_STATE_UPD_INTERVAL = 200; // updating client's state timer interval for continuous states (in ms) +const CONTINUOUS_STATE_THRESHOLD = 1000; // the state considering continuous after that interval (in ms) + +// Common database table's name +const SYNC_PERFORMANCE = 'SYNC_PERFORMANCE'; +const WRITE_DB_TIME_PERF_TABLE_KEY = 'average.db.writing.time.per.tx'; + // Transfer destination + amount // Used as input in `transferMulti` method // Please note the request could be fragmented @@ -67,6 +76,21 @@ export interface FeeAmount { // all values are in Gwei insufficientFunds: boolean; // true when the local balance is insufficient for requested tx amount } +export enum ClientState { + Initializing = 0, + AccountlessMode, + SwitchingPool, + AttachingAccount, + // the following routines belongs to the full mode + FullMode, // ready to operate + StateUpdating, // short state sync + StateUpdatingContinuous, // sync which takes longer than threshold + HistoryUpdating, +} +const continuousStates = [ ClientState.StateUpdatingContinuous ]; + +export type ClientStateCallback = (state: ClientState, progress?: number) => void; + export class ZkBobClient extends ZkBobProvider { // States for the current account in the different pools private zpStates: { [poolAlias: string]: ZkBobState } = {}; @@ -77,6 +101,10 @@ export class ZkBobClient extends ZkBobProvider { // The single worker for the all pools // Currently we assume parameters are the same for the all pools private worker: any; + // Performance estimation (msec per tx) + private wasmSpeed: number | undefined; + // Sync stat database + private statDb?: IDBPDatabase; // Active account config. It can be undefined util user isn't login // If it's undefined the ZkBobClient acts as accountless client // (client-oriented methods will throw error) @@ -86,13 +114,43 @@ export class ZkBobClient extends ZkBobProvider { private monitoredJobs = new Map(); private jobsMonitors = new Map>(); + // Library state info + private state: ClientState; + private stateProgress: number; + public getState(): ClientState { return this.state } + public getProgress(): number | undefined { + return continuousStates.includes(this.state) ? this.stateProgress : undefined; + } + private setState(newState: ClientState, progress?: number) { + const isContunious = continuousStates.includes(newState); + if (this.state != newState || isContunious) { + this.state = newState; + this.stateProgress = (isContunious && progress !== undefined) ? progress : -1; + if (this.stateCallback) { // invoke callback if defined + this.stateCallback(this.getState(), this.getProgress()); + } + } + } + public stateCallback?: ClientStateCallback; + // ------------------------=========< Lifecycle >=========------------------------ // | Init and free client, login/logout, switching between pools | // ------------------------------------------------------------------------------- - private constructor(pools: Pools, chains: Chains, initialPool: string, supportId: string | undefined) { + private constructor( + pools: Pools, + chains: Chains, + initialPool: string, + supportId?: string, + callback?: ClientStateCallback, + statDb?: IDBPDatabase + ) { super(pools, chains, initialPool, supportId); this.account = undefined; + this.state = ClientState.Initializing; + this.stateProgress = -1; + this.stateCallback = callback; + this.statDb = statDb; } private async workerInit( @@ -121,16 +179,35 @@ export class ZkBobClient extends ZkBobProvider { return worker; } - public static async create(config: ClientConfig, activePoolAlias: string): Promise { + public static async create( + config: ClientConfig, + activePoolAlias: string, + callback?: ClientStateCallback + ): Promise { if (Object.keys(config.pools).length == 0) { throw new InternalError(`Cannot initialize library without pools`); } - const client = new ZkBobClient(config.pools, config.chains, activePoolAlias, config.supportId ?? ""); + if (callback) { + callback(ClientState.Initializing); + } + + const commonDb = await openDB(`zkb.common`, 1, { + upgrade(db) { + db.createObjectStore(SYNC_PERFORMANCE); // table holds state synchronization measurements + } + }); + + const client = new ZkBobClient(config.pools, config.chains, activePoolAlias, config.supportId ?? "", callback, commonDb); const worker = await client.workerInit(config.snarkParams); client.zpStates = {}; client.worker = worker; + + // starts performance estimation if needed + client.getPoolAvgTimePerTx(); + + client.setState(ClientState.AccountlessMode); return client; } @@ -166,11 +243,13 @@ export class ZkBobClient extends ZkBobProvider { public async logout() { this.free(); this.account = undefined; + this.setState(ClientState.AccountlessMode); } // Swithing to the another pool without logout with the same spending key // Also available before login (just switch pool to use the instance as an accoutless client) public async switchToPool(poolAlias: string, birthindex?: number) { + this.setState(this.account ? ClientState.AttachingAccount : ClientState.SwitchingPool); // remove currently activated state if exist [to reduce memory consumption] const oldPoolAlias = super.currentPool(); this.freePoolState(oldPoolAlias); @@ -181,8 +260,7 @@ export class ZkBobClient extends ZkBobProvider { // the following values needed to initialize ZkBobState const pool = this.pool(); - const denominator = await this.denominator(); - const poolId = await this.poolId(); + const [denominator, poolId] = await Promise.all([this.denominator(), this.poolId()]); const network = this.network(); const networkName = this.networkName(); @@ -213,6 +291,7 @@ export class ZkBobClient extends ZkBobProvider { const state = await ZkBobState.create( this.account.sk, this.account.birthindex, + network, networkName, network.getRpcUrl(), denominator, @@ -227,6 +306,8 @@ export class ZkBobClient extends ZkBobProvider { } else { console.log(`Pool was switched to ${newPoolAlias} but account is not set yet`); } + + this.setState(this.account ? ClientState.FullMode : ClientState.AccountlessMode); } public hasAccount(): boolean { @@ -274,7 +355,7 @@ export class ZkBobClient extends ZkBobProvider { public async getOptimisticTotalBalance(updateState: boolean = true): Promise { const confirmedBalance = await this.getTotalBalance(updateState); - const historyRecords = await this.getAllHistory(updateState); + const historyRecords = await this.getAllHistory(false); let pendingDelta = BigInt(0); for (const oneRecord of historyRecords) { @@ -356,7 +437,11 @@ export class ZkBobClient extends ZkBobProvider { await this.updateState(); } - return await this.zpState().history?.getAllHistory() ?? []; + this.setState(ClientState.HistoryUpdating); + const res = await this.zpState().history?.getAllHistory() ?? []; + this.setState(ClientState.FullMode); + + return res; } public async getPendingDDs(): Promise { @@ -1393,12 +1478,59 @@ export class ZkBobClient extends ZkBobProvider { // Request the latest state from the relayer // Returns isReadyToTransact flag public async updateState(): Promise { - return await this.zpState().updateState( + this.setState(ClientState.StateUpdating); + + const timePerTx = await this.getPoolAvgTimePerTx(); // process + save in the most cases + const saveTimePerTx = await this.getAvgSavingTxTime(); // saving time + let maxShowedProgress = 0; + const timerId = setInterval(() => { + const syncInfo = this.zpState().curSyncInfo(); + if (syncInfo) { + // sync in progress + const timeElapsedMs = Date.now() - syncInfo.startTimestamp; + if (timeElapsedMs < CONTINUOUS_STATE_THRESHOLD) { + this.setState(ClientState.StateUpdating); + } else { + var asymptoticTo1 = (value: number) => { // returns value limited by 1 + const ePowProg = Math.pow(Math.E, 4 * value); + return (ePowProg - 1) / (ePowProg + 1); + } + // progress evaluation based on the saved stats or synthetic test + const estTimeMs = syncInfo.txCount * timePerTx; + const progressByTime = timeElapsedMs / estTimeMs; + const asymptProgressByTime = asymptoticTo1(timeElapsedMs / estTimeMs) + // actual progress (may work poor for parallel workers) + const estSavingTime = syncInfo.hotSyncCount * saveTimePerTx; + const savingFraction = Math.min(estSavingTime / estTimeMs, 1); + const savingProgressAsympt = syncInfo.startDbTimestamp ? + asymptoticTo1((Date.now() - syncInfo.startDbTimestamp) / estSavingTime) : 0; + let progressByTxs = syncInfo.txCount > 0 ? (syncInfo.processedTxCount / syncInfo.txCount) : 0; + progressByTxs = Math.max(progressByTxs - savingFraction * (1 - savingProgressAsympt), 0); + // final progress + const progress = Math.min(progressByTxs ? progressByTxs : asymptProgressByTime, 1.0); + if (progress > maxShowedProgress) { + this.setState(ClientState.StateUpdatingContinuous, progress); + maxShowedProgress = progress; + } + } + } + }, CONTINUOUS_STATE_UPD_INTERVAL); + + const hasOwnTxsInOptimisticState = await this.zpState().updateState( this.relayer(), async (index) => (await this.getPoolState(index)).root, await this.coldStorageConfig(), this.coldStorageBaseURL(), ); + + clearInterval(timerId); + + // get and save sync speed stat if needed + this.updatePoolPerformanceStatistic(this.pool().poolAddress, this.zpState().syncStatistics()); + + this.setState(ClientState.FullMode); + + return hasOwnTxsInOptimisticState; } // ----------------=========< Ephemeral Addresses Pool >=========----------------- @@ -1449,7 +1581,7 @@ export class ZkBobClient extends ZkBobProvider { return undefined; // relevant stat doesn't found } - // in milliseconds + // in milliseconds, based on the current state statistic (saved stats isn't included) public getAverageTimePerTx(): number | undefined { const stats = this.zpState().syncStatistics(); if (stats.length > 0) { @@ -1459,6 +1591,93 @@ export class ZkBobClient extends ZkBobProvider { return undefined; // relevant stat doesn't found } + // overall statistic for the current pool (saved/synthetic_tets, tx processing time) + private async getPoolAvgTimePerTx(): Promise { + if (this.statDb) { + // try to get saved performance indicator first + const poolAddr = this.pool().poolAddress; + const statTime = await this.statDb.get(SYNC_PERFORMANCE, poolAddr); + if (typeof statTime === 'number') { + return statTime; + } + } + + // returns synthetic test performance if real estimation is unavailable + return this.wasmSpeed ?? await this.estimateSyncSpeed().then((speed) => { + this.wasmSpeed = speed; + return speed; + }); + } + + // get average saving time for tx (in ms) + private async getAvgSavingTxTime(): Promise { + const DEFAULT_TX_SAVING_TIME = 0.1; + if (this.statDb) { + const avgTime = await this.statDb.get(SYNC_PERFORMANCE, WRITE_DB_TIME_PERF_TABLE_KEY); + return avgTime && typeof avgTime === 'number' && avgTime > 0 ? avgTime : DEFAULT_TX_SAVING_TIME; + } + + return DEFAULT_TX_SAVING_TIME; + } + + private async updatePoolPerformanceStatistic(poolAddr: string, stats: SyncStat[]): Promise { + if (this.statDb && stats.length > 0) { + // tx decrypting time + const fullSyncStats = stats.filter((aStat) => aStat.fullSync); + const fullSyncTime = fullSyncStats.length > 0 ? + fullSyncStats.map((aStat) => aStat.timePerTx).reduce((acc, cur) => acc + cur) / fullSyncStats.length : + undefined; + const allSyncTime = stats.map((aStat) => aStat.timePerTx).reduce((acc, cur) => acc + cur) / stats.length + // tx saving time + const statsWithRelevantSavingTime = stats.filter((aStat) => (aStat.txCount - aStat.cdnTxCnt) > 1000 && aStat.writeStateTime > 0); + const avgSavingTime = statsWithRelevantSavingTime.length > 0 ? + statsWithRelevantSavingTime + .map((aStat) => aStat.writeStateTime / (aStat.txCount - aStat.cdnTxCnt)) + .reduce((acc, cur) => acc + cur) / statsWithRelevantSavingTime.length : + undefined; + + + // save transaction decrypt time for the current pool + const statTime = await this.statDb.get(SYNC_PERFORMANCE, poolAddr); + if (typeof statTime === 'number') { + // if stat already exist for that pool - set new performace just in case of full sync + // Set the mean performance (saved & current) when the full sync stat isn't available + await this.statDb.put(SYNC_PERFORMANCE, fullSyncTime ?? ((allSyncTime + statTime) / 2), poolAddr); + } else { + // if no statistic exist - set current avg sync time (full sync is always prioritized) + await this.statDb.put(SYNC_PERFORMANCE, fullSyncTime ?? allSyncTime, poolAddr); + } + + // update database performance value (global value, pool-independent) + if (avgSavingTime) { + await this.statDb.put(SYNC_PERFORMANCE, avgSavingTime, WRITE_DB_TIME_PERF_TABLE_KEY); + } + } + } + + // synthetic benchmark, result in microseconds per tx + private async estimateSyncSpeed(samplesNum: number = 1000): Promise { + const sk = bigintToArrayLe(Privkey("test test test test test test test test test test test tell", "m/0'/0'")); + const samples = Array.from({length: samplesNum}, (_value, index) => index * (CONSTANTS.OUT + 1)); + const txs: IndexedTx[] = samples.map((index) => { + return { + index, + memo: '02000000ff73d841b6d0027b689346b50aee18ef8263e2a27b0da325aba9774c46ffd4000d2e19298339b722fa126acedf1bcb300ebe0f8a0e96589b0c92612c96346d0db314014936ed9f11a60f15de2704dfa3f0a735242720637e0136d9b79d06342de5604968cb42d9ba3f57d9c2a591d1ca448e1f24b675b9de375f2086a6f17fd35c5e6318e0694d7bddce27e259acdb03e5943fa1f794149fadd45b3fcb15e7d9e0b16eefae48e2221bb405fd0ced6baf1d09baa042b864d7c73c7d642d8b143903d4f434ce811eb25bc4b988202318e16fbe15e259a5a7636d2713c0bee2b9579901fe559e4dde2be00b723843decaa18febc1b48a349b9f4c29074692c5af0c8a828df1f8e8f9fd8d7d752470bb63f132892f7669d5a305460b6c4c1ac76d0fc2ee164eae1c30ee8ea9ec666296c0d7e205386d1cf8356e88bc8ebb5786ed47bca1910598ea1e2adbae1663b90b00697d4f499e1955fd05c998be29dd9824dccc20e47fc1c81e3e13e20e9fda4e21514a5d', + commitment: '0bc0c8fe774470d73f8695bd60aa3de479ce516e357d07f3e120ca8534cebd26' + } + }); + + const startTime = Date.now(); + const res = await this.worker.parseTxs(sk, txs); + const fullTime = Date.now() - startTime; + + const avgSpeed = fullTime / samplesNum; + + console.info(`[EstimateWasm] Parsed ${samplesNum} samples in ${fullTime / 1000} sec: ${avgSpeed} msec\\tx`); + + return avgSpeed; + } + // ------------------=========< Direct Deposits >=========------------------ // | Calculating sync time | // ------------------------------------------------------------------------- diff --git a/src/index.ts b/src/index.ts index 0e68ebd3..04d632f1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,9 @@ export { ClientConfig, AccountConfig, accountId, ProverMode, Chain, Pool, Chains, Pools, SnarkConfigParams, DepositType } from './config'; -export { ZkBobClient, TransferConfig, TransferRequest, FeeAmount } from './client'; +export { ZkBobClient, TransferConfig, TransferRequest, FeeAmount, + ClientState, ClientStateCallback + } from './client'; export { ZkBobProvider as ZkBobAccountlessClient, GiftCardProperties } from './client-provider'; export { SyncStat } from './state'; export { TxType } from './tx'; diff --git a/src/state.ts b/src/state.ts index e5da7514..718e6d8c 100644 --- a/src/state.ts +++ b/src/state.ts @@ -13,6 +13,7 @@ import { ColdStorageConfig } from './coldstorage'; import { InternalError } from './errors'; import { ZkBobRelayer } from './services/relayer'; import { CONSTANTS } from './constants'; +import { NetworkBackend } from './networks/network'; const LOG_STATE_HOTSYNC = false; @@ -22,17 +23,37 @@ const PARTIAL_TREE_USAGE_THRESHOLD = 500; // minimum tx count in Merkle tree to const CORRUPT_STATE_ROLLBACK_ATTEMPTS = 2; // number of state restore attempts (via rollback) const CORRUPT_STATE_WIPE_ATTEMPTS = 5; // number of state restore attempts (via wipe) const COLD_STORAGE_USAGE_THRESHOLD = 1000; // minimum number of txs to cold storage using -const MIN_TX_COUNT_FOR_STAT = 10; +const MIN_TX_COUNT_FOR_STAT = 100; export interface BatchResult { txCount: number; maxMinedIndex: number; maxPendingIndex: number; + hasOwnOptimisticTxs: boolean; state: Map; // key: first tx index, // value: StateUpdate object (notes, accounts, leafs and comminments) } +interface RawTxsBatch { + fromIndex: number; + count: number + minedTxs: IndexedTx[]; + pendingTxs: IndexedTx[]; + txHashes: Record; + maxMinedIndex: number; + maxPendingIndex: number; +} + +export interface StateSyncInfo { + txCount: number; // total (cold + hot) + hotSyncCount: number; // hot sync only + processedTxCount: number; + startTimestamp: number; + startDbTimestamp?: number; + endTimestamp?: number; +} + // Used to collect state synchronization statistic // It could be helpful to monitor average sync time @@ -45,10 +66,11 @@ export interface SyncStat { totalTime: number; // msec timePerTx: number; // msec + writeStateTime: number; // writing database time during the hot sync (ms) } -export interface PartialSyncResult { - txCount: number; // total txs count (relayer + CDN) +interface ColdSyncResult { + txCount: number; // txs count decryptedLeafs: number; // deposit/withdrawal = 1 leaf, // transfer = 1 + notes_cnt leafs firstIndex: number; // first index of the synced range @@ -61,6 +83,7 @@ export class ZkBobState { public stateId: string; // should depends on pool and sk private sk: Uint8Array; private birthIndex?: number; + private network: NetworkBackend; public history?: HistoryStorage; // should work synchronically with the state private ephemeralAddrPool?: EphemeralPool; // depends on sk so we placed it here private worker: any; @@ -76,11 +99,16 @@ export class ZkBobState { // need to decrease time in isOwnAddress() function private shieldedAddressCache = new Map>(); + // Sync info + private lastSyncInfo?: StateSyncInfo; + + // Create regular state with the provided spending key // and other parameters public static async create( sk: Uint8Array, birthIndex: number | undefined, + network: NetworkBackend, networkName: string, rpcUrl: string, denominator: bigint, @@ -95,13 +123,15 @@ export class ZkBobState { const userId = bufToHex(hash(zpState.sk)).slice(0, 32); zpState.stateId = `${networkName}.${poolId.toString(16).padStart(6, '0')}.${userId}`; // database name identifier + zpState.network = network; + await worker.createAccount(zpState.stateId, zpState.sk, poolId, networkName); zpState.worker = worker; zpState.history = await HistoryStorage.init(zpState.stateId, rpcUrl, zpState); - let network = networkName as NetworkType; - zpState.ephemeralAddrPool = await EphemeralPool.init(zpState.sk, tokenAddress, network, rpcUrl, denominator); + + zpState.ephemeralAddrPool = await EphemeralPool.init(zpState.sk, tokenAddress, networkName as NetworkType, rpcUrl, denominator); return zpState; } @@ -128,6 +158,15 @@ export class ZkBobState { return zpState; } + // returns undefined if state sync not in progress + public curSyncInfo(): StateSyncInfo | undefined { + if (this.updateStatePromise && this.lastSyncInfo) { + return this.lastSyncInfo + } + + return undefined; + } + public ephemeralPool(): EphemeralPool { if (!this.ephemeralAddrPool) { throw new InternalError(`The state ${this.stateId} doesn't have ephemeral pool`); @@ -296,13 +335,14 @@ export class ZkBobState { coldConfig?: ColdStorageConfig, coldBaseAddr?: string, ): Promise { + this.lastSyncInfo = {txCount: 0, hotSyncCount: 0, processedTxCount: 0, startTimestamp: Date.now()} let startIndex = Number(await this.getNextIndex()); const stateInfo = await relayer.info(); const nextIndex = Number(stateInfo.deltaIndex); const optimisticIndex = Number(stateInfo.optimisticDeltaIndex); - let readyToTransact = true; + let isReadyToTransact = true; if (optimisticIndex > startIndex) { // Use partial tree loading if possible @@ -322,8 +362,30 @@ export class ZkBobState { } } - // Try to using the cold storage - const coldResult = await this.loadColdStorageTxs(getPoolRoot, coldConfig, coldBaseAddr, startIndex); + // Getting start sync operation timestamp + const startSyncTime = Date.now(); + + // now we got actual txs count to sync => update info + this.lastSyncInfo.txCount = (optimisticIndex - startIndex) / OUTPLUSONE; + + // Try to using the cold storage if possible + const coldResultPromise = this.startColdSync(getPoolRoot, coldConfig, coldBaseAddr, startIndex); + + // Start the hot sync simultaneously with the cold sync + const assumedNextIndex = this.nextIndexAfterColdSync(coldConfig, startIndex); + this.lastSyncInfo.hotSyncCount = (optimisticIndex - assumedNextIndex) / OUTPLUSONE; + let hotSyncPromise = this.startHotSync(relayer, assumedNextIndex, optimisticIndex); + + // Waiting while cold sync finished (local state becomes updated) + const coldResult = await coldResultPromise; + + // Check is predicted next index after the cold sync equals actual one + if (coldResult.nextIndex != assumedNextIndex) { + // ... restarting the hot sync with the appropriate index otherwise + console.error(`🧊[ColdSync] next index not as assumed after sync (next index = ${coldResult.nextIndex}, assumed ${assumedNextIndex}) => starting hot sync again`); + this.lastSyncInfo.hotSyncCount = (optimisticIndex - coldResult.nextIndex) / OUTPLUSONE; + hotSyncPromise = this.startHotSync(relayer, coldResult.nextIndex, optimisticIndex); + } const curStat: SyncStat = { txCount: (optimisticIndex - startIndex) / OUTPLUSONE, @@ -332,121 +394,35 @@ export class ZkBobState { fullSync: startIndex == 0 ? true : false, totalTime: coldResult.totalTime, timePerTx: 0, + writeStateTime: 0, }; - // change hot sync position - startIndex = coldResult.nextIndex; - console.log(`🔥[HotSync] fetching transactions between ${startIndex} and ${optimisticIndex}...`); - const startTime = Date.now(); - - const batches: Promise[] = []; - for (let i = startIndex; i <= optimisticIndex; i = i + BATCH_SIZE * OUTPLUSONE) { - const oneBatch = relayer.fetchTransactionsOptimistic(BigInt(i), BATCH_SIZE).then( async txs => { - console.log(`🔥[HotSync] got ${txs.length} transactions from index ${i}`); - - const batchState = new Map(); - - const txHashes: Record = {}; - const indexedTxs: IndexedTx[] = []; - - const txHashesPending: Record = {}; - const indexedTxsPending: IndexedTx[] = []; - - let maxMinedIndex = -1; - let maxPendingIndex = -1; - - for (let txIdx = 0; txIdx < txs.length; ++txIdx) { - const tx = txs[txIdx]; - const memo_idx = i + txIdx * OUTPLUSONE; // Get the first leaf index in the tree - - // tx structure from relayer: mined flag + txHash(32 bytes, 64 chars) + commitment(32 bytes, 64 chars) + memo - const memo = tx.slice(129); // Skip mined flag, txHash and commitment - const commitment = tx.slice(65, 129) - - const indexedTx: IndexedTx = { - index: memo_idx, - memo: memo, - commitment: commitment, - } - - // 3. Get txHash - const txHash = tx.slice(1, 65); - - // 4. Get mined flag - if (tx.slice(0, 1) === '1') { - indexedTxs.push(indexedTx); - txHashes[memo_idx] = '0x' + txHash; - maxMinedIndex = Math.max(maxMinedIndex, memo_idx); - } else { - indexedTxsPending.push(indexedTx); - txHashesPending[memo_idx] = '0x' + txHash; - maxPendingIndex = Math.max(maxPendingIndex, memo_idx); - } - } - - if (indexedTxs.length > 0) { - const parseResult: ParseTxsResult = await this.worker.parseTxs(this.sk, indexedTxs); - const decryptedMemos = parseResult.decryptedMemos; - batchState.set(i, parseResult.stateUpdate); - if (LOG_STATE_HOTSYNC) { - this.logStateSync(i, i + txs.length * OUTPLUSONE, decryptedMemos); - } - for (let decryptedMemoIndex = 0; decryptedMemoIndex < decryptedMemos.length; ++decryptedMemoIndex) { - // save memos corresponding to the our account to restore history - const myMemo = decryptedMemos[decryptedMemoIndex]; - myMemo.txHash = txHashes[myMemo.index]; - this.history?.saveDecryptedMemo(myMemo, false); - } - } - - if (indexedTxsPending.length > 0) { - const parseResult: ParseTxsResult = await this.worker.parseTxs(this.sk, indexedTxsPending); - const decryptedPendingMemos = parseResult.decryptedMemos; - for (let idx = 0; idx < decryptedPendingMemos.length; ++idx) { - // save memos corresponding to the our account to restore history - const myMemo = decryptedPendingMemos[idx]; - myMemo.txHash = txHashesPending[myMemo.index]; - this.history?.saveDecryptedMemo(myMemo, true); - - if (myMemo.acc != undefined) { - // There is a pending transaction initiated by ourselfs - // So we cannot create new transactions in that case - readyToTransact = false; - } - } - } - - return {txCount: txs.length, maxMinedIndex, maxPendingIndex, state: batchState} ; - }); - batches.push(oneBatch); - }; - + // Waiting while batches for hot sync are ready const totalState = new Map(); - const initRes: BatchResult = {txCount: 0, maxMinedIndex: -1, maxPendingIndex: -1, state: totalState}; - const totalRes = (await Promise.all(batches)).reduce((acc, cur) => { + const initRes: BatchResult = {txCount: 0, maxMinedIndex: -1, maxPendingIndex: -1, hasOwnOptimisticTxs: false, state: totalState}; + const totalRes = (await hotSyncPromise).reduce((acc, cur) => { return { txCount: acc.txCount + cur.txCount, maxMinedIndex: Math.max(acc.maxMinedIndex, cur.maxMinedIndex), maxPendingIndex: Math.max(acc.maxPendingIndex, cur.maxPendingIndex), + hasOwnOptimisticTxs: acc.hasOwnOptimisticTxs || cur.hasOwnOptimisticTxs, state: new Map([...Array.from(acc.state.entries()), ...Array.from(cur.state.entries())]), } }, initRes); + const startSavingTime = Date.now(); + this.lastSyncInfo.startDbTimestamp = startSavingTime; + console.log(`🔥[HotSync] all batches were processed. Saving...`); + // Merging state updates into the single StateUpdate object const idxs = [...totalRes.state.keys()].sort((i1, i2) => i1 - i2); + const hotStateUpdate: StateUpdate = {newAccounts: [], newLeafs: [], newCommitments: [], newNotes: []}; for (const idx of idxs) { const oneStateUpdate = totalRes.state.get(idx); if (oneStateUpdate !== undefined) { - try { - await this.worker.updateState(this.stateId, oneStateUpdate, siblings); - } catch (err) { - const siblingsDescr = siblings !== undefined ? ` (+ ${siblings.length} siblings)` : ''; - console.warn(`🔥[HotSync] cannot update state from index ${idx}${siblingsDescr}`); - if (siblings != undefined) { - // if we try to update state with siblings and got an error - do not use partial sync again - this.birthIndex = undefined; - } - throw new InternalError(`Unable to synchronize pool state`); - } + hotStateUpdate.newAccounts = [...hotStateUpdate.newAccounts, ...oneStateUpdate.newAccounts]; + hotStateUpdate.newLeafs = [...hotStateUpdate.newLeafs, ...oneStateUpdate.newLeafs]; + hotStateUpdate.newCommitments = [...hotStateUpdate.newCommitments, ...oneStateUpdate.newCommitments]; + hotStateUpdate.newNotes = [...hotStateUpdate.newNotes, ...oneStateUpdate.newNotes]; curStat.decryptedLeafs += oneStateUpdate.newLeafs.length; } else { @@ -454,29 +430,44 @@ export class ZkBobState { } } + // Saving parsed transaction from the hot sync in the local Merkle tree + try { + await this.worker.updateState(this.stateId, hotStateUpdate, siblings); + } catch (err) { + const siblingsDescr = siblings !== undefined ? ` (+ ${siblings.length} siblings)` : ''; + console.warn(`🔥[HotSync] cannot update state from index ${idxs[0]}${siblingsDescr}`); + if (siblings != undefined) { + // if we try to update state with siblings and got an error - do not use partial sync again + this.birthIndex = undefined; + } + throw new InternalError(`Unable to synchronize pool state`); + } + const savingTime = Date.now() - startSavingTime; + console.log(`🔥[HotSync] Saved local state in ${savingTime} ms (${(savingTime / totalRes.txCount).toFixed(4)} ms/tx)`); + // remove unneeded pending records this.history?.setLastMinedTxIndex(totalRes.maxMinedIndex); this.history?.setLastPendingTxIndex(totalRes.maxPendingIndex); - const hotSyncTime = Date.now() - startTime; - const hotSyncTimePerTx = hotSyncTime / totalRes.txCount; + const fullSyncTime = Date.now() - startSyncTime; + const fullSyncTimePerTx = fullSyncTime / (coldResult.txCount + totalRes.txCount); curStat.txCount = totalRes.txCount + coldResult.txCount; curStat.cdnTxCnt = coldResult.txCount; - curStat.totalTime = hotSyncTime + coldResult.totalTime; - curStat.timePerTx = curStat.totalTime / curStat.txCount; + curStat.totalTime = fullSyncTime; + curStat.timePerTx = fullSyncTimePerTx; + curStat.writeStateTime = savingTime; // save relevant stats only if (curStat.txCount >= MIN_TX_COUNT_FOR_STAT) { this.syncStats.push(curStat); } + isReadyToTransact = !totalRes.hasOwnOptimisticTxs; - console.log(`🔥[HotSync] finished in ${hotSyncTime / 1000} sec | ${totalRes.txCount} tx, avg speed ${hotSyncTimePerTx.toFixed(1)} ms/tx`); - if (coldResult.txCount > 0) { - console.log(`🧊🔥[TotalSync] finished in ${curStat.totalTime / 1000} sec | ${curStat.txCount} tx, avg speed ${curStat.timePerTx.toFixed(1)} ms/tx`); - } + const syncType = coldResult.txCount > 0 ? '🧊🔥[TotalSync]' : '🔥[HotSync]' + console.log(`${syncType} finished in ${curStat.totalTime / 1000} sec | ${curStat.txCount} tx, avg speed ${curStat.timePerTx.toFixed(2)} ms/tx`); } else { this.history?.setLastMinedTxIndex(nextIndex - OUTPLUSONE); this.history?.setLastPendingTxIndex(-1); @@ -520,7 +511,129 @@ export class ZkBobState { } } - return readyToTransact; + // set finish sync timestamp + this.lastSyncInfo.endTimestamp = Date.now(); + + return isReadyToTransact; + } + + // Returns prepared data to include in the local Merkle tree + // 1. Fetch all needed tx batches + // 2. Parse batches + private async startHotSync(relayer: ZkBobRelayer, fromIndex: number, toIndex: number): Promise { + let hotSyncPromises: Promise[] = []; + for (let i = fromIndex; i <= toIndex; i = i + BATCH_SIZE * OUTPLUSONE) { + hotSyncPromises.push(this.fetchBatch(relayer, i, BATCH_SIZE).then(async (aBatch) => { + // batch fetched, let's parse it! + const res = await this.parseBatch(aBatch); + if (this.lastSyncInfo) this.lastSyncInfo.processedTxCount += aBatch.count; + return res; + })); + } + + return Promise.all(hotSyncPromises); + } + + // Get the transactions from the relayer starting from the specified index + private async fetchBatch(relayer: ZkBobRelayer, fromIndex: number, count: number): Promise { + return relayer.fetchTransactionsOptimistic(BigInt(fromIndex), count).then( async txs => { + const txHashes: Record = {}; + const indexedTxs: IndexedTx[] = []; + const indexedTxsPending: IndexedTx[] = []; + + let maxMinedIndex = -1; + let maxPendingIndex = -1; + + for (let txIdx = 0; txIdx < txs.length; ++txIdx) { + const tx = txs[txIdx]; + const memo_idx = fromIndex + txIdx * OUTPLUSONE; // Get the first leaf index in the tree + + // tx structure from relayer: mined flag + txHash(32 bytes, 64 chars) + commitment(32 bytes, 64 chars) + memo + const memo = tx.slice(129); // Skip mined flag, txHash and commitment + const commitment = tx.slice(65, 129) + + const indexedTx: IndexedTx = { + index: memo_idx, + memo: memo, + commitment: commitment, + } + + // 3. Get txHash + const txHash = tx.slice(1, 65); + txHashes[memo_idx] = '0x' + txHash; + + // 4. Get mined flag + if (tx.slice(0, 1) === '1') { + indexedTxs.push(indexedTx); + maxMinedIndex = Math.max(maxMinedIndex, memo_idx); + } else { + indexedTxsPending.push(indexedTx); + maxPendingIndex = Math.max(maxPendingIndex, memo_idx); + } + } + + console.log(`🔥[HotSync] got batch of ${txs.length} transactions from index ${fromIndex}`); + + return { + fromIndex: fromIndex, + count: txs.length, + minedTxs: indexedTxs, + pendingTxs: indexedTxsPending, + maxMinedIndex, + maxPendingIndex, + txHashes, + } + }); + } + + // The heaviest work: parse txs batch + // and returns batch result + private async parseBatch(batch: RawTxsBatch): Promise { + let hasOwnOptimisticTxs = false; + + const batchState = new Map(); + + // process mined transactions + if (batch.minedTxs.length > 0) { + const parseResult: ParseTxsResult = await this.worker.parseTxs(this.sk, batch.minedTxs); + const decryptedMemos = parseResult.decryptedMemos; + batchState.set(batch.fromIndex, parseResult.stateUpdate); + //if (LOG_STATE_HOTSYNC) { + // this.logStateSync(i, i + txs.length * OUTPLUSONE, decryptedMemos); + //} + for (let decryptedMemoIndex = 0; decryptedMemoIndex < decryptedMemos.length; ++decryptedMemoIndex) { + // save memos corresponding to the our account to restore history + const myMemo = decryptedMemos[decryptedMemoIndex]; + myMemo.txHash = batch.txHashes[myMemo.index]; + this.history?.saveDecryptedMemo(myMemo, false); + } + } + + // process pending transactions from the optimisstic state + if (batch.pendingTxs.length > 0) { + const parseResult: ParseTxsResult = await this.worker.parseTxs(this.sk, batch.pendingTxs); + const decryptedPendingMemos = parseResult.decryptedMemos; + for (let idx = 0; idx < decryptedPendingMemos.length; ++idx) { + // save memos corresponding to the our account to restore history + const myMemo = decryptedPendingMemos[idx]; + myMemo.txHash = batch.txHashes[myMemo.index]; + this.history?.saveDecryptedMemo(myMemo, true); + + if (myMemo.acc != undefined) { + // There is a pending transaction initiated by ourselfs + // So we cannot create new transactions in that case + hasOwnOptimisticTxs = true; + } + } + } + + return { + txCount: batch.count, + maxMinedIndex: batch.maxMinedIndex, + maxPendingIndex: batch.maxPendingIndex, + hasOwnOptimisticTxs, + state: batchState, + }; } // Just fetch and process the new state without local state updating @@ -617,17 +730,45 @@ export class ZkBobState { return false; } - private async loadColdStorageTxs( + private isColdSyncAvailable(coldConfig?: ColdStorageConfig, fromIndex?: number, toIndex?: number): boolean { + if (coldConfig) { + const startRange = fromIndex ?? 0; + const endRange = toIndex ?? (2 ** CONSTANTS.HEIGHT); + const actualRangeStart = Math.max(startRange, Number(coldConfig.index_from)); + const actualRangeEnd = Math.min(endRange, Number(coldConfig.next_index)); + + if (this.skipColdStorage == false && + (startRange % OUTPLUSONE) == 0 && + (endRange % OUTPLUSONE) == 0 && + isRangesIntersected(startRange, endRange, Number(coldConfig.index_from), Number(coldConfig.next_index)) && + ((actualRangeEnd - actualRangeStart) / OUTPLUSONE) >= COLD_STORAGE_USAGE_THRESHOLD + ) { + return true; + } + } + + return false; + } + + private nextIndexAfterColdSync(coldConfig?: ColdStorageConfig, fromIndex?: number, toIndex?: number): number { + if (this.isColdSyncAvailable(coldConfig, fromIndex, toIndex)) { + return Math.min(toIndex ?? (2 ** CONSTANTS.HEIGHT), Number(coldConfig?.next_index)); + } + + return fromIndex ?? 0; + } + + private async startColdSync( getPoolRoot: (index: bigint) => Promise, coldConfig?: ColdStorageConfig, coldStorageBaseAddr?: string, fromIndex?: number, toIndex?: number - ): Promise { + ): Promise { const startRange = fromIndex ?? 0; // inclusively const endRange = toIndex ?? (2 ** CONSTANTS.HEIGHT); // exclusively - const syncResult: PartialSyncResult = { + const syncResult: ColdSyncResult = { txCount: 0, decryptedLeafs: 0, firstIndex: startRange, @@ -635,79 +776,70 @@ export class ZkBobState { totalTime: 0, }; - if (coldConfig) { - const actualRangeStart = Math.max(startRange, Number(coldConfig.index_from)); - const actualRangeEnd = Math.min(endRange, Number(coldConfig.next_index)); + if (this.isColdSyncAvailable(coldConfig, fromIndex, toIndex)) { + const actualRangeStart = Math.max(startRange, Number(coldConfig?.index_from)); + const actualRangeEnd = Math.min(endRange, Number(coldConfig?.next_index)); - if (this.skipColdStorage == false && - (startRange % OUTPLUSONE) == 0 && - (endRange % OUTPLUSONE) == 0 && - isRangesIntersected(startRange, endRange, Number(coldConfig.index_from), Number(coldConfig.next_index)) && - ((actualRangeEnd - actualRangeStart) / OUTPLUSONE) >= COLD_STORAGE_USAGE_THRESHOLD - ) { - const startTime = Date.now(); + const startTime = Date.now(); - // try get txs from the cold storage - try { - if (coldConfig && coldStorageBaseAddr) { - console.log(`🧊[ColdSync] loading txs up to index ${coldConfig.next_index}...`); - const promises = coldConfig.bulks - .filter(aBulk => { - return isRangesIntersected(actualRangeStart, actualRangeEnd, Number(aBulk.index_from), Number(aBulk.next_index)) - }) - .map(async (bulkInfo) => { - let response = await fetch(`${coldStorageBaseAddr}/${bulkInfo.filename}`); - if (response.ok) { - let aBulk = await response.arrayBuffer(); - if (aBulk.byteLength == bulkInfo.bytes) { - console.log(`🧊[ColdSync] got bulk ${bulkInfo.filename} with ${bulkInfo.tx_count} txs (${bulkInfo.bytes} bytes)`); - - return new Uint8Array(aBulk); - } - - //console.warn(`🧊[ColdSync] cannot load bulk ${bulkInfo.filename}: got ${aBulk.byteLength} bytes, expected ${bulkInfo.bytes} bytes`); - //return new Uint8Array(); - throw new InternalError(`Cold storage corrupted (invalid file size: ${aBulk.byteLength})`) - } else { - //console.warn(`🧊[ColdSync] cannot load bulk ${bulkInfo.filename}: response code ${response.status} (${response.statusText})`); - //return new Uint8Array(); - throw new InternalError(`Couldn't load cold storage (invalid response code: ${response.status})`) + // try get txs from the cold storage + try { + if (coldConfig && coldStorageBaseAddr) { + console.log(`🧊[ColdSync] loading txs up to index ${coldConfig.next_index}...`); + const promises = coldConfig.bulks + .filter(aBulk => { + return isRangesIntersected(actualRangeStart, actualRangeEnd, Number(aBulk.index_from), Number(aBulk.next_index)) + }) + .map(async (bulkInfo) => { + let response = await fetch(`${coldStorageBaseAddr}/${bulkInfo.filename}`); + if (response.ok) { + let aBulk = await response.arrayBuffer(); + if (aBulk.byteLength == bulkInfo.bytes) { + console.log(`🧊[ColdSync] got bulk ${bulkInfo.filename} with ${bulkInfo.tx_count} txs (${bulkInfo.bytes} bytes)`); + + return new Uint8Array(aBulk); } - }); - - let bulksData = (await Promise.all(promises)).filter(data => data.length > 0); - - - let result: ParseTxsColdStorageResult = await this.updateStateColdStorage(bulksData, BigInt(actualRangeStart), BigInt(actualRangeEnd)); - result.decryptedMemos.forEach((aMemo) => { - this.history?.saveDecryptedMemo(aMemo, false); + + throw new InternalError(`Cold storage corrupted (invalid file size: ${aBulk.byteLength})`) + } else { + throw new InternalError(`Couldn't load cold storage (invalid response code: ${response.status})`) + } }); + + let bulksData = (await Promise.all(promises)).filter(data => data.length > 0); + + let result: ParseTxsColdStorageResult = await this.updateStateColdStorage(bulksData, BigInt(actualRangeStart), BigInt(actualRangeEnd)); + result.decryptedMemos.forEach((aMemo) => { + this.history?.saveDecryptedMemo(aMemo, false); + }); - syncResult.txCount = result.txCnt; - syncResult.decryptedLeafs = result.decryptedLeafsCnt; - syncResult.firstIndex = actualRangeStart; - syncResult.nextIndex = actualRangeEnd; - syncResult.totalTime = Date.now() - startTime; - - const isStateCorrect = await this.verifyState(getPoolRoot); - if (!isStateCorrect) { - console.warn(`🧊[ColdSync] Merkle tree root at index ${await this.getNextIndex()} mistmatch! Wiping the state...`); - await this.clean(); // rollback to 0 - this.skipColdStorage = true; // prevent cold storage usage - - syncResult.txCount = 0; - syncResult.decryptedLeafs = 0; - syncResult.firstIndex = 0; - syncResult.nextIndex = 0; - } else { - console.log(`🧊[ColdSync] ${syncResult.txCount} txs have been loaded in ${syncResult.totalTime / 1000} secs (${syncResult.totalTime / syncResult.txCount} ms/tx)`); - console.log(`🧊[ColdSync] Merkle root after tree update: ${await this.getRoot()} @ ${await this.getNextIndex()}`); - } + if (this.lastSyncInfo) this.lastSyncInfo.processedTxCount += result.txCnt; + + syncResult.txCount = result.txCnt; + syncResult.decryptedLeafs = result.decryptedLeafsCnt; + syncResult.firstIndex = actualRangeStart; + syncResult.nextIndex = actualRangeEnd; + syncResult.totalTime = Date.now() - startTime; + + const isStateCorrect = await this.verifyState(getPoolRoot); + if (!isStateCorrect) { + console.warn(`🧊[ColdSync] Merkle tree root at index ${await this.getNextIndex()} mistmatch! Wiping the state...`); + await this.clean(); // rollback to 0 + if (this.lastSyncInfo) this.lastSyncInfo.processedTxCount = 0; + this.skipColdStorage = true; // prevent cold storage usage + + syncResult.txCount = 0; + syncResult.decryptedLeafs = 0; + syncResult.firstIndex = 0; + syncResult.nextIndex = 0; + } else { + console.log(`🧊[ColdSync] ${syncResult.txCount} txs have been loaded in ${syncResult.totalTime / 1000} secs (${syncResult.totalTime / syncResult.txCount} ms/tx)`); + console.log(`🧊[ColdSync] Merkle root after tree update: ${await this.getRoot()} @ ${await this.getNextIndex()}`); } - } catch (err) { - console.warn(`🧊[ColdSync] cannot sync with cold storage: ${err}`); } + } catch (err) { + console.warn(`🧊[ColdSync] cannot sync with cold storage: ${err}`); } } diff --git a/src/worker.ts b/src/worker.ts index b4f66ad2..4ec296ea 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -182,10 +182,12 @@ const obj = { }, async updateState(accountId: string, stateUpdate: StateUpdate, siblings?: TreeNode[]): Promise { + console.debug('Web worker: updateState'); return zpAccounts[accountId].updateState(stateUpdate, siblings); }, async updateStateColdStorage(accountId: string, bulks: Uint8Array[], indexFrom?: bigint, indexTo?: bigint): Promise { + console.debug('Web worker: updateStateColdStorage'); return zpAccounts[accountId].updateStateColdStorage(bulks, indexFrom, indexTo); }, From aa90f5879e3230264fec88d28d1005a1406578ed Mon Sep 17 00:00:00 2001 From: EvgenKor Date: Mon, 9 Oct 2023 10:21:49 +0300 Subject: [PATCH 2/3] Tron support and network module improvements (#161) * Preparing network backend to support multiple RPCs * Moving web3 interaction to the Network backend [wip] * Fetching tx [wip] * Ephemeral addresses subsystem fixes * All blockchain-specific actions were moved to the NetworkBackend * Re-generating subgraph * Getting regular transactions from the subgraph * Improved subgraph interaction * Set subgraph fetch packet size * Moving signing routines to the NetworkBackend, fixing history issues * Added network types for Tron * Subgraph: changing schema (id -> index) * TronNetworkBackend implementation * Bugfixing * Fixes after relayer testing * Fix txHash issue * Fix issue with minTxAmount * removing launch.json * gitignore * Retrying web3 methods * Evm network RPC retries * RPC switching fixes * MultiRpcManager class * Getting DD from the contract directly (by index) * Getting DD details from the contract directly (as a fallback) * Fetching pending direct deposits from contract directly * Getting DD fee in accountless mode * Waiting for a block number * Syncing provider by block number during deposits * Do not retry sending native txs * New version * Retrieving is 'nonces' method supports for a token * Removed default values for critical parameters * Reload history record for DD txs fetched from RPC (as a fallback branch) * Added nile network, fixed minor cosmetic issues * Fix nextNullifier byte order * Fix Tron timestamp dimension (ms->s) * Updating wasm lib version --- .gitignore | 1 + copy_lib_to_console.sh | 2 - package.json | 12 +- src/.graphclient/index.ts | 1904 +- src/.graphclient/schema.graphql | 1550 +- .../zkbob-bob-goerli/introspectionSchema.ts | 6407 ----- .../sources/zkbob-bob-goerli/schema.graphql | 542 - .../sources/zkbob-bob-goerli/types.ts | 551 - .../zkbob-usdc-polygon/introspectionSchema.ts | 23958 ++++++++++++++++ .../sources/zkbob-usdc-polygon/schema.graphql | 1928 ++ .../sources/zkbob-usdc-polygon/types.ts | 1906 ++ src/.graphclientrc.yml | 9 +- src/client-provider.ts | 54 +- src/client.ts | 182 +- src/dd.ts | 165 + src/dd/dd-query.graphql | 11 - src/dd/index.ts | 163 - src/ephemeral.ts | 165 +- src/history.ts | 621 +- src/index.ts | 4 +- src/network-type.ts | 16 + src/networks/evm.ts | 273 - src/networks/evm/calldata.ts | 95 + src/networks/{ => evm}/evm-abi.ts | 158 + src/networks/evm/index.ts | 704 + src/networks/index.ts | 107 + src/networks/network.ts | 33 - src/networks/rpcman.ts | 127 + src/networks/tron/abi/usdt-abi.json | 252 + src/networks/tron/index.ts | 784 + src/services/relayer.ts | 4 +- src/signers/abstract-signer.ts | 35 +- src/signers/signer-factory.ts | 2 +- src/state.ts | 29 +- src/subgraph/dd-query.graphql | 43 + src/subgraph/index.ts | 230 + .../dd-resolvers.ts => subgraph/resolvers.ts} | 0 src/subgraph/tx-query.graphql | 63 + src/tx.ts | 305 +- src/utils.ts | 98 +- yarn.lock | 203 +- 41 files changed, 34593 insertions(+), 9103 deletions(-) delete mode 100755 copy_lib_to_console.sh delete mode 100644 src/.graphclient/sources/zkbob-bob-goerli/introspectionSchema.ts delete mode 100644 src/.graphclient/sources/zkbob-bob-goerli/schema.graphql delete mode 100644 src/.graphclient/sources/zkbob-bob-goerli/types.ts create mode 100644 src/.graphclient/sources/zkbob-usdc-polygon/introspectionSchema.ts create mode 100644 src/.graphclient/sources/zkbob-usdc-polygon/schema.graphql create mode 100644 src/.graphclient/sources/zkbob-usdc-polygon/types.ts create mode 100644 src/dd.ts delete mode 100644 src/dd/dd-query.graphql delete mode 100644 src/dd/index.ts delete mode 100644 src/networks/evm.ts create mode 100644 src/networks/evm/calldata.ts rename src/networks/{ => evm}/evm-abi.ts (67%) create mode 100644 src/networks/evm/index.ts create mode 100644 src/networks/index.ts delete mode 100644 src/networks/network.ts create mode 100644 src/networks/rpcman.ts create mode 100644 src/networks/tron/abi/usdt-abi.json create mode 100644 src/networks/tron/index.ts create mode 100644 src/subgraph/dd-query.graphql create mode 100644 src/subgraph/index.ts rename src/{dd/dd-resolvers.ts => subgraph/resolvers.ts} (100%) create mode 100644 src/subgraph/tx-query.graphql diff --git a/.gitignore b/.gitignore index aa6cc2e6..d1fd9ef0 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,4 @@ dist .parcel-cache *.DS_Store /lib/ +/.vscode/launch.json diff --git a/copy_lib_to_console.sh b/copy_lib_to_console.sh deleted file mode 100755 index dadd6771..00000000 --- a/copy_lib_to_console.sh +++ /dev/null @@ -1,2 +0,0 @@ -rm -rf ../zkbob-console/node_modules/zkbob-client-js -cp -R ../zkbob-client-js ../zkbob-console/node_modules/zkbob-client-js diff --git a/package.json b/package.json index 91029924..0bf7be8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zkbob-client-js", - "version": "5.3.0", + "version": "5.3.0-beta7", "description": "zkBob integration library", "repository": "git@github.com:zkBob/libzkbob-client-js.git", "author": "Dmitry Vdovin ", @@ -20,6 +20,7 @@ }, "dependencies": { "@ethereumjs/util": "^8.0.2", + "@graphprotocol/client-cli": "3.0.0", "@metamask/eth-sig-util": "5.0.0", "@scure/bip32": "1.1.1", "@scure/bip39": "1.1.0", @@ -29,18 +30,21 @@ "graphql": "16.7.1", "hdwallet-babyjub": "^0.0.2", "idb": "^7.0.0", - "libzkbob-rs-wasm-web": "1.4.1", - "libzkbob-rs-wasm-web-mt": "1.4.1", + "libzkbob-rs-wasm-web": "1.4.2", + "libzkbob-rs-wasm-web-mt": "1.4.2", + "promise-throttle": "^1.1.2", "regenerator-runtime": "^0.13.9", + "tronweb": "^5.3.0", "wasm-feature-detect": "^1.2.11", "web3": "1.8.0", "web3-utils": "1.8.0", - "@graphprotocol/client-cli": "3.0.0" + "promise-retry": "^2.0.1" }, "devDependencies": { "@types/ethereum-protocol": "^1.0.1", "@types/node": "^20.3.3", "@types/web3": "1.0.20", + "@types/promise-retry": "^1.1.3", "ts-loader": "^9.2.6", "typescript": "^5.1.6", "webpack": "^5.64.2", diff --git a/src/.graphclient/index.ts b/src/.graphclient/index.ts index 2014e7eb..48c676f9 100644 --- a/src/.graphclient/index.ts +++ b/src/.graphclient/index.ts @@ -21,8 +21,8 @@ import { getMesh, ExecuteMeshFn, SubscribeMeshFn, MeshContext as BaseMeshContext import { MeshStore, FsStoreStorageAdapter } from '@graphql-mesh/store'; import { path as pathModule } from '@graphql-mesh/cross-helpers'; import { ImportFn } from '@graphql-mesh/types'; -import type { ZkbobBobGoerliTypes } from './sources/zkbob-bob-goerli/types'; -import * as importedModule$0 from "./sources/zkbob-bob-goerli/introspectionSchema"; +import type { ZkbobUsdcPolygonTypes } from './sources/zkbob-usdc-polygon/types'; +import * as importedModule$0 from "./sources/zkbob-usdc-polygon/introspectionSchema"; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -48,10 +48,26 @@ export type Scalars = { export type Query = { directDeposit?: Maybe; directDeposits: Array; + payment?: Maybe; + payments: Array; + zkCommon?: Maybe; + zkCommons: Array; + depositOperation?: Maybe; + depositOperations: Array; + transferOperation?: Maybe; + transferOperations: Array; + withdrawalOperation?: Maybe; + withdrawalOperations: Array; + permittableDepositOperation?: Maybe; + permittableDepositOperations: Array; + ddbatchOperation?: Maybe; + ddbatchOperations: Array; + poolTx?: Maybe; + poolTxes: Array; lastSyncBlock?: Maybe; lastSyncBlocks: Array; - message?: Maybe; - messages: Array; + operation?: Maybe; + operations: Array; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; }; @@ -75,6 +91,150 @@ export type QuerydirectDepositsArgs = { }; +export type QuerypaymentArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypaymentsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryzkCommonArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryzkCommonsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerydepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerydepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytransferOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytransferOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerywithdrawalOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerywithdrawalOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypermittableDepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypermittableDepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryddbatchOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryddbatchOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypoolTxArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypoolTxesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + export type QuerylastSyncBlockArgs = { id: Scalars['ID']; block?: InputMaybe; @@ -93,19 +253,19 @@ export type QuerylastSyncBlocksArgs = { }; -export type QuerymessageArgs = { +export type QueryoperationArgs = { id: Scalars['ID']; block?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; }; -export type QuerymessagesArgs = { +export type QueryoperationsArgs = { skip?: InputMaybe; first?: InputMaybe; - orderBy?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - where?: InputMaybe; + where?: InputMaybe; block?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; }; @@ -118,10 +278,26 @@ export type Query_metaArgs = { export type Subscription = { directDeposit?: Maybe; directDeposits: Array; + payment?: Maybe; + payments: Array; + zkCommon?: Maybe; + zkCommons: Array; + depositOperation?: Maybe; + depositOperations: Array; + transferOperation?: Maybe; + transferOperations: Array; + withdrawalOperation?: Maybe; + withdrawalOperations: Array; + permittableDepositOperation?: Maybe; + permittableDepositOperations: Array; + ddbatchOperation?: Maybe; + ddbatchOperations: Array; + poolTx?: Maybe; + poolTxes: Array; lastSyncBlock?: Maybe; lastSyncBlocks: Array; - message?: Maybe; - messages: Array; + operation?: Maybe; + operations: Array; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; }; @@ -145,6 +321,150 @@ export type SubscriptiondirectDepositsArgs = { }; +export type SubscriptionpaymentArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpaymentsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionzkCommonArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionzkCommonsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiondepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiondepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontransferOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontransferOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionwithdrawalOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionwithdrawalOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpermittableDepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpermittableDepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionddbatchOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionddbatchOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpoolTxArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpoolTxesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + export type SubscriptionlastSyncBlockArgs = { id: Scalars['ID']; block?: InputMaybe; @@ -163,19 +483,19 @@ export type SubscriptionlastSyncBlocksArgs = { }; -export type SubscriptionmessageArgs = { +export type SubscriptionoperationArgs = { id: Scalars['ID']; block?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionmessagesArgs = { +export type SubscriptionoperationsArgs = { skip?: InputMaybe; first?: InputMaybe; - orderBy?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - where?: InputMaybe; + where?: InputMaybe; block?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; }; @@ -195,8 +515,199 @@ export type Block_height = { number_gte?: InputMaybe; }; +export type DDBatchOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + delegated_deposits: Array; +}; + + +export type DDBatchOperationdelegated_depositsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; +}; + +export type DDBatchOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + delegated_deposits?: InputMaybe>; + delegated_deposits_not?: InputMaybe>; + delegated_deposits_contains?: InputMaybe>; + delegated_deposits_contains_nocase?: InputMaybe>; + delegated_deposits_not_contains?: InputMaybe>; + delegated_deposits_not_contains_nocase?: InputMaybe>; + delegated_deposits_?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type DDBatchOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'delegated_deposits'; + +export type DepositOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; +}; + +export type DepositOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type DepositOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'token_amount' + | 'fee'; + export type DirectDeposit = { id: Scalars['String']; + index: Scalars['BigInt']; pending: Scalars['Boolean']; completed: Scalars['Boolean']; refunded: Scalars['Boolean']; @@ -205,9 +716,11 @@ export type DirectDeposit = { zkAddress_diversifier: Scalars['Bytes']; zkAddress_pk: Scalars['Bytes']; deposit: Scalars['BigInt']; + fee: Scalars['BigInt']; bnInit: Scalars['BigInt']; tsInit: Scalars['BigInt']; txInit: Scalars['Bytes']; + payment?: Maybe; bnClosed?: Maybe; tsClosed?: Maybe; txClosed?: Maybe; @@ -235,6 +748,14 @@ export type DirectDeposit_filter = { id_ends_with_nocase?: InputMaybe; id_not_ends_with?: InputMaybe; id_not_ends_with_nocase?: InputMaybe; + index?: InputMaybe; + index_not?: InputMaybe; + index_gt?: InputMaybe; + index_lt?: InputMaybe; + index_gte?: InputMaybe; + index_lte?: InputMaybe; + index_in?: InputMaybe>; + index_not_in?: InputMaybe>; pending?: InputMaybe; pending_not?: InputMaybe; pending_in?: InputMaybe>; @@ -295,6 +816,14 @@ export type DirectDeposit_filter = { deposit_lte?: InputMaybe; deposit_in?: InputMaybe>; deposit_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; bnInit?: InputMaybe; bnInit_not?: InputMaybe; bnInit_gt?: InputMaybe; @@ -321,6 +850,27 @@ export type DirectDeposit_filter = { txInit_not_in?: InputMaybe>; txInit_contains?: InputMaybe; txInit_not_contains?: InputMaybe; + payment?: InputMaybe; + payment_not?: InputMaybe; + payment_gt?: InputMaybe; + payment_lt?: InputMaybe; + payment_gte?: InputMaybe; + payment_lte?: InputMaybe; + payment_in?: InputMaybe>; + payment_not_in?: InputMaybe>; + payment_contains?: InputMaybe; + payment_contains_nocase?: InputMaybe; + payment_not_contains?: InputMaybe; + payment_not_contains_nocase?: InputMaybe; + payment_starts_with?: InputMaybe; + payment_starts_with_nocase?: InputMaybe; + payment_not_starts_with?: InputMaybe; + payment_not_starts_with_nocase?: InputMaybe; + payment_ends_with?: InputMaybe; + payment_ends_with_nocase?: InputMaybe; + payment_not_ends_with?: InputMaybe; + payment_not_ends_with_nocase?: InputMaybe; + payment_?: InputMaybe; bnClosed?: InputMaybe; bnClosed_not?: InputMaybe; bnClosed_gt?: InputMaybe; @@ -353,78 +903,420 @@ export type DirectDeposit_filter = { or?: InputMaybe>>; }; -export type DirectDeposit_orderBy = +export type DirectDeposit_orderBy = + | 'id' + | 'index' + | 'pending' + | 'completed' + | 'refunded' + | 'sender' + | 'fallbackUser' + | 'zkAddress_diversifier' + | 'zkAddress_pk' + | 'deposit' + | 'fee' + | 'bnInit' + | 'tsInit' + | 'txInit' + | 'payment' + | 'payment__id' + | 'payment__sender' + | 'payment__token' + | 'payment__note' + | 'bnClosed' + | 'tsClosed' + | 'txClosed'; + +export type LastSyncBlock = { + id: Scalars['Bytes']; + block?: Maybe; +}; + +export type LastSyncBlock_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_not_contains?: InputMaybe; + block?: InputMaybe; + block_not?: InputMaybe; + block_gt?: InputMaybe; + block_lt?: InputMaybe; + block_gte?: InputMaybe; + block_lte?: InputMaybe; + block_in?: InputMaybe>; + block_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type LastSyncBlock_orderBy = + | 'id' + | 'block'; + +export type Operation = { + id: Scalars['String']; + pooltx: PoolTx; +}; + +export type Operation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type Operation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata'; + +/** Defines the order direction, either ascending or descending */ +export type OrderDirection = + | 'asc' + | 'desc'; + +export type Payment = { + id: Scalars['String']; + sender?: Maybe; + delegated_deposit: DirectDeposit; + token: Scalars['Bytes']; + note?: Maybe; +}; + +export type Payment_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + sender?: InputMaybe; + sender_not?: InputMaybe; + sender_gt?: InputMaybe; + sender_lt?: InputMaybe; + sender_gte?: InputMaybe; + sender_lte?: InputMaybe; + sender_in?: InputMaybe>; + sender_not_in?: InputMaybe>; + sender_contains?: InputMaybe; + sender_not_contains?: InputMaybe; + delegated_deposit?: InputMaybe; + delegated_deposit_not?: InputMaybe; + delegated_deposit_gt?: InputMaybe; + delegated_deposit_lt?: InputMaybe; + delegated_deposit_gte?: InputMaybe; + delegated_deposit_lte?: InputMaybe; + delegated_deposit_in?: InputMaybe>; + delegated_deposit_not_in?: InputMaybe>; + delegated_deposit_contains?: InputMaybe; + delegated_deposit_contains_nocase?: InputMaybe; + delegated_deposit_not_contains?: InputMaybe; + delegated_deposit_not_contains_nocase?: InputMaybe; + delegated_deposit_starts_with?: InputMaybe; + delegated_deposit_starts_with_nocase?: InputMaybe; + delegated_deposit_not_starts_with?: InputMaybe; + delegated_deposit_not_starts_with_nocase?: InputMaybe; + delegated_deposit_ends_with?: InputMaybe; + delegated_deposit_ends_with_nocase?: InputMaybe; + delegated_deposit_not_ends_with?: InputMaybe; + delegated_deposit_not_ends_with_nocase?: InputMaybe; + delegated_deposit_?: InputMaybe; + token?: InputMaybe; + token_not?: InputMaybe; + token_gt?: InputMaybe; + token_lt?: InputMaybe; + token_gte?: InputMaybe; + token_lte?: InputMaybe; + token_in?: InputMaybe>; + token_not_in?: InputMaybe>; + token_contains?: InputMaybe; + token_not_contains?: InputMaybe; + note?: InputMaybe; + note_not?: InputMaybe; + note_gt?: InputMaybe; + note_lt?: InputMaybe; + note_gte?: InputMaybe; + note_lte?: InputMaybe; + note_in?: InputMaybe>; + note_not_in?: InputMaybe>; + note_contains?: InputMaybe; + note_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type Payment_orderBy = | 'id' - | 'pending' - | 'completed' - | 'refunded' | 'sender' - | 'fallbackUser' - | 'zkAddress_diversifier' - | 'zkAddress_pk' - | 'deposit' - | 'bnInit' - | 'tsInit' - | 'txInit' - | 'bnClosed' - | 'tsClosed' - | 'txClosed'; - -export type LastSyncBlock = { - id: Scalars['Bytes']; - block?: Maybe; + | 'delegated_deposit' + | 'delegated_deposit__id' + | 'delegated_deposit__index' + | 'delegated_deposit__pending' + | 'delegated_deposit__completed' + | 'delegated_deposit__refunded' + | 'delegated_deposit__sender' + | 'delegated_deposit__fallbackUser' + | 'delegated_deposit__zkAddress_diversifier' + | 'delegated_deposit__zkAddress_pk' + | 'delegated_deposit__deposit' + | 'delegated_deposit__fee' + | 'delegated_deposit__bnInit' + | 'delegated_deposit__tsInit' + | 'delegated_deposit__txInit' + | 'delegated_deposit__bnClosed' + | 'delegated_deposit__tsClosed' + | 'delegated_deposit__txClosed' + | 'token' + | 'note'; + +export type PermittableDepositOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; + permit_deadline: Scalars['BigInt']; + permit_holder: Scalars['Bytes']; + sig: Scalars['Bytes']; }; -export type LastSyncBlock_filter = { - id?: InputMaybe; - id_not?: InputMaybe; - id_gt?: InputMaybe; - id_lt?: InputMaybe; - id_gte?: InputMaybe; - id_lte?: InputMaybe; - id_in?: InputMaybe>; - id_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_not_contains?: InputMaybe; - block?: InputMaybe; - block_not?: InputMaybe; - block_gt?: InputMaybe; - block_lt?: InputMaybe; - block_gte?: InputMaybe; - block_lte?: InputMaybe; - block_in?: InputMaybe>; - block_not_in?: InputMaybe>; +export type PermittableDepositOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + permit_deadline?: InputMaybe; + permit_deadline_not?: InputMaybe; + permit_deadline_gt?: InputMaybe; + permit_deadline_lt?: InputMaybe; + permit_deadline_gte?: InputMaybe; + permit_deadline_lte?: InputMaybe; + permit_deadline_in?: InputMaybe>; + permit_deadline_not_in?: InputMaybe>; + permit_holder?: InputMaybe; + permit_holder_not?: InputMaybe; + permit_holder_gt?: InputMaybe; + permit_holder_lt?: InputMaybe; + permit_holder_gte?: InputMaybe; + permit_holder_lte?: InputMaybe; + permit_holder_in?: InputMaybe>; + permit_holder_not_in?: InputMaybe>; + permit_holder_contains?: InputMaybe; + permit_holder_not_contains?: InputMaybe; + sig?: InputMaybe; + sig_not?: InputMaybe; + sig_gt?: InputMaybe; + sig_lt?: InputMaybe; + sig_gte?: InputMaybe; + sig_lte?: InputMaybe; + sig_in?: InputMaybe>; + sig_not_in?: InputMaybe>; + sig_contains?: InputMaybe; + sig_not_contains?: InputMaybe; /** Filter for the block changed event. */ _change_block?: InputMaybe; - and?: InputMaybe>>; - or?: InputMaybe>>; + and?: InputMaybe>>; + or?: InputMaybe>>; }; -export type LastSyncBlock_orderBy = +export type PermittableDepositOperation_orderBy = | 'id' - | 'block'; - -export type Message = { - id: Scalars['Bytes']; + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'token_amount' + | 'fee' + | 'permit_deadline' + | 'permit_holder' + | 'sig'; + +export type PoolTx = { + id: Scalars['String']; index: Scalars['BigInt']; - hash: Scalars['Bytes']; + tx: Scalars['Bytes']; + ts: Scalars['BigInt']; + all_messages_hash: Scalars['Bytes']; + type: Scalars['Int']; message: Scalars['Bytes']; - blockNumber: Scalars['BigInt']; - blockTimestamp: Scalars['BigInt']; - transactionHash: Scalars['Bytes']; + gas_used: Scalars['Int']; + zk: ZkCommon; + operation: Operation; + calldata: Scalars['Bytes']; }; -export type Message_filter = { - id?: InputMaybe; - id_not?: InputMaybe; - id_gt?: InputMaybe; - id_lt?: InputMaybe; - id_gte?: InputMaybe; - id_lte?: InputMaybe; - id_in?: InputMaybe>; - id_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_not_contains?: InputMaybe; +export type PoolTx_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; index?: InputMaybe; index_not?: InputMaybe; index_gt?: InputMaybe; @@ -433,16 +1325,42 @@ export type Message_filter = { index_lte?: InputMaybe; index_in?: InputMaybe>; index_not_in?: InputMaybe>; - hash?: InputMaybe; - hash_not?: InputMaybe; - hash_gt?: InputMaybe; - hash_lt?: InputMaybe; - hash_gte?: InputMaybe; - hash_lte?: InputMaybe; - hash_in?: InputMaybe>; - hash_not_in?: InputMaybe>; - hash_contains?: InputMaybe; - hash_not_contains?: InputMaybe; + tx?: InputMaybe; + tx_not?: InputMaybe; + tx_gt?: InputMaybe; + tx_lt?: InputMaybe; + tx_gte?: InputMaybe; + tx_lte?: InputMaybe; + tx_in?: InputMaybe>; + tx_not_in?: InputMaybe>; + tx_contains?: InputMaybe; + tx_not_contains?: InputMaybe; + ts?: InputMaybe; + ts_not?: InputMaybe; + ts_gt?: InputMaybe; + ts_lt?: InputMaybe; + ts_gte?: InputMaybe; + ts_lte?: InputMaybe; + ts_in?: InputMaybe>; + ts_not_in?: InputMaybe>; + all_messages_hash?: InputMaybe; + all_messages_hash_not?: InputMaybe; + all_messages_hash_gt?: InputMaybe; + all_messages_hash_lt?: InputMaybe; + all_messages_hash_gte?: InputMaybe; + all_messages_hash_lte?: InputMaybe; + all_messages_hash_in?: InputMaybe>; + all_messages_hash_not_in?: InputMaybe>; + all_messages_hash_contains?: InputMaybe; + all_messages_hash_not_contains?: InputMaybe; + type?: InputMaybe; + type_not?: InputMaybe; + type_gt?: InputMaybe; + type_lt?: InputMaybe; + type_gte?: InputMaybe; + type_lte?: InputMaybe; + type_in?: InputMaybe>; + type_not_in?: InputMaybe>; message?: InputMaybe; message_not?: InputMaybe; message_gt?: InputMaybe; @@ -453,51 +1371,424 @@ export type Message_filter = { message_not_in?: InputMaybe>; message_contains?: InputMaybe; message_not_contains?: InputMaybe; - blockNumber?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_lt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_not_in?: InputMaybe>; - transactionHash?: InputMaybe; - transactionHash_not?: InputMaybe; - transactionHash_gt?: InputMaybe; - transactionHash_lt?: InputMaybe; - transactionHash_gte?: InputMaybe; - transactionHash_lte?: InputMaybe; - transactionHash_in?: InputMaybe>; - transactionHash_not_in?: InputMaybe>; - transactionHash_contains?: InputMaybe; - transactionHash_not_contains?: InputMaybe; + gas_used?: InputMaybe; + gas_used_not?: InputMaybe; + gas_used_gt?: InputMaybe; + gas_used_lt?: InputMaybe; + gas_used_gte?: InputMaybe; + gas_used_lte?: InputMaybe; + gas_used_in?: InputMaybe>; + gas_used_not_in?: InputMaybe>; + zk?: InputMaybe; + zk_not?: InputMaybe; + zk_gt?: InputMaybe; + zk_lt?: InputMaybe; + zk_gte?: InputMaybe; + zk_lte?: InputMaybe; + zk_in?: InputMaybe>; + zk_not_in?: InputMaybe>; + zk_contains?: InputMaybe; + zk_contains_nocase?: InputMaybe; + zk_not_contains?: InputMaybe; + zk_not_contains_nocase?: InputMaybe; + zk_starts_with?: InputMaybe; + zk_starts_with_nocase?: InputMaybe; + zk_not_starts_with?: InputMaybe; + zk_not_starts_with_nocase?: InputMaybe; + zk_ends_with?: InputMaybe; + zk_ends_with_nocase?: InputMaybe; + zk_not_ends_with?: InputMaybe; + zk_not_ends_with_nocase?: InputMaybe; + zk_?: InputMaybe; + operation?: InputMaybe; + operation_not?: InputMaybe; + operation_gt?: InputMaybe; + operation_lt?: InputMaybe; + operation_gte?: InputMaybe; + operation_lte?: InputMaybe; + operation_in?: InputMaybe>; + operation_not_in?: InputMaybe>; + operation_contains?: InputMaybe; + operation_contains_nocase?: InputMaybe; + operation_not_contains?: InputMaybe; + operation_not_contains_nocase?: InputMaybe; + operation_starts_with?: InputMaybe; + operation_starts_with_nocase?: InputMaybe; + operation_not_starts_with?: InputMaybe; + operation_not_starts_with_nocase?: InputMaybe; + operation_ends_with?: InputMaybe; + operation_ends_with_nocase?: InputMaybe; + operation_not_ends_with?: InputMaybe; + operation_not_ends_with_nocase?: InputMaybe; + operation_?: InputMaybe; + calldata?: InputMaybe; + calldata_not?: InputMaybe; + calldata_gt?: InputMaybe; + calldata_lt?: InputMaybe; + calldata_gte?: InputMaybe; + calldata_lte?: InputMaybe; + calldata_in?: InputMaybe>; + calldata_not_in?: InputMaybe>; + calldata_contains?: InputMaybe; + calldata_not_contains?: InputMaybe; /** Filter for the block changed event. */ _change_block?: InputMaybe; - and?: InputMaybe>>; - or?: InputMaybe>>; + and?: InputMaybe>>; + or?: InputMaybe>>; }; -export type Message_orderBy = +export type PoolTx_orderBy = | 'id' | 'index' - | 'hash' + | 'tx' + | 'ts' + | 'all_messages_hash' + | 'type' | 'message' - | 'blockNumber' - | 'blockTimestamp' - | 'transactionHash'; + | 'gas_used' + | 'zk' + | 'zk__id' + | 'zk__out_commit' + | 'zk__tree_root_after' + | 'operation' + | 'operation__id' + | 'calldata'; + +export type TransferOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + fee: Scalars['BigInt']; +}; -/** Defines the order direction, either ascending or descending */ -export type OrderDirection = - | 'asc' - | 'desc'; +export type TransferOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type TransferOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'fee'; + +export type WithdrawalOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + energy_amount: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; + native_amount: Scalars['BigInt']; + receiver: Scalars['Bytes']; +}; + +export type WithdrawalOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + energy_amount?: InputMaybe; + energy_amount_not?: InputMaybe; + energy_amount_gt?: InputMaybe; + energy_amount_lt?: InputMaybe; + energy_amount_gte?: InputMaybe; + energy_amount_lte?: InputMaybe; + energy_amount_in?: InputMaybe>; + energy_amount_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + native_amount?: InputMaybe; + native_amount_not?: InputMaybe; + native_amount_gt?: InputMaybe; + native_amount_lt?: InputMaybe; + native_amount_gte?: InputMaybe; + native_amount_lte?: InputMaybe; + native_amount_in?: InputMaybe>; + native_amount_not_in?: InputMaybe>; + receiver?: InputMaybe; + receiver_not?: InputMaybe; + receiver_gt?: InputMaybe; + receiver_lt?: InputMaybe; + receiver_gte?: InputMaybe; + receiver_lte?: InputMaybe; + receiver_in?: InputMaybe>; + receiver_not_in?: InputMaybe>; + receiver_contains?: InputMaybe; + receiver_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type WithdrawalOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'energy_amount' + | 'token_amount' + | 'fee' + | 'native_amount' + | 'receiver'; + +export type ZkCommon = { + id: Scalars['String']; + pooltx: PoolTx; + out_commit: Scalars['BigInt']; + witness: Array; + tree_root_after: Scalars['BigInt']; + tree_proof: Array; +}; + +export type ZkCommon_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + out_commit?: InputMaybe; + out_commit_not?: InputMaybe; + out_commit_gt?: InputMaybe; + out_commit_lt?: InputMaybe; + out_commit_gte?: InputMaybe; + out_commit_lte?: InputMaybe; + out_commit_in?: InputMaybe>; + out_commit_not_in?: InputMaybe>; + witness?: InputMaybe>; + witness_not?: InputMaybe>; + witness_contains?: InputMaybe>; + witness_contains_nocase?: InputMaybe>; + witness_not_contains?: InputMaybe>; + witness_not_contains_nocase?: InputMaybe>; + tree_root_after?: InputMaybe; + tree_root_after_not?: InputMaybe; + tree_root_after_gt?: InputMaybe; + tree_root_after_lt?: InputMaybe; + tree_root_after_gte?: InputMaybe; + tree_root_after_lte?: InputMaybe; + tree_root_after_in?: InputMaybe>; + tree_root_after_not_in?: InputMaybe>; + tree_proof?: InputMaybe>; + tree_proof_not?: InputMaybe>; + tree_proof_contains?: InputMaybe>; + tree_proof_contains_nocase?: InputMaybe>; + tree_proof_not_contains?: InputMaybe>; + tree_proof_not_contains_nocase?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type ZkCommon_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'out_commit' + | 'witness' + | 'tree_root_after' + | 'tree_proof'; export type _Block_ = { /** The hash of the block */ @@ -624,6 +1915,12 @@ export type ResolversTypes = ResolversObject<{ Block_height: Block_height; Boolean: ResolverTypeWrapper; Bytes: ResolverTypeWrapper; + DDBatchOperation: ResolverTypeWrapper; + DDBatchOperation_filter: DDBatchOperation_filter; + DDBatchOperation_orderBy: DDBatchOperation_orderBy; + DepositOperation: ResolverTypeWrapper; + DepositOperation_filter: DepositOperation_filter; + DepositOperation_orderBy: DepositOperation_orderBy; DirectDeposit: ResolverTypeWrapper; DirectDeposit_filter: DirectDeposit_filter; DirectDeposit_orderBy: DirectDeposit_orderBy; @@ -634,11 +1931,29 @@ export type ResolversTypes = ResolversObject<{ LastSyncBlock: ResolverTypeWrapper; LastSyncBlock_filter: LastSyncBlock_filter; LastSyncBlock_orderBy: LastSyncBlock_orderBy; - Message: ResolverTypeWrapper; - Message_filter: Message_filter; - Message_orderBy: Message_orderBy; + Operation: ResolversTypes['DDBatchOperation'] | ResolversTypes['DepositOperation'] | ResolversTypes['PermittableDepositOperation'] | ResolversTypes['TransferOperation'] | ResolversTypes['WithdrawalOperation']; + Operation_filter: Operation_filter; + Operation_orderBy: Operation_orderBy; OrderDirection: OrderDirection; + Payment: ResolverTypeWrapper; + Payment_filter: Payment_filter; + Payment_orderBy: Payment_orderBy; + PermittableDepositOperation: ResolverTypeWrapper; + PermittableDepositOperation_filter: PermittableDepositOperation_filter; + PermittableDepositOperation_orderBy: PermittableDepositOperation_orderBy; + PoolTx: ResolverTypeWrapper; + PoolTx_filter: PoolTx_filter; + PoolTx_orderBy: PoolTx_orderBy; String: ResolverTypeWrapper; + TransferOperation: ResolverTypeWrapper; + TransferOperation_filter: TransferOperation_filter; + TransferOperation_orderBy: TransferOperation_orderBy; + WithdrawalOperation: ResolverTypeWrapper; + WithdrawalOperation_filter: WithdrawalOperation_filter; + WithdrawalOperation_orderBy: WithdrawalOperation_orderBy; + ZkCommon: ResolverTypeWrapper; + ZkCommon_filter: ZkCommon_filter; + ZkCommon_orderBy: ZkCommon_orderBy; _Block_: ResolverTypeWrapper<_Block_>; _Meta_: ResolverTypeWrapper<_Meta_>; _SubgraphErrorPolicy_: _SubgraphErrorPolicy_; @@ -654,6 +1969,10 @@ export type ResolversParentTypes = ResolversObject<{ Block_height: Block_height; Boolean: Scalars['Boolean']; Bytes: Scalars['Bytes']; + DDBatchOperation: DDBatchOperation; + DDBatchOperation_filter: DDBatchOperation_filter; + DepositOperation: DepositOperation; + DepositOperation_filter: DepositOperation_filter; DirectDeposit: DirectDeposit; DirectDeposit_filter: DirectDeposit_filter; Float: Scalars['Float']; @@ -662,9 +1981,21 @@ export type ResolversParentTypes = ResolversObject<{ Int8: Scalars['Int8']; LastSyncBlock: LastSyncBlock; LastSyncBlock_filter: LastSyncBlock_filter; - Message: Message; - Message_filter: Message_filter; + Operation: ResolversParentTypes['DDBatchOperation'] | ResolversParentTypes['DepositOperation'] | ResolversParentTypes['PermittableDepositOperation'] | ResolversParentTypes['TransferOperation'] | ResolversParentTypes['WithdrawalOperation']; + Operation_filter: Operation_filter; + Payment: Payment; + Payment_filter: Payment_filter; + PermittableDepositOperation: PermittableDepositOperation; + PermittableDepositOperation_filter: PermittableDepositOperation_filter; + PoolTx: PoolTx; + PoolTx_filter: PoolTx_filter; String: Scalars['String']; + TransferOperation: TransferOperation; + TransferOperation_filter: TransferOperation_filter; + WithdrawalOperation: WithdrawalOperation; + WithdrawalOperation_filter: WithdrawalOperation_filter; + ZkCommon: ZkCommon; + ZkCommon_filter: ZkCommon_filter; _Block_: _Block_; _Meta_: _Meta_; }>; @@ -688,20 +2019,52 @@ export type derivedFromDirectiveResolver = ResolversObject<{ directDeposit?: Resolver, ParentType, ContextType, RequireFields>; directDeposits?: Resolver, ParentType, ContextType, RequireFields>; + payment?: Resolver, ParentType, ContextType, RequireFields>; + payments?: Resolver, ParentType, ContextType, RequireFields>; + zkCommon?: Resolver, ParentType, ContextType, RequireFields>; + zkCommons?: Resolver, ParentType, ContextType, RequireFields>; + depositOperation?: Resolver, ParentType, ContextType, RequireFields>; + depositOperations?: Resolver, ParentType, ContextType, RequireFields>; + transferOperation?: Resolver, ParentType, ContextType, RequireFields>; + transferOperations?: Resolver, ParentType, ContextType, RequireFields>; + withdrawalOperation?: Resolver, ParentType, ContextType, RequireFields>; + withdrawalOperations?: Resolver, ParentType, ContextType, RequireFields>; + permittableDepositOperation?: Resolver, ParentType, ContextType, RequireFields>; + permittableDepositOperations?: Resolver, ParentType, ContextType, RequireFields>; + ddbatchOperation?: Resolver, ParentType, ContextType, RequireFields>; + ddbatchOperations?: Resolver, ParentType, ContextType, RequireFields>; + poolTx?: Resolver, ParentType, ContextType, RequireFields>; + poolTxes?: Resolver, ParentType, ContextType, RequireFields>; lastSyncBlock?: Resolver, ParentType, ContextType, RequireFields>; lastSyncBlocks?: Resolver, ParentType, ContextType, RequireFields>; - message?: Resolver, ParentType, ContextType, RequireFields>; - messages?: Resolver, ParentType, ContextType, RequireFields>; + operation?: Resolver, ParentType, ContextType, RequireFields>; + operations?: Resolver, ParentType, ContextType, RequireFields>; _meta?: Resolver, ParentType, ContextType, Partial>; }>; export type SubscriptionResolvers = ResolversObject<{ directDeposit?: SubscriptionResolver, "directDeposit", ParentType, ContextType, RequireFields>; directDeposits?: SubscriptionResolver, "directDeposits", ParentType, ContextType, RequireFields>; + payment?: SubscriptionResolver, "payment", ParentType, ContextType, RequireFields>; + payments?: SubscriptionResolver, "payments", ParentType, ContextType, RequireFields>; + zkCommon?: SubscriptionResolver, "zkCommon", ParentType, ContextType, RequireFields>; + zkCommons?: SubscriptionResolver, "zkCommons", ParentType, ContextType, RequireFields>; + depositOperation?: SubscriptionResolver, "depositOperation", ParentType, ContextType, RequireFields>; + depositOperations?: SubscriptionResolver, "depositOperations", ParentType, ContextType, RequireFields>; + transferOperation?: SubscriptionResolver, "transferOperation", ParentType, ContextType, RequireFields>; + transferOperations?: SubscriptionResolver, "transferOperations", ParentType, ContextType, RequireFields>; + withdrawalOperation?: SubscriptionResolver, "withdrawalOperation", ParentType, ContextType, RequireFields>; + withdrawalOperations?: SubscriptionResolver, "withdrawalOperations", ParentType, ContextType, RequireFields>; + permittableDepositOperation?: SubscriptionResolver, "permittableDepositOperation", ParentType, ContextType, RequireFields>; + permittableDepositOperations?: SubscriptionResolver, "permittableDepositOperations", ParentType, ContextType, RequireFields>; + ddbatchOperation?: SubscriptionResolver, "ddbatchOperation", ParentType, ContextType, RequireFields>; + ddbatchOperations?: SubscriptionResolver, "ddbatchOperations", ParentType, ContextType, RequireFields>; + poolTx?: SubscriptionResolver, "poolTx", ParentType, ContextType, RequireFields>; + poolTxes?: SubscriptionResolver, "poolTxes", ParentType, ContextType, RequireFields>; lastSyncBlock?: SubscriptionResolver, "lastSyncBlock", ParentType, ContextType, RequireFields>; lastSyncBlocks?: SubscriptionResolver, "lastSyncBlocks", ParentType, ContextType, RequireFields>; - message?: SubscriptionResolver, "message", ParentType, ContextType, RequireFields>; - messages?: SubscriptionResolver, "messages", ParentType, ContextType, RequireFields>; + operation?: SubscriptionResolver, "operation", ParentType, ContextType, RequireFields>; + operations?: SubscriptionResolver, "operations", ParentType, ContextType, RequireFields>; _meta?: SubscriptionResolver, "_meta", ParentType, ContextType, Partial>; }>; @@ -717,8 +2080,26 @@ export interface BytesScalarConfig extends GraphQLScalarTypeConfig = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + delegated_deposits?: Resolver, ParentType, ContextType, RequireFields>; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type DepositOperationResolvers = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + nullifier?: Resolver; + index_ref?: Resolver; + token_amount?: Resolver; + fee?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + export type DirectDepositResolvers = ResolversObject<{ id?: Resolver; + index?: Resolver; pending?: Resolver; completed?: Resolver; refunded?: Resolver; @@ -727,9 +2108,11 @@ export type DirectDepositResolvers; zkAddress_pk?: Resolver; deposit?: Resolver; + fee?: Resolver; bnInit?: Resolver; tsInit?: Resolver; txInit?: Resolver; + payment?: Resolver, ParentType, ContextType>; bnClosed?: Resolver, ParentType, ContextType>; tsClosed?: Resolver, ParentType, ContextType>; txClosed?: Resolver, ParentType, ContextType>; @@ -747,14 +2130,78 @@ export type LastSyncBlockResolvers; }>; -export type MessageResolvers = ResolversObject<{ - id?: Resolver; +export type OperationResolvers = ResolversObject<{ + __resolveType: TypeResolveFn<'DDBatchOperation' | 'DepositOperation' | 'PermittableDepositOperation' | 'TransferOperation' | 'WithdrawalOperation', ParentType, ContextType>; + id?: Resolver; + pooltx?: Resolver; +}>; + +export type PaymentResolvers = ResolversObject<{ + id?: Resolver; + sender?: Resolver, ParentType, ContextType>; + delegated_deposit?: Resolver; + token?: Resolver; + note?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type PermittableDepositOperationResolvers = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + nullifier?: Resolver; + index_ref?: Resolver; + token_amount?: Resolver; + fee?: Resolver; + permit_deadline?: Resolver; + permit_holder?: Resolver; + sig?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type PoolTxResolvers = ResolversObject<{ + id?: Resolver; index?: Resolver; - hash?: Resolver; + tx?: Resolver; + ts?: Resolver; + all_messages_hash?: Resolver; + type?: Resolver; message?: Resolver; - blockNumber?: Resolver; - blockTimestamp?: Resolver; - transactionHash?: Resolver; + gas_used?: Resolver; + zk?: Resolver; + operation?: Resolver; + calldata?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type TransferOperationResolvers = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + nullifier?: Resolver; + index_ref?: Resolver; + fee?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type WithdrawalOperationResolvers = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + nullifier?: Resolver; + index_ref?: Resolver; + energy_amount?: Resolver; + token_amount?: Resolver; + fee?: Resolver; + native_amount?: Resolver; + receiver?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}>; + +export type ZkCommonResolvers = ResolversObject<{ + id?: Resolver; + pooltx?: Resolver; + out_commit?: Resolver; + witness?: Resolver, ParentType, ContextType>; + tree_root_after?: Resolver; + tree_proof?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }>; @@ -778,10 +2225,18 @@ export type Resolvers BigDecimal?: GraphQLScalarType; BigInt?: GraphQLScalarType; Bytes?: GraphQLScalarType; + DDBatchOperation?: DDBatchOperationResolvers; + DepositOperation?: DepositOperationResolvers; DirectDeposit?: DirectDepositResolvers; Int8?: GraphQLScalarType; LastSyncBlock?: LastSyncBlockResolvers; - Message?: MessageResolvers; + Operation?: OperationResolvers; + Payment?: PaymentResolvers; + PermittableDepositOperation?: PermittableDepositOperationResolvers; + PoolTx?: PoolTxResolvers; + TransferOperation?: TransferOperationResolvers; + WithdrawalOperation?: WithdrawalOperationResolvers; + ZkCommon?: ZkCommonResolvers; _Block_?: _Block_Resolvers; _Meta_?: _Meta_Resolvers; }>; @@ -792,7 +2247,7 @@ export type DirectiveResolvers; }>; -export type MeshContext = ZkbobBobGoerliTypes.Context & BaseMeshContext; +export type MeshContext = ZkbobUsdcPolygonTypes.Context & BaseMeshContext; import { fileURLToPath } from '@graphql-mesh/utils'; @@ -801,7 +2256,7 @@ const baseDir = pathModule.join(pathModule.dirname(fileURLToPath(import.meta.url const importFn: ImportFn = (moduleId: string) => { const relativeModuleId = (pathModule.isAbsolute(moduleId) ? pathModule.relative(baseDir, moduleId) : moduleId).split('\\').join('/').replace(baseDir + '/', ''); switch(relativeModuleId) { - case ".graphclient/sources/zkbob-bob-goerli/introspectionSchema": + case ".graphclient/sources/zkbob-usdc-polygon/introspectionSchema": return Promise.resolve(importedModule$0) as T; default: @@ -834,25 +2289,25 @@ const cache = new (MeshCache as any)({ const sources: MeshResolvedSource[] = []; const transforms: MeshTransform[] = []; const additionalEnvelopPlugins: MeshPlugin[] = []; -const zkbobBobGoerliTransforms = []; -const zkbobBobGoerliHandler = new GraphqlHandler({ - name: "zkbob-bob-goerli", - config: {"endpoint":"{context.subgraphEndpoint:https://api.thegraph.com/subgraphs/name/zkbob/zkbob-bob-goerli}"}, +const zkbobUsdcPolygonTransforms = []; +const zkbobUsdcPolygonHandler = new GraphqlHandler({ + name: "zkbob-usdc-polygon", + config: {"endpoint":"{context.subgraphEndpoint:https://api.thegraph.com/subgraphs/name/zkbob/zkbob-usdc-polygon}"}, baseDir, cache, pubsub, - store: sourcesStore.child("zkbob-bob-goerli"), - logger: logger.child("zkbob-bob-goerli"), + store: sourcesStore.child("zkbob-usdc-polygon"), + logger: logger.child("zkbob-usdc-polygon"), importFn, }); sources[0] = { - name: 'zkbob-bob-goerli', - handler: zkbobBobGoerliHandler, - transforms: zkbobBobGoerliTransforms + name: 'zkbob-usdc-polygon', + handler: zkbobUsdcPolygonHandler, + transforms: zkbobUsdcPolygonTransforms } const additionalTypeDefs = [parse("extend type DirectDeposit {\n subgraphEndpoint: String!\n}"),] as any[]; const additionalResolvers = await Promise.all([ - import("../dd/dd-resolvers") + import("../subgraph/resolvers") .then(m => m.resolvers || m.default || m) ]); const merger = new(BareMerger as any)({ @@ -875,11 +2330,23 @@ const merger = new(BareMerger as any)({ get documents() { return [ { + document: DirectDepositByIdDocument, + get rawSDL() { + return printWithCache(DirectDepositByIdDocument); + }, + location: 'DirectDepositByIdDocument.graphql' + },{ document: PendingDirectDepositsDocument, get rawSDL() { return printWithCache(PendingDirectDepositsDocument); }, location: 'PendingDirectDepositsDocument.graphql' + },{ + document: PoolTxesByIndexesDocument, + get rawSDL() { + return printWithCache(PoolTxesByIndexesDocument); + }, + location: 'PoolTxesByIndexesDocument.graphql' } ]; }, @@ -918,32 +2385,171 @@ export function getBuiltGraphSDK( const sdkRequester$ = getBuiltGraphClient().then(({ sdkRequesterFactory }) => sdkRequesterFactory(globalContext)); return getSdk((...args) => sdkRequester$.then(sdkRequester => sdkRequester(...args))); } +export type DirectDepositByIdQueryVariables = Exact<{ + id: Scalars['ID']; +}>; + + +export type DirectDepositByIdQuery = { directDeposit?: Maybe<( + Pick + & { payment?: Maybe> } + )> }; + export type PendingDirectDepositsQueryVariables = Exact<{ [key: string]: never; }>; -export type PendingDirectDepositsQuery = { directDeposits: Array> }; +export type PendingDirectDepositsQuery = { directDeposits: Array<( + Pick + & { payment?: Maybe> } + )> }; + +export type PoolTxesByIndexesQueryVariables = Exact<{ + index_in?: InputMaybe | Scalars['BigInt']>; + first?: InputMaybe; +}>; +export type PoolTxesByIndexesQuery = { poolTxes: Array<( + Pick + & { zk: Pick, operation: ( + Pick + & { delegated_deposits: Array<( + Pick + & { payment?: Maybe> } + )> } + ) | ( + Pick + & { pooltx: Pick } + ) | Pick | Pick | Pick } + )> }; + + +export const DirectDepositByIdDocument = gql` + query DirectDepositById($id: ID!) { + directDeposit(id: $id) { + id + pending + refunded + completed + zkAddress_pk + zkAddress_diversifier + deposit + fee + fallbackUser + sender + tsInit + tsClosed + txInit + txClosed + payment { + note + sender + token + } + } +} + ` as unknown as DocumentNode; export const PendingDirectDepositsDocument = gql` query PendingDirectDeposits { directDeposits(orderBy: bnInit, where: {pending: true}) { id + pending zkAddress_pk zkAddress_diversifier deposit + fee fallbackUser + sender tsInit txInit + payment { + note + sender + token + } } } ` as unknown as DocumentNode; +export const PoolTxesByIndexesDocument = gql` + query PoolTxesByIndexes($index_in: [BigInt!], $first: Int = 100) { + poolTxes(where: {index_in: $index_in}, first: $first) { + index + type + zk { + out_commit + } + ts + tx + message + operation { + ... on DepositOperation { + fee + nullifier + token_amount + pooltx { + calldata + } + } + ... on PermittableDepositOperation { + fee + nullifier + permit_holder + token_amount + } + ... on TransferOperation { + fee + nullifier + } + ... on WithdrawalOperation { + fee + native_amount + nullifier + receiver + token_amount + } + ... on DDBatchOperation { + id + delegated_deposits { + id + pending + refunded + completed + zkAddress_pk + zkAddress_diversifier + deposit + fee + fallbackUser + sender + tsInit + tsClosed + txInit + txClosed + payment { + note + sender + token + } + } + } + } + } +} + ` as unknown as DocumentNode; + + export type Requester = (doc: DocumentNode, vars?: V, options?: C) => Promise | AsyncIterable export function getSdk(requester: Requester) { return { + DirectDepositById(variables: DirectDepositByIdQueryVariables, options?: C): Promise { + return requester(DirectDepositByIdDocument, variables, options) as Promise; + }, PendingDirectDeposits(variables?: PendingDirectDepositsQueryVariables, options?: C): Promise { return requester(PendingDirectDepositsDocument, variables, options) as Promise; + }, + PoolTxesByIndexes(variables?: PoolTxesByIndexesQueryVariables, options?: C): Promise { + return requester(PoolTxesByIndexesDocument, variables, options) as Promise; } }; } diff --git a/src/.graphclient/schema.graphql b/src/.graphclient/schema.graphql index 486b2e4f..158ee547 100644 --- a/src/.graphclient/schema.graphql +++ b/src/.graphclient/schema.graphql @@ -39,6 +39,214 @@ type Query { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [DirectDeposit!]! + payment( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Payment + payments( + skip: Int = 0 + first: Int = 100 + orderBy: Payment_orderBy + orderDirection: OrderDirection + where: Payment_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Payment!]! + zkCommon( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ZkCommon + zkCommons( + skip: Int = 0 + first: Int = 100 + orderBy: ZkCommon_orderBy + orderDirection: OrderDirection + where: ZkCommon_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ZkCommon!]! + depositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DepositOperation + depositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DepositOperation_orderBy + orderDirection: OrderDirection + where: DepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DepositOperation!]! + transferOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferOperation + transferOperations( + skip: Int = 0 + first: Int = 100 + orderBy: TransferOperation_orderBy + orderDirection: OrderDirection + where: TransferOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferOperation!]! + withdrawalOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): WithdrawalOperation + withdrawalOperations( + skip: Int = 0 + first: Int = 100 + orderBy: WithdrawalOperation_orderBy + orderDirection: OrderDirection + where: WithdrawalOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [WithdrawalOperation!]! + permittableDepositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PermittableDepositOperation + permittableDepositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: PermittableDepositOperation_orderBy + orderDirection: OrderDirection + where: PermittableDepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PermittableDepositOperation!]! + ddbatchOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DDBatchOperation + ddbatchOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DDBatchOperation_orderBy + orderDirection: OrderDirection + where: DDBatchOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DDBatchOperation!]! + poolTx( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolTx + poolTxes( + skip: Int = 0 + first: Int = 100 + orderBy: PoolTx_orderBy + orderDirection: OrderDirection + where: PoolTx_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolTx!]! lastSyncBlock( id: ID! """ @@ -65,7 +273,7 @@ type Query { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [LastSyncBlock!]! - message( + operation( id: ID! """ The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. @@ -75,13 +283,13 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Message - messages( + ): Operation + operations( skip: Int = 0 first: Int = 100 - orderBy: Message_orderBy + orderBy: Operation_orderBy orderDirection: OrderDirection - where: Message_filter + where: Operation_filter """ The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. """ @@ -90,7 +298,7 @@ type Query { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Message!]! + ): [Operation!]! """Access to subgraph metadata""" _meta(block: Block_height): _Meta_ } @@ -122,6 +330,214 @@ type Subscription { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [DirectDeposit!]! + payment( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Payment + payments( + skip: Int = 0 + first: Int = 100 + orderBy: Payment_orderBy + orderDirection: OrderDirection + where: Payment_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Payment!]! + zkCommon( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ZkCommon + zkCommons( + skip: Int = 0 + first: Int = 100 + orderBy: ZkCommon_orderBy + orderDirection: OrderDirection + where: ZkCommon_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ZkCommon!]! + depositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DepositOperation + depositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DepositOperation_orderBy + orderDirection: OrderDirection + where: DepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DepositOperation!]! + transferOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferOperation + transferOperations( + skip: Int = 0 + first: Int = 100 + orderBy: TransferOperation_orderBy + orderDirection: OrderDirection + where: TransferOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferOperation!]! + withdrawalOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): WithdrawalOperation + withdrawalOperations( + skip: Int = 0 + first: Int = 100 + orderBy: WithdrawalOperation_orderBy + orderDirection: OrderDirection + where: WithdrawalOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [WithdrawalOperation!]! + permittableDepositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PermittableDepositOperation + permittableDepositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: PermittableDepositOperation_orderBy + orderDirection: OrderDirection + where: PermittableDepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PermittableDepositOperation!]! + ddbatchOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DDBatchOperation + ddbatchOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DDBatchOperation_orderBy + orderDirection: OrderDirection + where: DDBatchOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DDBatchOperation!]! + poolTx( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolTx + poolTxes( + skip: Int = 0 + first: Int = 100 + orderBy: PoolTx_orderBy + orderDirection: OrderDirection + where: PoolTx_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolTx!]! lastSyncBlock( id: ID! """ @@ -148,7 +564,7 @@ type Subscription { """ subgraphError: _SubgraphErrorPolicy_! = deny ): [LastSyncBlock!]! - message( + operation( id: ID! """ The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. @@ -158,13 +574,13 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): Message - messages( + ): Operation + operations( skip: Int = 0 first: Int = 100 - orderBy: Message_orderBy + orderBy: Operation_orderBy orderDirection: OrderDirection - where: Message_filter + where: Operation_filter """ The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. """ @@ -173,7 +589,7 @@ type Subscription { Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. """ subgraphError: _SubgraphErrorPolicy_! = deny - ): [Message!]! + ): [Operation!]! """Access to subgraph metadata""" _meta(block: Block_height): _Meta_ } @@ -186,16 +602,200 @@ input BlockChangedFilter { number_gte: Int! } -input Block_height { - hash: Bytes - number: Int - number_gte: Int +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +scalar Bytes + +type DDBatchOperation implements Operation { + id: String! + pooltx: PoolTx! + delegated_deposits(skip: Int = 0, first: Int = 100, orderBy: DirectDeposit_orderBy, orderDirection: OrderDirection, where: DirectDeposit_filter): [DirectDeposit!]! +} + +input DDBatchOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + delegated_deposits: [String!] + delegated_deposits_not: [String!] + delegated_deposits_contains: [String!] + delegated_deposits_contains_nocase: [String!] + delegated_deposits_not_contains: [String!] + delegated_deposits_not_contains_nocase: [String!] + delegated_deposits_: DirectDeposit_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DDBatchOperation_filter] + or: [DDBatchOperation_filter] +} + +enum DDBatchOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + delegated_deposits +} + +type DepositOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + token_amount: BigInt! + fee: BigInt! +} + +input DepositOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DepositOperation_filter] + or: [DepositOperation_filter] +} + +enum DepositOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + token_amount + fee } -scalar Bytes - type DirectDeposit { id: String! + index: BigInt! pending: Boolean! completed: Boolean! refunded: Boolean! @@ -204,9 +804,11 @@ type DirectDeposit { zkAddress_diversifier: Bytes! zkAddress_pk: Bytes! deposit: BigInt! + fee: BigInt! bnInit: BigInt! tsInit: BigInt! txInit: Bytes! + payment: Payment bnClosed: BigInt tsClosed: BigInt txClosed: Bytes @@ -234,6 +836,14 @@ input DirectDeposit_filter { id_ends_with_nocase: String id_not_ends_with: String id_not_ends_with_nocase: String + index: BigInt + index_not: BigInt + index_gt: BigInt + index_lt: BigInt + index_gte: BigInt + index_lte: BigInt + index_in: [BigInt!] + index_not_in: [BigInt!] pending: Boolean pending_not: Boolean pending_in: [Boolean!] @@ -294,6 +904,14 @@ input DirectDeposit_filter { deposit_lte: BigInt deposit_in: [BigInt!] deposit_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] bnInit: BigInt bnInit_not: BigInt bnInit_gt: BigInt @@ -320,6 +938,27 @@ input DirectDeposit_filter { txInit_not_in: [Bytes!] txInit_contains: Bytes txInit_not_contains: Bytes + payment: String + payment_not: String + payment_gt: String + payment_lt: String + payment_gte: String + payment_lte: String + payment_in: [String!] + payment_not_in: [String!] + payment_contains: String + payment_contains_nocase: String + payment_not_contains: String + payment_not_contains_nocase: String + payment_starts_with: String + payment_starts_with_nocase: String + payment_not_starts_with: String + payment_not_starts_with_nocase: String + payment_ends_with: String + payment_ends_with_nocase: String + payment_not_ends_with: String + payment_not_ends_with_nocase: String + payment_: Payment_filter bnClosed: BigInt bnClosed_not: BigInt bnClosed_gt: BigInt @@ -354,6 +993,7 @@ input DirectDeposit_filter { enum DirectDeposit_orderBy { id + index pending completed refunded @@ -362,9 +1002,15 @@ enum DirectDeposit_orderBy { zkAddress_diversifier zkAddress_pk deposit + fee bnInit tsInit txInit + payment + payment__id + payment__sender + payment__token + payment__note bnClosed tsClosed txClosed @@ -411,27 +1057,366 @@ enum LastSyncBlock_orderBy { block } -type Message { - id: Bytes! +interface Operation { + id: String! + pooltx: PoolTx! +} + +input Operation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Operation_filter] + or: [Operation_filter] +} + +enum Operation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata +} + +"""Defines the order direction, either ascending or descending""" +enum OrderDirection { + asc + desc +} + +type Payment { + id: String! + sender: Bytes + delegated_deposit: DirectDeposit! + token: Bytes! + note: Bytes +} + +input Payment_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + delegated_deposit: String + delegated_deposit_not: String + delegated_deposit_gt: String + delegated_deposit_lt: String + delegated_deposit_gte: String + delegated_deposit_lte: String + delegated_deposit_in: [String!] + delegated_deposit_not_in: [String!] + delegated_deposit_contains: String + delegated_deposit_contains_nocase: String + delegated_deposit_not_contains: String + delegated_deposit_not_contains_nocase: String + delegated_deposit_starts_with: String + delegated_deposit_starts_with_nocase: String + delegated_deposit_not_starts_with: String + delegated_deposit_not_starts_with_nocase: String + delegated_deposit_ends_with: String + delegated_deposit_ends_with_nocase: String + delegated_deposit_not_ends_with: String + delegated_deposit_not_ends_with_nocase: String + delegated_deposit_: DirectDeposit_filter + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + note: Bytes + note_not: Bytes + note_gt: Bytes + note_lt: Bytes + note_gte: Bytes + note_lte: Bytes + note_in: [Bytes!] + note_not_in: [Bytes!] + note_contains: Bytes + note_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Payment_filter] + or: [Payment_filter] +} + +enum Payment_orderBy { + id + sender + delegated_deposit + delegated_deposit__id + delegated_deposit__index + delegated_deposit__pending + delegated_deposit__completed + delegated_deposit__refunded + delegated_deposit__sender + delegated_deposit__fallbackUser + delegated_deposit__zkAddress_diversifier + delegated_deposit__zkAddress_pk + delegated_deposit__deposit + delegated_deposit__fee + delegated_deposit__bnInit + delegated_deposit__tsInit + delegated_deposit__txInit + delegated_deposit__bnClosed + delegated_deposit__tsClosed + delegated_deposit__txClosed + token + note +} + +type PermittableDepositOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + token_amount: BigInt! + fee: BigInt! + permit_deadline: BigInt! + permit_holder: Bytes! + sig: Bytes! +} + +input PermittableDepositOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + permit_deadline: BigInt + permit_deadline_not: BigInt + permit_deadline_gt: BigInt + permit_deadline_lt: BigInt + permit_deadline_gte: BigInt + permit_deadline_lte: BigInt + permit_deadline_in: [BigInt!] + permit_deadline_not_in: [BigInt!] + permit_holder: Bytes + permit_holder_not: Bytes + permit_holder_gt: Bytes + permit_holder_lt: Bytes + permit_holder_gte: Bytes + permit_holder_lte: Bytes + permit_holder_in: [Bytes!] + permit_holder_not_in: [Bytes!] + permit_holder_contains: Bytes + permit_holder_not_contains: Bytes + sig: Bytes + sig_not: Bytes + sig_gt: Bytes + sig_lt: Bytes + sig_gte: Bytes + sig_lte: Bytes + sig_in: [Bytes!] + sig_not_in: [Bytes!] + sig_contains: Bytes + sig_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PermittableDepositOperation_filter] + or: [PermittableDepositOperation_filter] +} + +enum PermittableDepositOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + token_amount + fee + permit_deadline + permit_holder + sig +} + +type PoolTx { + id: String! index: BigInt! - hash: Bytes! + tx: Bytes! + ts: BigInt! + all_messages_hash: Bytes! + type: Int! message: Bytes! - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! + gas_used: Int! + zk: ZkCommon! + operation: Operation! + calldata: Bytes! } -input Message_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes +input PoolTx_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String index: BigInt index_not: BigInt index_gt: BigInt @@ -440,16 +1425,42 @@ input Message_filter { index_lte: BigInt index_in: [BigInt!] index_not_in: [BigInt!] - hash: Bytes - hash_not: Bytes - hash_gt: Bytes - hash_lt: Bytes - hash_gte: Bytes - hash_lte: Bytes - hash_in: [Bytes!] - hash_not_in: [Bytes!] - hash_contains: Bytes - hash_not_contains: Bytes + tx: Bytes + tx_not: Bytes + tx_gt: Bytes + tx_lt: Bytes + tx_gte: Bytes + tx_lte: Bytes + tx_in: [Bytes!] + tx_not_in: [Bytes!] + tx_contains: Bytes + tx_not_contains: Bytes + ts: BigInt + ts_not: BigInt + ts_gt: BigInt + ts_lt: BigInt + ts_gte: BigInt + ts_lte: BigInt + ts_in: [BigInt!] + ts_not_in: [BigInt!] + all_messages_hash: Bytes + all_messages_hash_not: Bytes + all_messages_hash_gt: Bytes + all_messages_hash_lt: Bytes + all_messages_hash_gte: Bytes + all_messages_hash_lte: Bytes + all_messages_hash_in: [Bytes!] + all_messages_hash_not_in: [Bytes!] + all_messages_hash_contains: Bytes + all_messages_hash_not_contains: Bytes + type: Int + type_not: Int + type_gt: Int + type_lt: Int + type_gte: Int + type_lte: Int + type_in: [Int!] + type_not_in: [Int!] message: Bytes message_not: Bytes message_gt: Bytes @@ -460,52 +1471,427 @@ input Message_filter { message_not_in: [Bytes!] message_contains: Bytes message_not_contains: Bytes - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - blockTimestamp: BigInt - blockTimestamp_not: BigInt - blockTimestamp_gt: BigInt - blockTimestamp_lt: BigInt - blockTimestamp_gte: BigInt - blockTimestamp_lte: BigInt - blockTimestamp_in: [BigInt!] - blockTimestamp_not_in: [BigInt!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes + gas_used: Int + gas_used_not: Int + gas_used_gt: Int + gas_used_lt: Int + gas_used_gte: Int + gas_used_lte: Int + gas_used_in: [Int!] + gas_used_not_in: [Int!] + zk: String + zk_not: String + zk_gt: String + zk_lt: String + zk_gte: String + zk_lte: String + zk_in: [String!] + zk_not_in: [String!] + zk_contains: String + zk_contains_nocase: String + zk_not_contains: String + zk_not_contains_nocase: String + zk_starts_with: String + zk_starts_with_nocase: String + zk_not_starts_with: String + zk_not_starts_with_nocase: String + zk_ends_with: String + zk_ends_with_nocase: String + zk_not_ends_with: String + zk_not_ends_with_nocase: String + zk_: ZkCommon_filter + operation: String + operation_not: String + operation_gt: String + operation_lt: String + operation_gte: String + operation_lte: String + operation_in: [String!] + operation_not_in: [String!] + operation_contains: String + operation_contains_nocase: String + operation_not_contains: String + operation_not_contains_nocase: String + operation_starts_with: String + operation_starts_with_nocase: String + operation_not_starts_with: String + operation_not_starts_with_nocase: String + operation_ends_with: String + operation_ends_with_nocase: String + operation_not_ends_with: String + operation_not_ends_with_nocase: String + operation_: Operation_filter + calldata: Bytes + calldata_not: Bytes + calldata_gt: Bytes + calldata_lt: Bytes + calldata_gte: Bytes + calldata_lte: Bytes + calldata_in: [Bytes!] + calldata_not_in: [Bytes!] + calldata_contains: Bytes + calldata_not_contains: Bytes """Filter for the block changed event.""" _change_block: BlockChangedFilter - and: [Message_filter] - or: [Message_filter] + and: [PoolTx_filter] + or: [PoolTx_filter] } -enum Message_orderBy { +enum PoolTx_orderBy { id index - hash + tx + ts + all_messages_hash + type message - blockNumber - blockTimestamp - transactionHash + gas_used + zk + zk__id + zk__out_commit + zk__tree_root_after + operation + operation__id + calldata } -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc +type TransferOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + fee: BigInt! +} + +input TransferOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [TransferOperation_filter] + or: [TransferOperation_filter] +} + +enum TransferOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + fee +} + +type WithdrawalOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + energy_amount: BigInt! + token_amount: BigInt! + fee: BigInt! + native_amount: BigInt! + receiver: Bytes! +} + +input WithdrawalOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + energy_amount: BigInt + energy_amount_not: BigInt + energy_amount_gt: BigInt + energy_amount_lt: BigInt + energy_amount_gte: BigInt + energy_amount_lte: BigInt + energy_amount_in: [BigInt!] + energy_amount_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + native_amount: BigInt + native_amount_not: BigInt + native_amount_gt: BigInt + native_amount_lt: BigInt + native_amount_gte: BigInt + native_amount_lte: BigInt + native_amount_in: [BigInt!] + native_amount_not_in: [BigInt!] + receiver: Bytes + receiver_not: Bytes + receiver_gt: Bytes + receiver_lt: Bytes + receiver_gte: Bytes + receiver_lte: Bytes + receiver_in: [Bytes!] + receiver_not_in: [Bytes!] + receiver_contains: Bytes + receiver_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [WithdrawalOperation_filter] + or: [WithdrawalOperation_filter] +} + +enum WithdrawalOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + energy_amount + token_amount + fee + native_amount + receiver +} + +type ZkCommon { + id: String! + pooltx: PoolTx! + out_commit: BigInt! + witness: [BigInt!]! + tree_root_after: BigInt! + tree_proof: [BigInt!]! +} + +input ZkCommon_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + out_commit: BigInt + out_commit_not: BigInt + out_commit_gt: BigInt + out_commit_lt: BigInt + out_commit_gte: BigInt + out_commit_lte: BigInt + out_commit_in: [BigInt!] + out_commit_not_in: [BigInt!] + witness: [BigInt!] + witness_not: [BigInt!] + witness_contains: [BigInt!] + witness_contains_nocase: [BigInt!] + witness_not_contains: [BigInt!] + witness_not_contains_nocase: [BigInt!] + tree_root_after: BigInt + tree_root_after_not: BigInt + tree_root_after_gt: BigInt + tree_root_after_lt: BigInt + tree_root_after_gte: BigInt + tree_root_after_lte: BigInt + tree_root_after_in: [BigInt!] + tree_root_after_not_in: [BigInt!] + tree_proof: [BigInt!] + tree_proof_not: [BigInt!] + tree_proof_contains: [BigInt!] + tree_proof_contains_nocase: [BigInt!] + tree_proof_not_contains: [BigInt!] + tree_proof_not_contains_nocase: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [ZkCommon_filter] + or: [ZkCommon_filter] +} + +enum ZkCommon_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + out_commit + witness + tree_root_after + tree_proof } type _Block_ { diff --git a/src/.graphclient/sources/zkbob-bob-goerli/introspectionSchema.ts b/src/.graphclient/sources/zkbob-bob-goerli/introspectionSchema.ts deleted file mode 100644 index ed14a262..00000000 --- a/src/.graphclient/sources/zkbob-bob-goerli/introspectionSchema.ts +++ /dev/null @@ -1,6407 +0,0 @@ -// @ts-nocheck -import { buildASTSchema } from 'graphql'; - -const schemaAST = { - "kind": "Document", - "definitions": [ - { - "kind": "SchemaDefinition", - "operationTypes": [ - { - "kind": "OperationTypeDefinition", - "operation": "query", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Query" - } - } - }, - { - "kind": "OperationTypeDefinition", - "operation": "subscription", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Subscription" - } - } - } - ], - "directives": [] - }, - { - "kind": "DirectiveDefinition", - "description": { - "kind": "StringValue", - "value": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive." - }, - "name": { - "kind": "Name", - "value": "entity" - }, - "arguments": [], - "repeatable": false, - "locations": [ - { - "kind": "Name", - "value": "OBJECT" - } - ] - }, - { - "kind": "DirectiveDefinition", - "description": { - "kind": "StringValue", - "value": "Defined a Subgraph ID for an object type" - }, - "name": { - "kind": "Name", - "value": "subgraphId" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - "directives": [] - } - ], - "repeatable": false, - "locations": [ - { - "kind": "Name", - "value": "OBJECT" - } - ] - }, - { - "kind": "DirectiveDefinition", - "description": { - "kind": "StringValue", - "value": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API." - }, - "name": { - "kind": "Name", - "value": "derivedFrom" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "field" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - "directives": [] - } - ], - "repeatable": false, - "locations": [ - { - "kind": "Name", - "value": "FIELD_DEFINITION" - } - ] - }, - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "BigDecimal" - }, - "directives": [] - }, - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "BigInt" - }, - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "BlockChangedFilter" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "number_gte" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "Block_height" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "number" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "number_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "ScalarTypeDefinition", - "name": { - "kind": "Name", - "value": "Bytes" - }, - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "DirectDeposit" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "pending" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "completed" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "refunded" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "sender" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "deposit" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "bnInit" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "tsInit" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "txInit" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "bnClosed" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "tsClosed" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "txClosed" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "DirectDeposit_filter" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_contains_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_contains_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_starts_with" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_starts_with_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_starts_with" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_starts_with_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_ends_with" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_ends_with_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_ends_with" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_ends_with_nocase" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pending" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pending_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pending_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pending_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "completed" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "completed_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "completed_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "completed_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "refunded" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "refunded_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "refunded_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "refunded_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "sender_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "deposit_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txInit_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Filter for the block changed event.", - "block": true - }, - "name": { - "kind": "Name", - "value": "_change_block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BlockChangedFilter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "and" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_filter" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "or" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_filter" - } - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "EnumTypeDefinition", - "name": { - "kind": "Name", - "value": "DirectDeposit_orderBy" - }, - "values": [ - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "pending" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "completed" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "refunded" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "sender" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "fallbackUser" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_diversifier" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "zkAddress_pk" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "deposit" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "bnInit" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "tsInit" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "txInit" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "bnClosed" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "tsClosed" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "txClosed" - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "ScalarTypeDefinition", - "description": { - "kind": "StringValue", - "value": "8 bytes signed integer\n", - "block": true - }, - "name": { - "kind": "Name", - "value": "Int8" - }, - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "LastSyncBlock" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "block" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "LastSyncBlock_filter" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Filter for the block changed event.", - "block": true - }, - "name": { - "kind": "Name", - "value": "_change_block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BlockChangedFilter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "and" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_filter" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "or" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_filter" - } - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "EnumTypeDefinition", - "name": { - "kind": "Name", - "value": "LastSyncBlock_orderBy" - }, - "values": [ - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "block" - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "Message" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "index" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "hash" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "message" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "blockNumber" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "transactionHash" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "Message_filter" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "index_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "hash_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "message_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BigInt" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_not" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_lt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_lte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_not_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash_not_contains" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Filter for the block changed event.", - "block": true - }, - "name": { - "kind": "Name", - "value": "_change_block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "BlockChangedFilter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "and" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_filter" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "or" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_filter" - } - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "EnumTypeDefinition", - "name": { - "kind": "Name", - "value": "Message_orderBy" - }, - "values": [ - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "index" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "hash" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "message" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "blockNumber" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "blockTimestamp" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "transactionHash" - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "EnumTypeDefinition", - "description": { - "kind": "StringValue", - "value": "Defines the order direction, either ascending or descending", - "block": true - }, - "name": { - "kind": "Name", - "value": "OrderDirection" - }, - "values": [ - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "asc" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "name": { - "kind": "Name", - "value": "desc" - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "Query" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "directDeposit" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "directDeposits" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "lastSyncBlock" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "lastSyncBlocks" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "message" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "messages" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "Access to subgraph metadata", - "block": true - }, - "name": { - "kind": "Name", - "value": "_meta" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_Meta_" - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "Subscription" - }, - "fields": [ - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "directDeposit" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "directDeposits" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "DirectDeposit" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "lastSyncBlock" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "lastSyncBlocks" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "LastSyncBlock" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "message" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "id" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "ID" - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "name": { - "kind": "Name", - "value": "messages" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "skip" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "0" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "first" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "defaultValue": { - "kind": "IntValue", - "value": "100" - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderBy" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_orderBy" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "orderDirection" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "OrderDirection" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "where" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message_filter" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "block": true - }, - "name": { - "kind": "Name", - "value": "subgraphError" - }, - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - } - } - }, - "defaultValue": { - "kind": "EnumValue", - "value": "deny" - }, - "directives": [] - } - ], - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Message" - } - } - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "Access to subgraph metadata", - "block": true - }, - "name": { - "kind": "Name", - "value": "_meta" - }, - "arguments": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "block" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Block_height" - } - }, - "directives": [] - } - ], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_Meta_" - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "name": { - "kind": "Name", - "value": "_Block_" - }, - "fields": [ - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "The hash of the block", - "block": true - }, - "name": { - "kind": "Name", - "value": "hash" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Bytes" - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "The block number", - "block": true - }, - "name": { - "kind": "Name", - "value": "number" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "Integer representation of the timestamp stored in blocks for the chain", - "block": true - }, - "name": { - "kind": "Name", - "value": "timestamp" - }, - "arguments": [], - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Int" - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "ObjectTypeDefinition", - "description": { - "kind": "StringValue", - "value": "The type for the top-level _meta field", - "block": true - }, - "name": { - "kind": "Name", - "value": "_Meta_" - }, - "fields": [ - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n", - "block": true - }, - "name": { - "kind": "Name", - "value": "block" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "_Block_" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "The deployment ID", - "block": true - }, - "name": { - "kind": "Name", - "value": "deployment" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - }, - "directives": [] - }, - { - "kind": "FieldDefinition", - "description": { - "kind": "StringValue", - "value": "If `true`, the subgraph encountered indexing errors at some past block", - "block": true - }, - "name": { - "kind": "Name", - "value": "hasIndexingErrors" - }, - "arguments": [], - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - } - }, - "directives": [] - } - ], - "interfaces": [], - "directives": [] - }, - { - "kind": "EnumTypeDefinition", - "name": { - "kind": "Name", - "value": "_SubgraphErrorPolicy_" - }, - "values": [ - { - "kind": "EnumValueDefinition", - "description": { - "kind": "StringValue", - "value": "Data will be returned even if the subgraph has indexing errors", - "block": true - }, - "name": { - "kind": "Name", - "value": "allow" - }, - "directives": [] - }, - { - "kind": "EnumValueDefinition", - "description": { - "kind": "StringValue", - "value": "If the subgraph has indexing errors, data will be omitted. The default.", - "block": true - }, - "name": { - "kind": "Name", - "value": "deny" - }, - "directives": [] - } - ], - "directives": [] - } - ] -}; - -export default buildASTSchema(schemaAST, { - assumeValid: true, - assumeValidSDL: true -}); \ No newline at end of file diff --git a/src/.graphclient/sources/zkbob-bob-goerli/schema.graphql b/src/.graphclient/sources/zkbob-bob-goerli/schema.graphql deleted file mode 100644 index 7893ae43..00000000 --- a/src/.graphclient/sources/zkbob-bob-goerli/schema.graphql +++ /dev/null @@ -1,542 +0,0 @@ -schema { - query: Query - subscription: Subscription -} - -"Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive." -directive @entity on OBJECT - -"Defined a Subgraph ID for an object type" -directive @subgraphId(id: String!) on OBJECT - -"creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API." -directive @derivedFrom(field: String!) on FIELD_DEFINITION - -scalar BigDecimal - -scalar BigInt - -input BlockChangedFilter { - number_gte: Int! -} - -input Block_height { - hash: Bytes - number: Int - number_gte: Int -} - -scalar Bytes - -type DirectDeposit { - id: String! - pending: Boolean! - completed: Boolean! - refunded: Boolean! - sender: Bytes! - fallbackUser: Bytes! - zkAddress_diversifier: Bytes! - zkAddress_pk: Bytes! - deposit: BigInt! - bnInit: BigInt! - tsInit: BigInt! - txInit: Bytes! - bnClosed: BigInt - tsClosed: BigInt - txClosed: Bytes -} - -input DirectDeposit_filter { - id: String - id_not: String - id_gt: String - id_lt: String - id_gte: String - id_lte: String - id_in: [String!] - id_not_in: [String!] - id_contains: String - id_contains_nocase: String - id_not_contains: String - id_not_contains_nocase: String - id_starts_with: String - id_starts_with_nocase: String - id_not_starts_with: String - id_not_starts_with_nocase: String - id_ends_with: String - id_ends_with_nocase: String - id_not_ends_with: String - id_not_ends_with_nocase: String - pending: Boolean - pending_not: Boolean - pending_in: [Boolean!] - pending_not_in: [Boolean!] - completed: Boolean - completed_not: Boolean - completed_in: [Boolean!] - completed_not_in: [Boolean!] - refunded: Boolean - refunded_not: Boolean - refunded_in: [Boolean!] - refunded_not_in: [Boolean!] - sender: Bytes - sender_not: Bytes - sender_gt: Bytes - sender_lt: Bytes - sender_gte: Bytes - sender_lte: Bytes - sender_in: [Bytes!] - sender_not_in: [Bytes!] - sender_contains: Bytes - sender_not_contains: Bytes - fallbackUser: Bytes - fallbackUser_not: Bytes - fallbackUser_gt: Bytes - fallbackUser_lt: Bytes - fallbackUser_gte: Bytes - fallbackUser_lte: Bytes - fallbackUser_in: [Bytes!] - fallbackUser_not_in: [Bytes!] - fallbackUser_contains: Bytes - fallbackUser_not_contains: Bytes - zkAddress_diversifier: Bytes - zkAddress_diversifier_not: Bytes - zkAddress_diversifier_gt: Bytes - zkAddress_diversifier_lt: Bytes - zkAddress_diversifier_gte: Bytes - zkAddress_diversifier_lte: Bytes - zkAddress_diversifier_in: [Bytes!] - zkAddress_diversifier_not_in: [Bytes!] - zkAddress_diversifier_contains: Bytes - zkAddress_diversifier_not_contains: Bytes - zkAddress_pk: Bytes - zkAddress_pk_not: Bytes - zkAddress_pk_gt: Bytes - zkAddress_pk_lt: Bytes - zkAddress_pk_gte: Bytes - zkAddress_pk_lte: Bytes - zkAddress_pk_in: [Bytes!] - zkAddress_pk_not_in: [Bytes!] - zkAddress_pk_contains: Bytes - zkAddress_pk_not_contains: Bytes - deposit: BigInt - deposit_not: BigInt - deposit_gt: BigInt - deposit_lt: BigInt - deposit_gte: BigInt - deposit_lte: BigInt - deposit_in: [BigInt!] - deposit_not_in: [BigInt!] - bnInit: BigInt - bnInit_not: BigInt - bnInit_gt: BigInt - bnInit_lt: BigInt - bnInit_gte: BigInt - bnInit_lte: BigInt - bnInit_in: [BigInt!] - bnInit_not_in: [BigInt!] - tsInit: BigInt - tsInit_not: BigInt - tsInit_gt: BigInt - tsInit_lt: BigInt - tsInit_gte: BigInt - tsInit_lte: BigInt - tsInit_in: [BigInt!] - tsInit_not_in: [BigInt!] - txInit: Bytes - txInit_not: Bytes - txInit_gt: Bytes - txInit_lt: Bytes - txInit_gte: Bytes - txInit_lte: Bytes - txInit_in: [Bytes!] - txInit_not_in: [Bytes!] - txInit_contains: Bytes - txInit_not_contains: Bytes - bnClosed: BigInt - bnClosed_not: BigInt - bnClosed_gt: BigInt - bnClosed_lt: BigInt - bnClosed_gte: BigInt - bnClosed_lte: BigInt - bnClosed_in: [BigInt!] - bnClosed_not_in: [BigInt!] - tsClosed: BigInt - tsClosed_not: BigInt - tsClosed_gt: BigInt - tsClosed_lt: BigInt - tsClosed_gte: BigInt - tsClosed_lte: BigInt - tsClosed_in: [BigInt!] - tsClosed_not_in: [BigInt!] - txClosed: Bytes - txClosed_not: Bytes - txClosed_gt: Bytes - txClosed_lt: Bytes - txClosed_gte: Bytes - txClosed_lte: Bytes - txClosed_in: [Bytes!] - txClosed_not_in: [Bytes!] - txClosed_contains: Bytes - txClosed_not_contains: Bytes - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [DirectDeposit_filter] - or: [DirectDeposit_filter] -} - -enum DirectDeposit_orderBy { - id - pending - completed - refunded - sender - fallbackUser - zkAddress_diversifier - zkAddress_pk - deposit - bnInit - tsInit - txInit - bnClosed - tsClosed - txClosed -} - -""" -8 bytes signed integer - -""" -scalar Int8 - -type LastSyncBlock { - id: Bytes! - block: BigInt -} - -input LastSyncBlock_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - block: BigInt - block_not: BigInt - block_gt: BigInt - block_lt: BigInt - block_gte: BigInt - block_lte: BigInt - block_in: [BigInt!] - block_not_in: [BigInt!] - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [LastSyncBlock_filter] - or: [LastSyncBlock_filter] -} - -enum LastSyncBlock_orderBy { - id - block -} - -type Message { - id: Bytes! - index: BigInt! - hash: Bytes! - message: Bytes! - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! -} - -input Message_filter { - id: Bytes - id_not: Bytes - id_gt: Bytes - id_lt: Bytes - id_gte: Bytes - id_lte: Bytes - id_in: [Bytes!] - id_not_in: [Bytes!] - id_contains: Bytes - id_not_contains: Bytes - index: BigInt - index_not: BigInt - index_gt: BigInt - index_lt: BigInt - index_gte: BigInt - index_lte: BigInt - index_in: [BigInt!] - index_not_in: [BigInt!] - hash: Bytes - hash_not: Bytes - hash_gt: Bytes - hash_lt: Bytes - hash_gte: Bytes - hash_lte: Bytes - hash_in: [Bytes!] - hash_not_in: [Bytes!] - hash_contains: Bytes - hash_not_contains: Bytes - message: Bytes - message_not: Bytes - message_gt: Bytes - message_lt: Bytes - message_gte: Bytes - message_lte: Bytes - message_in: [Bytes!] - message_not_in: [Bytes!] - message_contains: Bytes - message_not_contains: Bytes - blockNumber: BigInt - blockNumber_not: BigInt - blockNumber_gt: BigInt - blockNumber_lt: BigInt - blockNumber_gte: BigInt - blockNumber_lte: BigInt - blockNumber_in: [BigInt!] - blockNumber_not_in: [BigInt!] - blockTimestamp: BigInt - blockTimestamp_not: BigInt - blockTimestamp_gt: BigInt - blockTimestamp_lt: BigInt - blockTimestamp_gte: BigInt - blockTimestamp_lte: BigInt - blockTimestamp_in: [BigInt!] - blockTimestamp_not_in: [BigInt!] - transactionHash: Bytes - transactionHash_not: Bytes - transactionHash_gt: Bytes - transactionHash_lt: Bytes - transactionHash_gte: Bytes - transactionHash_lte: Bytes - transactionHash_in: [Bytes!] - transactionHash_not_in: [Bytes!] - transactionHash_contains: Bytes - transactionHash_not_contains: Bytes - """Filter for the block changed event.""" - _change_block: BlockChangedFilter - and: [Message_filter] - or: [Message_filter] -} - -enum Message_orderBy { - id - index - hash - message - blockNumber - blockTimestamp - transactionHash -} - -"""Defines the order direction, either ascending or descending""" -enum OrderDirection { - asc - desc -} - -type Query { - directDeposit( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DirectDeposit - directDeposits( - skip: Int = 0 - first: Int = 100 - orderBy: DirectDeposit_orderBy - orderDirection: OrderDirection - where: DirectDeposit_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DirectDeposit!]! - lastSyncBlock( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LastSyncBlock - lastSyncBlocks( - skip: Int = 0 - first: Int = 100 - orderBy: LastSyncBlock_orderBy - orderDirection: OrderDirection - where: LastSyncBlock_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LastSyncBlock!]! - message( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Message - messages( - skip: Int = 0 - first: Int = 100 - orderBy: Message_orderBy - orderDirection: OrderDirection - where: Message_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Message!]! - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type Subscription { - directDeposit( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): DirectDeposit - directDeposits( - skip: Int = 0 - first: Int = 100 - orderBy: DirectDeposit_orderBy - orderDirection: OrderDirection - where: DirectDeposit_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [DirectDeposit!]! - lastSyncBlock( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): LastSyncBlock - lastSyncBlocks( - skip: Int = 0 - first: Int = 100 - orderBy: LastSyncBlock_orderBy - orderDirection: OrderDirection - where: LastSyncBlock_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [LastSyncBlock!]! - message( - id: ID! - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): Message - messages( - skip: Int = 0 - first: Int = 100 - orderBy: Message_orderBy - orderDirection: OrderDirection - where: Message_filter - """ - The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. - """ - block: Block_height - """ - Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. - """ - subgraphError: _SubgraphErrorPolicy_! = deny - ): [Message!]! - """Access to subgraph metadata""" - _meta(block: Block_height): _Meta_ -} - -type _Block_ { - """The hash of the block""" - hash: Bytes - """The block number""" - number: Int! - """Integer representation of the timestamp stored in blocks for the chain""" - timestamp: Int -} - -"""The type for the top-level _meta field""" -type _Meta_ { - """ - Information about a specific subgraph block. The hash of the block - will be null if the _meta field has a block constraint that asks for - a block number. It will be filled if the _meta field has no block constraint - and therefore asks for the latest block - - """ - block: _Block_! - """The deployment ID""" - deployment: String! - """If `true`, the subgraph encountered indexing errors at some past block""" - hasIndexingErrors: Boolean! -} - -enum _SubgraphErrorPolicy_ { - """Data will be returned even if the subgraph has indexing errors""" - allow - """ - If the subgraph has indexing errors, data will be omitted. The default. - """ - deny -} \ No newline at end of file diff --git a/src/.graphclient/sources/zkbob-bob-goerli/types.ts b/src/.graphclient/sources/zkbob-bob-goerli/types.ts deleted file mode 100644 index 9e35687b..00000000 --- a/src/.graphclient/sources/zkbob-bob-goerli/types.ts +++ /dev/null @@ -1,551 +0,0 @@ -// @ts-nocheck - -import { InContextSdkMethod } from '@graphql-mesh/types'; -import { MeshContext } from '@graphql-mesh/runtime'; - -export namespace ZkbobBobGoerliTypes { - export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - BigDecimal: any; - BigInt: any; - Bytes: any; - Int8: any; -}; - -export type BlockChangedFilter = { - number_gte: Scalars['Int']; -}; - -export type Block_height = { - hash?: InputMaybe; - number?: InputMaybe; - number_gte?: InputMaybe; -}; - -export type DirectDeposit = { - id: Scalars['String']; - pending: Scalars['Boolean']; - completed: Scalars['Boolean']; - refunded: Scalars['Boolean']; - sender: Scalars['Bytes']; - fallbackUser: Scalars['Bytes']; - zkAddress_diversifier: Scalars['Bytes']; - zkAddress_pk: Scalars['Bytes']; - deposit: Scalars['BigInt']; - bnInit: Scalars['BigInt']; - tsInit: Scalars['BigInt']; - txInit: Scalars['Bytes']; - bnClosed?: Maybe; - tsClosed?: Maybe; - txClosed?: Maybe; -}; - -export type DirectDeposit_filter = { - id?: InputMaybe; - id_not?: InputMaybe; - id_gt?: InputMaybe; - id_lt?: InputMaybe; - id_gte?: InputMaybe; - id_lte?: InputMaybe; - id_in?: InputMaybe>; - id_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_contains_nocase?: InputMaybe; - id_not_contains?: InputMaybe; - id_not_contains_nocase?: InputMaybe; - id_starts_with?: InputMaybe; - id_starts_with_nocase?: InputMaybe; - id_not_starts_with?: InputMaybe; - id_not_starts_with_nocase?: InputMaybe; - id_ends_with?: InputMaybe; - id_ends_with_nocase?: InputMaybe; - id_not_ends_with?: InputMaybe; - id_not_ends_with_nocase?: InputMaybe; - pending?: InputMaybe; - pending_not?: InputMaybe; - pending_in?: InputMaybe>; - pending_not_in?: InputMaybe>; - completed?: InputMaybe; - completed_not?: InputMaybe; - completed_in?: InputMaybe>; - completed_not_in?: InputMaybe>; - refunded?: InputMaybe; - refunded_not?: InputMaybe; - refunded_in?: InputMaybe>; - refunded_not_in?: InputMaybe>; - sender?: InputMaybe; - sender_not?: InputMaybe; - sender_gt?: InputMaybe; - sender_lt?: InputMaybe; - sender_gte?: InputMaybe; - sender_lte?: InputMaybe; - sender_in?: InputMaybe>; - sender_not_in?: InputMaybe>; - sender_contains?: InputMaybe; - sender_not_contains?: InputMaybe; - fallbackUser?: InputMaybe; - fallbackUser_not?: InputMaybe; - fallbackUser_gt?: InputMaybe; - fallbackUser_lt?: InputMaybe; - fallbackUser_gte?: InputMaybe; - fallbackUser_lte?: InputMaybe; - fallbackUser_in?: InputMaybe>; - fallbackUser_not_in?: InputMaybe>; - fallbackUser_contains?: InputMaybe; - fallbackUser_not_contains?: InputMaybe; - zkAddress_diversifier?: InputMaybe; - zkAddress_diversifier_not?: InputMaybe; - zkAddress_diversifier_gt?: InputMaybe; - zkAddress_diversifier_lt?: InputMaybe; - zkAddress_diversifier_gte?: InputMaybe; - zkAddress_diversifier_lte?: InputMaybe; - zkAddress_diversifier_in?: InputMaybe>; - zkAddress_diversifier_not_in?: InputMaybe>; - zkAddress_diversifier_contains?: InputMaybe; - zkAddress_diversifier_not_contains?: InputMaybe; - zkAddress_pk?: InputMaybe; - zkAddress_pk_not?: InputMaybe; - zkAddress_pk_gt?: InputMaybe; - zkAddress_pk_lt?: InputMaybe; - zkAddress_pk_gte?: InputMaybe; - zkAddress_pk_lte?: InputMaybe; - zkAddress_pk_in?: InputMaybe>; - zkAddress_pk_not_in?: InputMaybe>; - zkAddress_pk_contains?: InputMaybe; - zkAddress_pk_not_contains?: InputMaybe; - deposit?: InputMaybe; - deposit_not?: InputMaybe; - deposit_gt?: InputMaybe; - deposit_lt?: InputMaybe; - deposit_gte?: InputMaybe; - deposit_lte?: InputMaybe; - deposit_in?: InputMaybe>; - deposit_not_in?: InputMaybe>; - bnInit?: InputMaybe; - bnInit_not?: InputMaybe; - bnInit_gt?: InputMaybe; - bnInit_lt?: InputMaybe; - bnInit_gte?: InputMaybe; - bnInit_lte?: InputMaybe; - bnInit_in?: InputMaybe>; - bnInit_not_in?: InputMaybe>; - tsInit?: InputMaybe; - tsInit_not?: InputMaybe; - tsInit_gt?: InputMaybe; - tsInit_lt?: InputMaybe; - tsInit_gte?: InputMaybe; - tsInit_lte?: InputMaybe; - tsInit_in?: InputMaybe>; - tsInit_not_in?: InputMaybe>; - txInit?: InputMaybe; - txInit_not?: InputMaybe; - txInit_gt?: InputMaybe; - txInit_lt?: InputMaybe; - txInit_gte?: InputMaybe; - txInit_lte?: InputMaybe; - txInit_in?: InputMaybe>; - txInit_not_in?: InputMaybe>; - txInit_contains?: InputMaybe; - txInit_not_contains?: InputMaybe; - bnClosed?: InputMaybe; - bnClosed_not?: InputMaybe; - bnClosed_gt?: InputMaybe; - bnClosed_lt?: InputMaybe; - bnClosed_gte?: InputMaybe; - bnClosed_lte?: InputMaybe; - bnClosed_in?: InputMaybe>; - bnClosed_not_in?: InputMaybe>; - tsClosed?: InputMaybe; - tsClosed_not?: InputMaybe; - tsClosed_gt?: InputMaybe; - tsClosed_lt?: InputMaybe; - tsClosed_gte?: InputMaybe; - tsClosed_lte?: InputMaybe; - tsClosed_in?: InputMaybe>; - tsClosed_not_in?: InputMaybe>; - txClosed?: InputMaybe; - txClosed_not?: InputMaybe; - txClosed_gt?: InputMaybe; - txClosed_lt?: InputMaybe; - txClosed_gte?: InputMaybe; - txClosed_lte?: InputMaybe; - txClosed_in?: InputMaybe>; - txClosed_not_in?: InputMaybe>; - txClosed_contains?: InputMaybe; - txClosed_not_contains?: InputMaybe; - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - and?: InputMaybe>>; - or?: InputMaybe>>; -}; - -export type DirectDeposit_orderBy = - | 'id' - | 'pending' - | 'completed' - | 'refunded' - | 'sender' - | 'fallbackUser' - | 'zkAddress_diversifier' - | 'zkAddress_pk' - | 'deposit' - | 'bnInit' - | 'tsInit' - | 'txInit' - | 'bnClosed' - | 'tsClosed' - | 'txClosed'; - -export type LastSyncBlock = { - id: Scalars['Bytes']; - block?: Maybe; -}; - -export type LastSyncBlock_filter = { - id?: InputMaybe; - id_not?: InputMaybe; - id_gt?: InputMaybe; - id_lt?: InputMaybe; - id_gte?: InputMaybe; - id_lte?: InputMaybe; - id_in?: InputMaybe>; - id_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_not_contains?: InputMaybe; - block?: InputMaybe; - block_not?: InputMaybe; - block_gt?: InputMaybe; - block_lt?: InputMaybe; - block_gte?: InputMaybe; - block_lte?: InputMaybe; - block_in?: InputMaybe>; - block_not_in?: InputMaybe>; - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - and?: InputMaybe>>; - or?: InputMaybe>>; -}; - -export type LastSyncBlock_orderBy = - | 'id' - | 'block'; - -export type Message = { - id: Scalars['Bytes']; - index: Scalars['BigInt']; - hash: Scalars['Bytes']; - message: Scalars['Bytes']; - blockNumber: Scalars['BigInt']; - blockTimestamp: Scalars['BigInt']; - transactionHash: Scalars['Bytes']; -}; - -export type Message_filter = { - id?: InputMaybe; - id_not?: InputMaybe; - id_gt?: InputMaybe; - id_lt?: InputMaybe; - id_gte?: InputMaybe; - id_lte?: InputMaybe; - id_in?: InputMaybe>; - id_not_in?: InputMaybe>; - id_contains?: InputMaybe; - id_not_contains?: InputMaybe; - index?: InputMaybe; - index_not?: InputMaybe; - index_gt?: InputMaybe; - index_lt?: InputMaybe; - index_gte?: InputMaybe; - index_lte?: InputMaybe; - index_in?: InputMaybe>; - index_not_in?: InputMaybe>; - hash?: InputMaybe; - hash_not?: InputMaybe; - hash_gt?: InputMaybe; - hash_lt?: InputMaybe; - hash_gte?: InputMaybe; - hash_lte?: InputMaybe; - hash_in?: InputMaybe>; - hash_not_in?: InputMaybe>; - hash_contains?: InputMaybe; - hash_not_contains?: InputMaybe; - message?: InputMaybe; - message_not?: InputMaybe; - message_gt?: InputMaybe; - message_lt?: InputMaybe; - message_gte?: InputMaybe; - message_lte?: InputMaybe; - message_in?: InputMaybe>; - message_not_in?: InputMaybe>; - message_contains?: InputMaybe; - message_not_contains?: InputMaybe; - blockNumber?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_lt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_not_in?: InputMaybe>; - transactionHash?: InputMaybe; - transactionHash_not?: InputMaybe; - transactionHash_gt?: InputMaybe; - transactionHash_lt?: InputMaybe; - transactionHash_gte?: InputMaybe; - transactionHash_lte?: InputMaybe; - transactionHash_in?: InputMaybe>; - transactionHash_not_in?: InputMaybe>; - transactionHash_contains?: InputMaybe; - transactionHash_not_contains?: InputMaybe; - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - and?: InputMaybe>>; - or?: InputMaybe>>; -}; - -export type Message_orderBy = - | 'id' - | 'index' - | 'hash' - | 'message' - | 'blockNumber' - | 'blockTimestamp' - | 'transactionHash'; - -/** Defines the order direction, either ascending or descending */ -export type OrderDirection = - | 'asc' - | 'desc'; - -export type Query = { - directDeposit?: Maybe; - directDeposits: Array; - lastSyncBlock?: Maybe; - lastSyncBlocks: Array; - message?: Maybe; - messages: Array; - /** Access to subgraph metadata */ - _meta?: Maybe<_Meta_>; -}; - - -export type QuerydirectDepositArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type QuerydirectDepositsArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type QuerylastSyncBlockArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type QuerylastSyncBlocksArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type QuerymessageArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type QuerymessagesArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type Query_metaArgs = { - block?: InputMaybe; -}; - -export type Subscription = { - directDeposit?: Maybe; - directDeposits: Array; - lastSyncBlock?: Maybe; - lastSyncBlocks: Array; - message?: Maybe; - messages: Array; - /** Access to subgraph metadata */ - _meta?: Maybe<_Meta_>; -}; - - -export type SubscriptiondirectDepositArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type SubscriptiondirectDepositsArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type SubscriptionlastSyncBlockArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type SubscriptionlastSyncBlocksArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type SubscriptionmessageArgs = { - id: Scalars['ID']; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type SubscriptionmessagesArgs = { - skip?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - where?: InputMaybe; - block?: InputMaybe; - subgraphError?: _SubgraphErrorPolicy_; -}; - - -export type Subscription_metaArgs = { - block?: InputMaybe; -}; - -export type _Block_ = { - /** The hash of the block */ - hash?: Maybe; - /** The block number */ - number: Scalars['Int']; - /** Integer representation of the timestamp stored in blocks for the chain */ - timestamp?: Maybe; -}; - -/** The type for the top-level _meta field */ -export type _Meta_ = { - /** - * Information about a specific subgraph block. The hash of the block - * will be null if the _meta field has a block constraint that asks for - * a block number. It will be filled if the _meta field has no block constraint - * and therefore asks for the latest block - * - */ - block: _Block_; - /** The deployment ID */ - deployment: Scalars['String']; - /** If `true`, the subgraph encountered indexing errors at some past block */ - hasIndexingErrors: Scalars['Boolean']; -}; - -export type _SubgraphErrorPolicy_ = - /** Data will be returned even if the subgraph has indexing errors */ - | 'allow' - /** If the subgraph has indexing errors, data will be omitted. The default. */ - | 'deny'; - - export type QuerySdk = { - /** null **/ - directDeposit: InContextSdkMethod, - /** null **/ - directDeposits: InContextSdkMethod, - /** null **/ - lastSyncBlock: InContextSdkMethod, - /** null **/ - lastSyncBlocks: InContextSdkMethod, - /** null **/ - message: InContextSdkMethod, - /** null **/ - messages: InContextSdkMethod, - /** Access to subgraph metadata **/ - _meta: InContextSdkMethod - }; - - export type MutationSdk = { - - }; - - export type SubscriptionSdk = { - /** null **/ - directDeposit: InContextSdkMethod, - /** null **/ - directDeposits: InContextSdkMethod, - /** null **/ - lastSyncBlock: InContextSdkMethod, - /** null **/ - lastSyncBlocks: InContextSdkMethod, - /** null **/ - message: InContextSdkMethod, - /** null **/ - messages: InContextSdkMethod, - /** Access to subgraph metadata **/ - _meta: InContextSdkMethod - }; - - export type Context = { - ["zkbob-bob-goerli"]: { Query: QuerySdk, Mutation: MutationSdk, Subscription: SubscriptionSdk }, - ["subgraphEndpoint"]: Scalars['ID'] - }; -} diff --git a/src/.graphclient/sources/zkbob-usdc-polygon/introspectionSchema.ts b/src/.graphclient/sources/zkbob-usdc-polygon/introspectionSchema.ts new file mode 100644 index 00000000..3901df96 --- /dev/null +++ b/src/.graphclient/sources/zkbob-usdc-polygon/introspectionSchema.ts @@ -0,0 +1,23958 @@ +// @ts-nocheck +import { buildASTSchema } from 'graphql'; + +const schemaAST = { + "kind": "Document", + "definitions": [ + { + "kind": "SchemaDefinition", + "operationTypes": [ + { + "kind": "OperationTypeDefinition", + "operation": "query", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Query" + } + } + }, + { + "kind": "OperationTypeDefinition", + "operation": "subscription", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Subscription" + } + } + } + ], + "directives": [] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive." + }, + "name": { + "kind": "Name", + "value": "entity" + }, + "arguments": [], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "OBJECT" + } + ] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "Defined a Subgraph ID for an object type" + }, + "name": { + "kind": "Name", + "value": "subgraphId" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + } + ], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "OBJECT" + } + ] + }, + { + "kind": "DirectiveDefinition", + "description": { + "kind": "StringValue", + "value": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API." + }, + "name": { + "kind": "Name", + "value": "derivedFrom" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "field" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + } + ], + "repeatable": false, + "locations": [ + { + "kind": "Name", + "value": "FIELD_DEFINITION" + } + ] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "BigDecimal" + }, + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "BigInt" + }, + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number_gte" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Block_height" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "hash" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "number_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "Bytes" + }, + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DDBatchOperation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + } + } + } + }, + "directives": [] + } + ], + "interfaces": [ + { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DDBatchOperation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_not" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_not_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_not_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "DDBatchOperation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposits" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DepositOperation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + } + ], + "interfaces": [ + { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DepositOperation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "DepositOperation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DirectDeposit" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pending" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "completed" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "refunded" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "bnInit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tsInit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "txInit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "payment" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "bnClosed" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tsClosed" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "txClosed" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pending" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pending_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pending_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pending_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "completed" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "completed_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "completed_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "completed_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "refunded" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "refunded_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "refunded_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "refunded_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "deposit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txInit_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "payment_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "DirectDeposit_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pending" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "completed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "refunded" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fallbackUser" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_diversifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zkAddress_pk" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "deposit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "bnInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "tsInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "txInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "payment" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "payment__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "payment__sender" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "payment__token" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "payment__note" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "bnClosed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "tsClosed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "txClosed" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "description": { + "kind": "StringValue", + "value": "8 bytes signed integer\n", + "block": true + }, + "name": { + "kind": "Name", + "value": "Int8" + }, + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "LastSyncBlock" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "LastSyncBlock_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "LastSyncBlock_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "InterfaceTypeDefinition", + "name": { + "kind": "Name", + "value": "Operation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + } + ], + "directives": [], + "interfaces": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Operation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Operation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "description": { + "kind": "StringValue", + "value": "Defines the order direction, either ascending or descending", + "block": true + }, + "name": { + "kind": "Name", + "value": "OrderDirection" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "asc" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "desc" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Payment" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "note" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Payment_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sender_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "note_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "Payment_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "sender" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__pending" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__completed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__refunded" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__sender" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__fallbackUser" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__zkAddress_diversifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__zkAddress_pk" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__deposit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__fee" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__bnInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__tsInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__txInit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__bnClosed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__tsClosed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "delegated_deposit__txClosed" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "note" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permit_holder" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "sig" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + } + ], + "interfaces": [ + { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "sig_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "permit_deadline" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "permit_holder" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "sig" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "PoolTx" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "ts" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "type" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "message" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "gas_used" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zk" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "operation" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "calldata" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "ts_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "type_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "message_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "zk_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "operation_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "calldata_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "PoolTx_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zk" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zk__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zk__out_commit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "zk__tree_root_after" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "operation" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "operation__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "calldata" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Query" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "directDeposit" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "directDeposits" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "payment" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "payments" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkCommon" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkCommons" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "depositOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "depositOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "transferOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "transferOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "withdrawalOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "withdrawalOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permittableDepositOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permittableDepositOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "ddbatchOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "ddbatchOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "poolTx" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "poolTxes" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "lastSyncBlock" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "lastSyncBlocks" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "operation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "operations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Access to subgraph metadata", + "block": true + }, + "name": { + "kind": "Name", + "value": "_meta" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Meta_" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "Subscription" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "directDeposit" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "directDeposits" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DirectDeposit" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "payment" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "payments" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Payment" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkCommon" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "zkCommons" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "depositOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "depositOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DepositOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "transferOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "transferOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "withdrawalOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "withdrawalOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permittableDepositOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "permittableDepositOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PermittableDepositOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "ddbatchOperation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "ddbatchOperations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "DDBatchOperation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "poolTx" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "poolTxes" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "lastSyncBlock" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "lastSyncBlocks" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "LastSyncBlock" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "operation" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ID" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "operations" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "skip" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "0" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "first" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "defaultValue": { + "kind": "IntValue", + "value": "100" + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderBy" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_orderBy" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "orderDirection" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "OrderDirection" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "where" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", + "block": true + }, + "name": { + "kind": "Name", + "value": "subgraphError" + }, + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + } + } + }, + "defaultValue": { + "kind": "EnumValue", + "value": "deny" + }, + "directives": [] + } + ], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Access to subgraph metadata", + "block": true + }, + "name": { + "kind": "Name", + "value": "_meta" + }, + "arguments": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Block_height" + } + }, + "directives": [] + } + ], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Meta_" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "TransferOperation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + } + ], + "interfaces": [ + { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "TransferOperation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "TransferOperation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "TransferOperation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "WithdrawalOperation" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "energy_amount" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "native_amount" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "receiver" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + }, + "directives": [] + } + ], + "interfaces": [ + { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Operation" + } + } + ], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "fee_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "receiver_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "WithdrawalOperation_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "nullifier" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "index_ref" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "energy_amount" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "token_amount" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "fee" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "native_amount" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "receiver" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "ZkCommon" + }, + "fields": [ + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "out_commit" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "witness" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "name": { + "kind": "Name", + "value": "tree_proof" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "id_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_contains_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_starts_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_not_ends_with_nocase" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx_" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "PoolTx_filter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness_not" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness_not_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "witness_not_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_not" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after_not_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof_not" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof_not_contains" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof_not_contains_nocase" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BigInt" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "Filter for the block changed event.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_change_block" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "BlockChangedFilter" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "and" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "or" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "ZkCommon_filter" + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "ZkCommon_orderBy" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__id" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__index" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__tx" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__ts" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__all_messages_hash" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__type" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__message" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__gas_used" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "pooltx__calldata" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "out_commit" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "witness" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "tree_root_after" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "name": { + "kind": "Name", + "value": "tree_proof" + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "name": { + "kind": "Name", + "value": "_Block_" + }, + "fields": [ + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The hash of the block", + "block": true + }, + "name": { + "kind": "Name", + "value": "hash" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Bytes" + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The block number", + "block": true + }, + "name": { + "kind": "Name", + "value": "number" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Integer representation of the timestamp stored in blocks for the chain", + "block": true + }, + "name": { + "kind": "Name", + "value": "timestamp" + }, + "arguments": [], + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Int" + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "ObjectTypeDefinition", + "description": { + "kind": "StringValue", + "value": "The type for the top-level _meta field", + "block": true + }, + "name": { + "kind": "Name", + "value": "_Meta_" + }, + "fields": [ + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n", + "block": true + }, + "name": { + "kind": "Name", + "value": "block" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_Block_" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "The deployment ID", + "block": true + }, + "name": { + "kind": "Name", + "value": "deployment" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" + } + } + }, + "directives": [] + }, + { + "kind": "FieldDefinition", + "description": { + "kind": "StringValue", + "value": "If `true`, the subgraph encountered indexing errors at some past block", + "block": true + }, + "name": { + "kind": "Name", + "value": "hasIndexingErrors" + }, + "arguments": [], + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + } + }, + "directives": [] + } + ], + "interfaces": [], + "directives": [] + }, + { + "kind": "EnumTypeDefinition", + "name": { + "kind": "Name", + "value": "_SubgraphErrorPolicy_" + }, + "values": [ + { + "kind": "EnumValueDefinition", + "description": { + "kind": "StringValue", + "value": "Data will be returned even if the subgraph has indexing errors", + "block": true + }, + "name": { + "kind": "Name", + "value": "allow" + }, + "directives": [] + }, + { + "kind": "EnumValueDefinition", + "description": { + "kind": "StringValue", + "value": "If the subgraph has indexing errors, data will be omitted. The default.", + "block": true + }, + "name": { + "kind": "Name", + "value": "deny" + }, + "directives": [] + } + ], + "directives": [] + } + ] +}; + +export default buildASTSchema(schemaAST, { + assumeValid: true, + assumeValidSDL: true +}); \ No newline at end of file diff --git a/src/.graphclient/sources/zkbob-usdc-polygon/schema.graphql b/src/.graphclient/sources/zkbob-usdc-polygon/schema.graphql new file mode 100644 index 00000000..d2f67011 --- /dev/null +++ b/src/.graphclient/sources/zkbob-usdc-polygon/schema.graphql @@ -0,0 +1,1928 @@ +schema { + query: Query + subscription: Subscription +} + +"Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive." +directive @entity on OBJECT + +"Defined a Subgraph ID for an object type" +directive @subgraphId(id: String!) on OBJECT + +"creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API." +directive @derivedFrom(field: String!) on FIELD_DEFINITION + +scalar BigDecimal + +scalar BigInt + +input BlockChangedFilter { + number_gte: Int! +} + +input Block_height { + hash: Bytes + number: Int + number_gte: Int +} + +scalar Bytes + +type DDBatchOperation implements Operation { + id: String! + pooltx: PoolTx! + delegated_deposits(skip: Int = 0, first: Int = 100, orderBy: DirectDeposit_orderBy, orderDirection: OrderDirection, where: DirectDeposit_filter): [DirectDeposit!]! +} + +input DDBatchOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + delegated_deposits: [String!] + delegated_deposits_not: [String!] + delegated_deposits_contains: [String!] + delegated_deposits_contains_nocase: [String!] + delegated_deposits_not_contains: [String!] + delegated_deposits_not_contains_nocase: [String!] + delegated_deposits_: DirectDeposit_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DDBatchOperation_filter] + or: [DDBatchOperation_filter] +} + +enum DDBatchOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + delegated_deposits +} + +type DepositOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + token_amount: BigInt! + fee: BigInt! +} + +input DepositOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DepositOperation_filter] + or: [DepositOperation_filter] +} + +enum DepositOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + token_amount + fee +} + +type DirectDeposit { + id: String! + index: BigInt! + pending: Boolean! + completed: Boolean! + refunded: Boolean! + sender: Bytes! + fallbackUser: Bytes! + zkAddress_diversifier: Bytes! + zkAddress_pk: Bytes! + deposit: BigInt! + fee: BigInt! + bnInit: BigInt! + tsInit: BigInt! + txInit: Bytes! + payment: Payment + bnClosed: BigInt + tsClosed: BigInt + txClosed: Bytes +} + +input DirectDeposit_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + index: BigInt + index_not: BigInt + index_gt: BigInt + index_lt: BigInt + index_gte: BigInt + index_lte: BigInt + index_in: [BigInt!] + index_not_in: [BigInt!] + pending: Boolean + pending_not: Boolean + pending_in: [Boolean!] + pending_not_in: [Boolean!] + completed: Boolean + completed_not: Boolean + completed_in: [Boolean!] + completed_not_in: [Boolean!] + refunded: Boolean + refunded_not: Boolean + refunded_in: [Boolean!] + refunded_not_in: [Boolean!] + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + fallbackUser: Bytes + fallbackUser_not: Bytes + fallbackUser_gt: Bytes + fallbackUser_lt: Bytes + fallbackUser_gte: Bytes + fallbackUser_lte: Bytes + fallbackUser_in: [Bytes!] + fallbackUser_not_in: [Bytes!] + fallbackUser_contains: Bytes + fallbackUser_not_contains: Bytes + zkAddress_diversifier: Bytes + zkAddress_diversifier_not: Bytes + zkAddress_diversifier_gt: Bytes + zkAddress_diversifier_lt: Bytes + zkAddress_diversifier_gte: Bytes + zkAddress_diversifier_lte: Bytes + zkAddress_diversifier_in: [Bytes!] + zkAddress_diversifier_not_in: [Bytes!] + zkAddress_diversifier_contains: Bytes + zkAddress_diversifier_not_contains: Bytes + zkAddress_pk: Bytes + zkAddress_pk_not: Bytes + zkAddress_pk_gt: Bytes + zkAddress_pk_lt: Bytes + zkAddress_pk_gte: Bytes + zkAddress_pk_lte: Bytes + zkAddress_pk_in: [Bytes!] + zkAddress_pk_not_in: [Bytes!] + zkAddress_pk_contains: Bytes + zkAddress_pk_not_contains: Bytes + deposit: BigInt + deposit_not: BigInt + deposit_gt: BigInt + deposit_lt: BigInt + deposit_gte: BigInt + deposit_lte: BigInt + deposit_in: [BigInt!] + deposit_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + bnInit: BigInt + bnInit_not: BigInt + bnInit_gt: BigInt + bnInit_lt: BigInt + bnInit_gte: BigInt + bnInit_lte: BigInt + bnInit_in: [BigInt!] + bnInit_not_in: [BigInt!] + tsInit: BigInt + tsInit_not: BigInt + tsInit_gt: BigInt + tsInit_lt: BigInt + tsInit_gte: BigInt + tsInit_lte: BigInt + tsInit_in: [BigInt!] + tsInit_not_in: [BigInt!] + txInit: Bytes + txInit_not: Bytes + txInit_gt: Bytes + txInit_lt: Bytes + txInit_gte: Bytes + txInit_lte: Bytes + txInit_in: [Bytes!] + txInit_not_in: [Bytes!] + txInit_contains: Bytes + txInit_not_contains: Bytes + payment: String + payment_not: String + payment_gt: String + payment_lt: String + payment_gte: String + payment_lte: String + payment_in: [String!] + payment_not_in: [String!] + payment_contains: String + payment_contains_nocase: String + payment_not_contains: String + payment_not_contains_nocase: String + payment_starts_with: String + payment_starts_with_nocase: String + payment_not_starts_with: String + payment_not_starts_with_nocase: String + payment_ends_with: String + payment_ends_with_nocase: String + payment_not_ends_with: String + payment_not_ends_with_nocase: String + payment_: Payment_filter + bnClosed: BigInt + bnClosed_not: BigInt + bnClosed_gt: BigInt + bnClosed_lt: BigInt + bnClosed_gte: BigInt + bnClosed_lte: BigInt + bnClosed_in: [BigInt!] + bnClosed_not_in: [BigInt!] + tsClosed: BigInt + tsClosed_not: BigInt + tsClosed_gt: BigInt + tsClosed_lt: BigInt + tsClosed_gte: BigInt + tsClosed_lte: BigInt + tsClosed_in: [BigInt!] + tsClosed_not_in: [BigInt!] + txClosed: Bytes + txClosed_not: Bytes + txClosed_gt: Bytes + txClosed_lt: Bytes + txClosed_gte: Bytes + txClosed_lte: Bytes + txClosed_in: [Bytes!] + txClosed_not_in: [Bytes!] + txClosed_contains: Bytes + txClosed_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [DirectDeposit_filter] + or: [DirectDeposit_filter] +} + +enum DirectDeposit_orderBy { + id + index + pending + completed + refunded + sender + fallbackUser + zkAddress_diversifier + zkAddress_pk + deposit + fee + bnInit + tsInit + txInit + payment + payment__id + payment__sender + payment__token + payment__note + bnClosed + tsClosed + txClosed +} + +""" +8 bytes signed integer + +""" +scalar Int8 + +type LastSyncBlock { + id: Bytes! + block: BigInt +} + +input LastSyncBlock_filter { + id: Bytes + id_not: Bytes + id_gt: Bytes + id_lt: Bytes + id_gte: Bytes + id_lte: Bytes + id_in: [Bytes!] + id_not_in: [Bytes!] + id_contains: Bytes + id_not_contains: Bytes + block: BigInt + block_not: BigInt + block_gt: BigInt + block_lt: BigInt + block_gte: BigInt + block_lte: BigInt + block_in: [BigInt!] + block_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [LastSyncBlock_filter] + or: [LastSyncBlock_filter] +} + +enum LastSyncBlock_orderBy { + id + block +} + +interface Operation { + id: String! + pooltx: PoolTx! +} + +input Operation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Operation_filter] + or: [Operation_filter] +} + +enum Operation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata +} + +"""Defines the order direction, either ascending or descending""" +enum OrderDirection { + asc + desc +} + +type Payment { + id: String! + sender: Bytes + delegated_deposit: DirectDeposit! + token: Bytes! + note: Bytes +} + +input Payment_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + sender: Bytes + sender_not: Bytes + sender_gt: Bytes + sender_lt: Bytes + sender_gte: Bytes + sender_lte: Bytes + sender_in: [Bytes!] + sender_not_in: [Bytes!] + sender_contains: Bytes + sender_not_contains: Bytes + delegated_deposit: String + delegated_deposit_not: String + delegated_deposit_gt: String + delegated_deposit_lt: String + delegated_deposit_gte: String + delegated_deposit_lte: String + delegated_deposit_in: [String!] + delegated_deposit_not_in: [String!] + delegated_deposit_contains: String + delegated_deposit_contains_nocase: String + delegated_deposit_not_contains: String + delegated_deposit_not_contains_nocase: String + delegated_deposit_starts_with: String + delegated_deposit_starts_with_nocase: String + delegated_deposit_not_starts_with: String + delegated_deposit_not_starts_with_nocase: String + delegated_deposit_ends_with: String + delegated_deposit_ends_with_nocase: String + delegated_deposit_not_ends_with: String + delegated_deposit_not_ends_with_nocase: String + delegated_deposit_: DirectDeposit_filter + token: Bytes + token_not: Bytes + token_gt: Bytes + token_lt: Bytes + token_gte: Bytes + token_lte: Bytes + token_in: [Bytes!] + token_not_in: [Bytes!] + token_contains: Bytes + token_not_contains: Bytes + note: Bytes + note_not: Bytes + note_gt: Bytes + note_lt: Bytes + note_gte: Bytes + note_lte: Bytes + note_in: [Bytes!] + note_not_in: [Bytes!] + note_contains: Bytes + note_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [Payment_filter] + or: [Payment_filter] +} + +enum Payment_orderBy { + id + sender + delegated_deposit + delegated_deposit__id + delegated_deposit__index + delegated_deposit__pending + delegated_deposit__completed + delegated_deposit__refunded + delegated_deposit__sender + delegated_deposit__fallbackUser + delegated_deposit__zkAddress_diversifier + delegated_deposit__zkAddress_pk + delegated_deposit__deposit + delegated_deposit__fee + delegated_deposit__bnInit + delegated_deposit__tsInit + delegated_deposit__txInit + delegated_deposit__bnClosed + delegated_deposit__tsClosed + delegated_deposit__txClosed + token + note +} + +type PermittableDepositOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + token_amount: BigInt! + fee: BigInt! + permit_deadline: BigInt! + permit_holder: Bytes! + sig: Bytes! +} + +input PermittableDepositOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + permit_deadline: BigInt + permit_deadline_not: BigInt + permit_deadline_gt: BigInt + permit_deadline_lt: BigInt + permit_deadline_gte: BigInt + permit_deadline_lte: BigInt + permit_deadline_in: [BigInt!] + permit_deadline_not_in: [BigInt!] + permit_holder: Bytes + permit_holder_not: Bytes + permit_holder_gt: Bytes + permit_holder_lt: Bytes + permit_holder_gte: Bytes + permit_holder_lte: Bytes + permit_holder_in: [Bytes!] + permit_holder_not_in: [Bytes!] + permit_holder_contains: Bytes + permit_holder_not_contains: Bytes + sig: Bytes + sig_not: Bytes + sig_gt: Bytes + sig_lt: Bytes + sig_gte: Bytes + sig_lte: Bytes + sig_in: [Bytes!] + sig_not_in: [Bytes!] + sig_contains: Bytes + sig_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PermittableDepositOperation_filter] + or: [PermittableDepositOperation_filter] +} + +enum PermittableDepositOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + token_amount + fee + permit_deadline + permit_holder + sig +} + +type PoolTx { + id: String! + index: BigInt! + tx: Bytes! + ts: BigInt! + all_messages_hash: Bytes! + type: Int! + message: Bytes! + gas_used: Int! + zk: ZkCommon! + operation: Operation! + calldata: Bytes! +} + +input PoolTx_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + index: BigInt + index_not: BigInt + index_gt: BigInt + index_lt: BigInt + index_gte: BigInt + index_lte: BigInt + index_in: [BigInt!] + index_not_in: [BigInt!] + tx: Bytes + tx_not: Bytes + tx_gt: Bytes + tx_lt: Bytes + tx_gte: Bytes + tx_lte: Bytes + tx_in: [Bytes!] + tx_not_in: [Bytes!] + tx_contains: Bytes + tx_not_contains: Bytes + ts: BigInt + ts_not: BigInt + ts_gt: BigInt + ts_lt: BigInt + ts_gte: BigInt + ts_lte: BigInt + ts_in: [BigInt!] + ts_not_in: [BigInt!] + all_messages_hash: Bytes + all_messages_hash_not: Bytes + all_messages_hash_gt: Bytes + all_messages_hash_lt: Bytes + all_messages_hash_gte: Bytes + all_messages_hash_lte: Bytes + all_messages_hash_in: [Bytes!] + all_messages_hash_not_in: [Bytes!] + all_messages_hash_contains: Bytes + all_messages_hash_not_contains: Bytes + type: Int + type_not: Int + type_gt: Int + type_lt: Int + type_gte: Int + type_lte: Int + type_in: [Int!] + type_not_in: [Int!] + message: Bytes + message_not: Bytes + message_gt: Bytes + message_lt: Bytes + message_gte: Bytes + message_lte: Bytes + message_in: [Bytes!] + message_not_in: [Bytes!] + message_contains: Bytes + message_not_contains: Bytes + gas_used: Int + gas_used_not: Int + gas_used_gt: Int + gas_used_lt: Int + gas_used_gte: Int + gas_used_lte: Int + gas_used_in: [Int!] + gas_used_not_in: [Int!] + zk: String + zk_not: String + zk_gt: String + zk_lt: String + zk_gte: String + zk_lte: String + zk_in: [String!] + zk_not_in: [String!] + zk_contains: String + zk_contains_nocase: String + zk_not_contains: String + zk_not_contains_nocase: String + zk_starts_with: String + zk_starts_with_nocase: String + zk_not_starts_with: String + zk_not_starts_with_nocase: String + zk_ends_with: String + zk_ends_with_nocase: String + zk_not_ends_with: String + zk_not_ends_with_nocase: String + zk_: ZkCommon_filter + operation: String + operation_not: String + operation_gt: String + operation_lt: String + operation_gte: String + operation_lte: String + operation_in: [String!] + operation_not_in: [String!] + operation_contains: String + operation_contains_nocase: String + operation_not_contains: String + operation_not_contains_nocase: String + operation_starts_with: String + operation_starts_with_nocase: String + operation_not_starts_with: String + operation_not_starts_with_nocase: String + operation_ends_with: String + operation_ends_with_nocase: String + operation_not_ends_with: String + operation_not_ends_with_nocase: String + operation_: Operation_filter + calldata: Bytes + calldata_not: Bytes + calldata_gt: Bytes + calldata_lt: Bytes + calldata_gte: Bytes + calldata_lte: Bytes + calldata_in: [Bytes!] + calldata_not_in: [Bytes!] + calldata_contains: Bytes + calldata_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [PoolTx_filter] + or: [PoolTx_filter] +} + +enum PoolTx_orderBy { + id + index + tx + ts + all_messages_hash + type + message + gas_used + zk + zk__id + zk__out_commit + zk__tree_root_after + operation + operation__id + calldata +} + +type Query { + directDeposit( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DirectDeposit + directDeposits( + skip: Int = 0 + first: Int = 100 + orderBy: DirectDeposit_orderBy + orderDirection: OrderDirection + where: DirectDeposit_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DirectDeposit!]! + payment( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Payment + payments( + skip: Int = 0 + first: Int = 100 + orderBy: Payment_orderBy + orderDirection: OrderDirection + where: Payment_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Payment!]! + zkCommon( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ZkCommon + zkCommons( + skip: Int = 0 + first: Int = 100 + orderBy: ZkCommon_orderBy + orderDirection: OrderDirection + where: ZkCommon_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ZkCommon!]! + depositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DepositOperation + depositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DepositOperation_orderBy + orderDirection: OrderDirection + where: DepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DepositOperation!]! + transferOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferOperation + transferOperations( + skip: Int = 0 + first: Int = 100 + orderBy: TransferOperation_orderBy + orderDirection: OrderDirection + where: TransferOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferOperation!]! + withdrawalOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): WithdrawalOperation + withdrawalOperations( + skip: Int = 0 + first: Int = 100 + orderBy: WithdrawalOperation_orderBy + orderDirection: OrderDirection + where: WithdrawalOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [WithdrawalOperation!]! + permittableDepositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PermittableDepositOperation + permittableDepositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: PermittableDepositOperation_orderBy + orderDirection: OrderDirection + where: PermittableDepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PermittableDepositOperation!]! + ddbatchOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DDBatchOperation + ddbatchOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DDBatchOperation_orderBy + orderDirection: OrderDirection + where: DDBatchOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DDBatchOperation!]! + poolTx( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolTx + poolTxes( + skip: Int = 0 + first: Int = 100 + orderBy: PoolTx_orderBy + orderDirection: OrderDirection + where: PoolTx_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolTx!]! + lastSyncBlock( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): LastSyncBlock + lastSyncBlocks( + skip: Int = 0 + first: Int = 100 + orderBy: LastSyncBlock_orderBy + orderDirection: OrderDirection + where: LastSyncBlock_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [LastSyncBlock!]! + operation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Operation + operations( + skip: Int = 0 + first: Int = 100 + orderBy: Operation_orderBy + orderDirection: OrderDirection + where: Operation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Operation!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +type Subscription { + directDeposit( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DirectDeposit + directDeposits( + skip: Int = 0 + first: Int = 100 + orderBy: DirectDeposit_orderBy + orderDirection: OrderDirection + where: DirectDeposit_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DirectDeposit!]! + payment( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Payment + payments( + skip: Int = 0 + first: Int = 100 + orderBy: Payment_orderBy + orderDirection: OrderDirection + where: Payment_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Payment!]! + zkCommon( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): ZkCommon + zkCommons( + skip: Int = 0 + first: Int = 100 + orderBy: ZkCommon_orderBy + orderDirection: OrderDirection + where: ZkCommon_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [ZkCommon!]! + depositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DepositOperation + depositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DepositOperation_orderBy + orderDirection: OrderDirection + where: DepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DepositOperation!]! + transferOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): TransferOperation + transferOperations( + skip: Int = 0 + first: Int = 100 + orderBy: TransferOperation_orderBy + orderDirection: OrderDirection + where: TransferOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [TransferOperation!]! + withdrawalOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): WithdrawalOperation + withdrawalOperations( + skip: Int = 0 + first: Int = 100 + orderBy: WithdrawalOperation_orderBy + orderDirection: OrderDirection + where: WithdrawalOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [WithdrawalOperation!]! + permittableDepositOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PermittableDepositOperation + permittableDepositOperations( + skip: Int = 0 + first: Int = 100 + orderBy: PermittableDepositOperation_orderBy + orderDirection: OrderDirection + where: PermittableDepositOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PermittableDepositOperation!]! + ddbatchOperation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): DDBatchOperation + ddbatchOperations( + skip: Int = 0 + first: Int = 100 + orderBy: DDBatchOperation_orderBy + orderDirection: OrderDirection + where: DDBatchOperation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [DDBatchOperation!]! + poolTx( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): PoolTx + poolTxes( + skip: Int = 0 + first: Int = 100 + orderBy: PoolTx_orderBy + orderDirection: OrderDirection + where: PoolTx_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [PoolTx!]! + lastSyncBlock( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): LastSyncBlock + lastSyncBlocks( + skip: Int = 0 + first: Int = 100 + orderBy: LastSyncBlock_orderBy + orderDirection: OrderDirection + where: LastSyncBlock_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [LastSyncBlock!]! + operation( + id: ID! + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): Operation + operations( + skip: Int = 0 + first: Int = 100 + orderBy: Operation_orderBy + orderDirection: OrderDirection + where: Operation_filter + """ + The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted. + """ + block: Block_height + """ + Set to `allow` to receive data even if the subgraph has skipped over errors while syncing. + """ + subgraphError: _SubgraphErrorPolicy_! = deny + ): [Operation!]! + """Access to subgraph metadata""" + _meta(block: Block_height): _Meta_ +} + +type TransferOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + fee: BigInt! +} + +input TransferOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [TransferOperation_filter] + or: [TransferOperation_filter] +} + +enum TransferOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + fee +} + +type WithdrawalOperation implements Operation { + id: String! + pooltx: PoolTx! + nullifier: BigInt! + index_ref: BigInt! + energy_amount: BigInt! + token_amount: BigInt! + fee: BigInt! + native_amount: BigInt! + receiver: Bytes! +} + +input WithdrawalOperation_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + nullifier: BigInt + nullifier_not: BigInt + nullifier_gt: BigInt + nullifier_lt: BigInt + nullifier_gte: BigInt + nullifier_lte: BigInt + nullifier_in: [BigInt!] + nullifier_not_in: [BigInt!] + index_ref: BigInt + index_ref_not: BigInt + index_ref_gt: BigInt + index_ref_lt: BigInt + index_ref_gte: BigInt + index_ref_lte: BigInt + index_ref_in: [BigInt!] + index_ref_not_in: [BigInt!] + energy_amount: BigInt + energy_amount_not: BigInt + energy_amount_gt: BigInt + energy_amount_lt: BigInt + energy_amount_gte: BigInt + energy_amount_lte: BigInt + energy_amount_in: [BigInt!] + energy_amount_not_in: [BigInt!] + token_amount: BigInt + token_amount_not: BigInt + token_amount_gt: BigInt + token_amount_lt: BigInt + token_amount_gte: BigInt + token_amount_lte: BigInt + token_amount_in: [BigInt!] + token_amount_not_in: [BigInt!] + fee: BigInt + fee_not: BigInt + fee_gt: BigInt + fee_lt: BigInt + fee_gte: BigInt + fee_lte: BigInt + fee_in: [BigInt!] + fee_not_in: [BigInt!] + native_amount: BigInt + native_amount_not: BigInt + native_amount_gt: BigInt + native_amount_lt: BigInt + native_amount_gte: BigInt + native_amount_lte: BigInt + native_amount_in: [BigInt!] + native_amount_not_in: [BigInt!] + receiver: Bytes + receiver_not: Bytes + receiver_gt: Bytes + receiver_lt: Bytes + receiver_gte: Bytes + receiver_lte: Bytes + receiver_in: [Bytes!] + receiver_not_in: [Bytes!] + receiver_contains: Bytes + receiver_not_contains: Bytes + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [WithdrawalOperation_filter] + or: [WithdrawalOperation_filter] +} + +enum WithdrawalOperation_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + nullifier + index_ref + energy_amount + token_amount + fee + native_amount + receiver +} + +type ZkCommon { + id: String! + pooltx: PoolTx! + out_commit: BigInt! + witness: [BigInt!]! + tree_root_after: BigInt! + tree_proof: [BigInt!]! +} + +input ZkCommon_filter { + id: String + id_not: String + id_gt: String + id_lt: String + id_gte: String + id_lte: String + id_in: [String!] + id_not_in: [String!] + id_contains: String + id_contains_nocase: String + id_not_contains: String + id_not_contains_nocase: String + id_starts_with: String + id_starts_with_nocase: String + id_not_starts_with: String + id_not_starts_with_nocase: String + id_ends_with: String + id_ends_with_nocase: String + id_not_ends_with: String + id_not_ends_with_nocase: String + pooltx: String + pooltx_not: String + pooltx_gt: String + pooltx_lt: String + pooltx_gte: String + pooltx_lte: String + pooltx_in: [String!] + pooltx_not_in: [String!] + pooltx_contains: String + pooltx_contains_nocase: String + pooltx_not_contains: String + pooltx_not_contains_nocase: String + pooltx_starts_with: String + pooltx_starts_with_nocase: String + pooltx_not_starts_with: String + pooltx_not_starts_with_nocase: String + pooltx_ends_with: String + pooltx_ends_with_nocase: String + pooltx_not_ends_with: String + pooltx_not_ends_with_nocase: String + pooltx_: PoolTx_filter + out_commit: BigInt + out_commit_not: BigInt + out_commit_gt: BigInt + out_commit_lt: BigInt + out_commit_gte: BigInt + out_commit_lte: BigInt + out_commit_in: [BigInt!] + out_commit_not_in: [BigInt!] + witness: [BigInt!] + witness_not: [BigInt!] + witness_contains: [BigInt!] + witness_contains_nocase: [BigInt!] + witness_not_contains: [BigInt!] + witness_not_contains_nocase: [BigInt!] + tree_root_after: BigInt + tree_root_after_not: BigInt + tree_root_after_gt: BigInt + tree_root_after_lt: BigInt + tree_root_after_gte: BigInt + tree_root_after_lte: BigInt + tree_root_after_in: [BigInt!] + tree_root_after_not_in: [BigInt!] + tree_proof: [BigInt!] + tree_proof_not: [BigInt!] + tree_proof_contains: [BigInt!] + tree_proof_contains_nocase: [BigInt!] + tree_proof_not_contains: [BigInt!] + tree_proof_not_contains_nocase: [BigInt!] + """Filter for the block changed event.""" + _change_block: BlockChangedFilter + and: [ZkCommon_filter] + or: [ZkCommon_filter] +} + +enum ZkCommon_orderBy { + id + pooltx + pooltx__id + pooltx__index + pooltx__tx + pooltx__ts + pooltx__all_messages_hash + pooltx__type + pooltx__message + pooltx__gas_used + pooltx__calldata + out_commit + witness + tree_root_after + tree_proof +} + +type _Block_ { + """The hash of the block""" + hash: Bytes + """The block number""" + number: Int! + """Integer representation of the timestamp stored in blocks for the chain""" + timestamp: Int +} + +"""The type for the top-level _meta field""" +type _Meta_ { + """ + Information about a specific subgraph block. The hash of the block + will be null if the _meta field has a block constraint that asks for + a block number. It will be filled if the _meta field has no block constraint + and therefore asks for the latest block + + """ + block: _Block_! + """The deployment ID""" + deployment: String! + """If `true`, the subgraph encountered indexing errors at some past block""" + hasIndexingErrors: Boolean! +} + +enum _SubgraphErrorPolicy_ { + """Data will be returned even if the subgraph has indexing errors""" + allow + """ + If the subgraph has indexing errors, data will be omitted. The default. + """ + deny +} \ No newline at end of file diff --git a/src/.graphclient/sources/zkbob-usdc-polygon/types.ts b/src/.graphclient/sources/zkbob-usdc-polygon/types.ts new file mode 100644 index 00000000..c2330059 --- /dev/null +++ b/src/.graphclient/sources/zkbob-usdc-polygon/types.ts @@ -0,0 +1,1906 @@ +// @ts-nocheck + +import { InContextSdkMethod } from '@graphql-mesh/types'; +import { MeshContext } from '@graphql-mesh/runtime'; + +export namespace ZkbobUsdcPolygonTypes { + export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + BigDecimal: any; + BigInt: any; + Bytes: any; + Int8: any; +}; + +export type BlockChangedFilter = { + number_gte: Scalars['Int']; +}; + +export type Block_height = { + hash?: InputMaybe; + number?: InputMaybe; + number_gte?: InputMaybe; +}; + +export type DDBatchOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + delegated_deposits: Array; +}; + + +export type DDBatchOperationdelegated_depositsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; +}; + +export type DDBatchOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + delegated_deposits?: InputMaybe>; + delegated_deposits_not?: InputMaybe>; + delegated_deposits_contains?: InputMaybe>; + delegated_deposits_contains_nocase?: InputMaybe>; + delegated_deposits_not_contains?: InputMaybe>; + delegated_deposits_not_contains_nocase?: InputMaybe>; + delegated_deposits_?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type DDBatchOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'delegated_deposits'; + +export type DepositOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; +}; + +export type DepositOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type DepositOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'token_amount' + | 'fee'; + +export type DirectDeposit = { + id: Scalars['String']; + index: Scalars['BigInt']; + pending: Scalars['Boolean']; + completed: Scalars['Boolean']; + refunded: Scalars['Boolean']; + sender: Scalars['Bytes']; + fallbackUser: Scalars['Bytes']; + zkAddress_diversifier: Scalars['Bytes']; + zkAddress_pk: Scalars['Bytes']; + deposit: Scalars['BigInt']; + fee: Scalars['BigInt']; + bnInit: Scalars['BigInt']; + tsInit: Scalars['BigInt']; + txInit: Scalars['Bytes']; + payment?: Maybe; + bnClosed?: Maybe; + tsClosed?: Maybe; + txClosed?: Maybe; +}; + +export type DirectDeposit_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + index?: InputMaybe; + index_not?: InputMaybe; + index_gt?: InputMaybe; + index_lt?: InputMaybe; + index_gte?: InputMaybe; + index_lte?: InputMaybe; + index_in?: InputMaybe>; + index_not_in?: InputMaybe>; + pending?: InputMaybe; + pending_not?: InputMaybe; + pending_in?: InputMaybe>; + pending_not_in?: InputMaybe>; + completed?: InputMaybe; + completed_not?: InputMaybe; + completed_in?: InputMaybe>; + completed_not_in?: InputMaybe>; + refunded?: InputMaybe; + refunded_not?: InputMaybe; + refunded_in?: InputMaybe>; + refunded_not_in?: InputMaybe>; + sender?: InputMaybe; + sender_not?: InputMaybe; + sender_gt?: InputMaybe; + sender_lt?: InputMaybe; + sender_gte?: InputMaybe; + sender_lte?: InputMaybe; + sender_in?: InputMaybe>; + sender_not_in?: InputMaybe>; + sender_contains?: InputMaybe; + sender_not_contains?: InputMaybe; + fallbackUser?: InputMaybe; + fallbackUser_not?: InputMaybe; + fallbackUser_gt?: InputMaybe; + fallbackUser_lt?: InputMaybe; + fallbackUser_gte?: InputMaybe; + fallbackUser_lte?: InputMaybe; + fallbackUser_in?: InputMaybe>; + fallbackUser_not_in?: InputMaybe>; + fallbackUser_contains?: InputMaybe; + fallbackUser_not_contains?: InputMaybe; + zkAddress_diversifier?: InputMaybe; + zkAddress_diversifier_not?: InputMaybe; + zkAddress_diversifier_gt?: InputMaybe; + zkAddress_diversifier_lt?: InputMaybe; + zkAddress_diversifier_gte?: InputMaybe; + zkAddress_diversifier_lte?: InputMaybe; + zkAddress_diversifier_in?: InputMaybe>; + zkAddress_diversifier_not_in?: InputMaybe>; + zkAddress_diversifier_contains?: InputMaybe; + zkAddress_diversifier_not_contains?: InputMaybe; + zkAddress_pk?: InputMaybe; + zkAddress_pk_not?: InputMaybe; + zkAddress_pk_gt?: InputMaybe; + zkAddress_pk_lt?: InputMaybe; + zkAddress_pk_gte?: InputMaybe; + zkAddress_pk_lte?: InputMaybe; + zkAddress_pk_in?: InputMaybe>; + zkAddress_pk_not_in?: InputMaybe>; + zkAddress_pk_contains?: InputMaybe; + zkAddress_pk_not_contains?: InputMaybe; + deposit?: InputMaybe; + deposit_not?: InputMaybe; + deposit_gt?: InputMaybe; + deposit_lt?: InputMaybe; + deposit_gte?: InputMaybe; + deposit_lte?: InputMaybe; + deposit_in?: InputMaybe>; + deposit_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + bnInit?: InputMaybe; + bnInit_not?: InputMaybe; + bnInit_gt?: InputMaybe; + bnInit_lt?: InputMaybe; + bnInit_gte?: InputMaybe; + bnInit_lte?: InputMaybe; + bnInit_in?: InputMaybe>; + bnInit_not_in?: InputMaybe>; + tsInit?: InputMaybe; + tsInit_not?: InputMaybe; + tsInit_gt?: InputMaybe; + tsInit_lt?: InputMaybe; + tsInit_gte?: InputMaybe; + tsInit_lte?: InputMaybe; + tsInit_in?: InputMaybe>; + tsInit_not_in?: InputMaybe>; + txInit?: InputMaybe; + txInit_not?: InputMaybe; + txInit_gt?: InputMaybe; + txInit_lt?: InputMaybe; + txInit_gte?: InputMaybe; + txInit_lte?: InputMaybe; + txInit_in?: InputMaybe>; + txInit_not_in?: InputMaybe>; + txInit_contains?: InputMaybe; + txInit_not_contains?: InputMaybe; + payment?: InputMaybe; + payment_not?: InputMaybe; + payment_gt?: InputMaybe; + payment_lt?: InputMaybe; + payment_gte?: InputMaybe; + payment_lte?: InputMaybe; + payment_in?: InputMaybe>; + payment_not_in?: InputMaybe>; + payment_contains?: InputMaybe; + payment_contains_nocase?: InputMaybe; + payment_not_contains?: InputMaybe; + payment_not_contains_nocase?: InputMaybe; + payment_starts_with?: InputMaybe; + payment_starts_with_nocase?: InputMaybe; + payment_not_starts_with?: InputMaybe; + payment_not_starts_with_nocase?: InputMaybe; + payment_ends_with?: InputMaybe; + payment_ends_with_nocase?: InputMaybe; + payment_not_ends_with?: InputMaybe; + payment_not_ends_with_nocase?: InputMaybe; + payment_?: InputMaybe; + bnClosed?: InputMaybe; + bnClosed_not?: InputMaybe; + bnClosed_gt?: InputMaybe; + bnClosed_lt?: InputMaybe; + bnClosed_gte?: InputMaybe; + bnClosed_lte?: InputMaybe; + bnClosed_in?: InputMaybe>; + bnClosed_not_in?: InputMaybe>; + tsClosed?: InputMaybe; + tsClosed_not?: InputMaybe; + tsClosed_gt?: InputMaybe; + tsClosed_lt?: InputMaybe; + tsClosed_gte?: InputMaybe; + tsClosed_lte?: InputMaybe; + tsClosed_in?: InputMaybe>; + tsClosed_not_in?: InputMaybe>; + txClosed?: InputMaybe; + txClosed_not?: InputMaybe; + txClosed_gt?: InputMaybe; + txClosed_lt?: InputMaybe; + txClosed_gte?: InputMaybe; + txClosed_lte?: InputMaybe; + txClosed_in?: InputMaybe>; + txClosed_not_in?: InputMaybe>; + txClosed_contains?: InputMaybe; + txClosed_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type DirectDeposit_orderBy = + | 'id' + | 'index' + | 'pending' + | 'completed' + | 'refunded' + | 'sender' + | 'fallbackUser' + | 'zkAddress_diversifier' + | 'zkAddress_pk' + | 'deposit' + | 'fee' + | 'bnInit' + | 'tsInit' + | 'txInit' + | 'payment' + | 'payment__id' + | 'payment__sender' + | 'payment__token' + | 'payment__note' + | 'bnClosed' + | 'tsClosed' + | 'txClosed'; + +export type LastSyncBlock = { + id: Scalars['Bytes']; + block?: Maybe; +}; + +export type LastSyncBlock_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_not_contains?: InputMaybe; + block?: InputMaybe; + block_not?: InputMaybe; + block_gt?: InputMaybe; + block_lt?: InputMaybe; + block_gte?: InputMaybe; + block_lte?: InputMaybe; + block_in?: InputMaybe>; + block_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type LastSyncBlock_orderBy = + | 'id' + | 'block'; + +export type Operation = { + id: Scalars['String']; + pooltx: PoolTx; +}; + +export type Operation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type Operation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata'; + +/** Defines the order direction, either ascending or descending */ +export type OrderDirection = + | 'asc' + | 'desc'; + +export type Payment = { + id: Scalars['String']; + sender?: Maybe; + delegated_deposit: DirectDeposit; + token: Scalars['Bytes']; + note?: Maybe; +}; + +export type Payment_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + sender?: InputMaybe; + sender_not?: InputMaybe; + sender_gt?: InputMaybe; + sender_lt?: InputMaybe; + sender_gte?: InputMaybe; + sender_lte?: InputMaybe; + sender_in?: InputMaybe>; + sender_not_in?: InputMaybe>; + sender_contains?: InputMaybe; + sender_not_contains?: InputMaybe; + delegated_deposit?: InputMaybe; + delegated_deposit_not?: InputMaybe; + delegated_deposit_gt?: InputMaybe; + delegated_deposit_lt?: InputMaybe; + delegated_deposit_gte?: InputMaybe; + delegated_deposit_lte?: InputMaybe; + delegated_deposit_in?: InputMaybe>; + delegated_deposit_not_in?: InputMaybe>; + delegated_deposit_contains?: InputMaybe; + delegated_deposit_contains_nocase?: InputMaybe; + delegated_deposit_not_contains?: InputMaybe; + delegated_deposit_not_contains_nocase?: InputMaybe; + delegated_deposit_starts_with?: InputMaybe; + delegated_deposit_starts_with_nocase?: InputMaybe; + delegated_deposit_not_starts_with?: InputMaybe; + delegated_deposit_not_starts_with_nocase?: InputMaybe; + delegated_deposit_ends_with?: InputMaybe; + delegated_deposit_ends_with_nocase?: InputMaybe; + delegated_deposit_not_ends_with?: InputMaybe; + delegated_deposit_not_ends_with_nocase?: InputMaybe; + delegated_deposit_?: InputMaybe; + token?: InputMaybe; + token_not?: InputMaybe; + token_gt?: InputMaybe; + token_lt?: InputMaybe; + token_gte?: InputMaybe; + token_lte?: InputMaybe; + token_in?: InputMaybe>; + token_not_in?: InputMaybe>; + token_contains?: InputMaybe; + token_not_contains?: InputMaybe; + note?: InputMaybe; + note_not?: InputMaybe; + note_gt?: InputMaybe; + note_lt?: InputMaybe; + note_gte?: InputMaybe; + note_lte?: InputMaybe; + note_in?: InputMaybe>; + note_not_in?: InputMaybe>; + note_contains?: InputMaybe; + note_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type Payment_orderBy = + | 'id' + | 'sender' + | 'delegated_deposit' + | 'delegated_deposit__id' + | 'delegated_deposit__index' + | 'delegated_deposit__pending' + | 'delegated_deposit__completed' + | 'delegated_deposit__refunded' + | 'delegated_deposit__sender' + | 'delegated_deposit__fallbackUser' + | 'delegated_deposit__zkAddress_diversifier' + | 'delegated_deposit__zkAddress_pk' + | 'delegated_deposit__deposit' + | 'delegated_deposit__fee' + | 'delegated_deposit__bnInit' + | 'delegated_deposit__tsInit' + | 'delegated_deposit__txInit' + | 'delegated_deposit__bnClosed' + | 'delegated_deposit__tsClosed' + | 'delegated_deposit__txClosed' + | 'token' + | 'note'; + +export type PermittableDepositOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; + permit_deadline: Scalars['BigInt']; + permit_holder: Scalars['Bytes']; + sig: Scalars['Bytes']; +}; + +export type PermittableDepositOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + permit_deadline?: InputMaybe; + permit_deadline_not?: InputMaybe; + permit_deadline_gt?: InputMaybe; + permit_deadline_lt?: InputMaybe; + permit_deadline_gte?: InputMaybe; + permit_deadline_lte?: InputMaybe; + permit_deadline_in?: InputMaybe>; + permit_deadline_not_in?: InputMaybe>; + permit_holder?: InputMaybe; + permit_holder_not?: InputMaybe; + permit_holder_gt?: InputMaybe; + permit_holder_lt?: InputMaybe; + permit_holder_gte?: InputMaybe; + permit_holder_lte?: InputMaybe; + permit_holder_in?: InputMaybe>; + permit_holder_not_in?: InputMaybe>; + permit_holder_contains?: InputMaybe; + permit_holder_not_contains?: InputMaybe; + sig?: InputMaybe; + sig_not?: InputMaybe; + sig_gt?: InputMaybe; + sig_lt?: InputMaybe; + sig_gte?: InputMaybe; + sig_lte?: InputMaybe; + sig_in?: InputMaybe>; + sig_not_in?: InputMaybe>; + sig_contains?: InputMaybe; + sig_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type PermittableDepositOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'token_amount' + | 'fee' + | 'permit_deadline' + | 'permit_holder' + | 'sig'; + +export type PoolTx = { + id: Scalars['String']; + index: Scalars['BigInt']; + tx: Scalars['Bytes']; + ts: Scalars['BigInt']; + all_messages_hash: Scalars['Bytes']; + type: Scalars['Int']; + message: Scalars['Bytes']; + gas_used: Scalars['Int']; + zk: ZkCommon; + operation: Operation; + calldata: Scalars['Bytes']; +}; + +export type PoolTx_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + index?: InputMaybe; + index_not?: InputMaybe; + index_gt?: InputMaybe; + index_lt?: InputMaybe; + index_gte?: InputMaybe; + index_lte?: InputMaybe; + index_in?: InputMaybe>; + index_not_in?: InputMaybe>; + tx?: InputMaybe; + tx_not?: InputMaybe; + tx_gt?: InputMaybe; + tx_lt?: InputMaybe; + tx_gte?: InputMaybe; + tx_lte?: InputMaybe; + tx_in?: InputMaybe>; + tx_not_in?: InputMaybe>; + tx_contains?: InputMaybe; + tx_not_contains?: InputMaybe; + ts?: InputMaybe; + ts_not?: InputMaybe; + ts_gt?: InputMaybe; + ts_lt?: InputMaybe; + ts_gte?: InputMaybe; + ts_lte?: InputMaybe; + ts_in?: InputMaybe>; + ts_not_in?: InputMaybe>; + all_messages_hash?: InputMaybe; + all_messages_hash_not?: InputMaybe; + all_messages_hash_gt?: InputMaybe; + all_messages_hash_lt?: InputMaybe; + all_messages_hash_gte?: InputMaybe; + all_messages_hash_lte?: InputMaybe; + all_messages_hash_in?: InputMaybe>; + all_messages_hash_not_in?: InputMaybe>; + all_messages_hash_contains?: InputMaybe; + all_messages_hash_not_contains?: InputMaybe; + type?: InputMaybe; + type_not?: InputMaybe; + type_gt?: InputMaybe; + type_lt?: InputMaybe; + type_gte?: InputMaybe; + type_lte?: InputMaybe; + type_in?: InputMaybe>; + type_not_in?: InputMaybe>; + message?: InputMaybe; + message_not?: InputMaybe; + message_gt?: InputMaybe; + message_lt?: InputMaybe; + message_gte?: InputMaybe; + message_lte?: InputMaybe; + message_in?: InputMaybe>; + message_not_in?: InputMaybe>; + message_contains?: InputMaybe; + message_not_contains?: InputMaybe; + gas_used?: InputMaybe; + gas_used_not?: InputMaybe; + gas_used_gt?: InputMaybe; + gas_used_lt?: InputMaybe; + gas_used_gte?: InputMaybe; + gas_used_lte?: InputMaybe; + gas_used_in?: InputMaybe>; + gas_used_not_in?: InputMaybe>; + zk?: InputMaybe; + zk_not?: InputMaybe; + zk_gt?: InputMaybe; + zk_lt?: InputMaybe; + zk_gte?: InputMaybe; + zk_lte?: InputMaybe; + zk_in?: InputMaybe>; + zk_not_in?: InputMaybe>; + zk_contains?: InputMaybe; + zk_contains_nocase?: InputMaybe; + zk_not_contains?: InputMaybe; + zk_not_contains_nocase?: InputMaybe; + zk_starts_with?: InputMaybe; + zk_starts_with_nocase?: InputMaybe; + zk_not_starts_with?: InputMaybe; + zk_not_starts_with_nocase?: InputMaybe; + zk_ends_with?: InputMaybe; + zk_ends_with_nocase?: InputMaybe; + zk_not_ends_with?: InputMaybe; + zk_not_ends_with_nocase?: InputMaybe; + zk_?: InputMaybe; + operation?: InputMaybe; + operation_not?: InputMaybe; + operation_gt?: InputMaybe; + operation_lt?: InputMaybe; + operation_gte?: InputMaybe; + operation_lte?: InputMaybe; + operation_in?: InputMaybe>; + operation_not_in?: InputMaybe>; + operation_contains?: InputMaybe; + operation_contains_nocase?: InputMaybe; + operation_not_contains?: InputMaybe; + operation_not_contains_nocase?: InputMaybe; + operation_starts_with?: InputMaybe; + operation_starts_with_nocase?: InputMaybe; + operation_not_starts_with?: InputMaybe; + operation_not_starts_with_nocase?: InputMaybe; + operation_ends_with?: InputMaybe; + operation_ends_with_nocase?: InputMaybe; + operation_not_ends_with?: InputMaybe; + operation_not_ends_with_nocase?: InputMaybe; + operation_?: InputMaybe; + calldata?: InputMaybe; + calldata_not?: InputMaybe; + calldata_gt?: InputMaybe; + calldata_lt?: InputMaybe; + calldata_gte?: InputMaybe; + calldata_lte?: InputMaybe; + calldata_in?: InputMaybe>; + calldata_not_in?: InputMaybe>; + calldata_contains?: InputMaybe; + calldata_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type PoolTx_orderBy = + | 'id' + | 'index' + | 'tx' + | 'ts' + | 'all_messages_hash' + | 'type' + | 'message' + | 'gas_used' + | 'zk' + | 'zk__id' + | 'zk__out_commit' + | 'zk__tree_root_after' + | 'operation' + | 'operation__id' + | 'calldata'; + +export type Query = { + directDeposit?: Maybe; + directDeposits: Array; + payment?: Maybe; + payments: Array; + zkCommon?: Maybe; + zkCommons: Array; + depositOperation?: Maybe; + depositOperations: Array; + transferOperation?: Maybe; + transferOperations: Array; + withdrawalOperation?: Maybe; + withdrawalOperations: Array; + permittableDepositOperation?: Maybe; + permittableDepositOperations: Array; + ddbatchOperation?: Maybe; + ddbatchOperations: Array; + poolTx?: Maybe; + poolTxes: Array; + lastSyncBlock?: Maybe; + lastSyncBlocks: Array; + operation?: Maybe; + operations: Array; + /** Access to subgraph metadata */ + _meta?: Maybe<_Meta_>; +}; + + +export type QuerydirectDepositArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerydirectDepositsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypaymentArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypaymentsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryzkCommonArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryzkCommonsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerydepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerydepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytransferOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerytransferOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerywithdrawalOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerywithdrawalOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypermittableDepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypermittableDepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryddbatchOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryddbatchOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypoolTxArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerypoolTxesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerylastSyncBlockArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QuerylastSyncBlocksArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryoperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryoperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Query_metaArgs = { + block?: InputMaybe; +}; + +export type Subscription = { + directDeposit?: Maybe; + directDeposits: Array; + payment?: Maybe; + payments: Array; + zkCommon?: Maybe; + zkCommons: Array; + depositOperation?: Maybe; + depositOperations: Array; + transferOperation?: Maybe; + transferOperations: Array; + withdrawalOperation?: Maybe; + withdrawalOperations: Array; + permittableDepositOperation?: Maybe; + permittableDepositOperations: Array; + ddbatchOperation?: Maybe; + ddbatchOperations: Array; + poolTx?: Maybe; + poolTxes: Array; + lastSyncBlock?: Maybe; + lastSyncBlocks: Array; + operation?: Maybe; + operations: Array; + /** Access to subgraph metadata */ + _meta?: Maybe<_Meta_>; +}; + + +export type SubscriptiondirectDepositArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiondirectDepositsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpaymentArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpaymentsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionzkCommonArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionzkCommonsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiondepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiondepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontransferOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptiontransferOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionwithdrawalOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionwithdrawalOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpermittableDepositOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpermittableDepositOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionddbatchOperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionddbatchOperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpoolTxArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionpoolTxesArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionlastSyncBlockArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionlastSyncBlocksArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionoperationArgs = { + id: Scalars['ID']; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionoperationsArgs = { + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type Subscription_metaArgs = { + block?: InputMaybe; +}; + +export type TransferOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + fee: Scalars['BigInt']; +}; + +export type TransferOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type TransferOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'fee'; + +export type WithdrawalOperation = Operation & { + id: Scalars['String']; + pooltx: PoolTx; + nullifier: Scalars['BigInt']; + index_ref: Scalars['BigInt']; + energy_amount: Scalars['BigInt']; + token_amount: Scalars['BigInt']; + fee: Scalars['BigInt']; + native_amount: Scalars['BigInt']; + receiver: Scalars['Bytes']; +}; + +export type WithdrawalOperation_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + nullifier?: InputMaybe; + nullifier_not?: InputMaybe; + nullifier_gt?: InputMaybe; + nullifier_lt?: InputMaybe; + nullifier_gte?: InputMaybe; + nullifier_lte?: InputMaybe; + nullifier_in?: InputMaybe>; + nullifier_not_in?: InputMaybe>; + index_ref?: InputMaybe; + index_ref_not?: InputMaybe; + index_ref_gt?: InputMaybe; + index_ref_lt?: InputMaybe; + index_ref_gte?: InputMaybe; + index_ref_lte?: InputMaybe; + index_ref_in?: InputMaybe>; + index_ref_not_in?: InputMaybe>; + energy_amount?: InputMaybe; + energy_amount_not?: InputMaybe; + energy_amount_gt?: InputMaybe; + energy_amount_lt?: InputMaybe; + energy_amount_gte?: InputMaybe; + energy_amount_lte?: InputMaybe; + energy_amount_in?: InputMaybe>; + energy_amount_not_in?: InputMaybe>; + token_amount?: InputMaybe; + token_amount_not?: InputMaybe; + token_amount_gt?: InputMaybe; + token_amount_lt?: InputMaybe; + token_amount_gte?: InputMaybe; + token_amount_lte?: InputMaybe; + token_amount_in?: InputMaybe>; + token_amount_not_in?: InputMaybe>; + fee?: InputMaybe; + fee_not?: InputMaybe; + fee_gt?: InputMaybe; + fee_lt?: InputMaybe; + fee_gte?: InputMaybe; + fee_lte?: InputMaybe; + fee_in?: InputMaybe>; + fee_not_in?: InputMaybe>; + native_amount?: InputMaybe; + native_amount_not?: InputMaybe; + native_amount_gt?: InputMaybe; + native_amount_lt?: InputMaybe; + native_amount_gte?: InputMaybe; + native_amount_lte?: InputMaybe; + native_amount_in?: InputMaybe>; + native_amount_not_in?: InputMaybe>; + receiver?: InputMaybe; + receiver_not?: InputMaybe; + receiver_gt?: InputMaybe; + receiver_lt?: InputMaybe; + receiver_gte?: InputMaybe; + receiver_lte?: InputMaybe; + receiver_in?: InputMaybe>; + receiver_not_in?: InputMaybe>; + receiver_contains?: InputMaybe; + receiver_not_contains?: InputMaybe; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type WithdrawalOperation_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'nullifier' + | 'index_ref' + | 'energy_amount' + | 'token_amount' + | 'fee' + | 'native_amount' + | 'receiver'; + +export type ZkCommon = { + id: Scalars['String']; + pooltx: PoolTx; + out_commit: Scalars['BigInt']; + witness: Array; + tree_root_after: Scalars['BigInt']; + tree_proof: Array; +}; + +export type ZkCommon_filter = { + id?: InputMaybe; + id_not?: InputMaybe; + id_gt?: InputMaybe; + id_lt?: InputMaybe; + id_gte?: InputMaybe; + id_lte?: InputMaybe; + id_in?: InputMaybe>; + id_not_in?: InputMaybe>; + id_contains?: InputMaybe; + id_contains_nocase?: InputMaybe; + id_not_contains?: InputMaybe; + id_not_contains_nocase?: InputMaybe; + id_starts_with?: InputMaybe; + id_starts_with_nocase?: InputMaybe; + id_not_starts_with?: InputMaybe; + id_not_starts_with_nocase?: InputMaybe; + id_ends_with?: InputMaybe; + id_ends_with_nocase?: InputMaybe; + id_not_ends_with?: InputMaybe; + id_not_ends_with_nocase?: InputMaybe; + pooltx?: InputMaybe; + pooltx_not?: InputMaybe; + pooltx_gt?: InputMaybe; + pooltx_lt?: InputMaybe; + pooltx_gte?: InputMaybe; + pooltx_lte?: InputMaybe; + pooltx_in?: InputMaybe>; + pooltx_not_in?: InputMaybe>; + pooltx_contains?: InputMaybe; + pooltx_contains_nocase?: InputMaybe; + pooltx_not_contains?: InputMaybe; + pooltx_not_contains_nocase?: InputMaybe; + pooltx_starts_with?: InputMaybe; + pooltx_starts_with_nocase?: InputMaybe; + pooltx_not_starts_with?: InputMaybe; + pooltx_not_starts_with_nocase?: InputMaybe; + pooltx_ends_with?: InputMaybe; + pooltx_ends_with_nocase?: InputMaybe; + pooltx_not_ends_with?: InputMaybe; + pooltx_not_ends_with_nocase?: InputMaybe; + pooltx_?: InputMaybe; + out_commit?: InputMaybe; + out_commit_not?: InputMaybe; + out_commit_gt?: InputMaybe; + out_commit_lt?: InputMaybe; + out_commit_gte?: InputMaybe; + out_commit_lte?: InputMaybe; + out_commit_in?: InputMaybe>; + out_commit_not_in?: InputMaybe>; + witness?: InputMaybe>; + witness_not?: InputMaybe>; + witness_contains?: InputMaybe>; + witness_contains_nocase?: InputMaybe>; + witness_not_contains?: InputMaybe>; + witness_not_contains_nocase?: InputMaybe>; + tree_root_after?: InputMaybe; + tree_root_after_not?: InputMaybe; + tree_root_after_gt?: InputMaybe; + tree_root_after_lt?: InputMaybe; + tree_root_after_gte?: InputMaybe; + tree_root_after_lte?: InputMaybe; + tree_root_after_in?: InputMaybe>; + tree_root_after_not_in?: InputMaybe>; + tree_proof?: InputMaybe>; + tree_proof_not?: InputMaybe>; + tree_proof_contains?: InputMaybe>; + tree_proof_contains_nocase?: InputMaybe>; + tree_proof_not_contains?: InputMaybe>; + tree_proof_not_contains_nocase?: InputMaybe>; + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + or?: InputMaybe>>; +}; + +export type ZkCommon_orderBy = + | 'id' + | 'pooltx' + | 'pooltx__id' + | 'pooltx__index' + | 'pooltx__tx' + | 'pooltx__ts' + | 'pooltx__all_messages_hash' + | 'pooltx__type' + | 'pooltx__message' + | 'pooltx__gas_used' + | 'pooltx__calldata' + | 'out_commit' + | 'witness' + | 'tree_root_after' + | 'tree_proof'; + +export type _Block_ = { + /** The hash of the block */ + hash?: Maybe; + /** The block number */ + number: Scalars['Int']; + /** Integer representation of the timestamp stored in blocks for the chain */ + timestamp?: Maybe; +}; + +/** The type for the top-level _meta field */ +export type _Meta_ = { + /** + * Information about a specific subgraph block. The hash of the block + * will be null if the _meta field has a block constraint that asks for + * a block number. It will be filled if the _meta field has no block constraint + * and therefore asks for the latest block + * + */ + block: _Block_; + /** The deployment ID */ + deployment: Scalars['String']; + /** If `true`, the subgraph encountered indexing errors at some past block */ + hasIndexingErrors: Scalars['Boolean']; +}; + +export type _SubgraphErrorPolicy_ = + /** Data will be returned even if the subgraph has indexing errors */ + | 'allow' + /** If the subgraph has indexing errors, data will be omitted. The default. */ + | 'deny'; + + export type QuerySdk = { + /** null **/ + directDeposit: InContextSdkMethod, + /** null **/ + directDeposits: InContextSdkMethod, + /** null **/ + payment: InContextSdkMethod, + /** null **/ + payments: InContextSdkMethod, + /** null **/ + zkCommon: InContextSdkMethod, + /** null **/ + zkCommons: InContextSdkMethod, + /** null **/ + depositOperation: InContextSdkMethod, + /** null **/ + depositOperations: InContextSdkMethod, + /** null **/ + transferOperation: InContextSdkMethod, + /** null **/ + transferOperations: InContextSdkMethod, + /** null **/ + withdrawalOperation: InContextSdkMethod, + /** null **/ + withdrawalOperations: InContextSdkMethod, + /** null **/ + permittableDepositOperation: InContextSdkMethod, + /** null **/ + permittableDepositOperations: InContextSdkMethod, + /** null **/ + ddbatchOperation: InContextSdkMethod, + /** null **/ + ddbatchOperations: InContextSdkMethod, + /** null **/ + poolTx: InContextSdkMethod, + /** null **/ + poolTxes: InContextSdkMethod, + /** null **/ + lastSyncBlock: InContextSdkMethod, + /** null **/ + lastSyncBlocks: InContextSdkMethod, + /** null **/ + operation: InContextSdkMethod, + /** null **/ + operations: InContextSdkMethod, + /** Access to subgraph metadata **/ + _meta: InContextSdkMethod + }; + + export type MutationSdk = { + + }; + + export type SubscriptionSdk = { + /** null **/ + directDeposit: InContextSdkMethod, + /** null **/ + directDeposits: InContextSdkMethod, + /** null **/ + payment: InContextSdkMethod, + /** null **/ + payments: InContextSdkMethod, + /** null **/ + zkCommon: InContextSdkMethod, + /** null **/ + zkCommons: InContextSdkMethod, + /** null **/ + depositOperation: InContextSdkMethod, + /** null **/ + depositOperations: InContextSdkMethod, + /** null **/ + transferOperation: InContextSdkMethod, + /** null **/ + transferOperations: InContextSdkMethod, + /** null **/ + withdrawalOperation: InContextSdkMethod, + /** null **/ + withdrawalOperations: InContextSdkMethod, + /** null **/ + permittableDepositOperation: InContextSdkMethod, + /** null **/ + permittableDepositOperations: InContextSdkMethod, + /** null **/ + ddbatchOperation: InContextSdkMethod, + /** null **/ + ddbatchOperations: InContextSdkMethod, + /** null **/ + poolTx: InContextSdkMethod, + /** null **/ + poolTxes: InContextSdkMethod, + /** null **/ + lastSyncBlock: InContextSdkMethod, + /** null **/ + lastSyncBlocks: InContextSdkMethod, + /** null **/ + operation: InContextSdkMethod, + /** null **/ + operations: InContextSdkMethod, + /** Access to subgraph metadata **/ + _meta: InContextSdkMethod + }; + + export type Context = { + ["zkbob-usdc-polygon"]: { Query: QuerySdk, Mutation: MutationSdk, Subscription: SubscriptionSdk }, + ["subgraphEndpoint"]: Scalars['ID'] + }; +} diff --git a/src/.graphclientrc.yml b/src/.graphclientrc.yml index c8b2ceb7..b500d1b4 100644 --- a/src/.graphclientrc.yml +++ b/src/.graphclientrc.yml @@ -1,8 +1,8 @@ sources: - - name: zkbob-bob-goerli + - name: zkbob-usdc-polygon handler: graphql: - endpoint: '{context.subgraphEndpoint:https://api.thegraph.com/subgraphs/name/zkbob/zkbob-bob-goerli}' + endpoint: '{context.subgraphEndpoint:https://api.thegraph.com/subgraphs/name/zkbob/zkbob-usdc-polygon}' additionalTypeDefs: | extend type DirectDeposit { @@ -10,10 +10,11 @@ additionalTypeDefs: | } additionalResolvers: - - ./dd/dd-resolvers + - ./subgraph/resolvers documents: - - ./dd/dd-query.graphql + - ./subgraph/tx-query.graphql + - ./subgraph/dd-query.graphql codegen: contextType: 'MeshContext & { subgraphEndpoint: string }' \ No newline at end of file diff --git a/src/client-provider.ts b/src/client-provider.ts index 7e688519..92f79c78 100644 --- a/src/client-provider.ts +++ b/src/client-provider.ts @@ -1,15 +1,15 @@ import { Chains, ProverMode, Pool, Pools } from "./config"; import { InternalError } from "./errors"; -import { EvmNetwork } from "./networks/evm"; +import { NetworkBackendFactory } from "./networks"; import { NetworkType } from "./network-type"; -import { NetworkBackend } from "./networks/network"; +import { NetworkBackend } from "./networks"; import { ServiceVersion } from "./services/common"; import { ZkBobDelegatedProver } from "./services/prover"; import { RelayerFee, LimitsFetch, ZkBobRelayer } from "./services/relayer"; import { ColdStorageConfig } from "./coldstorage"; import { bufToHex, HexStringReader, HexStringWriter, hexToBuf, truncateHexPrefix } from "./utils"; -import { estimateCalldataLength, TxType } from "./tx"; -import { DirectDepositProcessor } from "./dd"; +import { RegularTxType } from "./tx"; +import { ZkBobSubgraph } from "./subgraph"; const bs58 = require('bs58') @@ -90,6 +90,7 @@ export class ZkBobProvider { private relayers: { [name: string]: ZkBobRelayer } = {}; private provers: { [name: string]: ZkBobDelegatedProver } = {}; private proverModes: { [name: string]: ProverMode } = {}; + private subgraphs: { [name: string]: ZkBobSubgraph } = {}; private poolDenominators: { [name: string]: bigint } = {}; private tokenDecimals: { [name: string]: number } = {}; private poolIds: { [name: string]: number } = {}; @@ -109,8 +110,7 @@ export class ZkBobProvider { if (chain.rpcUrls.length == 0) { throw new InternalError(`Chain with id ${chainId} being initialized without RPC URL`); } - // TODO: implement multi-RPC NetworkBackend - const backend = new EvmNetwork(chain.rpcUrls[0], false); // initialize backend in the disabled state + const backend = NetworkBackendFactory.createBackend(Number(chainId), chain.rpcUrls, false); // initialize backend in the disabled state let networkName = NetworkType.networkName(Number(chainId)); if (!networkName) { console.warn(`The chain with id ${chainId} currently isn't fully supported. Unsuspectable issues may occured`); @@ -140,6 +140,16 @@ export class ZkBobProvider { } this.proverModes[alias] = ProverMode.Local; + + // create subraph if presented + if (pool.ddSubgraph) { + try { + const subgraph = new ZkBobSubgraph(pool.ddSubgraph); + this.subgraphs[alias] = subgraph; + } catch(err) { + console.warn(`The subgraph ${pool.ddSubgraph} cannot be created: ${err.message}`); + } + } } if (!this.pools[currentPool]) { @@ -232,6 +242,10 @@ export class ZkBobProvider { return this.provers[this.curPool]; } + protected subgraph(): ZkBobSubgraph | undefined { + return this.subgraphs[this.curPool]; + } + // Pool contract using denominator to calculate // absolute token amount (by multiplying) // E.g. for denomiator 10^9 values less than 1 Gwei @@ -383,39 +397,39 @@ export class ZkBobProvider { return cachedFee.fee; } - protected async executionTxFee(txType: TxType, relayerFee?: RelayerFee): Promise { + protected async executionTxFee(txType: RegularTxType, relayerFee?: RelayerFee): Promise { const fee = relayerFee ?? await this.getRelayerFee(); switch (txType) { - case TxType.Deposit: return fee.fee.deposit; - case TxType.Transfer: return fee.fee.transfer; - case TxType.Withdraw: return fee.fee.withdrawal; - case TxType.BridgeDeposit: return fee.fee.permittableDeposit; + case RegularTxType.Deposit: return fee.fee.deposit; + case RegularTxType.Transfer: return fee.fee.transfer; + case RegularTxType.Withdraw: return fee.fee.withdrawal; + case RegularTxType.BridgeDeposit: return fee.fee.permittableDeposit; default: throw new InternalError(`Unknown TxType: ${txType}`); } } // Min transaction fee in pool resolution (for regular transaction without any payload overhead) // To estimate fee for the concrete tx use account-based method (feeEstimate from client.ts) - public async atomicTxFee(txType: TxType, withdrawSwap: bigint = 0n): Promise { + public async atomicTxFee(txType: RegularTxType, withdrawSwap: bigint = 0n): Promise { const relayerFee = await this.getRelayerFee(); - return this.singleTxFeeInternal(relayerFee, txType, txType == TxType.Transfer ? 1 : 0, 0, withdrawSwap, true); + return this.singleTxFeeInternal(relayerFee, txType, txType == RegularTxType.Transfer ? 1 : 0, 0, withdrawSwap, true); } // dynamic fee calculation routine protected async singleTxFeeInternal( relayerFee: RelayerFee, - txType: TxType, + txType: RegularTxType, notesCnt: number, extraDataLen: number = 0, withdrawSwapAmount: bigint = 0n, roundFee?: boolean, ): Promise { - const calldataBytesCnt = estimateCalldataLength(txType, notesCnt, extraDataLen); + const calldataBytesCnt = this.network().estimateCalldataLength(txType, notesCnt, extraDataLen); const baseFee = await this.executionTxFee(txType, relayerFee); let totalFee = baseFee + relayerFee.oneByteFee * BigInt(calldataBytesCnt); - if (txType == TxType.Withdraw && withdrawSwapAmount > 0n) { + if (txType == RegularTxType.Withdraw && withdrawSwapAmount > 0n) { // swapping tokens during withdrawal may require additional fee totalFee += relayerFee.nativeConvertFee; } @@ -447,7 +461,7 @@ export class ZkBobProvider { } public async minTxAmount(): Promise { - return this.pool().minTxAmount ?? MIN_TX_AMOUNT; + return BigInt(this.pool().minTxAmount ?? MIN_TX_AMOUNT); } // The deposit and withdraw amount is limited by few factors: @@ -697,7 +711,8 @@ export class ZkBobProvider { writer.writeNumber(GIFT_CARD_CODE_VER, 1); writer.writeHex(bufToHex(giftCard.sk)); writer.writeNumber(giftCard.birthIndex, 6); - writer.writeHex(pool.poolAddress.slice(-8)); + const poolAddrHex = bufToHex(this.network().addressToBytes(pool.poolAddress)); + writer.writeHex(poolAddrHex.slice(-8)); writer.writeNumber(pool.chainId, 4); writer.writeBigInt(giftCard.balance, 8); @@ -727,7 +742,8 @@ export class ZkBobProvider { let poolAlias: string | undefined = undefined; for (const [alias, pool] of Object.entries(this.pools)) { - if (pool.chainId == chainId && pool.poolAddress.slice(-8).toLowerCase() == poolAddrSlice.toLowerCase()) { + const poolAddrHex = bufToHex(this.network().addressToBytes(pool.poolAddress)); + if (pool.chainId == chainId && poolAddrHex.slice(-8).toLowerCase() == poolAddrSlice.toLowerCase()) { poolAlias = alias; break; } diff --git a/src/client.ts b/src/client.ts index 32c3e0f1..f9eff431 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,11 +1,11 @@ import { Proof, ITransferData, IWithdrawData, StateUpdate, TreeNode, IAddressComponents, IndexedTx } from 'libzkbob-rs-wasm-web'; import { Chains, Pools, SnarkConfigParams, ClientConfig, AccountConfig, accountId, ProverMode, DepositType } from './config'; -import { ethAddrToBuf, toCompactSignature, truncateHexPrefix, +import { truncateHexPrefix, toTwosComplementHex, bufToHex, bigintToArrayLe } from './utils'; import { SyncStat, ZkBobState } from './state'; -import { CALLDATA_BASE_LENGTH, CALLDATA_MEMO_NOTE_LENGTH, CALLDATA_MEMO_TRANSFER_BASE_LENGTH, TxType, estimateCalldataLength, txTypeToString } from './tx'; +import { DirectDeposit, RegularTxType, txTypeToString } from './tx'; import { CONSTANTS } from './constants'; import { HistoryRecord, HistoryRecordState, HistoryTransactionType, ComplianceHistoryRecord } from './history' import { EphemeralAddress } from './ephemeral'; @@ -18,24 +18,23 @@ import { GiftCardProperties, TreeState, ZkBobProvider } from './client-provider' import { DepositData, SignatureRequest } from './signers/abstract-signer'; import { DepositSignerFactory } from './signers/signer-factory' import { PERMIT2_CONTRACT } from './signers/permit2-signer'; -import { DirectDeposit, DirectDepositProcessor, DirectDepositType } from './dd'; +import { DirectDepositProcessor, DirectDepositType } from './dd'; -import { isHexPrefixed } from '@ethereumjs/util'; -import { isAddress } from 'web3-utils'; import { wrap } from 'comlink'; -import { PreparedTransaction } from './networks/network'; +import { PreparedTransaction } from './networks'; import { Privkey } from 'hdwallet-babyjub'; import { IDBPDatabase, openDB } from 'idb'; const OUTPLUSONE = CONSTANTS.OUT + 1; // number of leaves (account + notes) in a transaction const PARTIAL_TREE_USAGE_THRESHOLD = 500; // minimum tx count in Merkle tree to partial tree update using -const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; const PERMIT_DEADLINE_INTERVAL = 1200; // permit deadline is current time + 20 min const PERMIT_DEADLINE_THRESHOLD = 300; // minimum time to deadline before tx proof calculation and sending (5 min) const CONTINUOUS_STATE_UPD_INTERVAL = 200; // updating client's state timer interval for continuous states (in ms) const CONTINUOUS_STATE_THRESHOLD = 1000; // the state considering continuous after that interval (in ms) +const PROVIDER_SYNC_TIMEOUT = 60; // maximum time to sync network backend by blockNumber (in seconds) + // Common database table's name const SYNC_PERFORMANCE = 'SYNC_PERFORMANCE'; const WRITE_DB_TIME_PERF_TABLE_KEY = 'average.db.writing.time.per.tx'; @@ -292,15 +291,15 @@ export class ZkBobClient extends ZkBobProvider { this.account.sk, this.account.birthindex, network, + this.subgraph(), networkName, - network.getRpcUrl(), denominator, poolId, pool.tokenAddress, this.worker ); this.zpStates[newPoolAlias] = state; - this.ddProcessors[newPoolAlias] = new DirectDepositProcessor(pool, network, state) + this.ddProcessors[newPoolAlias] = new DirectDepositProcessor(pool, network, state, this.subgraph()); console.log(`Pool and user account was switched to ${newPoolAlias} successfully`); } else { @@ -407,9 +406,10 @@ export class ZkBobClient extends ZkBobProvider { const accId = accountId(giftCardAcc); if (!this.auxZpStates[accId]) { // create gift-card auxiliary state if needed + const network = this.network(); const networkName = this.networkName(); const poolId = await this.poolId(); - const giftCardState = await ZkBobState.createNaked(giftCardAcc.sk, giftCardAcc.birthindex, networkName, poolId, this.worker); + const giftCardState = await ZkBobState.createNaked(giftCardAcc.sk, giftCardAcc.birthindex, network, networkName, poolId, this.worker); // state will be removed after gift card redemption or on logout this.auxZpStates[accId] = giftCardState; @@ -525,7 +525,8 @@ export class ZkBobClient extends ZkBobProvider { if (job.state === 'failed') { throw new RelayerJobError(Number(jobId), job.failedReason ? job.failedReason : 'unknown reason'); } else if (job.state === 'sent') { - if (!job.txHash) throw new InternalError(`Relayer return job #${jobId} without txHash in 'sent' state`); + //if (!job.txHash) throw new InternalError(`Relayer return job #${jobId} without txHash in 'sent' state`); + if (!job.txHash) console.error(`Relayer return job #${jobId} without txHash in 'sent' state`); break; } else if (job.state === 'reverted') { throw new PoolJobError(Number(jobId), job.txHash ? job.txHash : 'no_txhash', job.failedReason ?? 'unknown reason'); @@ -575,7 +576,9 @@ export class ZkBobClient extends ZkBobProvider { const relayer = this.relayer(); const state = this.zpState(); + let issues = 0; const INTERVAL_MS = 1000; + const ISSUES_THRESHOLD = 20; let job: JobInfo; let lastTxHash = ''; let lastJobState = ''; @@ -611,6 +614,7 @@ export class ZkBobClient extends ZkBobProvider { } } else { console.warn(`JobMonitoring: ${jobDescr} was sent to the pool but has no assigned txHash [relayer issue]`); + issues++; } } else if (job.state === 'reverted') { // [TERMINAL STATE] Transaction was reverted on the Pool and won't resend @@ -624,6 +628,7 @@ export class ZkBobClient extends ZkBobProvider { revertReason = retrievedReason ?? 'transaction was not found\\reverted' } else { console.warn(`JobMonitoring: ${jobDescr} has no txHash in reverted state [relayer issue]`) + issues++; } state.history?.setSentTransactionFailedByPool(jobId, job.txHash ?? '', revertReason); @@ -636,6 +641,7 @@ export class ZkBobClient extends ZkBobProvider { console.info(`JobMonitoring: ${jobDescr} was mined successfully: ${job.txHash}`); } else { console.warn(`JobMonitoring: ${jobDescr} was mined but has no assigned txHash [relayer issue]`); + issues++; } break; } @@ -645,6 +651,11 @@ export class ZkBobClient extends ZkBobProvider { } + if (issues > ISSUES_THRESHOLD) { + console.warn(`JobMonitoring: job #${jobId} issues threshold achieved, stop monitoring`); + break; + } + await new Promise(resolve => setTimeout(resolve, INTERVAL_MS)); } @@ -663,6 +674,7 @@ export class ZkBobClient extends ZkBobProvider { signatureCallback: (request: SignatureRequest) => Promise, fromAddress: string, relayerFee?: RelayerFee, + blockNumber?: number, // synchronize internal provider with the block ): Promise { const pool = this.pool(); const relayer = this.relayer(); @@ -682,7 +694,7 @@ export class ZkBobClient extends ZkBobProvider { // Fee estimating const usedFee = relayerFee ?? await this.getRelayerFee(); - const txType = pool.depositScheme == DepositType.Approve ? TxType.Deposit : TxType.BridgeDeposit; + const txType = pool.depositScheme == DepositType.Approve ? RegularTxType.Deposit : RegularTxType.BridgeDeposit; let estimatedFee = await this.feeEstimateInternal([amountGwei], txType, usedFee, 0n, false, true); const feeGwei = estimatedFee.total; @@ -690,7 +702,7 @@ export class ZkBobClient extends ZkBobProvider { // Creating raw deposit transaction object let txData; - if (txType == TxType.Deposit) { + if (txType == RegularTxType.Deposit) { // deposit via approve (deprecated) txData = await state.createDeposit({ amount: (amountGwei + feeGwei).toString(), @@ -702,10 +714,19 @@ export class ZkBobClient extends ZkBobProvider { amount: (amountGwei + feeGwei).toString(), fee: feeGwei.toString(), deadline: String(deadline), - holder: ethAddrToBuf(fromAddress) + holder: this.network().addressToBytes(fromAddress) }); } + // sync by block number if needed + if (blockNumber !== undefined) { + const ready = await this.network().waitForBlock(blockNumber, PROVIDER_SYNC_TIMEOUT); + if (!ready) { + // do not throw error here, pass to validation anyway + console.warn(`Unable to sync network backend (sync block ${blockNumber}, current ${await this.network().getBlockNumber()}). Validation may failed!`); + } + } + // Preparing signature request and sending it via callback const dataToSign: DepositData = { tokenAddress: pool.tokenAddress, @@ -719,18 +740,18 @@ export class ZkBobClient extends ZkBobProvider { await depositSigner.checkIsDataValid(dataToSign); // may throw an error in case of the owner isn't prepared for requested deposit scheme const signReq = await depositSigner.buildSignatureRequest(dataToSign); let signature = await signatureCallback(signReq); - signature = toCompactSignature(truncateHexPrefix(signature)); + signature = truncateHexPrefix(this.network().toCompactSignature(signature)); // Checking signature correct (corresponded with declared address) - const claimedAddr = `0x${bufToHex(ethAddrToBuf(fromAddress))}`; + const claimedAddr = fromAddress; let recoveredAddr; try { recoveredAddr = await depositSigner.recoverAddress(dataToSign, signature); } catch (err) { throw new SignatureError(`Cannot recover address from the provided signature. Error: ${err.message}`); } - if (recoveredAddr != claimedAddr) { - throw new SignatureError(`The address recovered from the permit signature ${recoveredAddr} doesn't match the declared one ${claimedAddr}`); + if (!this.network().isEqualAddresses(recoveredAddr, claimedAddr)) { + throw new SignatureError(`The address recovered from the provided signature ${recoveredAddr} doesn't match the declared one ${claimedAddr}`); } // We should also check deadline here because the user could introduce great delay @@ -782,7 +803,7 @@ export class ZkBobClient extends ZkBobProvider { // for ephemeral address in contrast to depositing from external user's address const pool = await this.pool(); const actualFee = relayerFee ?? await this.getRelayerFee(); - const txType = pool.depositScheme == DepositType.Approve ? TxType.Deposit : TxType.BridgeDeposit; + const txType = pool.depositScheme == DepositType.Approve ? RegularTxType.Deposit : RegularTxType.BridgeDeposit; const neededFee = await this.feeEstimateInternal([amountGwei], txType, actualFee, 0n, true, true); if(fromAddress.tokenBalance < amountGwei + neededFee.total) { throw new TxInsufficientFundsError(amountGwei + neededFee.total, fromAddress.tokenBalance); @@ -801,8 +822,6 @@ export class ZkBobClient extends ZkBobProvider { return this.deposit(amountGwei, async (signingRequest) => { const pool = this.pool(); - const state = this.zpState(); - const privKey = this.getEphemeralAddressPrivateKey(ephemeralIndex); const depositSigner = DepositSignerFactory.createSigner(this.network(), pool.depositScheme); @@ -815,7 +834,8 @@ export class ZkBobClient extends ZkBobProvider { type: DirectDepositType, fromAddress: string, amount: bigint, // in pool resolution - sendTxCallback: (tx: PreparedTransaction) => Promise, // txHash + sendTxCallback: (tx: PreparedTransaction) => Promise, // => txHash + blockNumber?: number, // synchronize internal provider with the block ): Promise { const pool = this.pool(); const processor = this.ddProcessor(); @@ -830,12 +850,32 @@ export class ZkBobClient extends ZkBobProvider { const fee = await processor.getFee(); let fullAmountNative = await this.shieldedAmountToWei(amount + fee); + // Sync by block number if needed + if (blockNumber !== undefined) { + const ready = await this.network().waitForBlock(blockNumber, PROVIDER_SYNC_TIMEOUT); + if (!ready) { + // do not throw error here, pass to validation + console.warn(`Unable to sync network backend (sync block ${blockNumber}, current ${await this.network().getBlockNumber()}). Validation may failed!`); + } + } + + // Validate the sender's account are ready for direct deposit if (type == DirectDepositType.Token) { - // For the token-based DD we should check allowance first - const curAllowance = await this.network().allowance(pool.tokenAddress, fromAddress, ddQueueAddress); + const [curAllowance, curBalance] = await Promise.all([ + this.network().allowance(pool.tokenAddress, fromAddress, ddQueueAddress), + this.network().getTokenBalance(pool.tokenAddress, fromAddress), + ]); if (curAllowance < fullAmountNative) { throw new TxDepositAllowanceTooLow(fullAmountNative, curAllowance, ddQueueAddress); } + if (curBalance < fullAmountNative) { + throw new TxInsufficientFundsError(fullAmountNative, curBalance); + } + } else if (type == DirectDepositType.Native) { + const curNativeBalance = await this.network().getNativeBalance(fromAddress); + if (curNativeBalance < fullAmountNative) { + throw new TxInsufficientFundsError(fullAmountNative, curNativeBalance); + } } const rawTx = await processor.prepareDirectDeposit(type, zkAddress, fullAmountNative, fromAddress, true); @@ -865,13 +905,13 @@ export class ZkBobClient extends ZkBobProvider { })); const usedFee = relayerFee ?? await this.getRelayerFee(); - const txParts = await this.getTransactionParts(TxType.Transfer, transfers, usedFee); + const txParts = await this.getTransactionParts(RegularTxType.Transfer, transfers, usedFee); if (txParts.length == 0) { - const available = await this.calcMaxAvailableTransfer(TxType.Transfer, usedFee, 0n, false); + const available = await this.calcMaxAvailableTransfer(RegularTxType.Transfer, usedFee, 0n, false); const amounts = transfers.map((aTx) => aTx.amountGwei); const totalAmount = amounts.reduce((acc, cur) => acc + cur, BigInt(0)); - const feeEst = await this.feeEstimateInternal(amounts, TxType.Transfer, usedFee, 0n, false, true); + const feeEst = await this.feeEstimateInternal(amounts, RegularTxType.Transfer, usedFee, 0n, false, true); throw new TxInsufficientFundsError(totalAmount + feeEst.total, available); } @@ -893,7 +933,7 @@ export class ZkBobClient extends ZkBobProvider { const proofTime = (Date.now() - startProofDate) / 1000; console.log(`Proof calculation took ${proofTime.toFixed(1)} sec`); - const transaction = {memo: oneTxData.memo, proof: txProof, txType: TxType.Transfer}; + const transaction = {memo: oneTxData.memo, proof: txProof, txType: RegularTxType.Transfer}; this.assertCalldataLength(transaction, onePart.calldataLength); const jobId = await relayer.sendTransactions([transaction]); @@ -942,15 +982,11 @@ export class ZkBobClient extends ZkBobProvider { const relayer = this.relayer(); const state = this.zpState(); - // Validate withdrawal address: - // - it should starts with '0x' prefix - // - it should be 20-byte length - // - if it contains checksum (EIP-55) it should be valid - // - zero addresses are prohibited to withdraw - if (!isHexPrefixed(address) || !isAddress(address) || address.toLowerCase() == NULL_ADDRESS) { + // Check is withdrawal address and nonzero + if (!this.network().validateAddress(address)) { throw new TxInvalidArgumentError('Please provide a valid non-zero address'); } - const addressBin = ethAddrToBuf(address); + const addressBin = this.network().addressToBytes(address); const supportedSwapAmount = await this.maxSupportedTokenSwap(); if (swapAmount > supportedSwapAmount) { @@ -968,11 +1004,11 @@ export class ZkBobClient extends ZkBobProvider { } const usedFee = relayerFee ?? await this.getRelayerFee(); - const txParts = await this.getTransactionParts(TxType.Withdraw, [{amountGwei, destination: address}], usedFee); + const txParts = await this.getTransactionParts(RegularTxType.Withdraw, [{amountGwei, destination: address}], usedFee); if (txParts.length == 0) { - const available = await this.calcMaxAvailableTransfer(TxType.Withdraw, usedFee, swapAmount, false); - const feeEst = await this.feeEstimateInternal([amountGwei], TxType.Withdraw, usedFee, swapAmount, false, true); + const available = await this.calcMaxAvailableTransfer(RegularTxType.Withdraw, usedFee, swapAmount, false); + const feeEst = await this.feeEstimateInternal([amountGwei], RegularTxType.Withdraw, usedFee, swapAmount, false, true); throw new TxInsufficientFundsError(amountGwei + feeEst.total, available); } @@ -982,14 +1018,14 @@ export class ZkBobClient extends ZkBobProvider { const onePart = txParts[index]; let oneTxData: any; - let txType: TxType; + let txType: RegularTxType; if (onePart.outNotes.length == 0) { const oneTx: ITransferData = { outputs: [], fee: onePart.fee.toString(), }; oneTxData = await state.createTransferOptimistic(oneTx, optimisticState); - txType = TxType.Transfer; + txType = RegularTxType.Transfer; } else if (onePart.outNotes.length == 1) { const oneTx: IWithdrawData = { amount: onePart.outNotes[0].amountGwei.toString(), @@ -999,7 +1035,7 @@ export class ZkBobClient extends ZkBobProvider { energy_amount: '0', }; oneTxData = await state.createWithdrawalOptimistic(oneTx, optimisticState); - txType = TxType.Withdraw; + txType = RegularTxType.Withdraw; } else { throw new Error('Invalid transaction configuration'); } @@ -1018,7 +1054,7 @@ export class ZkBobClient extends ZkBobProvider { // Temporary save transaction part in the history module (to prevent history delays) const ts = Math.floor(Date.now() / 1000); - if (txType == TxType.Transfer) { + if (txType == RegularTxType.Transfer) { const record = await HistoryRecord.aggregateNotes(onePart.fee, ts, '0', true); state.history?.keepQueuedTransactions([record], jobId); } else { @@ -1058,7 +1094,7 @@ export class ZkBobClient extends ZkBobProvider { const accId = accountId(giftCardAcc); const giftCardBalance = await this.giftCardBalanceInternal(giftCardAcc); - const minFee = await this.atomicTxFee(TxType.Transfer); + const minFee = await this.atomicTxFee(RegularTxType.Transfer); const minTxAmount = await this.minTxAmount(); if (giftCardBalance - minFee < minTxAmount) { throw new TxInsufficientFundsError(minTxAmount + minFee, giftCardBalance) @@ -1084,8 +1120,8 @@ export class ZkBobClient extends ZkBobProvider { const proofTime = (Date.now() - startProofDate) / 1000; console.log(`Proof calculation took ${proofTime.toFixed(1)} sec`); - const transaction = {memo: txData.memo, proof: txProof, txType: TxType.Transfer}; - this.assertCalldataLength(transaction, estimateCalldataLength(TxType.Transfer, 1)); + const transaction = {memo: txData.memo, proof: txProof, txType: RegularTxType.Transfer}; + this.assertCalldataLength(transaction, this.network().estimateCalldataLength(RegularTxType.Transfer, 1, 0)); const relayer = this.relayer(); const jobId = await relayer.sendTransactions([transaction]); @@ -1104,7 +1140,7 @@ export class ZkBobClient extends ZkBobProvider { } private assertCalldataLength(txToRelayer: any, estimatedLen: number) { - let factLen = CALLDATA_BASE_LENGTH + txToRelayer.memo.length / 2; + let factLen = this.network().calldataBaseLength() + txToRelayer.memo.length / 2; if (txToRelayer.depositSignature) { factLen += txToRelayer.depositSignature.length / 2; } @@ -1126,14 +1162,14 @@ export class ZkBobClient extends ZkBobProvider { // There are two extra states in case of insufficient funds for requested token amount: // 1. txCnt contains number of transactions for maximum available transfer // 2. txCnt can't be less than 1 (e.g. when balance is less than atomic fee) - public async feeEstimate(transfersGwei: bigint[], txType: TxType, withdrawSwap: bigint = 0n, updateState: boolean = true): Promise { + public async feeEstimate(transfersGwei: bigint[], txType: RegularTxType, withdrawSwap: bigint = 0n, updateState: boolean = true): Promise { const relayerFee = await this.getRelayerFee(); return this.feeEstimateInternal(transfersGwei, txType, relayerFee, withdrawSwap, updateState, true); } private async feeEstimateInternal( transfersGwei: bigint[], - txType: TxType, + txType: RegularTxType, relayerFee: RelayerFee, withdrawSwap: bigint, updateState: boolean, @@ -1144,9 +1180,9 @@ export class ZkBobClient extends ZkBobProvider { let calldataTotalLength = 0; let insufficientFunds = false; - if (txType === TxType.Transfer || txType === TxType.Withdraw) { + if (txType === RegularTxType.Transfer || txType === RegularTxType.Withdraw) { // we set allowPartial flag here to get parts anywhere - const requests: TransferRequest[] = transfersGwei.map((gwei) => { return {amountGwei: gwei, destination: NULL_ADDRESS} }); // destination address is ignored for estimation purposes + const requests: TransferRequest[] = transfersGwei.map((gwei) => { return {amountGwei: gwei, destination: '0'} }); // destination address is ignored for estimation purposes const parts = await this.getTransactionParts(txType, requests, relayerFee, withdrawSwap, updateState, true); const totalBalance = await this.getTotalBalance(false); @@ -1159,22 +1195,22 @@ export class ZkBobClient extends ZkBobProvider { if (parts.length > 0) { txCnt = parts.length; for (let i = 0; i < txCnt; i++) { - const curTxType = i < txCnt - 1 ? TxType.Transfer : txType; + const curTxType = i < txCnt - 1 ? RegularTxType.Transfer : txType; const curFee = roundFee ? (await this.roundFee(parts[i].fee)) : parts[i].fee; total += curFee; - calldataTotalLength += estimateCalldataLength(curTxType, curTxType == TxType.Transfer ? parts[i].outNotes.length : 0); + calldataTotalLength += this.network().estimateCalldataLength(curTxType, curTxType == RegularTxType.Transfer ? parts[i].outNotes.length : 0, 0); } } else { // if we haven't funds for atomic fee - suppose we can make at least one tx txCnt = 1; total = await this.atomicTxFee(txType, withdrawSwap); - calldataTotalLength = estimateCalldataLength(txType, txType == TxType.Transfer ? transfersGwei.length : 0); + calldataTotalLength = this.network().estimateCalldataLength(txType, txType == RegularTxType.Transfer ? transfersGwei.length : 0, 0); } insufficientFunds = (totalSumm < totalRequested || totalSumm + total > totalBalance) ? true : false; } else { // Deposit and BridgeDeposit cases are independent on the user balance // Fee got from the native coins, so any deposit can be make within single tx - calldataTotalLength = estimateCalldataLength(txType, 0) + calldataTotalLength = this.network().estimateCalldataLength(txType, 0, 0) total = await this.singleTxFeeInternal(relayerFee, txType, 0, 0, 0n, roundFee); } @@ -1183,8 +1219,8 @@ export class ZkBobClient extends ZkBobProvider { // Account + notes balance excluding fee needed to transfer or withdraw it // TODO: need to optimize for edge cases (account limit calculating) - public async calcMaxAvailableTransfer(txType: TxType, relayerFee?: RelayerFee, withdrawSwap: bigint = 0n, updateState: boolean = true): Promise { - if (txType != TxType.Transfer && txType != TxType.Withdraw) { + public async calcMaxAvailableTransfer(txType: RegularTxType, relayerFee?: RelayerFee, withdrawSwap: bigint = 0n, updateState: boolean = true): Promise { + if (txType != RegularTxType.Transfer && txType != RegularTxType.Withdraw) { throw new InternalError(`Attempting to invoke \'calcMaxAvailableTransfer\' for ${txTypeToString(txType)} tx (only transfer\\withdraw are supported)`); } @@ -1194,8 +1230,8 @@ export class ZkBobClient extends ZkBobProvider { } const usedFee = relayerFee ?? await this.getRelayerFee(); - const aggregateTxFee = await this.singleTxFeeInternal(usedFee, TxType.Transfer, 0, 0, 0n); - const finalTxFee = await this.singleTxFeeInternal(usedFee, txType, txType == TxType.Transfer ? 1 : 0, 0, withdrawSwap); + const aggregateTxFee = await this.singleTxFeeInternal(usedFee, RegularTxType.Transfer, 0, 0, 0n); + const finalTxFee = await this.singleTxFeeInternal(usedFee, txType, txType == RegularTxType.Transfer ? 1 : 0, 0, withdrawSwap); const groupedNotesBalances = await this.getGroupedNotes(); let accountBalance = await state.accountBalance(); @@ -1223,7 +1259,7 @@ export class ZkBobClient extends ZkBobProvider { // (otherwise the void array will be returned in case of insufficient funds) // This method ALLOWS creating transaction parts less than MIN_TX_AMOUNT (check it before tx creating) public async getTransactionParts( - txType: TxType, + txType: RegularTxType, transfers: TransferRequest[], relayerFee?: RelayerFee, withdrawSwap: bigint = 0n, @@ -1231,7 +1267,7 @@ export class ZkBobClient extends ZkBobProvider { allowPartial: boolean = false, ): Promise> { - if (txType != TxType.Transfer && txType != TxType.Withdraw) { + if (txType != RegularTxType.Transfer && txType != RegularTxType.Withdraw) { throw new InternalError(`Attempting to invoke \'getTransactionParts\' for ${txTypeToString(txType)} tx (only transfer\\withdraw are supported)`); } @@ -1281,7 +1317,7 @@ export class ZkBobClient extends ZkBobProvider { break; } - const aggregateTxFee = await this.singleTxFeeInternal(usedFee, TxType.Transfer, 0, 0, 0n); + const aggregateTxFee = await this.singleTxFeeInternal(usedFee, RegularTxType.Transfer, 0, 0, 0n); const inNotesBalance = groupedNotesBalances[i]; if (accountBalance + inNotesBalance < aggregateTxFee) { @@ -1293,7 +1329,7 @@ export class ZkBobClient extends ZkBobProvider { aggregationParts.push({ inNotesBalance, outNotes: [], - calldataLength: estimateCalldataLength(TxType.Transfer, 0), + calldataLength: this.network().estimateCalldataLength(RegularTxType.Transfer, 0, 0), fee: aggregateTxFee, accountLimit: BigInt(0) }); @@ -1308,7 +1344,7 @@ export class ZkBobClient extends ZkBobProvider { // try to prepare transfer configs without extra aggregation transactions // (using just account balance and notes collected in these txs) private async tryToPrepareTransfers( - txType: TxType, + txType: RegularTxType, balance: bigint, relayerFee: RelayerFee, groupedNotesBalances: Array, @@ -1320,7 +1356,7 @@ export class ZkBobClient extends ZkBobProvider { for (let i = 0; i < transfers.length; i++) { const inNotesBalance = i < groupedNotesBalances.length ? groupedNotesBalances[i] : BigInt(0); - const numOfNotes = (txType == TxType.Transfer) ? transfers[i].requests.length : 0; + const numOfNotes = (txType == RegularTxType.Transfer) ? transfers[i].requests.length : 0; const fee = await this.singleTxFeeInternal(relayerFee, txType, numOfNotes, 0, withdrawSwap); if (accountBalance + inNotesBalance < transfers[i].totalAmount + fee) { @@ -1331,7 +1367,7 @@ export class ZkBobClient extends ZkBobProvider { parts.push({ inNotesBalance, outNotes: transfers[i].requests, - calldataLength: estimateCalldataLength(txType, numOfNotes), + calldataLength: this.network().estimateCalldataLength(txType, numOfNotes, 0), fee, accountLimit: BigInt(0) }); @@ -1516,7 +1552,9 @@ export class ZkBobClient extends ZkBobProvider { } }, CONTINUOUS_STATE_UPD_INTERVAL); - const hasOwnTxsInOptimisticState = await this.zpState().updateState( + let noOwnTxsInOptimisticState = true; + + noOwnTxsInOptimisticState = await this.zpState().updateState( this.relayer(), async (index) => (await this.getPoolState(index)).root, await this.coldStorageConfig(), @@ -1530,7 +1568,7 @@ export class ZkBobClient extends ZkBobProvider { this.setState(ClientState.FullMode); - return hasOwnTxsInOptimisticState; + return noOwnTxsInOptimisticState; } // ----------------=========< Ephemeral Addresses Pool >=========----------------- @@ -1685,7 +1723,7 @@ export class ZkBobClient extends ZkBobProvider { protected ddProcessor(): DirectDepositProcessor { const proccessor = this.ddProcessors[this.curPool]; if (!proccessor) { - throw new InternalError(`No direct deposit processer initialized for the pool ${this.curPool}`); + throw new InternalError(`No direct deposit processor initialized for the pool ${this.curPool}`); } return proccessor; @@ -1696,7 +1734,13 @@ export class ZkBobClient extends ZkBobProvider { } public async directDepositFee(): Promise { - return this.ddProcessor().getFee(); + try { + return await this.ddProcessor().getFee(); + } catch { + // fallback in case of DD-processor isn't initialized yet (e.g. for clientless mode) + const ddQueueAddr = await this.network().getDirectDepositQueueContract(this.pool().poolAddress); + return this.network().getDirectDepositFee(ddQueueAddr); + } } } \ No newline at end of file diff --git a/src/dd.ts b/src/dd.ts new file mode 100644 index 00000000..9b706787 --- /dev/null +++ b/src/dd.ts @@ -0,0 +1,165 @@ +import { Pool } from "./config"; +import { InternalError } from "./errors"; +import { NetworkBackend, PreparedTransaction } from "./networks"; +import { ZkBobState } from "./state"; +import { ZkBobSubgraph } from "./subgraph"; +import { DirectDeposit, DirectDepositState } from "./tx"; + +const DD_FEE_LIFETIME = 3600; +const DD_SCAN_BATCH = 10; // number of simultaneously request DDs during the manual scan +const DD_SCAN_DEPTH = 10080; // 7 days (in minutes): How old DDd should be searched during the manual scan + +export enum DirectDepositType { + Token, // using directDeposit contract method, amount in the pool token resolution + Native, // using directNativeDeposit, amount in wei (e.g. native coin for Ethereum mainnet is ETH) +} + +interface FeeFetch { + fee: bigint; + timestamp: number; // when the fee was fetched +} + +export class DirectDepositProcessor { + protected network: NetworkBackend; + protected subgraph?: ZkBobSubgraph; + protected state: ZkBobState; + + protected tokenAddress: string; + protected poolAddress: string; + protected ddQueueContract?: string; + protected isNativeSupported: boolean; + + protected cachedFee?: FeeFetch; + + // variables for manual DD scanning + protected lastScannedIndex: number = -1; + protected directDeposits = new Map(); + + constructor(pool: Pool, network: NetworkBackend, state: ZkBobState, subgraph?: ZkBobSubgraph) { + this.network = network; + this.subgraph = subgraph; + this.state = state; + this.tokenAddress = pool.tokenAddress; + this.poolAddress = pool.poolAddress; + this.isNativeSupported = pool.isNative ?? false; + } + + public async getQueueContract(): Promise { + if (!this.ddQueueContract) { + this.ddQueueContract = await this.network.getDirectDepositQueueContract(this.poolAddress); + } + + return this.ddQueueContract; + } + + public async getFee(): Promise { + + let fee = this.cachedFee; + if (!fee || fee.timestamp + DD_FEE_LIFETIME * 1000 < Date.now()) { + const queue = await this.getQueueContract(); + const fetchedFee = await this.network.getDirectDepositFee(queue); + fee = {fee: fetchedFee, timestamp: Date.now()}; + this.cachedFee = fee; + } + + return fee.fee; + } + + public async prepareDirectDeposit( + type: DirectDepositType, + zkAddress: string, + amount: bigint, // in native resolution (wei for DirectDepositType.Native) + fallbackAddress: string, + feeAlreadyIncluded: boolean = true, // calculate and add required fee amount when false + ): Promise { + if (type == DirectDepositType.Native && !this.isNativeSupported) { + throw new InternalError(`Native direct deposits are not supported in this pool`); + } + + const queue = await this.getQueueContract(); + + let addedFee = 0n; + if (!feeAlreadyIncluded) { + addedFee = await this.getFee(); + } + + switch (type) { + case DirectDepositType.Token: + return this.network.createDirectDepositTx(queue, amount + addedFee, zkAddress, fallbackAddress); + + case DirectDepositType.Native: + return this.network.createNativeDirectDepositTx(queue, amount + addedFee, zkAddress, fallbackAddress); + + default: + throw new InternalError(`Unsupported direct deposit type ${type}`); + } + } + + public async pendingDirectDeposits(): Promise { + let result: DirectDeposit[] | undefined; + if (this.subgraph) { + try { + result = await this.subgraph.pendingDirectDeposits(this.state) + } catch (err) { + console.warn(`Cannot get pending DDs from subgraph: ${err.message}. Falbacking to the direct request`); + } + } + + if (result === undefined) { + try { + result = await this.manualPendingDirectDepositScan(); + } catch (err) { + console.warn(`Cannot get pending DDs from contract directly: ${err.message}`); + } + } + + return result ?? []; + } + + protected async manualPendingDirectDepositScan(): Promise { + const ddQueueAddr = await this.getQueueContract(); + + // check cached pending DDs and remove not pending ones + const dds = await Promise.all([...this.directDeposits.keys()].map(async (index) => { + const dd = await this.network.getDirectDeposit(ddQueueAddr, index, this.state) + return {index, dd}; + })); + dds.forEach((val) => { + if (val.dd && val.dd.state != DirectDepositState.Queued) { + this.directDeposits.delete(val.index); + } + }); + + // look for new pending DDs + const ddNonce = await this.network.getDirectDepositNonce(ddQueueAddr); + const range = (from, to) => [...Array(to + 1).keys()].slice(from); + const scanTimestampLimit = (Date.now() / 1000) - (DD_SCAN_DEPTH * 60); + for (let idx = ddNonce - 1; idx > this.lastScannedIndex; idx -= DD_SCAN_BATCH) { + const indexes = range(idx - DD_SCAN_BATCH + 1, idx); + const rangeDDs = (await Promise.all(indexes.map(async (index) => { + const dd = await this.network.getDirectDeposit(ddQueueAddr, index, this.state); + const isOwn = dd ? await this.state.isOwnAddress(dd.destination) : false; + return {index, dd, isOwn}; + }))) + .filter((val) => val.dd !== undefined) + .map((val) => ({index: val.index, dd: val.dd as DirectDeposit, isOwn: val.isOwn}) ); + + rangeDDs.forEach((val) => { + if (val.dd.state == DirectDepositState.Queued && val.isOwn) { + this.directDeposits.set(val.index, val.dd); + } + }); + + if (rangeDDs.length > 0 && (rangeDDs[0].dd.timestamp ?? 0) < scanTimestampLimit) { + // scan limit (by timestamp) reached => abort scan + break; + } + } + + this.lastScannedIndex = ddNonce - 1; + + return [...this.directDeposits.values()]; + } + + +} \ No newline at end of file diff --git a/src/dd/dd-query.graphql b/src/dd/dd-query.graphql deleted file mode 100644 index ec7ffdc7..00000000 --- a/src/dd/dd-query.graphql +++ /dev/null @@ -1,11 +0,0 @@ -query PendingDirectDeposits { - directDeposits(orderBy: bnInit, where: {pending: true}) { - id - zkAddress_pk - zkAddress_diversifier - deposit - fallbackUser - tsInit - txInit - } -} \ No newline at end of file diff --git a/src/dd/index.ts b/src/dd/index.ts deleted file mode 100644 index f889295c..00000000 --- a/src/dd/index.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Pool } from "../config"; -import { InternalError } from "../errors"; -import { NetworkBackend, PreparedTransaction } from "../networks/network"; -import { getBuiltGraphSDK } from "../.graphclient"; -import { ZkBobState } from "../state"; -import { hostedServiceDefaultURL } from "./dd-resolvers"; - -const DD_FEE_LIFETIME = 3600; - -export enum DirectDepositState { - Queued, - Deposited, - Refunded, -} - -export interface DirectDeposit { - id: bigint; // DD queue unique identifier - state: DirectDepositState; - amount: bigint; // in pool resolution - destination: string; // zk-addresss - fallback: string; // 0x-address to refund DD - timestamp: number; // when it was created - queueTxHash: string; // transaction hash to the queue -} - -export enum DirectDepositType { - Token, // using directDeposit contract method, amount in the pool token resolution - Native, // using directNativeDeposit, amount in wei (e.g. native coin for Ethereum mainnet is ETH) -} - -interface FeeFetch { - fee: bigint; - timestamp: number; // when the fee was fetched -} - -export class DirectDepositProcessor { - protected network: NetworkBackend; - protected tokenAddress: string; - protected poolAddress: string; - protected ddQueueContract?: string; - protected isNativeSupported: boolean; - protected subgraphName?: string; - protected state: ZkBobState; - protected sdk; - - protected cachedFee?: FeeFetch; - - constructor(pool: Pool, network: NetworkBackend, state: ZkBobState) { - this.network = network; - this.tokenAddress = pool.tokenAddress; - this.poolAddress = pool.poolAddress; - this.isNativeSupported = pool.isNative ?? false; - this.subgraphName = pool.ddSubgraph; - this.state = state; - - this.sdk = getBuiltGraphSDK({ - subgraphEndpoint: this.subgraphEndpoint(), - }) - } - - public async getQueueContract(): Promise { - if (!this.ddQueueContract) { - this.ddQueueContract = await this.network.getDirectDepositQueueContract(this.poolAddress); - } - - return this.ddQueueContract; - } - - public async getFee(): Promise { - - let fee = this.cachedFee; - if (!fee || fee.timestamp + DD_FEE_LIFETIME * 1000 < Date.now()) { - const queue = await this.getQueueContract(); - const fetchedFee = await this.network.getDirectDepositFee(queue); - fee = {fee: fetchedFee, timestamp: Date.now()}; - this.cachedFee = fee; - } - - return fee.fee; - } - - public async prepareDirectDeposit( - type: DirectDepositType, - zkAddress: string, - amount: bigint, // in native resolution (wei for DirectDepositType.Native) - fallbackAddress: string, - feeAlreadyIncluded: boolean = true, // calculate and add required fee amount when false - ): Promise { - if (type == DirectDepositType.Native && !this.isNativeSupported) { - throw new InternalError(`Native direct deposits are not supported in this pool`); - } - - const queue = await this.getQueueContract(); - - let addedFee = 0n; - if (!feeAlreadyIncluded) { - addedFee = await this.getFee(); - } - - switch (type) { - case DirectDepositType.Token: - return this.network.createDirectDepositTx(queue, amount + addedFee, zkAddress, fallbackAddress); - - case DirectDepositType.Native: - return this.network.createNativeDirectDepositTx(queue, amount + addedFee, zkAddress, fallbackAddress); - - default: - throw new InternalError(`Unsupported direct deposit type ${type}`); - } - } - - protected subgraphEndpoint(): string | undefined { - if (this.subgraphName) { - if (this.subgraphName.indexOf('/') == -1) { - return `${hostedServiceDefaultURL}${this.subgraphName}`; - } - } - - return this.subgraphName; - } - - public async pendingDirectDeposits(): Promise { - - if (this.subgraphEndpoint()) { - const allPendingDDs = await this.sdk.PendingDirectDeposits({}, { - subgraphEndpoint: this.subgraphEndpoint(), - }).then((data) => data.directDeposits); - - if (Array.isArray(allPendingDDs)) { - const myPendingDDs = (await Promise.all(allPendingDDs.map(async (subgraphDD) => { - const d = BigInt(subgraphDD.zkAddress_diversifier); - const p_d = BigInt(subgraphDD.zkAddress_pk); - const zkAddress = await this.state.assembleAddress(d.toString(), p_d.toString()); - const isOwn = await this.state.isOwnAddress(zkAddress); - - const dd: DirectDeposit = { - id: BigInt(subgraphDD.id), - state: DirectDepositState.Queued, - amount: BigInt(subgraphDD.deposit), - destination: zkAddress, - fallback: subgraphDD.fallbackUser, - timestamp: Number(subgraphDD.tsInit), - queueTxHash: subgraphDD.txInit, - }; - - return {dd, isOwn}; - }))) - .filter((dd) => dd.isOwn) - .map((myDD) => myDD.dd); - - return myPendingDDs; - } else { - throw new InternalError(`Unexpected response from the DD subgraph: ${allPendingDDs}`); - } - } else { - console.warn('There is no configured subraph to query pending DD') - } - - return []; - } - - -} \ No newline at end of file diff --git a/src/ephemeral.ts b/src/ephemeral.ts index a29fe559..fcf10558 100644 --- a/src/ephemeral.ts +++ b/src/ephemeral.ts @@ -1,16 +1,11 @@ -import Web3 from 'web3'; -import { Contract } from 'web3-eth-contract' -import { TransactionConfig } from 'web3-core'; import { hash } from 'tweetnacl'; -import { addHexPrefix, bufToHex, concatenateBuffers, hexToBuf } from './utils'; +import { bufToHex, concatenateBuffers, hexToBuf } from './utils'; import { entropyToMnemonic, mnemonicToSeedSync } from '@scure/bip39'; import { wordlist } from '@scure/bip39/wordlists/english'; import { HDKey } from '@scure/bip32'; import { InternalError } from './errors'; import { NetworkType } from './network-type'; -import { tokenABI } from './networks/evm-abi'; - -const util = require('ethereumjs-util'); +import { NetworkBackend } from './networks'; const GAS_PRICE_MULTIPLIER = 1.1; @@ -41,11 +36,12 @@ interface TransfersInfo { export class EphemeralPool { private tokenAddress: string; private hdwallet: HDKey; - private web3: Web3; - private token: Contract; - private rpcUrl: string; + private network: NetworkBackend; private poolDenominator: bigint; // we represent all amounts in that library as in pool + // addresses by index [to avoid extra generations] + private addresses = new Map(); + // save last scanned address to decrease scan time private startScanIndex = 0; private scanPromise: Promise | undefined; @@ -69,33 +65,30 @@ export class EphemeralPool { constructor( sk: Uint8Array, tokenAddress: string, - network: NetworkType, - rpcUrl: string, + networkType: NetworkType, + network: NetworkBackend, poolDenominator: bigint ) { this.tokenAddress = tokenAddress; this.poolDenominator = poolDenominator; - this.rpcUrl = rpcUrl; - this.web3 = new Web3(this.rpcUrl); + this.network = network; let buf = concatenateBuffers(hexToBuf(this.skPrefix), sk); let entropy = hash(buf).slice(0, 16); let mnemonic = entropyToMnemonic(entropy, wordlist); let seed = mnemonicToSeedSync(mnemonic); - let ephemeralWalletPath = `${NetworkType.chainPath(network)}/0'/0`; + let ephemeralWalletPath = `${NetworkType.chainPath(networkType)}/0'/0`; this.hdwallet = HDKey.fromMasterSeed(seed).derive(ephemeralWalletPath); - - this.token = new this.web3.eth.Contract(tokenABI, tokenAddress) as unknown as Contract; } static async init( sk: Uint8Array, tokenAddress: string, - network: NetworkType, - rpcUrl: string, + networkType: NetworkType, + network: NetworkBackend, poolDenominator: bigint ): Promise { - const storage = new EphemeralPool(sk, tokenAddress, network, rpcUrl, poolDenominator); + const storage = new EphemeralPool(sk, tokenAddress, networkType, network, poolDenominator); // Start address info preloading let startTime = Date.now(); @@ -108,15 +101,19 @@ export class EphemeralPool { // Get native address at the specified index without additional info public getAddress(index: number): string { - let key = this.hdwallet.deriveChild(index) - const publicKey = key.publicKey; - key.wipePrivateData(); - if (publicKey) { - const fullPublicKey = util.importPublic(Buffer.from(publicKey)); - return addHexPrefix(util.pubToAddress(fullPublicKey).toString('hex')); + let address = this.addresses.get(index); + if (address === undefined) { + const key = this.hdwallet.deriveChild(index) + if (key.privateKey == null) { + throw new InternalError(`Cannot generate private key for ephemeral address at index ${index}`); + } + address = this.network.addressFromPrivateKey(key.privateKey); + key.wipePrivateData(); + + this.addresses.set(index, address); } - throw new InternalError(`Cannot generate public key for ephemeral address at index ${index}`); + return address; } // Get address with asssociated info [may take some time] @@ -202,126 +199,74 @@ export class EphemeralPool { // Get number of incoming token transfers public async getEphemeralAddressInTxCount(index: number): Promise { const address = this.getAddress(index); - const curBlock = await this.web3.eth.getBlockNumber(); + //const curBlock = await this.web3.eth.getBlockNumber(); let info = this.cachedInTransfersInfo.get(index); if (info === undefined) { info = {index, blockNumber: -1, txCount: 0 }; } - let txCnt = await this.getIncomingTokenTxCount(address, curBlock, info.blockNumber + 1); + return info.txCount; + + /*let txCnt = await this.getIncomingTokenTxCount(address, curBlock, info.blockNumber + 1); info.blockNumber = curBlock; info.txCount += txCnt; this.cachedInTransfersInfo.set(index, info); - return info.txCount; + return info.txCount;*/ } // Get number of outcoming token transfers public async getEphemeralAddressOutTxCount(index: number): Promise { const address = this.getAddress(index); - const curBlock = await this.web3.eth.getBlockNumber(); + //const curBlock = await this.web3.eth.getBlockNumber(); let info = this.cachedOutTransfersInfo.get(index); if (info === undefined) { info = {index, blockNumber: -1, txCount: 0 }; } - let txCnt = await this.getOutcomingTokenTxCount(address, curBlock, info.blockNumber + 1); + return info.txCount; + + /*let txCnt = await this.getOutcomingTokenTxCount(address, curBlock, info.blockNumber + 1); info.blockNumber = curBlock; info.txCount += txCnt; this.cachedOutTransfersInfo.set(index, info); - return info.txCount; + return info.txCount;*/ } public async allowance(index: number, spender: string): Promise { const address = this.getAddress(index); - const result = await this.token.methods.allowance(address, spender).call();; - - return BigInt(result); + return await this.network.allowance(this.tokenAddress, address, spender); } public async approve(index: number, spender: string, amount: bigint): Promise { const address = await this.getAddress(index); - const encodedTx = await this.token.methods.approve(spender, BigInt(amount)).encodeABI(); - let txObject: TransactionConfig = { - from: address, - to: this.tokenAddress, - data: encodedTx, - }; - - const gas = await this.web3.eth.estimateGas(txObject); - const gasPrice = Number(await this.web3.eth.getGasPrice()); - const nonce = await this.web3.eth.getTransactionCount(address); - txObject.gas = gas; - txObject.gasPrice = `0x${BigInt(Math.ceil(gasPrice * GAS_PRICE_MULTIPLIER)).toString(16)}`; - txObject.nonce = nonce; - const privKey = this.getEphemeralAddressPrivateKey(index); - const signedTx = await this.web3.eth.accounts.signTransaction(txObject, privKey); - const receipt = await this.web3.eth.sendSignedTransaction(signedTx.rawTransaction ?? ''); - - return receipt.transactionHash; + + return this.network.approveTokens(this.tokenAddress, privKey, address, spender, amount, GAS_PRICE_MULTIPLIER); } // ------------------=========< Private Routines >=========-------------------- // | Retrieving address info | // ---------------------------------------------------------------------------- - // Binary search for the contract creation block - // Used to decrease token transfer count retrieving time - // WARNING: we cannot use this method because - // the real RPC nodes cannot return getCode for old blocks - private async findContractCreationBlock(tokenAddress: string): Promise { - let fromBlock = 0; - let toBlock = Number(await this.web3.eth.getBlockNumber()); - - let contractCode = await this.web3.eth.getCode(tokenAddress, toBlock); - if (contractCode == "0x") { - throw new Error(`Contract ${tokenAddress} does not exist!`); - } - - while (fromBlock <= toBlock) { - let middleBlock = Math.floor((fromBlock + toBlock) / 2); - - try { - contractCode = await this.web3.eth.getCode(tokenAddress, middleBlock); - } catch (err) { - // Here is a case when node doesn't sync whole blockchain - // so we can't retrieve selected block state - // In that case let's suppose the contract isn't created yet - contractCode = '0x'; - } - - if (contractCode != '0x') { - toBlock = middleBlock; - } else if (contractCode == '0x') { - fromBlock = middleBlock; - } - - if (toBlock == fromBlock + 1) { - return toBlock; - } - } - - return fromBlock; - - } - // get and update address details private async updateAddressInfo(existing: EphemeralAddress): Promise { let promises = [ this.getTokenBalance(existing.address), - this.getNativeBalance(existing.address), - this.getPermitNonce(existing.address).catch(async () => { - // fallback for tokens without permit support (e.g. WETH) - const blockNumber = await this.web3.eth.getBlockNumber(); - return this.getOutcomingTokenTxCount(existing.address, blockNumber); + this.network.getNativeBalance(existing.address), + this.network.isSupportNonce(this.tokenAddress).then((isSupport) => { + if (isSupport) { + return this.network.getTokenNonce(this.tokenAddress, existing.address).catch(() => 0); + } else { + return 0; + } }), - this.web3.eth.getTransactionCount(existing.address), + this.network.getNativeNonce(existing.address), ]; const [tokenBalance, nativeBalance, permitNonce, nativeNonce] = await Promise.all(promises); @@ -332,30 +277,16 @@ export class EphemeralPool { return existing; } - - // in pool dimension - private async getNativeBalance(address: string): Promise { - const result = await this.web3.eth.getBalance(address); - - return BigInt(result); - } // in pool dimension private async getTokenBalance(address: string): Promise { - const result = await this.token.methods.balanceOf(address).call(); + const result = await this.network.getTokenBalance(this.tokenAddress, address); return this.poolDenominator > 0 ? BigInt(result) / this.poolDenominator : BigInt(result) * (-this.poolDenominator); } - // number of outgoing transfers via permit - private async getPermitNonce(address: string): Promise { - const result = await this.token.methods.nonces(address).call(); - - return Number(result); - } - // Find first unused account private async scanRoutine(): Promise { while (true) { @@ -372,7 +303,7 @@ export class EphemeralPool { } // Number of incoming token transfers to the account - private async getIncomingTokenTxCount(address: string, toBlock: number, fromBlock: number = 0): Promise { + /*private async getIncomingTokenTxCount(address: string, toBlock: number, fromBlock: number = 0): Promise { if (toBlock >= fromBlock) { const events = await this.token.getPastEvents('Transfer', { filter: { to: address }, @@ -399,7 +330,7 @@ export class EphemeralPool { } return 0; - } + }*/ // address nonused criteria private isAddressNonused(address: EphemeralAddress): boolean { diff --git a/src/history.ts b/src/history.ts index 14dc57d4..7d56e029 100644 --- a/src/history.ts +++ b/src/history.ts @@ -1,11 +1,12 @@ import { openDB, IDBPDatabase } from 'idb'; -import Web3 from 'web3'; import { Account, Note, TxMemoChunk, IndexedTx, ParseTxsResult, TxInput } from 'libzkbob-rs-wasm-web'; -import { ShieldedTx, TxType } from './tx'; -import { bigintToArrayLe, bufToHex, HexStringWriter, hexToBuf, toCanonicalSignature } from './utils'; +import { DDBatchTxDetails, PoolTxDetails, PoolTxType, RegularTxDetails, RegularTxType } from './tx'; +import { HexStringWriter, hexToBuf, removeDuplicates } from './utils'; import { CONSTANTS } from './constants'; import { InternalError } from './errors'; import { ZkBobState } from './state'; +import { NetworkBackend } from './networks'; +import { ZkBobSubgraph } from './subgraph'; const LOG_HISTORY_SYNC = false; const MAX_SYNC_ATTEMPTS = 3; // if sync was not fully completed due to RPR errors @@ -46,16 +47,12 @@ export interface TokensMoving { from: string, to: string, amount: bigint, + ddFee?: bigint, // for direct deposits only // This property is applicable only for outcoming transfers // true - destination address is belongs to the sender account isLoopback: boolean, } -enum PoolSelector { - Transact = "af989083", - AppendDirectDeposit = "1dc4cb33", -} - export class HistoryRecord { constructor( public type: HistoryTransactionType, @@ -65,6 +62,7 @@ export class HistoryRecord { public txHash: string, public state: HistoryRecordState, public failureReason?: string, + public extraInfo?: any, ) {} public static async deposit( @@ -73,11 +71,12 @@ export class HistoryRecord { fee: bigint, ts: number, txHash: string, - pending: boolean + pending: boolean, + extraInfo?: any, ): Promise { const action: TokensMoving = {from, to: "", amount, isLoopback: false}; const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.Deposit, ts, [action], fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.Deposit, ts, [action], fee, txHash, state, undefined, extraInfo); } public static async transferIn( @@ -85,11 +84,12 @@ export class HistoryRecord { fee: bigint, ts: number, txHash: string, - pending: boolean + pending: boolean, + extraInfo?: any, ): Promise { const actions: TokensMoving[] = transfers.map(({to, amount}) => { return ({from: "", to, amount, isLoopback: false}) }); const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.TransferIn, ts, actions, fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.TransferIn, ts, actions, fee, txHash, state, undefined, extraInfo); } public static async transferOut( @@ -98,13 +98,14 @@ export class HistoryRecord { ts: number, txHash: string, pending: boolean, - getIsLoopback: (shieldedAddress: string) => Promise + getIsLoopback: (shieldedAddress: string) => Promise, + extraInfo?: any, ): Promise { const actions: TokensMoving[] = await Promise.all(transfers.map(async ({to, amount}) => { return ({from: "", to, amount, isLoopback: await getIsLoopback(to)}) })); const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.TransferOut, ts, actions, fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.TransferOut, ts, actions, fee, txHash, state, undefined, extraInfo); } public static async withdraw( @@ -113,33 +114,38 @@ export class HistoryRecord { fee: bigint, ts: number, txHash: string, - pending: boolean + pending: boolean, + extraInfo?: any, ): Promise { const action: TokensMoving = {from: "", to, amount, isLoopback: false}; const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.Withdrawal, ts, [action], fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.Withdrawal, ts, [action], fee, txHash, state, undefined, extraInfo); } public static async aggregateNotes( fee: bigint, ts: number, txHash: string, - pending: boolean + pending: boolean, + extraInfo?: any, ): Promise { const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.AggregateNotes, ts, [], fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.AggregateNotes, ts, [], fee, txHash, state, undefined, extraInfo); } public static async directDeposit( - transfers: {to: string, amount: bigint}[], + from: string, + to: string, + amount: bigint, fee: bigint, ts: number, txHash: string, - pending: boolean + pending: boolean, + extraInfo?: any, ): Promise { - const actions: TokensMoving[] = transfers.map(({to, amount}) => { return ({from: "", to, amount, isLoopback: false}) }); + const actions: TokensMoving[] = [ {from, to, amount, isLoopback: false} ]; const state: HistoryRecordState = pending ? HistoryRecordState.Pending : HistoryRecordState.Mined; - return new HistoryRecord(HistoryTransactionType.DirectDeposit, ts, actions, fee, txHash, state); + return new HistoryRecord(HistoryTransactionType.DirectDeposit, ts, actions, fee, txHash, state, undefined, extraInfo); } public toJson(): string { @@ -230,6 +236,8 @@ export class HistoryStorage { private syncIndex = -1; private syncAttempts = 0; private state: ZkBobState; + private network: NetworkBackend; + private subgraph?: ZkBobSubgraph; private queuedTxs = new Map(); // jobId -> HistoryRecord[] //(while tx isn't processed on relayer) @@ -250,15 +258,16 @@ export class HistoryStorage { private syncHistoryPromise: Promise | undefined; - private web3; - constructor(db: IDBPDatabase, rpcUrl: string, state: ZkBobState) { + + constructor(db: IDBPDatabase, network: NetworkBackend, state: ZkBobState, subgraph?: ZkBobSubgraph) { this.db = db; - this.web3 = new Web3(rpcUrl); + this.network = network; this.state = state; + this.subgraph = subgraph; } - static async init(db_id: string, rpcUrl: string, state: ZkBobState): Promise { + static async init(db_id: string, network: NetworkBackend, state: ZkBobState, subgraph?: ZkBobSubgraph): Promise { let isNewDB = false; const db = await openDB(`zkb.${db_id}.history`, 4, { upgrade(db, oldVersion, newVersions) { @@ -318,7 +327,7 @@ export class HistoryStorage { await db.put(HISTORY_STATE_TABLE, HISTORY_RECORD_VERSION, 'version'); } - const storage = new HistoryStorage(db, rpcUrl, state); + const storage = new HistoryStorage(db, network, state, subgraph); await storage.preloadCache(); return storage; @@ -647,100 +656,59 @@ export class HistoryStorage { recTs < (toTimestamp ?? Number.MAX_VALUE) && value.state == HistoryRecordState.Mined ) { - const calldata = await this.getNativeTx(treeIndex, value.txHash); - if (calldata && calldata.blockNumber && calldata.input) { - try { - const txSelector = calldata.input.slice(2, 10).toLowerCase(); - if (txSelector == PoolSelector.Transact) { - const tx = ShieldedTx.decode(calldata.input); - const memoblock = hexToBuf(tx.ciphertext); - - let decryptedMemo = await this.getDecryptedMemo(treeIndex, false); - if (!decryptedMemo) { - // If the decrypted memo cannot be retrieved from the database => decrypt it again - const indexedTx: IndexedTx = { - index: treeIndex, - memo: tx.ciphertext, - commitment: bufToHex(bigintToArrayLe(tx.outCommit)), - } - const res: ParseTxsResult = await this.state.decryptMemos(indexedTx); - if (res.decryptedMemos.length == 1) { - decryptedMemo = res.decryptedMemos[0]; - } else { - throw new InternalError(`Cannot decrypt tx. Excepted 1 memo, got ${res.decryptedMemos.length}`); - } - } - - const chunks: TxMemoChunk[] = await this.state.extractDecryptKeys(treeIndex, memoblock); - - let nullifier: Uint8Array | undefined; - let inputs: TxInput | undefined; - let nextNullifier: Uint8Array | undefined; - if (value.type != HistoryTransactionType.TransferIn) { - // tx is user-initiated - nullifier = bigintToArrayLe(tx.nullifier); - inputs = await this.state.getTxInputs(treeIndex); - if (decryptedMemo && decryptedMemo.acc) { - const strNullifier = await this.state.calcNullifier(decryptedMemo.index, decryptedMemo.acc); - const writer = new HexStringWriter(); - writer.writeBigInt(BigInt(strNullifier), 32, true); - nextNullifier = hexToBuf(writer.toString()); - } else { - throw new InternalError(`Account was not decrypted @${treeIndex}`); - } - } - - // TEST-CASE: I'll remove it before merging - // Currently you could check key extracting correctness with that code - for (const aChunk of chunks) { - if(aChunk.index == treeIndex) { - // account - const restoredAcc = await this.state.decryptAccount(aChunk.key, aChunk.encrypted); - if (JSON.stringify(restoredAcc) != JSON.stringify(decryptedMemo?.acc)) { - throw new InternalError(`Cannot restore source account @${aChunk.index} from the compliance report!`); - } - } else if (decryptedMemo) { - // notes - const restoredNote = await this.state.decryptNote(aChunk.key, aChunk.encrypted); - let srcNote: Note | undefined; - for (const aNote of decryptedMemo.outNotes) { - if (aNote.index == aChunk.index) { srcNote = aNote.note; break; } - } - if (!srcNote) { - for (const aNote of decryptedMemo.inNotes) { - if (aNote.index == aChunk.index) { srcNote = aNote.note; break; } - } - } - - if (!srcNote) { - throw new InternalError(`Cannot find associated note @${aChunk.index} to check decryption!`); - } else if ( JSON.stringify(restoredNote) != JSON.stringify(srcNote)) { - throw new InternalError(`Cannot restore source note @${aChunk.index} from the compliance report!`); - } - } - }; - // --- END-OF-TEST-CASE --- - - const aRec = new ComplianceHistoryRecord(value, treeIndex, nullifier, nextNullifier, decryptedMemo, chunks, inputs); - complienceRecords.push(aRec); - } else if(txSelector == PoolSelector.AppendDirectDeposit) { - // Here is direct deposit transaction - // It isn't encrypted so we do not need any extra info - let decryptedMemo = await this.getDecryptedMemo(treeIndex, false); - if (decryptedMemo) { - const aRec = new ComplianceHistoryRecord(value, treeIndex, undefined, undefined, decryptedMemo, [], undefined); - complienceRecords.push(aRec); - } + const txDetails = await this.network.getTxDetails(treeIndex, value.txHash, this.state); + const details = txDetails?.details; + if (txDetails && details instanceof RegularTxDetails) { // txDetails belongs to a regular transaction + // regular transaction + const memoblock = hexToBuf(details.ciphertext); + + let decryptedMemo = await this.getDecryptedMemo(treeIndex, false); + if (!decryptedMemo) { + // If the decrypted memo cannot be retrieved from the database => decrypt it again + const indexedTx: IndexedTx = { + index: treeIndex, + memo: details.ciphertext, + commitment: details.commitment, + } + const res: ParseTxsResult = await this.state.decryptMemos(indexedTx); + if (res.decryptedMemos.length == 1) { + decryptedMemo = res.decryptedMemos[0]; + } else { + throw new InternalError(`Cannot decrypt tx. Excepted 1 memo, got ${res.decryptedMemos.length}`); + } + } + const chunks: TxMemoChunk[] = await this.state.extractDecryptKeys(treeIndex, memoblock); + + let nullifier: Uint8Array | undefined; + let inputs: TxInput | undefined; + let nextNullifier: Uint8Array | undefined; + if (value.type != HistoryTransactionType.TransferIn) { + // tx is user-initiated + nullifier = hexToBuf(details.nullifier); + inputs = await this.state.getTxInputs(treeIndex); + if (decryptedMemo && decryptedMemo.acc) { + const strNullifier = await this.state.calcNullifier(decryptedMemo.index, decryptedMemo.acc); + const writer = new HexStringWriter(); + writer.writeBigInt(BigInt(strNullifier), 32); + nextNullifier = hexToBuf(writer.toString()); } else { - throw new InternalError(`Cannot decode calldata for tx @ ${treeIndex}: incorrect selector ${txSelector}`); + throw new InternalError(`Account was not decrypted @${treeIndex}`); } } - catch (e) { - throw new InternalError(`Cannot generate compliance report for tx @ ${treeIndex}: ${e}`); + + const aRec = new ComplianceHistoryRecord(value, treeIndex, nullifier, nextNullifier, decryptedMemo as DecryptedMemo, chunks, inputs); + complienceRecords.push(aRec); + } else if (txDetails && details instanceof DDBatchTxDetails) { // txDetails belongs to direct deposit batch + // Here is direct deposit batch transaction + // It isn't encrypted so we do not need any extra info + let decryptedMemo = await this.getDecryptedMemo(treeIndex, false); + if (decryptedMemo) { + const aRec = new ComplianceHistoryRecord(value, treeIndex, undefined, undefined, decryptedMemo, [], undefined); + complienceRecords.push(aRec); } - } else { - console.warn(`[HistoryStorage]: cannot get calldata for tx at index ${treeIndex}`); + } else { // cannot retrieve transaction details + throw new InternalError(`Cannot retrieve tx details @ ${treeIndex}`) } } }; @@ -775,7 +743,7 @@ export class HistoryStorage { }); - // Remove records after the specified idex from the database + // Remove records after the specified index from the database await this.db.delete(TX_TABLE, IDBKeyRange.lowerBound(rollbackIndex)); await this.db.delete(DECRYPTED_MEMO_TABLE, IDBKeyRange.lowerBound(rollbackIndex)); await this.db.delete(DECRYPTED_PENDING_MEMO_TABLE, IDBKeyRange.lowerBound(rollbackIndex)); @@ -837,38 +805,18 @@ export class HistoryStorage { if (this.unparsedMemo.size > 0 || this.unparsedPendingMemo.size > 0) { console.log(`[HistoryStorage] starting memo synchronizing from the index ${this.syncIndex + 1} (${this.unparsedMemo.size} + ${this.unparsedPendingMemo.size}(pending) unprocessed memos)`); - const historyPromises: Promise[] = []; + //const historyPromises: Promise[] = []; // process mined memos - const processedIndexes: number[] = []; - const unprocessedIndexes: number[] = []; - for (const oneMemo of this.unparsedMemo.values()) { - const hist = this.convertToHistory(oneMemo, false).then( records => { - if (records.length > 0) { - processedIndexes.push(oneMemo.index); - } else { - // collect unprocessed indexes as well - // (the reason is most likely RPC failure) - unprocessedIndexes.push(oneMemo.index) - } - - return records; - }); - historyPromises.push(hist); - } + const minedHistoryPromise = this.convertToHistory([...this.unparsedMemo.values()], false); + const pendingHistoryPromise = this.convertToHistory([...this.unparsedPendingMemo.values()], true); + const [minedHistory, pendingHistory] = await Promise.all([minedHistoryPromise, pendingHistoryPromise]); - // process pending memos - const processedPendingIndexes: number[] = []; - for (const oneMemo of this.unparsedPendingMemo.values()) { - if (this.failedHistory.find(rec => rec.txHash == oneMemo.txHash) === undefined) { - const hist = this.convertToHistory(oneMemo, true); - historyPromises.push(hist); - - processedPendingIndexes.push(oneMemo.index); - } - } - const historyRedords = await Promise.all(historyPromises); + const historyRecords = minedHistory.records.concat(pendingHistory.records); + const processedIndexes = minedHistory.succIdxs.concat(pendingHistory.succIdxs); + const unprocessedIndexes = minedHistory.failIdxs.concat(pendingHistory.failIdxs); + const needToResyncIndexes = minedHistory.resyncIdxs.concat(pendingHistory.resyncIdxs); // delete all pending history records [we'll refresh them immediately] for (const [index, record] of this.currentHistory.entries()) { @@ -878,40 +826,45 @@ export class HistoryStorage { } let newSyncIndex = this.syncIndex; - for (const oneSet of historyRedords) { - for (const oneRec of oneSet) { - if (LOG_HISTORY_SYNC) { - console.log(`[HistoryStorage] history record @${oneRec.index} has been created`); - } + for (const oneRec of historyRecords) { + if (LOG_HISTORY_SYNC) { + console.log(`[HistoryStorage] history record @${oneRec.index} has been created`); + } - this.currentHistory.set(oneRec.index, oneRec.record); + this.currentHistory.set(oneRec.index, oneRec.record); - if (oneRec.record.state == HistoryRecordState.Mined) { - // save history record only for mined transactions - this.put(oneRec.index, oneRec.record); - - newSyncIndex = oneRec.index; - } + if (oneRec.record.state == HistoryRecordState.Mined) { + // save history record only for mined transactions + this.put(oneRec.index, oneRec.record); + + newSyncIndex = oneRec.index; } } if (unprocessedIndexes.length > 0) { - console.warn(`[HistoryStorage] unprocessed: ${unprocessedIndexes.sort().map((idx) => `@${idx}`).join(', ')}`); + console.warn(`[HistoryStorage] unable to sync indexes: ${unprocessedIndexes.sort().map((idx) => `@${idx}`).join(', ')}`); + } + if (needToResyncIndexes.length > 0) { + console.warn(`[HistoryStorage] need to resync later: ${needToResyncIndexes.sort().map((idx) => `@${idx}`).join(', ')}`); } - // we should save unprocessed records to restore them in case of library reload - this.db.put(HISTORY_STATE_TABLE, unprocessedIndexes, 'fail_indexes'); + // we should save unprocessed and incompleted records to restore them in case of library reload + this.db.put(HISTORY_STATE_TABLE, [...unprocessedIndexes, ...needToResyncIndexes], 'fail_indexes'); for (const oneIndex of processedIndexes) { - this.unparsedMemo.delete(oneIndex); + if (!needToResyncIndexes.includes(oneIndex)) { + // remove memo from the unparsed list if it shouldn't be resynced + this.unparsedMemo.delete(oneIndex); + } } this.syncIndex = Math.max(this.syncIndex, newSyncIndex); // prevent sync index decreasing this.db.put(HISTORY_STATE_TABLE, this.syncIndex, 'sync_index'); const timeMs = Date.now() - startTime; - const remainsStr = unprocessedIndexes.length > 0 ? ` (${unprocessedIndexes.length} memos remain unprecessed)` : ''; - console.log(`[HistoryStorage] history has been synced up to index ${this.syncIndex}${remainsStr} in ${timeMs} msec (records: ${[...this.currentHistory.keys()].length})`); + const remainStr = unprocessedIndexes.length > 0 ? ` (${unprocessedIndexes.length} memos remain unprocessed)` : ''; + const resyncStr = needToResyncIndexes.length > 0 ? ` (${needToResyncIndexes.length} memos will be re-synced)` : ''; + console.log(`[HistoryStorage] history has been synced up to index ${this.syncIndex}${remainStr}${resyncStr} in ${timeMs} msec (records: ${[...this.currentHistory.keys()].length})`); } else { // No any records (new or pending) => delete all pending history records for (const [index, record] of this.currentHistory.entries()) { @@ -936,193 +889,203 @@ export class HistoryStorage { return data; } - private async convertToHistory(memo: DecryptedMemo, pending: boolean): Promise { - const txHash = memo.txHash; - if (txHash) { - const txData = await this.getNativeTx(memo.index, txHash); - if (txData) { - const block = await this.web3.eth.getBlock(txData.blockNumber).catch(() => null); - if (block && block.timestamp) { - let ts: number = 0; - if (typeof block.timestamp === "number" ) { - ts = block.timestamp; - } else if (typeof block.timestamp === "string" ) { - ts = Number(block.timestamp); - } + private async getTxesDetails( + memos: DecryptedMemo[] + ): Promise<{ + details: PoolTxDetails[], // all fetched txes details + fetched: number[], // fetched tx's indexes (in Merkle tree) + notFetched: number[], // failed to fetch tx's indexes + needResync: number[]}> // indexes which are fetched incompletely + // (e.g. DD via fallback with existing subgraph) + { + const requestedIndexes = memos.map((aMemo) => aMemo.index); + let fetchedTxs: PoolTxDetails[] = []; + let fetchedIndexes: number[] = []; + let fetchedIncompletely: number[] = []; + if (this.subgraph) { + // try to fetch txes from the sugraph (if available) + fetchedTxs = await this.subgraph.getTxesDetails(requestedIndexes, this.state, this.network); + } - // Decode transaction data - try { - const txSelector = txData.input.slice(2, 10).toLowerCase(); - if (txSelector == PoolSelector.Transact) { - // Here is a regular transaction (deposit/transfer/withdrawal) - const tx = ShieldedTx.decode(txData.input); - const feeAmount = BigInt('0x' + tx.memo.substr(0, 16)) - - // All data is collected here. Let's analyze it - const allRecords: HistoryRecordIdx[] = []; - if (tx.txType == TxType.Deposit) { - // here is a deposit transaction (approvable method) - // source address are recovered from the signature - if (tx.extra && tx.extra.length >= 128) { - const fullSig = toCanonicalSignature(tx.extra.substr(0, 128)); - const nullifier = '0x' + tx.nullifier.toString(16).padStart(64, '0'); - const depositHolderAddr = await this.web3.eth.accounts.recover(nullifier, fullSig); - - const rec = await HistoryRecord.deposit(depositHolderAddr, tx.tokenAmount, feeAmount, ts, txHash, pending); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); - } else { - //incorrect signature - throw new InternalError(`no signature for approvable deposit`); - } - } else if (tx.txType == TxType.BridgeDeposit) { - // here is a deposit transaction (permittable token) - // source address in the memo block (20 bytes, starts from 16 bytes offset) - const depositHolderAddr = '0x' + tx.memo.substr(32, 40); // TODO: Check it! - - const rec = await HistoryRecord.deposit(depositHolderAddr, tx.tokenAmount, feeAmount, ts, txHash, pending); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); + // subgraph-based magic (due to DD batch have no index) + fetchedIndexes = fetchedTxs.map((aTx) => aTx.index); + const fetchedTxHashes = fetchedTxs.map((aTx) => aTx.details.txHash); + const fetchedIndexesByTxHashes = memos + .filter((aMemo) => { + return aMemo.txHash && fetchedTxHashes.includes(aMemo.txHash) && !fetchedIndexes.includes(aMemo.index); + }) + .map((aMemo) => aMemo.index); + fetchedIndexes = removeDuplicates([...fetchedIndexes, ...fetchedIndexesByTxHashes]) + + // get unprocessed memos + const unparsedMemos = memos.filter((aMemo) => !fetchedIndexes.includes(aMemo.index)); + + // fetch from the RPC node unprocessed txs by subgraph + if (this.subgraph && unparsedMemos.length > 0) { + console.warn(`[HistoryStorage] Cannot fetch ${unparsedMemos.length} of ${memos.length} indexes from subgraph. Fallbacking to RPC node: ${unparsedMemos.map((aMemo) => aMemo.index).join(', ')}`); + } + const promises: Promise[] = []; + for (let aMemo of unparsedMemos) { + if (aMemo.txHash) { + promises.push(this.network.getTxDetails(aMemo.index, aMemo.txHash, this.state)); + } + } + const resFromRpc = await Promise.all(promises); + for (let aTx of resFromRpc) { + if (aTx) { + fetchedTxs.push(aTx); + fetchedIndexes.push(aTx.index); + if (aTx.poolTxType == PoolTxType.DirectDepositBatch && this.subgraph !== undefined) { + fetchedIncompletely.push(aTx.index); + } + } + } - } else if (tx.txType == TxType.Transfer) { - // there are 2 cases: - if (memo.acc) { - // 1. we initiated it => outcoming tx(s) - const transfers = await Promise.all(memo.outNotes.map(async ({note}) => { - const destAddr = await this.state.assembleAddress(note.d, note.p_d); - return {to: destAddr, amount: BigInt(note.b)}; - })); - - if (transfers.length == 0) { - const rec = await HistoryRecord.aggregateNotes(feeAmount, ts, txHash, pending); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); - } else { - const rec = await HistoryRecord.transferOut( - transfers, - feeAmount, - ts, txHash, - pending, - async (addr) => this.state.isOwnAddress(addr) - ); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); - } - } else { - // 2. somebody initiated it => incoming tx(s) - - const transfers = await Promise.all(memo.inNotes.map(async ({note}) => { - const destAddr = await this.state.assembleAddress(note.d, note.p_d); - return {to: destAddr, amount: BigInt(note.b)}; - })); - - const rec = await HistoryRecord.transferIn(transfers, BigInt(0), ts, txHash, pending); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); - } - } else if (tx.txType == TxType.Withdraw) { - // withdrawal transaction (destination address in the memoblock) - const withdrawDestAddr = '0x' + tx.memo.substr(32, 40); - - const rec = await HistoryRecord.withdraw(withdrawDestAddr, -(tx.tokenAmount + feeAmount), feeAmount, ts, txHash, pending); - allRecords.push(HistoryRecordIdx.create(rec, memo.index)); - } + const notFetchedIndexes = requestedIndexes.filter((aIdx) => !fetchedIndexes.includes(aIdx)); + return { + details: fetchedTxs, + fetched: fetchedIndexes, + notFetched: notFetchedIndexes, + needResync: fetchedIncompletely, + }; + } + + private async convertToHistory( + memos: DecryptedMemo[], + pending: boolean + ): Promise<{ + records: HistoryRecordIdx[], + succIdxs: number[], // fetched successfully + failIdxs: number[], // the related txs are not presented in records + resyncIdxs: number[]}> // the fetched txs which should be updated again for any reason + { + const result = await this.getTxesDetails(memos); + const txesDetails = result.details; + const fetched = result.fetched; + const notFetched = result.notFetched; + + const allRecords: HistoryRecordIdx[] = []; + for (let txDetails of txesDetails) { + const memo = memos.find((aMemo) => aMemo.index == txDetails.index || aMemo.txHash == txDetails.details.txHash) + if (memo) { + if (txDetails.poolTxType == PoolTxType.Regular && txDetails.details instanceof RegularTxDetails) { + // regular transaction + const details = txDetails.details + if (details.txType == RegularTxType.Deposit || details.txType == RegularTxType.BridgeDeposit) { + const rec = await HistoryRecord.deposit( + details.depositAddr ?? '', + details.tokenAmount, + details.feeAmount, + details.timestamp, + details.txHash, + pending + ); + allRecords.push(HistoryRecordIdx.create(rec, txDetails.index)); + } else if (details.txType == RegularTxType.Transfer) { + // there are 2 cases: + if (memo.acc) { + // 1. we initiated it => outcoming tx(s) + const transfers = await Promise.all(memo.outNotes.map(async ({note}) => { + const destAddr = await this.state.assembleAddress(note.d, note.p_d); + return {to: destAddr, amount: BigInt(note.b)}; + })); - // if we found txHash in the blockchain -> remove it from the saved tx array - if (pending) { - // if tx is in pending state - remove it only on success - const txReceipt = await this.web3.eth.getTransactionReceipt(txHash); - if (txReceipt && txReceipt.status !== undefined && txReceipt.status == true) { - this.removePendingTxByTxHash(txHash); - } + if (transfers.length == 0) { + const rec = await HistoryRecord.aggregateNotes(details.feeAmount, details.timestamp, details.txHash, pending); + allRecords.push(HistoryRecordIdx.create(rec, memo.index)); } else { - this.removePendingTxByTxHash(txHash); + const rec = await HistoryRecord.transferOut( + transfers, + details.feeAmount, + details.timestamp, + details.txHash, + pending, + async (addr) => this.state.isOwnAddress(addr) + ); + allRecords.push(HistoryRecordIdx.create(rec, memo.index)); } - - return allRecords; - - } else if (txSelector == PoolSelector.AppendDirectDeposit) { - // Direct Deposit tranaction + } else { + // 2. somebody initiated it => incoming tx(s) const transfers = await Promise.all(memo.inNotes.map(async ({note}) => { const destAddr = await this.state.assembleAddress(note.d, note.p_d); return {to: destAddr, amount: BigInt(note.b)}; })); - const rec = await HistoryRecord.directDeposit(transfers, BigInt(0), ts, txHash, pending); - return [HistoryRecordIdx.create(rec, memo.index)]; - } else { - - throw new InternalError(`Cannot decode calldata for tx ${txHash}: incorrect selector ${txSelector}`); + const rec = await HistoryRecord.transferIn(transfers, BigInt(0), details.timestamp, details.txHash, pending); + allRecords.push(HistoryRecordIdx.create(rec, memo.index)); } - } catch (e) { - // there is no workaround for that issue => throw Error - throw new InternalError(`Cannot decode calldata for tx ${txHash}: ${e}`); + } else if (details.txType == RegularTxType.Withdraw) { + const rec = await HistoryRecord.withdraw( + details.withdrawAddr ?? '', + -(details.tokenAmount + details.feeAmount), + details.feeAmount, + details.timestamp, + details.txHash, + pending + ); + allRecords.push(HistoryRecordIdx.create(rec, memo.index)); + } else { + throw new InternalError(`[HistoryStorage] Unknown transaction type ${details.txType}`) } - } - // we shouldn't panic here: will retry in the next time - console.warn(`[HistoryStorage] unable to fetch block ${txData.blockNumber} for tx @${memo.index}`); - } else { - // Look for a transactions, initiated by the user and try to convert it to the HistoryRecord - const records = this.sentTxs.get(txHash); - if (records !== undefined) { - console.log(`[HistoryStorage] tx ${txHash} isn't indexed yet, but we have ${records.length} associated history record(s)`); - return records.map((oneRecord, index) => HistoryRecordIdx.create(oneRecord, memo.index + index)); - } else { - // we shouldn't panic here: will retry in the next time - console.warn(`[HistoryStorage] cannot fetch tx ${txHash} and no local associated records`); + if (!pending || (pending && details.isMined)) { + // if tx is in pending state - remove it only on success + this.removePendingTxByTxHash(details.txHash); + } + } else if (txDetails.poolTxType == PoolTxType.DirectDepositBatch && txDetails.details instanceof DDBatchTxDetails) { + // transaction is DD batch on the pool + // Direct Deposit tranaction + const details = txDetails.details + details.deposits.forEach(async (aDeposit, idx) => { + const tokenMoving = {to: aDeposit.destination, amount: aDeposit.amount }; + const rec = await HistoryRecord.directDeposit( + aDeposit.sender && aDeposit.sender != '' ? aDeposit.sender : aDeposit.fallback, + aDeposit.destination, + aDeposit.amount, + aDeposit.fee, + details.timestamp, + details.txHash, + pending, + aDeposit.payment, + ); + allRecords.push(HistoryRecordIdx.create(rec, memo.index + idx)); + }); + } else { + throw new InternalError(`Incorrect or unsupported transaction details`); } + } else { + throw new InternalError(`Could not find associated memo for txDetails (index: ${txDetails.index}, txHash: ${txDetails.details.txHash})`); } - - // In some cases (e.g. unable to fetch tx) we should return a valid value - // Otherwise top-level Promise.all() will failed - return []; - } - throw new InternalError(`Cannot find txHash for memo at index ${memo.index}`); - } - - private async getNativeTx(index: number, txHash: string | undefined = undefined): Promise { - const mask = (-1) << CONSTANTS.OUTLOG; - const txIndex = index & mask; - - let calldata = await this.db.get(NATIVE_TX_TABLE, txIndex); - if (!calldata) { - // calldata for that index isn't presented in the DB => request it - if (txHash === undefined) { - // it's need to get txHash for that index first - const decryptedMemo = await this.getDecryptedMemo(txIndex, false); // only mined txs - if (decryptedMemo && decryptedMemo.txHash) { - txHash = decryptedMemo.txHash; - } else { - console.warn(`[HistoryStorage]: unable to retrieve txHash for tx at index ${txIndex}: no saved decrypted memo`); - - return null; - } - } - - try { - const txData = await this.web3.eth.getTransaction(txHash); - if (txData && txData.blockNumber && txData.input) { - this.saveNativeTx(index, txData); - - return txData; + // working with memos without fetched tx details + for (let aUnprocessedIdx of notFetched) { + const memo = memos.find((aMemo) => aMemo.index == aUnprocessedIdx); + if (memo) { + if (memo.txHash) { + // Cannot retrieve transaction details (maybe it's not mined yet?) + // Look for a transactions, initiated by the user and try to convert it to the HistoryRecord + const records = this.sentTxs.get(memo.txHash); + if (records !== undefined) { + console.log(`[HistoryStorage] tx ${memo.txHash} isn't indexed yet, but we have ${records.length} associated history record(s)`); + records.forEach((oneRecord, index) => { + allRecords.push(HistoryRecordIdx.create(oneRecord, memo.index + index)); + if (!fetched.includes(memo.index)) fetched.push(memo.index); + const x = notFetched.indexOf(memo.index); + if (x >= 0) { notFetched.splice(x, 1); } + }); + } else { + // we shouldn't panic here: will retry the next time + console.warn(`[HistoryStorage] cannot fetch tx ${memo.txHash} and no local associated records`); + } } else { - console.warn(`[HistoryStorage]: cannot get native tx ${txHash} (tx still not mined?)`); - - return null; + throw new InternalError(`Cannot find txHash for memo at index ${memo.index}`); } - } catch (err) { - console.warn(`[HistoryStorage]: cannot get native tx ${txHash} (${err.message})`); - - return null; + } else { + throw new InternalError(`Could not find associated memo for unprocessed index ${aUnprocessedIdx}`); } } - return calldata; + return {records: allRecords, succIdxs: fetched, failIdxs: notFetched, resyncIdxs: result.needResync}; } - - private async saveNativeTx(index: number, txData: any): Promise { - const mask = (-1) << CONSTANTS.OUTLOG; - const txIndex = index & mask; - - await this.db.put(NATIVE_TX_TABLE, txData, txIndex); - } - } diff --git a/src/index.ts b/src/index.ts index 04d632f1..d19863a3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ export { ZkBobClient, TransferConfig, TransferRequest, FeeAmount, } from './client'; export { ZkBobProvider as ZkBobAccountlessClient, GiftCardProperties } from './client-provider'; export { SyncStat } from './state'; -export { TxType } from './tx'; +export { RegularTxType as TxType, DirectDeposit } from './tx'; export { RelayerFee } from './services/relayer' export { HistoryRecord, HistoryTransactionType, HistoryRecordState, ComplianceHistoryRecord } from './history'; export { EphemeralAddress, EphemeralPool } from './ephemeral'; @@ -18,6 +18,6 @@ export { EvmNetwork } from './networks/evm' export { deriveSpendingKeyZkBob } from './utils' export { IAddressComponents } from 'libzkbob-rs-wasm-web'; export { SignatureType } from './signers/abstract-signer' -export { DirectDepositType, DirectDeposit } from './dd' +export { DirectDepositType } from './dd' export * from './errors' \ No newline at end of file diff --git a/src/network-type.ts b/src/network-type.ts index 1c35b2fb..125de56e 100755 --- a/src/network-type.ts +++ b/src/network-type.ts @@ -5,10 +5,13 @@ export enum NetworkType { ethereum = 'ethereum', polygon = 'polygon', optimism = 'optimism', + tron = 'tron', // testnets sepolia = 'sepolia', goerli = 'goerli', goerliOptimism = 'goerli-optimism', + shasta = 'shasta', // TRON testnet + nile = 'nile', // TRON testnet localNode = 'local-node', } @@ -30,9 +33,12 @@ export namespace NetworkType { case NetworkType.ethereum: case NetworkType.polygon: case NetworkType.optimism: + case NetworkType.tron: case NetworkType.sepolia: case NetworkType.goerli: case NetworkType.goerliOptimism: + case NetworkType.shasta: + case NetworkType.nile: case NetworkType.localNode: return `/0'/0/${account}`; @@ -50,9 +56,13 @@ export namespace NetworkType { return 966; case NetworkType.optimism: return 614; + case NetworkType.tron: + return 195; case NetworkType.sepolia: case NetworkType.goerli: case NetworkType.goerliOptimism: + case NetworkType.shasta: + case NetworkType.nile: case NetworkType.localNode: return 1; @@ -70,12 +80,18 @@ export namespace NetworkType { return 'polygon'; case 10: return 'optimism'; + case 0x2b6653dc: // 728126428 + return 'tron'; case 11155111: return 'sepolia'; case 5: return 'goerli'; case 420: return 'goerli-optimism'; + case 0x94a9059e: // 2494104990 + return 'shasta'; + case 0xcd8690dc: //3448148188 + return 'nile'; case 1337: case 31337: return 'local-node'; diff --git a/src/networks/evm.ts b/src/networks/evm.ts deleted file mode 100644 index fa297e54..00000000 --- a/src/networks/evm.ts +++ /dev/null @@ -1,273 +0,0 @@ -import Web3 from 'web3'; -import { Contract } from 'web3-eth-contract' -import { TransactionConfig } from 'web3-core' -import { NetworkBackend, PreparedTransaction } from './network'; -import { InternalError } from '..'; -import { ddContractABI, poolContractABI, tokenABI } from './evm-abi'; -import bs58 from 'bs58'; - -export class EvmNetwork implements NetworkBackend { - rpcUrl: string; - - // these properties can be undefined when backend in disabled state - private web3?: Web3; - private pool?: Contract; - private dd?: Contract; - private token?: Contract; - - private tokenSellerAddresses = new Map(); // poolContractAddress -> tokenSellerContractAddress - private ddContractAddresses = new Map(); // poolContractAddress -> directDepositContractAddress - - constructor(rpcUrl: string, enabled: boolean = true) { - this.rpcUrl = rpcUrl; - - if (enabled) { - this.setEnabled(true); - } - } - - public isEnabled(): boolean { - return this.web3 !== undefined && - this.pool !== undefined && - this.dd !== undefined && - this.token !== undefined; - } - - public setEnabled(enabled: boolean) { - if (enabled) { - if (!this.isEnabled()) { - this.web3 = new Web3(this.rpcUrl); - this.pool = new this.web3.eth.Contract(poolContractABI) as unknown as Contract; - this.dd = new this.web3.eth.Contract(ddContractABI) as unknown as Contract; - this.token = new this.web3.eth.Contract(tokenABI) as unknown as Contract; - } - } else { - this.web3 = undefined; - this.pool = undefined; - this.dd = undefined; - this.token = undefined; - } - } - - private activeWeb3(): Web3 { - if (!this.web3) { - throw new InternalError(`EvmNetwork: Cannot interact in the disabled mode`); - } - - return this.web3; - } - - private poolContract(): Contract { - if (!this.pool) { - throw new InternalError(`EvmNetwork: pool contract object is undefined`); - } - - return this.pool; - } - - private directDepositContract(): Contract { - if (!this.dd) { - throw new InternalError(`EvmNetwork: direct deposit contract object is undefined`); - } - - return this.dd; - } - - private tokenContract(): Contract { - if (!this.token) { - throw new InternalError(`EvmNetwork: token contract object is undefined`); - } - - return this.token; - } - - public async getChainId(): Promise { - return await this.activeWeb3().eth.getChainId(); - } - - public async getDomainSeparator(tokenAddress: string): Promise { - this.tokenContract().options.address = tokenAddress; - return await this.tokenContract().methods.DOMAIN_SEPARATOR().call(); - } - - public async getTokenName(tokenAddress: string): Promise { - this.tokenContract().options.address = tokenAddress; - return await this.tokenContract().methods.name().call(); - } - - public async getTokenDecimals(tokenAddress: string): Promise { - this.tokenContract().options.address = tokenAddress; - return Number(await this.tokenContract().methods.decimals().call()); - } - - public async getTokenNonce(tokenAddress: string, address: string): Promise { - this.tokenContract().options.address = tokenAddress; - return Number(await this.tokenContract().methods.nonces(address).call()); - } - - public async getTokenBalance(tokenAddress: string, address: string): Promise { // in wei - this.tokenContract().options.address = tokenAddress; - return BigInt(await this.tokenContract().methods.balanceOf(address).call()); - } - - public async allowance(tokenAddress: string, owner: string, spender: string): Promise { - this.tokenContract().options.address = tokenAddress; - const result = await this.tokenContract().methods.allowance(owner, spender).call(); - - return BigInt(result); - } - - public async permit2NonceBitmap(permit2Address: string, owner: string, wordPos: bigint): Promise { - this.tokenContract().options.address = permit2Address; - const result = await this.tokenContract().methods.nonceBitmap(owner, wordPos).call(); - - return BigInt(result); - } - - public async erc3009AuthState(tokenAddress: string, authorizer: string, nonce: bigint): Promise { - this.tokenContract().options.address = tokenAddress; - const result = await this.tokenContract().methods.authorizationState(authorizer, `0x${nonce.toString(16)}`).call(); - - return BigInt(result); - } - - public async getDenominator(poolAddress: string): Promise { - this.poolContract().options.address = poolAddress; - return BigInt(await this.poolContract().methods.denominator().call()); - } - - public async getPoolId(poolAddress: string): Promise { - this.poolContract().options.address = poolAddress; - return Number(await this.poolContract().methods.pool_id().call()); - } - - isSignatureCompact(): boolean { - return true; - } - - defaultNetworkName(): string { - return 'ethereum'; - } - - getRpcUrl(): string { - return this.rpcUrl; - } - - public async poolLimits(poolAddress: string, address: string | undefined): Promise { - this.poolContract().options.address = poolAddress; - let addr = address; - if (address === undefined) { - addr = '0x0000000000000000000000000000000000000000'; - } - - return await this.poolContract().methods.getLimitsFor(addr).call(); - } - - public async getTokenSellerContract(poolAddress: string): Promise { - let tokenSellerAddr = this.tokenSellerAddresses.get(poolAddress); - if (!tokenSellerAddr) { - this.poolContract().options.address = poolAddress; - tokenSellerAddr = await this.poolContract().methods.tokenSeller().call(); - if (tokenSellerAddr) { - this.tokenSellerAddresses.set(poolAddress, tokenSellerAddr); - } else { - throw new InternalError(`Cannot fetch token seller contract address`); - } - } - - return tokenSellerAddr; - } - - public async getDirectDepositQueueContract(poolAddress: string): Promise { - let ddContractAddr = this.ddContractAddresses.get(poolAddress); - if (!ddContractAddr) { - this.poolContract().options.address = poolAddress; - ddContractAddr = await this.poolContract().methods.direct_deposit_queue().call(); - if (ddContractAddr) { - this.ddContractAddresses.set(poolAddress, ddContractAddr); - } else { - throw new InternalError(`Cannot fetch DD contract address`); - } - } - - return ddContractAddr; - } - - public async getDirectDepositFee(ddQueueAddress: string): Promise { - this.directDepositContract().options.address = ddQueueAddress; - - return BigInt(await this.directDepositContract().methods.directDepositFee().call()); - } - - public async createDirectDepositTx( - ddQueueAddress: string, - amount: bigint, - zkAddress: string, - fallbackAddress: string, - ): Promise { - const zkAddrBytes = `0x${Buffer.from(bs58.decode(zkAddress.substring(zkAddress.indexOf(':') + 1))).toString('hex')}`; - const encodedTx = await this.directDepositContract().methods["directDeposit(address,uint256,bytes)"](fallbackAddress, amount, zkAddrBytes).encodeABI(); - - return { - to: ddQueueAddress, - amount: 0n, - data: encodedTx, - }; - } - - public async createNativeDirectDepositTx( - ddQueueAddress: string, - nativeAmount: bigint, - zkAddress: string, - fallbackAddress: string, - ): Promise { - const zkAddrBytes = `0x${Buffer.from(bs58.decode(zkAddress.substring(zkAddress.indexOf(':') + 1))).toString('hex')}`; - const encodedTx = await this.directDepositContract().methods["directNativeDeposit(address,bytes)"](fallbackAddress, zkAddrBytes).encodeABI(); - - return { - to: ddQueueAddress, - amount: nativeAmount, - data: encodedTx, - }; - } - - public async poolState(poolAddress: string, index?: bigint): Promise<{index: bigint, root: bigint}> { - this.poolContract().options.address = poolAddress; - let idx; - if (index === undefined) { - idx = await this.poolContract().methods.pool_index().call(); - } else { - idx = index?.toString(); - } - const root = await this.poolContract().methods.roots(idx).call(); - - - return {index: BigInt(idx), root: BigInt(root)}; - } - - public async getTxRevertReason(txHash: string): Promise { - const txReceipt = await this.activeWeb3().eth.getTransactionReceipt(txHash); - if (txReceipt && txReceipt.status !== undefined) { - if (txReceipt.status == false) { - const txData = await this.activeWeb3().eth.getTransaction(txHash); - - let reason = 'unknown reason'; - try { - await this.activeWeb3().eth.call(txData as TransactionConfig, txData.blockNumber as number); - } catch(err) { - reason = err.message; - } - console.log(`getTxRevertReason: revert reason for ${txHash}: ${reason}`) - - return reason; - } else { - console.warn(`getTxRevertReason: ${txHash} was not reverted`); - } - } else { - console.warn(`getTxRevertReason: ${txHash} was not mined yet`); - } - - return null; - } - -} \ No newline at end of file diff --git a/src/networks/evm/calldata.ts b/src/networks/evm/calldata.ts new file mode 100644 index 00000000..3957b092 --- /dev/null +++ b/src/networks/evm/calldata.ts @@ -0,0 +1,95 @@ +import { InternalError } from "../../errors"; +import { ShieldedTx, RegularTxType } from "../../tx"; +import { HexStringReader, assertNotNull } from "../../utils"; +import { PoolSelector } from "."; + + +// Sizes in bytes +const MEMO_META_DEFAULT_SIZE: number = 8; // fee (u64) +const MEMO_META_WITHDRAW_SIZE: number = 8 + 8 + 20; // fee (u64) + amount + address (u160) +const MEMO_META_PERMITDEPOSIT_SIZE: number = 8 + 8 + 20; // fee (u64) + amount + address (u160) + +export const CALLDATA_BASE_LENGTH: number = 644; +export const CALLDATA_MEMO_APPROVE_DEPOSIT_BASE_LENGTH: number = 210; +export const CALLDATA_MEMO_DEPOSIT_BASE_LENGTH: number = 238; +export const CALLDATA_MEMO_TRANSFER_BASE_LENGTH: number = 210; +export const CALLDATA_MEMO_NOTE_LENGTH: number = 172; +export const CALLDATA_MEMO_WITHDRAW_BASE_LENGTH: number = 238; +export const CALLDATA_DEPOSIT_SIGNATURE_LENGTH: number = 64; + + +export function estimateEvmCalldataLength(txType: RegularTxType, notesCnt: number, extraDataLen: number = 0): number { + let txSpecificLen = 0; + switch (txType) { + case RegularTxType.Deposit: + txSpecificLen = CALLDATA_MEMO_APPROVE_DEPOSIT_BASE_LENGTH + CALLDATA_DEPOSIT_SIGNATURE_LENGTH; + break; + + case RegularTxType.BridgeDeposit: + txSpecificLen = CALLDATA_MEMO_DEPOSIT_BASE_LENGTH + CALLDATA_DEPOSIT_SIGNATURE_LENGTH; + break; + + case RegularTxType.Transfer: + txSpecificLen = CALLDATA_MEMO_TRANSFER_BASE_LENGTH; + break; + + case RegularTxType.Withdraw: + txSpecificLen = CALLDATA_MEMO_WITHDRAW_BASE_LENGTH; + break; + } + + return CALLDATA_BASE_LENGTH + txSpecificLen + extraDataLen + notesCnt * CALLDATA_MEMO_NOTE_LENGTH; +} + +export function decodeEvmCalldata(calldata: string): ShieldedTx { + const tx = new ShieldedTx(); + const reader = new HexStringReader(calldata); + + const selector = reader.readHex(4)!; + if (selector.toLocaleLowerCase() != PoolSelector.Transact) { + throw new InternalError(`[EvmNetwork] Cannot decode transaction: incorrect selector ${selector} (expected ${PoolSelector.Transact})`); + } + + tx.nullifier = reader.readBigInt(32)!; + assertNotNull(tx.nullifier); + tx.outCommit = reader.readBigInt(32)!; + assertNotNull(tx.outCommit); + tx.transferIndex = reader.readBigInt(6)!; + assertNotNull(tx.transferIndex); + tx.energyAmount = reader.readSignedBigInt(14)!; + assertNotNull(tx.energyAmount); + tx.tokenAmount = reader.readSignedBigInt(8)!; + assertNotNull(tx.tokenAmount); + tx.transactProof = reader.readBigIntArray(8, 32); + tx.rootAfter = reader.readBigInt(32)!; + assertNotNull(tx.rootAfter); + tx.treeProof = reader.readBigIntArray(8, 32); + tx.txType = reader.readHex(2) as RegularTxType; + assertNotNull(tx.txType); + const memoSize = reader.readNumber(2); + assertNotNull(memoSize); + tx.memo = reader.readHex(memoSize)!; + assertNotNull(tx.memo); + + // Extra data + // It contains deposit holder signature for deposit transactions + // or any other data which user can append + tx.extra = reader.readHexToTheEnd()!; + assertNotNull(tx.extra); + + return tx; +} + +export function getCiphertext(tx: ShieldedTx): string { + if (tx.txType === RegularTxType.Withdraw) { + return tx.memo.slice(MEMO_META_WITHDRAW_SIZE * 2); + } else if (tx.txType === RegularTxType.BridgeDeposit) { + return tx.memo.slice(MEMO_META_PERMITDEPOSIT_SIZE * 2); + } + + return tx.memo.slice(MEMO_META_DEFAULT_SIZE * 2); +} + +export function decodeEvmCalldataAppendDD(calldata: string) { + +} \ No newline at end of file diff --git a/src/networks/evm-abi.ts b/src/networks/evm/evm-abi.ts similarity index 67% rename from src/networks/evm-abi.ts rename to src/networks/evm/evm-abi.ts index 6159ad64..d2513491 100644 --- a/src/networks/evm-abi.ts +++ b/src/networks/evm/evm-abi.ts @@ -294,6 +294,33 @@ export const poolContractABI: AbiItem[] = [ }], stateMutability: 'view', type: 'function' + }, + { + inputs: [{ + internalType: 'uint256', + name: '_root_after', + type: 'uint256' + }, { + internalType: 'uint256[]', + name: '_indices', + type: 'uint256[]' + }, { + internalType: 'uint256', + name: '_out_commit', + type: 'uint256' + }, { + internalType: 'uint256[8]', + name: '_batch_deposit_proof', + type: 'uint256[8]' + }, { + internalType: 'uint256[8]', + name: '_tree_proof', + type: 'uint256[8]' + }], + name: 'appendDirectDeposits', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' } ]; @@ -309,6 +336,65 @@ export const ddContractABI: AbiItem[] = [ stateMutability: 'view', type: 'function' }, + { + inputs: [], + name: 'directDepositNonce', + outputs: [{ + internalType: 'uint32', + name: '', + type: 'uint32' + }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [{ + internalType: 'uint256', + name: '_index', + type: 'uint256' + }], + name: 'getDirectDeposit', + outputs: [{ + components: [{ + internalType: 'address', + name: 'fallbackReceiver', + type: 'address' + }, { + internalType: 'uint96', + name: 'sent', + type: 'uint96' + }, { + internalType: 'uint64', + name: 'deposit', + type: 'uint64' + }, { + internalType: 'uint64', + name: 'fee', + type: 'uint64' + }, { + internalType: 'uint40', + name: 'timestamp', + type: 'uint40' + }, { + internalType: 'enum IZkBobDirectDeposits.DirectDepositStatus', + name: 'status', + type: 'uint8' + }, { + internalType: 'bytes10', + name: 'diversifier', + type: 'bytes10' + }, { + internalType: 'bytes32', + name: 'pk', + type: 'bytes32' + }], + internalType: 'struct IZkBobDirectDeposits.DirectDeposit', + name: '', + type: 'tuple' + }], + stateMutability: 'view', + type: 'function' + }, { inputs: [{ internalType: 'address', @@ -351,4 +437,76 @@ export const ddContractABI: AbiItem[] = [ stateMutability: 'payable', type: 'function' }, + { + anonymous: false, + inputs: [{ + indexed: true, + internalType: 'address', + name: 'sender', + type: 'address' + }, { + indexed: true, + internalType: 'uint256', + name: 'nonce', + type: 'uint256' + }, { + indexed: false, + internalType: 'address', + name: 'fallbackUser', + type: 'address' + }, { + components: [{ + internalType: 'bytes10', + name: 'diversifier', + type: 'bytes10' + }, { + internalType: 'bytes32', + name: 'pk', + type: 'bytes32' + }], + indexed: false, + internalType: 'struct ZkAddress.ZkAddress', + name: 'zkAddress', + type: 'tuple' + }, { + indexed: false, + internalType: 'uint64', + name: 'deposit', + type: 'uint64' + }], + name: 'SubmitDirectDeposit', + type: 'event' + }, + { + anonymous: false, + inputs: [{ + indexed: false, + internalType: 'uint256[]', + name: 'indices', + type: 'uint256[]' + }], + name: 'CompleteDirectDepositBatch', + type: 'event' + }, + { + anonymous: false, + inputs: [{ + indexed: true, + internalType: 'uint256', + name: 'nonce', + type: 'uint256' + }, { + indexed: false, + internalType: 'address', + name: 'receiver', + type: 'address' + }, { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256' + }], + name: 'RefundDirectDeposit', + type: 'event' + }, ]; \ No newline at end of file diff --git a/src/networks/evm/index.ts b/src/networks/evm/index.ts new file mode 100644 index 00000000..1ff9fda2 --- /dev/null +++ b/src/networks/evm/index.ts @@ -0,0 +1,704 @@ +import Web3 from 'web3'; +import { Contract } from 'web3-eth-contract' +import { TransactionConfig } from 'web3-core' +import { NetworkBackend, PreparedTransaction} from '..'; +import { InternalError } from '../../errors'; +import { ddContractABI, poolContractABI, tokenABI } from './evm-abi'; +import bs58 from 'bs58'; +import { DDBatchTxDetails, RegularTxDetails, PoolTxDetails, RegularTxType, PoolTxType, DirectDeposit, DirectDepositState } from '../../tx'; +import { addHexPrefix, bufToHex, hexToBuf, toTwosComplementHex, truncateHexPrefix } from '../../utils'; +import { CALLDATA_BASE_LENGTH, decodeEvmCalldata, estimateEvmCalldataLength, getCiphertext } from './calldata'; +import { recoverTypedSignature, signTypedData, SignTypedDataVersion, + personalSign, recoverPersonalSignature } from '@metamask/eth-sig-util' +import { privateToAddress, bufferToHex, isHexPrefixed } from '@ethereumjs/util'; +import { isAddress } from 'web3-utils'; +import { Transaction, TransactionReceipt } from 'web3-core'; +import { RpcManagerDelegate, MultiRpcManager } from '../rpcman'; +import { ZkBobState } from '../../state'; + +const RETRY_COUNT = 10; +const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; + +export enum PoolSelector { + Transact = "af989083", + AppendDirectDeposit = "1dc4cb33", + } + +export class EvmNetwork extends MultiRpcManager implements NetworkBackend, RpcManagerDelegate { + // These properties can be undefined when backend in the disabled state + private web3?: Web3; + private pool?: Contract; + private dd?: Contract; + private token?: Contract; + + // Local cache + private tokenSellerAddresses = new Map(); // poolContractAddress -> tokenSellerContractAddress + private ddContractAddresses = new Map(); // poolContractAddress -> directDepositContractAddress + private supportsNonces = new Map(); // tokenAddress -> isSupportsNonceMethod + + // ------------------------=========< Lifecycle >=========------------------------ + // | Init, enabling and disabling backend | + // ------------------------------------------------------------------------------- + + constructor(rpcUrls: string[], enabled: boolean = true) { + super(rpcUrls); + super.delegate = this; + + if (enabled) { + this.setEnabled(true); + } + } + + public isEnabled(): boolean { + return this.web3 !== undefined && + this.pool !== undefined && + this.dd !== undefined && + this.token !== undefined; + } + + public setEnabled(enabled: boolean) { + if (enabled) { + if (!this.isEnabled()) { + this.web3 = new Web3(super.curRpcUrl()); + this.pool = new this.web3.eth.Contract(poolContractABI) as unknown as Contract; + this.dd = new this.web3.eth.Contract(ddContractABI) as unknown as Contract; + this.token = new this.web3.eth.Contract(tokenABI) as unknown as Contract; + } + } else { + this.web3 = undefined; + this.pool = undefined; + this.dd = undefined; + this.token = undefined; + } + } + + private activeWeb3(): Web3 { + if (!this.web3) { + throw new InternalError(`EvmNetwork: Cannot interact in the disabled mode`); + } + + return this.web3; + } + + private poolContract(): Contract { + if (!this.pool) { + throw new InternalError(`EvmNetwork: pool contract object is undefined`); + } + + return this.pool; + } + + private directDepositContract(): Contract { + if (!this.dd) { + throw new InternalError(`EvmNetwork: direct deposit contract object is undefined`); + } + + return this.dd; + } + + private tokenContract(): Contract { + if (!this.token) { + throw new InternalError(`EvmNetwork: token contract object is undefined`); + } + + return this.token; + } + + private contractCallRetry(contract: Contract, address: string, method: string, args: any[] = []): Promise { + return this.commonRpcRetry(async () => { + contract.options.address = address; + return await contract.methods[method](...args).call() + }, + `[EvmNetwork] Contract call (${method}) error`, + RETRY_COUNT + ); + } + + // -----------------=========< Token-Related Routiness >=========----------------- + // | Getting balance, allowance, nonce etc | + // ------------------------------------------------------------------------------- + + public async getTokenName(tokenAddress: string): Promise { + return this.contractCallRetry(this.tokenContract(), tokenAddress, 'name'); + } + + public async getTokenDecimals(tokenAddress: string): Promise { + const res = await this.contractCallRetry(this.tokenContract(), tokenAddress, 'decimals'); + return Number(res); + } + + public async getDomainSeparator(tokenAddress: string): Promise { + return this.contractCallRetry(this.tokenContract(), tokenAddress, 'DOMAIN_SEPARATOR'); + } + + public async getTokenNonce(tokenAddress: string, address: string): Promise { + const res = await this.contractCallRetry(this.tokenContract(), tokenAddress, 'nonces', [address]); + return Number(res); + } + + public async getTokenBalance(tokenAddress: string, address: string): Promise { // in token base units + const res = await this.contractCallRetry(this.tokenContract(), tokenAddress, 'balanceOf', [address]); + return BigInt(res); + } + + public async allowance(tokenAddress: string, owner: string, spender: string): Promise { + const res = await this.contractCallRetry(this.tokenContract(), tokenAddress, 'allowance', [owner, spender]); + return BigInt(res); + } + + public async permit2NonceBitmap(permit2Address: string, owner: string, wordPos: bigint): Promise { + const res = await this.contractCallRetry(this.tokenContract(), permit2Address, 'nonceBitmap', [owner, wordPos]); + return BigInt(res); + } + + public async erc3009AuthState(tokenAddress: string, authorizer: string, nonce: bigint): Promise { + const res = await this.contractCallRetry(this.tokenContract(), tokenAddress, 'authorizationState', [authorizer, `0x${nonce.toString(16)}`]); + return BigInt(res); + } + + public async approveTokens( + tokenAddress: string, + privateKey: string, + holder: string, + spender: string, + amount: bigint, + gasFactor?: number + ): Promise { + const encodedTx = await this.tokenContract().methods.approve(spender, BigInt(amount)).encodeABI(); + let txObject: TransactionConfig = { + from: holder, + to: tokenAddress, + data: encodedTx, + }; + + const gas = await this.commonRpcRetry(async () => { + return Number(await this.activeWeb3().eth.estimateGas(txObject)); + }, 'Unable to estimate gas', RETRY_COUNT); + const gasPrice = await this.commonRpcRetry(async () => { + return Number(await this.activeWeb3().eth.getGasPrice()); + }, 'Unable to get gas price', RETRY_COUNT); + txObject.gas = gas; + txObject.gasPrice = `0x${BigInt(Math.ceil(gasPrice * (gasFactor ?? 1.0))).toString(16)}`; + txObject.nonce = await this.getNativeNonce(holder); + + const signedTx = await this.activeWeb3().eth.accounts.signTransaction(txObject, privateKey); + + const receipt = await this.commonRpcRetry(async () => { + return this.activeWeb3().eth.sendSignedTransaction(signedTx.rawTransaction ?? ''); + }, 'Unable to send approve tx', 0); // do not retry sending to avoid any side effects + + return receipt.transactionHash; + } + + public async isSupportNonce(tokenAddress: string): Promise { + let isSupport = this.supportsNonces.get(tokenAddress); + if (isSupport === undefined) { + try { + const tokenContract = this.tokenContract(); + tokenContract.options.address = tokenAddress; + await tokenContract.methods['nonces'](ZERO_ADDRESS).call() + isSupport = true; + } catch (err) { + console.warn(`The token seems doesn't support nonces method`); + isSupport = false; + } + + this.supportsNonces.set(tokenAddress, isSupport); + }; + + return isSupport + } + + + // ---------------------=========< Pool Interaction >=========-------------------- + // | Getting common info: pool ID, denominator, limits etc | + // ------------------------------------------------------------------------------- + + public async getPoolId(poolAddress: string): Promise { + return Number(await this.contractCallRetry(this.poolContract(), poolAddress, 'pool_id')); + } + + public async getDenominator(poolAddress: string): Promise { + return BigInt(await this.contractCallRetry(this.poolContract(), poolAddress, 'denominator')); + } + + public async poolState(poolAddress: string, index?: bigint): Promise<{index: bigint, root: bigint}> { + let idx: string; + if (index === undefined) { + idx = await this.contractCallRetry(this.poolContract(), poolAddress, 'pool_index'); + } else { + idx = index?.toString(); + } + let root = BigInt(await this.contractCallRetry(this.poolContract(), poolAddress, 'roots', [idx])); + if (root == 0n) { + // it's seems the RPC node got behind the actual blockchain state + // let's try to find the best one and retry root request + const switched = await this.switchToTheBestRPC(); + if (switched) { + root = await this.contractCallRetry(this.poolContract(), poolAddress, 'roots', [idx]); + } + if (root == 0n) { + console.warn(`[EvmNetwork] cannot retrieve root at index ${idx} (is it exist?)`); + } + } + + return {index: BigInt(idx), root}; + } + + public async poolLimits(poolAddress: string, address: string | undefined): Promise { + return await this.contractCallRetry(this.poolContract(), poolAddress, 'getLimitsFor', [address ?? ZERO_ADDRESS]); + } + + public async getTokenSellerContract(poolAddress: string): Promise { + let tokenSellerAddr = this.tokenSellerAddresses.get(poolAddress); + if (!tokenSellerAddr) { + tokenSellerAddr = await this.contractCallRetry(this.poolContract(), poolAddress, 'tokenSeller'); + if (tokenSellerAddr) { + this.tokenSellerAddresses.set(poolAddress, tokenSellerAddr); + } else { + throw new InternalError(`Cannot fetch token seller contract address`); + } + } + + return tokenSellerAddr; + } + + + // ---------------------=========< Direct Deposits >=========--------------------- + // | Sending DD and fetching info | + // ------------------------------------------------------------------------------- + + public async getDirectDepositQueueContract(poolAddress: string): Promise { + let ddContractAddr = this.ddContractAddresses.get(poolAddress); + if (!ddContractAddr) { + ddContractAddr = await this.contractCallRetry(this.poolContract(), poolAddress, 'direct_deposit_queue'); + if (ddContractAddr) { + this.ddContractAddresses.set(poolAddress, ddContractAddr); + } else { + throw new InternalError(`Cannot fetch DD contract address`); + } + } + + return ddContractAddr; + } + + public async getDirectDepositFee(ddQueueAddress: string): Promise { + const fee = await this.contractCallRetry(this.directDepositContract(), ddQueueAddress, 'directDepositFee'); + return BigInt(fee); + } + + public async createDirectDepositTx( + ddQueueAddress: string, + amount: bigint, + zkAddress: string, + fallbackAddress: string, + ): Promise { + const zkAddrBytes = `0x${Buffer.from(bs58.decode(zkAddress.substring(zkAddress.indexOf(':') + 1))).toString('hex')}`; + const encodedTx = await this.directDepositContract().methods["directDeposit(address,uint256,bytes)"](fallbackAddress, amount, zkAddrBytes).encodeABI(); + + return { + to: ddQueueAddress, + amount: 0n, + data: encodedTx, + }; + } + + public async createNativeDirectDepositTx( + ddQueueAddress: string, + nativeAmount: bigint, + zkAddress: string, + fallbackAddress: string, + ): Promise { + const zkAddrBytes = `0x${Buffer.from(bs58.decode(zkAddress.substring(zkAddress.indexOf(':') + 1))).toString('hex')}`; + const encodedTx = await this.directDepositContract().methods["directNativeDeposit(address,bytes)"](fallbackAddress, zkAddrBytes).encodeABI(); + + return { + to: ddQueueAddress, + amount: nativeAmount, + data: encodedTx, + }; + } + + public async getDirectDeposit(ddQueueAddress: string, idx: number, state: ZkBobState): Promise { + const ddInfo = await this.contractCallRetry(this.directDepositContract(), ddQueueAddress, 'getDirectDeposit', [idx]); + const ddStatusCode = Number(ddInfo.status); + if (ddStatusCode != 0) { + return { + id: BigInt(idx), // DD queue unique identifier + state: (ddStatusCode - 1) as DirectDepositState, + amount: BigInt(ddInfo.deposit), // in pool resolution + destination: await state.assembleAddress(ddInfo.diversifier, ddInfo.pk), // zk-addresss + fee: BigInt(ddInfo.fee), // relayer fee + fallback: ddInfo.fallbackReceiver, // 0x-address to refund DD + sender: '', // 0x-address of sender [to the queue] + queueTimestamp: Number(ddInfo.timestamp), // when it was created + queueTxHash: '', // transaction hash to the queue + //timestamp?: number; // when it was sent to the pool + //txHash?: string; // transaction hash to the pool + //payment?: DDPaymentInfo; + }; + } + + return undefined; + } + + public async getDirectDepositNonce(ddQueueAddress: string): Promise { + const res = await this.contractCallRetry(this.directDepositContract(), ddQueueAddress, 'directDepositNonce'); + + return Number(res); + } + + + // ------------------------=========< Signatures >=========----------------------- + // | Signing and recovery [ECDSA] | + // ------------------------------------------------------------------------------- + + public async sign(data: any, privKey: string): Promise { + let keyBuf = Buffer.from(hexToBuf(privKey)); + const signature = personalSign({ + privateKey: keyBuf, + data: data, + }); // canonical signature (65 bytes long, LSByte: 1b or 1c) + keyBuf.fill(0); + + // EVM deployments use compact signatures + return this.toCompactSignature(signature); + } + + public async signTypedData(typedData: any, privKey: string): Promise { + let keyBuf = Buffer.from(hexToBuf(privKey)); + const signature = signTypedData({ + privateKey: keyBuf, + data: typedData, + version: SignTypedDataVersion.V4 + }); // canonical signature (65 bytes long, LSByte: 1b or 1c) + keyBuf.fill(0); + + // EVM deployments use compact signatures + return this.toCompactSignature(signature); + } + + public async recoverSigner(data: any, signature: string): Promise { + const address = await recoverPersonalSignature({ + data: data, + signature: this.toCanonicalSignature(signature) + }); + + return addHexPrefix(address); + } + + public async recoverSignerTypedData(typedData: any, signature: string): Promise { + const address = await recoverTypedSignature({ + data: typedData, + signature: this.toCanonicalSignature(signature), + version: SignTypedDataVersion.V4 + }); + + return addHexPrefix(address); + } + + public toCompactSignature(signature: string): string { + signature = truncateHexPrefix(signature); + + if (signature.length > 128) { + // it seems it's an extended signature, let's compact it! + const v = signature.slice(128, 130); + if (v == "1c") { + return `0x${signature.slice(0, 64)}${(parseInt(signature[64], 16) | 8).toString(16)}${signature.slice(65, 128)}`; + } else if (v != "1b") { + throw new InternalError("Invalid signature: v should be 27 or 28"); + } + + return '0x' + signature.slice(0, 128); + } else if (signature.length < 128) { + throw new InternalError("invalid signature: it should consist at least 64 bytes (128 chars)"); + } + + // it seems the signature already compact + return '0x' + signature; + } + + public toCanonicalSignature(signature: string): string { + let sig = truncateHexPrefix(signature); + + if ((sig.length % 2) == 0) { + if (sig.length == 128) { + return `0x` + sig; + } else if (sig.length == 130) { + let v = "1b"; + if (parseInt(sig[64], 16) > 7) { + v = "1c"; + sig = sig.slice(0, 64) + `${(parseInt(sig[64], 16) & 7).toString(16)}` + sig.slice(65); + } + return `0x` + sig + v; + } else { + throw new InternalError(`Incorrect signature length (${sig.length}), expected 64 or 65 bytes (128 or 130 chars)`); + } + } else { + throw new InternalError(`Incorrect signature length (${sig.length}), expected an even number`); + } + } + + + // ----------------------=========< Miscellaneous >=========---------------------- + // | Getting tx revert reason, chain ID, signature format, etc... | + // ------------------------------------------------------------------------------- + + public validateAddress(address: string): boolean { + // Validate a given address: + // - it should starts with '0x' prefix + // - it should be 20-byte length + // - if it contains checksum (EIP-55) it should be valid + // - zero addresses are prohibited to withdraw + return isHexPrefixed(address) && isAddress(address) && address.toLowerCase() != ZERO_ADDRESS; + } + + public addressFromPrivateKey(privKeyBytes: Uint8Array): string { + const buf = Buffer.from(privKeyBytes); + const address = bufferToHex(privateToAddress(buf)); + buf.fill(0); + + return address; + } + + public addressToBytes(address: string): Uint8Array { + return hexToBuf(address, 20); + } + + public bytesToAddress(bytes: Uint8Array): string { + return addHexPrefix(bufToHex(bytes)); + } + + public isEqualAddresses(addr1: string, addr2: string): boolean { + return truncateHexPrefix(addr1).toLocaleLowerCase() == truncateHexPrefix(addr2).toLocaleLowerCase(); + } + + public txHashFromHexString(hexString: string): string { + return addHexPrefix(hexString); + } + + private async getTransaction(txHash: string): Promise { + return this.commonRpcRetry(() => { + return this.activeWeb3().eth.getTransaction(txHash); + }, 'Cannot get tx', RETRY_COUNT); + } + + private async getTransactionReceipt(txHash: string): Promise { + return this.commonRpcRetry(() => { + return this.activeWeb3().eth.getTransactionReceipt(txHash); + }, 'Cannot get tx receipt', RETRY_COUNT); + } + + public async getTxRevertReason(txHash: string): Promise { + const txReceipt = await this.getTransactionReceipt(txHash); + if (txReceipt && txReceipt.status !== undefined) { + if (txReceipt.status == false) { + const txData = await this.getTransaction(txHash); + let reason = 'unknown reason'; + try { + await this.activeWeb3().eth.call(txData as TransactionConfig, txData.blockNumber as number); + } catch(err) { + reason = err.message; + } + console.log(`getTxRevertReason: revert reason for ${txHash}: ${reason}`) + + return reason; + } else { + console.warn(`getTxRevertReason: ${txHash} was not reverted`); + } + } else { + console.warn(`getTxRevertReason: ${txHash} was not mined yet`); + } + + return null; + } + + public async getChainId(): Promise { + return this.commonRpcRetry(async () => { + return this.activeWeb3().eth.getChainId(); + }, 'Cannot get chain ID', RETRY_COUNT); + } + + public async getNativeBalance(address: string): Promise { + return this.commonRpcRetry(async () => { + return BigInt(await this.activeWeb3().eth.getBalance(address)); + }, 'Cannot get native balance', RETRY_COUNT); + } + + public async getNativeNonce(address: string): Promise { + return this.commonRpcRetry(async () => { + return Number(await this.activeWeb3().eth.getTransactionCount(address)) + }, 'Cannot get native nonce', RETRY_COUNT); + } + + public async getTxDetails(index: number, poolTxHash: string, state: ZkBobState): Promise { + try { + const transactionObj = await this.getTransaction(poolTxHash); + if (transactionObj && transactionObj.blockNumber && transactionObj.input) { + const txData = truncateHexPrefix(transactionObj.input); + const block = await this.activeWeb3().eth.getBlock(transactionObj.blockNumber).catch(() => null); + if (block && block.timestamp) { + let timestamp: number = 0; + if (typeof block.timestamp === "number" ) { + timestamp = block.timestamp; + } else if (typeof block.timestamp === "string" ) { + timestamp = Number(block.timestamp); + } + + let isMined = false; + const txReceipt = await this.getTransactionReceipt(poolTxHash); + if (txReceipt && txReceipt.status !== undefined && txReceipt.status == true) { + isMined = true; + } + + const txSelector = txData.slice(0, 8).toLowerCase(); + if (txSelector == PoolSelector.Transact) { + const tx = decodeEvmCalldata(txData); + const feeAmount = BigInt('0x' + tx.memo.slice(0, 16)); + + const txInfo = new RegularTxDetails(); + txInfo.txType = tx.txType; + txInfo.tokenAmount = tx.tokenAmount; + txInfo.feeAmount = feeAmount; + txInfo.txHash = poolTxHash; + txInfo.isMined = isMined + txInfo.timestamp = timestamp; + txInfo.nullifier = '0x' + toTwosComplementHex(BigInt((tx.nullifier)), 32); + txInfo.commitment = '0x' + toTwosComplementHex(BigInt((tx.outCommit)), 32); + txInfo.ciphertext = getCiphertext(tx); + + // additional tx-specific fields for deposits and withdrawals + if (tx.txType == RegularTxType.Deposit) { + if (tx.extra && tx.extra.length >= 128) { + const fullSig = this.toCanonicalSignature(tx.extra.slice(0, 128)); + txInfo.depositAddr = await this.recoverSigner(txInfo.nullifier, fullSig); + } else { + // incorrect signature + throw new InternalError(`No signature for approve deposit`); + } + } else if (tx.txType == RegularTxType.BridgeDeposit) { + txInfo.depositAddr = '0x' + tx.memo.slice(32, 72); + } else if (tx.txType == RegularTxType.Withdraw) { + txInfo.withdrawAddr = '0x' + tx.memo.slice(32, 72); + } + + return { + poolTxType: PoolTxType.Regular, + details: txInfo, + index, + }; + } else if (txSelector == PoolSelector.AppendDirectDeposit) { + const txInfo = new DDBatchTxDetails(); + txInfo.txHash = poolTxHash; + txInfo.isMined = isMined; + txInfo.timestamp = timestamp; + txInfo.deposits = []; + + // get appendDirectDeposits input ABI + const ddAbi = poolContractABI.find((val) => val.name == 'appendDirectDeposits'); + if (ddAbi && ddAbi.inputs) { + const decoded = this.activeWeb3().eth.abi.decodeParameters(ddAbi.inputs, txData.slice(8)); + if (decoded._indices && Array.isArray(decoded._indices) && transactionObj.to) { + const ddQueue = await this.getDirectDepositQueueContract(transactionObj.to) + const directDeposits = (await Promise.all(decoded._indices.map(async (ddIdx) => { + const dd = await this.getDirectDeposit(ddQueue, Number(ddIdx), state); + const isOwn = dd ? await state.isOwnAddress(dd.destination) : false; + return {dd, isOwn} + }))) + .filter((val) => val.dd && val.isOwn ) // exclude not own DDs + .map((val) => { + const aDD = val.dd as DirectDeposit; + aDD.txHash = poolTxHash; + aDD.timestamp = timestamp; + return aDD; + }); + txInfo.deposits = directDeposits; + } else { + console.error(`Could not decode appendDirectDeposits calldata`); + } + } else { + console.error(`Could not find appendDirectDeposits method input ABI`); + } + + return { + poolTxType: PoolTxType.DirectDepositBatch, + details: txInfo, + index, + }; + } else { + throw new InternalError(`[EvmNetwork]: Cannot decode calldata for tx ${poolTxHash} (incorrect selector ${txSelector})`); + } + } else { + console.warn(`[EvmNetwork]: cannot get block (${transactionObj.blockNumber}) to retrieve timestamp`); + } + } else { + console.warn(`[EvmNetwork]: cannot get native tx ${poolTxHash} (tx still not mined?)`); + } + } catch (err) { + console.warn(`[EvmNetwork]: cannot get native tx ${poolTxHash} (${err.message})`); + } + + return null; + } + + public calldataBaseLength(): number { + return CALLDATA_BASE_LENGTH; + } + + public estimateCalldataLength(txType: RegularTxType, notesCnt: number, extraDataLen: number = 0): number { + return estimateEvmCalldataLength(txType, notesCnt, extraDataLen) + } + + // ----------------------=========< Syncing >=========---------------------- + // | Getting block number, waiting for a block... | + // ------------------------------------------------------------------------- + + public async getBlockNumber(): Promise { + return this.commonRpcRetry(() => { + return this.activeWeb3().eth.getBlockNumber(); + }, '[EvmNetwork]: Cannot get block number', RETRY_COUNT); + } + + public async getBlockNumberFrom(rpcurl: string): Promise { + const tmpWeb3 = new Web3(rpcurl); + return this.commonRpcRetry(() => { + return tmpWeb3.eth.getBlockNumber(); + }, `[EvmNetwork]: Cannot get block number from ${rpcurl}`, 2); + } + + public async waitForBlock(blockNumber: number, timeoutSec?: number): Promise { + const startTime = Date.now(); + const SWITCH_RPC_DELAY = 30; // force switch RPC node after that time interval (in seconds) + let curBlock: number; + let waitMsgLogged = false; + do { + curBlock = await this.getBlockNumber().catch(() => 0); + + if (curBlock < blockNumber) { + if (!waitMsgLogged) { + console.warn(`[EvmNetwork]: waiting for a block ${blockNumber} (current ${curBlock})...`); + waitMsgLogged = true; + } + + if (Date.now() > startTime + SWITCH_RPC_DELAY * 1000) { + if (await this.switchToTheBestRPC()) { + console.warn(`[EvmNetwork]: RPC was auto switched because the block ${blockNumber} was not reached yet`); + } + } else { + await new Promise(resolve => setTimeout(resolve, 1000)); + } + } + + if (Date.now() > startTime + (timeoutSec ?? Number.MAX_SAFE_INTEGER) * 1000) { + console.warn(`[EvmNetwork]: timeout reached while waiting for a block ${blockNumber} (current block ${curBlock})`) + return false; + } + } while(curBlock < blockNumber); + + if (waitMsgLogged) { + console.log(`[EvmNetwork]: internal provider was synced with block ${blockNumber}`); + } + + return true; + } +} \ No newline at end of file diff --git a/src/networks/index.ts b/src/networks/index.ts new file mode 100644 index 00000000..a06c63c2 --- /dev/null +++ b/src/networks/index.ts @@ -0,0 +1,107 @@ +import { ZkBobState } from "../state"; +import { EvmNetwork, InternalError, TxType } from ".."; +import { DirectDeposit, PoolTxDetails } from "../tx"; +import { TronNetwork } from "./tron"; + +export interface PreparedTransaction { + to: string; + amount: bigint; + data: string; + selector?: string; +} + + +export interface NetworkBackend { + // Backend Maintenance + isEnabled(): boolean; + setEnabled(enabled: boolean); + + // Token + getTokenName(tokenAddress: string): Promise; + getTokenDecimals(tokenAddress: string): Promise; + getDomainSeparator(tokenAddress: string): Promise; + getTokenNonce(tokenAddress: string, address: string): Promise; + getTokenBalance(tokenAddress: string, address: string): Promise; + allowance(tokenAddress: string, owner: string, spender: string): Promise; + permit2NonceBitmap(permit2Address: string, owner: string, wordPos: bigint): Promise; + erc3009AuthState(tokenAddress: string, authorizer: string, nonce: bigint): Promise; + approveTokens(tokenAddress: string, privateKey: string, holder: string, spender: string, amount: bigint, gasFactor?: number): Promise + isSupportNonce(tokenAddres: string): Promise; + + // Pool Interaction + getPoolId(poolAddress: string): Promise; + getDenominator(poolAddress: string): Promise; + poolState(poolAddress: string, index?: bigint): Promise<{index: bigint, root: bigint}>; + poolLimits(poolAddress: string, address: string | undefined): Promise; + getTokenSellerContract(poolAddress: string): Promise; + + // Direct Deposits + getDirectDepositQueueContract(poolAddress: string): Promise; + getDirectDepositFee(ddQueueAddress: string): Promise; + getDirectDeposit(ddQueueAddress: string, idx: number, state: ZkBobState): Promise; + getDirectDepositNonce(ddQueueAddress: string): Promise; + createDirectDepositTx(ddQueueAddress: string, amount: bigint, zkAddress: string, fallbackAddress: string): Promise; + createNativeDirectDepositTx(ddQueueAddress: string, nativeAmount: bigint, zkAddress: string, fallbackAddress: string): Promise; + + // Signatures + sign(data: any, privKey: string): Promise; + signTypedData(typedData: any, privKey: string): Promise; + recoverSigner(data: any, signature: string): Promise; + recoverSignerTypedData(typedData: any, signature: string): Promise; + toCompactSignature(signature: string): string; + toCanonicalSignature(signature: string): string; + + // Miscellaneous + validateAddress(address: string): boolean; + addressFromPrivateKey(privKeyBytes: Uint8Array): string; + addressToBytes(address: string): Uint8Array; + bytesToAddress(bytes: Uint8Array): string; + isEqualAddresses(addr1: string, addr2: string): boolean; + txHashFromHexString(hexString: string): string; + getTxRevertReason(txHash: string): Promise + getChainId(): Promise; + getNativeBalance(address: string): Promise; + getNativeNonce(address: string): Promise; + getTxDetails(index: number, poolTxHash: string, state: ZkBobState): Promise; + calldataBaseLength(): number; + estimateCalldataLength(txType: TxType, notesCnt: number, extraDataLen: number): number; + + // syncing with external providers + getBlockNumber(): Promise; + waitForBlock(blockNumber: number, timeoutSec?: number): Promise; +} + + +enum SupportedNetwork { + EvmNetwork, + TronNetwork, +} + +function networkType(chainId: number): SupportedNetwork | undefined { + if ([0x2b6653dc, 0x94a9059e].includes(chainId)) { + return SupportedNetwork.TronNetwork; + } else if ([1, 137, 10, 11155111, 5, 420, 1337, 31337].includes(chainId)) { + return SupportedNetwork.EvmNetwork; + } + + return undefined; +} + + +export class NetworkBackendFactory { + static createBackend(chainId: number, rpcUrls: string[], enabled: boolean = true): NetworkBackend { + const type = networkType(chainId); + switch (type) { + case SupportedNetwork.TronNetwork: + return new TronNetwork(rpcUrls, enabled); + + case undefined: + console.warn(`[NetworkBackendFactory] Unknown chain id provided (${chainId}). Assume it's an EVM network...`) + case SupportedNetwork.EvmNetwork: + return new EvmNetwork(rpcUrls, enabled); + + default: + throw new Error(`Unknown network type ${type}`); + } + } +} \ No newline at end of file diff --git a/src/networks/network.ts b/src/networks/network.ts deleted file mode 100644 index c6cb952f..00000000 --- a/src/networks/network.ts +++ /dev/null @@ -1,33 +0,0 @@ -export interface PreparedTransaction { - to: string; - amount: bigint; - data: string; -} - -export interface NetworkBackend { - isEnabled(): boolean; - setEnabled(enabled: boolean); - getChainId(): Promise; - getDomainSeparator(tokenAddress: string): Promise; - getTokenName(tokenAddress: string): Promise; - getTokenDecimals(tokenAddress: string): Promise; - getTokenNonce(tokenAddress: string, address: string): Promise; - getTokenBalance(tokenAddress: string, address: string): Promise; - allowance(tokenAddress: string, owner: string, spender: string): Promise; - permit2NonceBitmap(permit2Address: string, owner: string, wordPos: bigint): Promise; - erc3009AuthState(tokenAddress: string, authorizer: string, nonce: bigint): Promise; - getDenominator(poolAddress: string): Promise; - getPoolId(poolAddress: string): Promise; - poolLimits(poolAddress: string, address: string | undefined): Promise; - getTokenSellerContract(poolAddress: string): Promise; - getDirectDepositQueueContract(poolAddress: string): Promise; - getDirectDepositFee(ddQueueAddress: string): Promise; - createDirectDepositTx(ddQueueAddress: string, amount: bigint, zkAddress: string, fallbackAddress: string): Promise; - createNativeDirectDepositTx(ddQueueAddress: string, nativeAmount: bigint, zkAddress: string, fallbackAddress: string): Promise; - poolState(poolAddress: string, index?: bigint): Promise<{index: bigint, root: bigint}>; - getTxRevertReason(txHash: string): Promise - isSignatureCompact(): boolean; - defaultNetworkName(): string; - getRpcUrl(): string; - -} \ No newline at end of file diff --git a/src/networks/rpcman.ts b/src/networks/rpcman.ts new file mode 100644 index 00000000..565844a4 --- /dev/null +++ b/src/networks/rpcman.ts @@ -0,0 +1,127 @@ +import { InternalError } from "../errors"; +import promiseRetry from 'promise-retry'; + +const RPC_ISSUES_THRESHOLD = 20; // number of errors needed to switch RPC + +export interface RpcManagerDelegate { + setEnabled(enabled: boolean); + getBlockNumber(): Promise; + getBlockNumberFrom(rpcurl: string): Promise; +} + +export class MultiRpcManager { + private rpcUrls: string[]; + private curRpcIdx: number; + private curRpcIssues = 0; + private badRpcs: number[] = []; // RPC indexes which are considered to be unstable or unavailable + public delegate?: RpcManagerDelegate; + + constructor(rpcUrls: string[]) { + if (rpcUrls.length == 0) { + throw new InternalError(`MultiRpcManager: Unable to initialize without RPC URL`); + } + + this.rpcUrls = rpcUrls; + this.curRpcIdx = 0; + } + + // Performs RPC interaction within several attempts. The errors will registered automatically + protected commonRpcRetry(closure: () => any, errorPattern: string, retriesCnt: number): Promise { + return promiseRetry( + async (retry, attempt) => { + try { + return await closure(); + } catch (e) { + console.error(`${errorPattern ?? 'Error occured'} [attempt #${attempt}]: ${e.message}`); + this.registerRpcIssue(); + retry(e) + } + }, + { + retries: retriesCnt, + minTimeout: 500, + maxTimeout: 500, + } + ); + } + + // ----------------------=========< RPC switching >=========---------------------- + // | Getting current RPC, registering issues, switching between RPCs | + // ------------------------------------------------------------------------------- + + public curRpcUrl(): string { + if (this.curRpcIdx < 0) { + return this.rpcUrls[0]; + } else if (this.curRpcIdx >= this.rpcUrls.length) { + return this.rpcUrls[this.rpcUrls.length - 1]; + } else { + return this.rpcUrls[this.curRpcIdx]; + } + } + + // Call this routine to increase issue counter + // The RPC will be swiching automatically on threshold + protected registerRpcIssue() { + if (++this.curRpcIssues >= RPC_ISSUES_THRESHOLD) { + if (this.switchRPC(undefined, true)) { + this.curRpcIssues = 0; + } + } + } + + protected switchRPC(index?: number, markCurrentAsBad: boolean = true): boolean { + if (markCurrentAsBad && !this.badRpcs.includes(this.curRpcIdx)) { + this.badRpcs.push(this.curRpcIdx); + console.log(`[MultiRpcManager]: RPC ${this.curRpcUrl()} marked as bad (${this.curRpcIssues} issues registered)`); + } + + + let newRpcIndex = index ?? this.curRpcIdx; + if (index === undefined && this.rpcUrls.length > 1) { + let passesCnt = 0; + do { + newRpcIndex = (newRpcIndex + 1) % this.rpcUrls.length; + if (!this.badRpcs.includes(newRpcIndex) || passesCnt > 0) { + break; + } + + if (newRpcIndex == this.curRpcIdx) { + passesCnt++; + } + } while(passesCnt < 2) + } + + if (newRpcIndex != this.curRpcIdx) { + this.delegate?.setEnabled(false); + this.curRpcIdx = newRpcIndex; + this.delegate?.setEnabled(true); + this.curRpcIssues = 0; + console.log(`[MultiRpcManager]: RPC was switched to ${this.curRpcUrl()}`); + + return true; + } + + return false; + } + + protected async switchToTheBestRPC(): Promise { + if (this.rpcUrls.length - this.badRpcs.length > 1) { + const blockNums = await Promise.all(this.rpcUrls.map(async (rpcurl, index) => { + if (this.badRpcs.includes(index) == false) { + const latestBlock = await this.delegate?.getBlockNumberFrom(rpcurl).catch(() => 0); + return {index, latestBlock: latestBlock ?? 0}; + } + + return {index, latestBlock: 0}; + })); + + const curRpc = blockNums.find((val) => val.index == this.curRpcIdx); + const bestRpc = blockNums.reduce((prev, cur) => (prev && prev.latestBlock > cur.latestBlock) ? prev : cur); + if (bestRpc.index != curRpc?.index && bestRpc.latestBlock > (curRpc?.latestBlock ?? 0)) { + return this.switchRPC(bestRpc.index, false); + } + } + + return false; + } +} \ No newline at end of file diff --git a/src/networks/tron/abi/usdt-abi.json b/src/networks/tron/abi/usdt-abi.json new file mode 100644 index 00000000..b9927ee2 --- /dev/null +++ b/src/networks/tron/abi/usdt-abi.json @@ -0,0 +1,252 @@ +[ + { + "stateMutability": "Nonpayable", + "type": "Constructor" + }, + { + "inputs": + [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "Event" + }, + { + "inputs": + [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "Event" + }, + { + "outputs": + [ + { + "type": "uint256" + } + ], + "constant": true, + "inputs": + [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "bool" + } + ], + "inputs": + [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "stateMutability": "Nonpayable", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "uint256" + } + ], + "constant": true, + "inputs": + [ + { + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "uint8" + } + ], + "constant": true, + "name": "decimals", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "bool" + } + ], + "inputs": + [ + { + "name": "spender", + "type": "address" + }, + { + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "stateMutability": "Nonpayable", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "bool" + } + ], + "inputs": + [ + { + "name": "spender", + "type": "address" + }, + { + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "stateMutability": "Nonpayable", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "string" + } + ], + "constant": true, + "name": "name", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "string" + } + ], + "constant": true, + "name": "symbol", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "uint256" + } + ], + "constant": true, + "name": "totalSupply", + "stateMutability": "View", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "bool" + } + ], + "inputs": + [ + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "stateMutability": "Nonpayable", + "type": "Function" + }, + { + "outputs": + [ + { + "type": "bool" + } + ], + "inputs": + [ + { + "name": "sender", + "type": "address" + }, + { + "name": "recipient", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "stateMutability": "Nonpayable", + "type": "Function" + } +] \ No newline at end of file diff --git a/src/networks/tron/index.ts b/src/networks/tron/index.ts new file mode 100644 index 00000000..a8ce25cc --- /dev/null +++ b/src/networks/tron/index.ts @@ -0,0 +1,784 @@ +import { NetworkBackend, PreparedTransaction } from '..'; +import { InternalError, TxType } from '../../index'; +import { DDBatchTxDetails, DirectDeposit, DirectDepositState, PoolTxDetails, PoolTxType, RegularTxDetails, RegularTxType } from '../../tx'; +import tokenAbi from './abi/usdt-abi.json'; +import { ddContractABI as ddAbi, poolContractABI as poolAbi} from '../evm/evm-abi'; +import { bufToHex, hexToBuf, toTwosComplementHex, truncateHexPrefix } from '../../utils'; +import { CALLDATA_BASE_LENGTH, decodeEvmCalldata, estimateEvmCalldataLength, getCiphertext } from '../evm/calldata'; +import { hexToBytes } from 'web3-utils'; +import { PoolSelector } from '../evm'; +import { MultiRpcManager, RpcManagerDelegate } from '../rpcman'; +import { ZkBobState } from '../../state'; + +const TronWeb = require('tronweb') +const bs58 = require('bs58') + +const RETRY_COUNT = 5; +const DEFAULT_ENERGY_FEE = 420; +const ZERO_ADDRESS = 'T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb'; + +export class TronNetwork extends MultiRpcManager implements NetworkBackend, RpcManagerDelegate { + protected tronWeb; + protected address: string; + // We need to cache a contract object for the each token address separately + private tokenContracts = new Map(); // tokenAddress -> contact object + private poolContracts = new Map(); // tokenAddress -> contact object + private ddContracts = new Map(); // tokenAddress -> contact object + + // blockchain long-lived cached parameters + private chainId: number | undefined = undefined; + private energyFee: number | undefined = undefined; + private tokenSymbols = new Map(); // tokenAddress -> token_symbol + private tokenDecimals = new Map(); // tokenAddress -> decimals + private tokenSellerAddresses = new Map(); // poolContractAddress -> tokenSellerContractAddress + private ddContractAddresses = new Map(); // poolAddress -> ddQueueAddress + private supportsNonces = new Map(); // tokenAddress -> isSupportsNonceMethod + + + // ------------------------=========< Lifecycle >=========------------------------ + // | Init, enabling and disabling backend | + // ------------------------------------------------------------------------------- + constructor(rpcUrls: string[], enabled: boolean = true) { + super(rpcUrls.map((aUrl) => aUrl.endsWith('/') ? aUrl : aUrl += '/' )); + super.delegate = this; + + if (enabled) { + this.setEnabled(true); + } + } + + private activeTronweb(): any { + if (!this.tronWeb) { + throw new InternalError(`TronNetwork: Cannot interact in the disabled mode`); + } + + return this.tronWeb; + } + + public isEnabled(): boolean { + return this.tronWeb !== undefined; + } + + public setEnabled(enabled: boolean) { + if (enabled) { + if (!this.isEnabled()) { + this.tronWeb = new TronWeb({ + fullHost: this.curRpcUrl(), + privateKey: '01', + }); + } + } else { + this.tronWeb = undefined; + this.tokenContracts.clear(); + this.poolContracts.clear(); + this.ddContracts.clear(); + } + } + + protected async getTokenContract(tokenAddress: string): Promise { + let contract = this.tokenContracts.get(tokenAddress); + if (!contract) { + contract = await this.activeTronweb().contract(tokenAbi, tokenAddress); + if (contract) { + this.tokenContracts.set(tokenAddress, contract); + } else { + throw new Error(`Cannot initialize a contact object for the token ${tokenAddress}`); + } + } + + return contract; + } + + protected async getPoolContract(poolAddress: string): Promise { + let contract = this.poolContracts.get(poolAddress); + if (!contract) { + contract = await this.activeTronweb().contract(poolAbi, poolAddress); + if (contract) { + this.poolContracts.set(poolAddress, contract); + } else { + throw new Error(`Cannot initialize a contact object for the pool ${poolAddress}`); + } + } + + return contract; + } + + protected async getDdContract(ddQueueAddress: string): Promise { + let contract = this.ddContracts.get(ddQueueAddress); + if (!contract) { + contract = await this.activeTronweb().contract(ddAbi, ddQueueAddress); + if (contract) { + this.ddContracts.set(ddQueueAddress, contract); + } else { + throw new Error(`Cannot initialize a contact object for the DD queue ${ddQueueAddress}`); + } + } + + return contract; + } + + private contractCallRetry(contract: any, method: string, args: any[] = []): Promise { + return this.commonRpcRetry(async () => { + return await contract[method](...args).call() + }, + `[TronNetwork] Contract call (${method}) error`, + RETRY_COUNT, + ); + } + + // -----------------=========< Token-Related Routiness >=========----------------- + // | Getting balance, allowance, nonce etc | + // ------------------------------------------------------------------------------- + + public async getTokenName(tokenAddress: string): Promise { + let res = this.tokenSymbols.get(tokenAddress); + if (!res) { + try { + const token = await this.getTokenContract(tokenAddress); + res = await this.contractCallRetry(token, 'symbol'); + if (typeof res === 'string') { + this.tokenSymbols.set(tokenAddress, res); + } else { + throw new Error(`returned token symbol has ${typeof res} type (string expected)`); + } + } catch (err) { + console.warn(`Cannot fetch symbol for the token ${tokenAddress}. Reason: ${err.message}`); + } + } + + return res ?? ''; + } + + public async getTokenDecimals(tokenAddress: string): Promise { + let res = this.tokenDecimals.get(tokenAddress); + if (!res) { + const token = await this.getTokenContract(tokenAddress); + res = Number(await this.contractCallRetry(token, 'decimals')); + this.tokenDecimals.set(tokenAddress, res); + } + + return res; + } + + public async getDomainSeparator(tokenAddress: string): Promise { + throw new InternalError(`Domain separator is currently unsupported for TRC20 tokens`) + } + + public async getTokenNonce(tokenAddress: string, address: string): Promise { + throw new InternalError(`Token nonce is currently unsupported for TRC20 tokens`) + } + + public async getTokenBalance(tokenAddress: string, address: string): Promise { + const token = await this.getTokenContract(tokenAddress); + let result = await this.contractCallRetry(token, 'balanceOf', [address]); + + return BigInt(result); + } + + public async allowance(tokenAddress: string, owner: string, spender: string): Promise { + const token = await this.getTokenContract(tokenAddress); + let result = await this.contractCallRetry(token, 'allowance', [owner, spender]); + + return BigInt(result); + } + + public async permit2NonceBitmap(permit2Address: string, owner: string, wordPos: bigint): Promise { + throw new InternalError(`Nonce bitmaps is currently unsupported for TRC20 tokens`) + } + + public async erc3009AuthState(tokenAddress: string, authorizer: string, nonce: bigint): Promise { + throw new InternalError(`Authorisation state is currently unsupported for TRC20 tokens`) + } + + public async approveTokens( + tokenAddress: string, + privateKey: string, + _holder: string, + spender: string, + amount: bigint, + _gasFactor?: number + ): Promise { + const selector = 'approve(address,uint256)'; + const parameters = [{type: 'address', value: spender}, {type: 'uint256', value: amount}] + + return this.verifyAndSendTx(tokenAddress, selector, parameters, privateKey) + } + + public async isSupportNonce(tokenAddress: string): Promise { + let isSupport = this.supportsNonces.get(tokenAddress); + if (isSupport === undefined) { + const contract = await this.commonRpcRetry(() => { + return this.activeTronweb().trx.getContract(tokenAddress); + }, 'Unable to retrieve smart contract object', RETRY_COUNT); + const methods = contract.abi.entrys; + if (Array.isArray(methods)) { + isSupport = methods.find((val) => val.name == 'nonces') !== undefined; + this.supportsNonces.set(tokenAddress, isSupport); + } else { + isSupport = false; + } + } + + return isSupport; + } + + + + // ---------------------=========< Pool Interaction >=========-------------------- + // | Getting common info: pool ID, denominator, limits etc | + // ------------------------------------------------------------------------------- + + public async getPoolId(poolAddress: string): Promise { + const pool = await this.getPoolContract(poolAddress); + let result = await this.contractCallRetry(pool, 'pool_id'); + + return Number(result); + } + + public async getDenominator(poolAddress: string): Promise { + const pool = await this.getPoolContract(poolAddress); + let result = await this.contractCallRetry(pool, 'denominator'); + + return BigInt(result); + } + + public async poolState(poolAddress: string, index?: bigint): Promise<{index: bigint, root: bigint}> { + const pool = await this.getPoolContract(poolAddress); + let idx; + if (index === undefined) { + idx = await this.contractCallRetry(pool, 'pool_index'); + } else { + idx = index.toString(); + } + let root = BigInt(await this.contractCallRetry(pool, 'roots', [idx])); + if (root == 0n) { + // it's seems the RPC node got behind the actual blockchain state + // let's try to find the best one and retry root request + const switched = await this.switchToTheBestRPC(); + if (switched) { + root = BigInt(await this.contractCallRetry(pool, 'roots', [idx])); + } + if (root == 0n) { + console.warn(`[TronNetwork] cannot retrieve root at index ${idx} (is it exist?)`); + } + } + + return {index: BigInt(idx), root}; + } + + public async poolLimits(poolAddress: string, address: string | undefined): Promise { + const pool = await this.getPoolContract(poolAddress); + return await this.contractCallRetry(pool, 'getLimitsFor', [address ?? ZERO_ADDRESS]); + } + + public async getTokenSellerContract(poolAddress: string): Promise { + let tokenSellerAddr = this.tokenSellerAddresses.get(poolAddress); + if (!tokenSellerAddr) { + const pool = await this.getPoolContract(poolAddress); + const rawAddr = await this.contractCallRetry(pool, 'tokenSeller'); + tokenSellerAddr = TronWeb.address.fromHex(rawAddr); + if (tokenSellerAddr) { + this.tokenSellerAddresses.set(poolAddress, tokenSellerAddr); + } else { + throw new InternalError(`Cannot fetch token seller contract address`); + } + } + + return tokenSellerAddr; + } + + + // ---------------------=========< Direct Deposits >=========--------------------- + // | Sending DD and fetching info | + // ------------------------------------------------------------------------------- + + public async getDirectDepositQueueContract(poolAddress: string): Promise { + let ddContractAddr = this.ddContractAddresses.get(poolAddress); + if (!ddContractAddr) { + const pool = await this.getPoolContract(poolAddress); + const rawAddr = await this.contractCallRetry(pool, 'direct_deposit_queue'); + ddContractAddr = TronWeb.address.fromHex(rawAddr); + if (ddContractAddr) { + this.ddContractAddresses.set(poolAddress, ddContractAddr); + } else { + throw new InternalError(`Cannot fetch DD contract address`); + } + } + + return ddContractAddr; + } + + public async getDirectDepositFee(ddQueueAddress: string): Promise { + const dd = await this.getDdContract(ddQueueAddress); + return BigInt(await this.contractCallRetry(dd, 'directDepositFee')); + } + + public async createDirectDepositTx( + ddQueueAddress: string, + amount: bigint, + zkAddress: string, + fallbackAddress: string, + ): Promise { + const zkAddrBytes = `0x${Buffer.from(bs58.decode(zkAddress.substring(zkAddress.indexOf(':') + 1))).toString('hex')}`; + const selector = 'directDeposit(address,uint256,bytes)'; + const parameters = [ + {type: 'address', value: fallbackAddress}, + {type: 'uint256', value: amount}, + {type: 'bytes', value: zkAddrBytes} + ]; + const tx = await this.activeTronweb().transactionBuilder.triggerSmartContract(ddQueueAddress, selector, { feeLimit: 100_000_000 }, parameters); + const contract = tx?.transaction?.raw_data?.contract; + let txData: any | undefined; + if (Array.isArray(contract) && contract.length > 0) { + txData = truncateHexPrefix(contract[0].parameter?.value?.data); + } + + if (typeof txData !== 'string' && txData.length < 8) { + throw new InternalError('Unable to extract DD calldata'); + } + + return { + to: ddQueueAddress, + amount: 0n, + data: txData.slice(8), // skip selector from the calldata + selector, + }; + } + + public async createNativeDirectDepositTx( + ddQueueAddress: string, + nativeAmount: bigint, + zkAddress: string, + fallbackAddress: string, + ): Promise { + throw new InternalError(`Native direct deposits are currently unsupported for Tron deployments`) + } + + public async getDirectDeposit(ddQueueAddress: string, idx: number, state: ZkBobState): Promise { + const dd = await this.getDdContract(ddQueueAddress); + const ddInfo = await this.contractCallRetry(dd, 'getDirectDeposit', [idx]); + const ddStatusCode = Number(ddInfo.status); + if (ddStatusCode != 0) { + return { + id: BigInt(idx), // DD queue unique identifier + state: (ddStatusCode - 1) as DirectDepositState, + amount: BigInt(ddInfo.deposit), // in pool resolution + destination: await state.assembleAddress(ddInfo.diversifier, ddInfo.pk), // zk-addresss + fee: BigInt(ddInfo.fee), // relayer fee + fallback: ddInfo.fallbackReceiver, // 0x-address to refund DD + sender: '', // 0x-address of sender [to the queue] + queueTimestamp: Number(ddInfo.timestamp), // when it was created + queueTxHash: '', // transaction hash to the queue + //timestamp?: number; // when it was sent to the pool + //txHash?: string; // transaction hash to the pool + //payment?: DDPaymentInfo; + }; + } + + return undefined; + } + + public async getDirectDepositNonce(ddQueueAddress: string): Promise { + const dd = await this.getDdContract(ddQueueAddress); + return Number(await this.contractCallRetry(dd, 'directDepositNonce')); + } + + // ------------------------=========< Signatures >=========----------------------- + // | Signing and recovery | + // ------------------------------------------------------------------------------- + + public async sign(data: any, privKey: string): Promise { + if (typeof data === 'string') { + const bytes = hexToBytes(data); + return this.activeTronweb().trx.signMessageV2(bytes, privKey); + } + + throw new Error('Incorrect signing request: data must be a hex string'); + } + + public async signTypedData(typedData: any, privKey: string): Promise { + if (typedData && typedData.domain && typedData.types && typedData.message) { + return this.activeTronweb().trx._signTypedData(typedData.domain, typedData.types, typedData.message, privKey); + } + + throw new Error('Incorrect typed signing request: it must contains at least domain, types and message keys'); + } + + public async recoverSigner(data: any, signature: string): Promise { + if (typeof data === 'string') { + const bytes = hexToBytes(data); + return this.activeTronweb().trx.verifyMessageV2(bytes, this.toCanonicalSignature(signature)); + } + + throw new Error('Cannot recover signature: data must be a hex string'); + } + + public async recoverSignerTypedData(typedData: any, signature: string): Promise { + throw new InternalError('recover typed data is unimplemented for Tron yet') + } + + public toCompactSignature(signature: string): string { + signature = truncateHexPrefix(signature); + + if (signature.length > 128) { + // it seems it's an extended signature, let's compact it! + const v = signature.slice(128, 130); + if (v == "1c") { + return `0x${signature.slice(0, 64)}${(parseInt(signature[64], 16) | 8).toString(16)}${signature.slice(65, 128)}`; + } else if (v != "1b") { + throw new InternalError("Invalid signature: v should be 27 or 28"); + } + + return '0x' + signature.slice(0, 128); + } else if (signature.length < 128) { + throw new InternalError("invalid signature: it should consist at least 64 bytes (128 chars)"); + } + + // it seems the signature already compact + return '0x' + signature; + } + + public toCanonicalSignature(signature: string): string { + let sig = truncateHexPrefix(signature); + + if ((sig.length % 2) == 0) { + if (sig.length == 128) { + return `0x` + sig; + } else if (sig.length == 130) { + let v = "1b"; + if (parseInt(sig[64], 16) > 7) { + v = "1c"; + sig = sig.slice(0, 64) + `${(parseInt(sig[64], 16) & 7).toString(16)}` + sig.slice(65); + } + return `0x` + sig + v; + } else { + throw new InternalError(`Incorrect signature length (${sig.length}), expected 64 or 65 bytes (128 or 130 chars)`); + } + } else { + throw new InternalError(`Incorrect signature length (${sig.length}), expected an even number`); + } + } + + + // ----------------------=========< Miscellaneous >=========---------------------- + // | Getting tx revert reason, chain ID, signature format, etc... | + // ------------------------------------------------------------------------------- + + public validateAddress(address: string): boolean { + return TronWeb.isAddress(address) && address != ZERO_ADDRESS; + } + + public addressFromPrivateKey(privKeyBytes: Uint8Array): string { + return TronWeb.address.fromPrivateKey(bufToHex(privKeyBytes)); + } + + public addressToBytes(address: string): Uint8Array { + const hexAddr = TronWeb.address.toHex(address); + if (typeof hexAddr !== 'string' || hexAddr.length != 42) { + throw new InternalError(`Incorrect address format`); + } + + return hexToBuf(hexAddr.slice(2), 20); + } + + public bytesToAddress(bytes: Uint8Array): string { + const hexBytes = bufToHex(bytes); + if (hexBytes.length == 42) { + return TronWeb.address.fromHex(hexBytes) + } else if (hexBytes.length == 40) { + return TronWeb.address.fromHex('41' + hexBytes) + } + + throw new InternalError(`Incorrect address buffer`); + } + + public isEqualAddresses(addr1: string, addr2: string): boolean { + return addr1 == addr2;; + } + + public txHashFromHexString(hexString: string): string { + return truncateHexPrefix(hexString); + } + + public async getTxRevertReason(txHash: string): Promise { + return 'UNKNOWN_REASON' + } + + public async getChainId(): Promise { + if (this.chainId === undefined) { + // tronweb cannot fetch chainId + // so we should request it directly from the JSON RPC endpoint + const tryUrls = [`${this.curRpcUrl()}jsonrpc`, this.curRpcUrl()]; + for (let aAttemptUrl of tryUrls) { + try { + const chainId = await this.fetchChainIdFrom(aAttemptUrl); + this.chainId = chainId; + return chainId; + } catch(err) { + console.warn(`Cannot fetch chainId from ${aAttemptUrl}: ${err.message}`); + } + } + + // unable to fetch + throw new InternalError('Unable to get actual chainId'); + } + + return this.chainId; + } + + public async getNativeBalance(address: string): Promise { + return this.commonRpcRetry(async () => { + return BigInt(await this.activeTronweb().trx.getBalance(address)); + }, '[TronNetwork] Cannot get native balance', RETRY_COUNT); + } + + public async getNativeNonce(address: string): Promise { + return 0; + } + + public async getTxDetails(index: number, poolTxHash: string, state: ZkBobState): Promise { + try { + const tronTransaction = await this.commonRpcRetry(async () => { + return this.activeTronweb().trx.getTransaction(poolTxHash); + }, '[TronNetwork] Cannot get transaction', RETRY_COUNT); + //const tronTransactionInfo = await this.activeTronweb().trx.getTransaction(poolTxHash); + const timestamp = tronTransaction?.raw_data?.timestamp + const contract = tronTransaction?.raw_data?.contract; + let txData: any | undefined; + if (Array.isArray(contract) && contract.length > 0) { + txData = truncateHexPrefix(contract[0].parameter?.value?.data); + } + + if (txData && timestamp) { + // TODO: get is tx mined!!! + let isMined = true; + + const txSelector = txData.slice(0, 8).toLowerCase(); + if (txSelector == PoolSelector.Transact) { + const tx = decodeEvmCalldata(txData); + const feeAmount = BigInt('0x' + tx.memo.slice(0, 16)); + + const txInfo = new RegularTxDetails(); + txInfo.txType = tx.txType; + txInfo.tokenAmount = tx.tokenAmount; + txInfo.feeAmount = feeAmount; + txInfo.txHash = poolTxHash; + txInfo.isMined = isMined + txInfo.timestamp = timestamp / 1000; // timestamp should be in seconds + txInfo.nullifier = '0x' + toTwosComplementHex(BigInt((tx.nullifier)), 32); + txInfo.commitment = '0x' + toTwosComplementHex(BigInt((tx.outCommit)), 32); + txInfo.ciphertext = getCiphertext(tx); + + // additional tx-specific fields for deposits and withdrawals + if (tx.txType == RegularTxType.Deposit) { + if (tx.extra && tx.extra.length >= 128) { + const fullSig = this.toCanonicalSignature(tx.extra.slice(0, 128)); + txInfo.depositAddr = await this.recoverSigner(txInfo.nullifier, fullSig); + } else { + // incorrect signature + throw new InternalError(`No signature for approve deposit`); + } + } else if (tx.txType == RegularTxType.BridgeDeposit) { + txInfo.depositAddr = '0x' + tx.memo.slice(32, 72); + } else if (tx.txType == RegularTxType.Withdraw) { + txInfo.withdrawAddr = '0x' + tx.memo.slice(32, 72); + } + + return { + poolTxType: PoolTxType.Regular, + details: txInfo, + index, + }; + } else if (txSelector == PoolSelector.AppendDirectDeposit) { + const txInfo = new DDBatchTxDetails(); + txInfo.txHash = poolTxHash; + txInfo.isMined = isMined; + txInfo.timestamp = timestamp / 1000; + txInfo.deposits = []; + + // TODO: decode input with ABI, request DDs by indexes + + return { + poolTxType: PoolTxType.DirectDepositBatch, + details: txInfo, + index, + }; + } else { + throw new InternalError(`[EvmNetwork]: Cannot decode calldata for tx ${poolTxHash} (incorrect selector ${txSelector})`); + } + } else { + console.warn(`[TronNetwork]: cannot get native tx ${poolTxHash} (tx still not mined?)`); + } + } catch (err) { + console.warn(`[TronNetwork]: cannot get native tx ${poolTxHash} (${err.message})`); + } + + return null; + } + + public calldataBaseLength(): number { + return CALLDATA_BASE_LENGTH; + } + + public estimateCalldataLength(txType: RegularTxType, notesCnt: number, extraDataLen: number = 0): number { + return estimateEvmCalldataLength(txType, notesCnt, extraDataLen) + } + + + // xxxxxxxxxxxxxxxxxxxxXXXXXXXXX< Private routines >XXXXXXXXXxxxxxxxxxxxxxxxxxxxxx + // x Sending tx, working with energy and others x + // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + private async fetchChainIdFrom(url: string): Promise { + const body = {"jsonrpc":"2.0", "method": "eth_chainId", "params": [], "id": 1}; + const response = await fetch(url, { + method: 'POST', + body: JSON.stringify(body), + headers: {'Content-Type': 'application/json; charset=UTF-8'} }); + + if (!response.ok) { + throw new Error(`Cannot fetch from JSON RPC (error ${response.status}): ${response.body ?? 'no description'}`); + } + + const json = await response.json(); + if (json && json.result) { + return Number(json.result); + } + + throw new Error(`Cannot fetch from JSON RPC: incorrect response JSON (${json})`); + } + + private async getEnergyCost(): Promise { + if (this.energyFee === undefined) { + try { + const chainParams = await this.commonRpcRetry(async () => { + return this.activeTronweb().trx.getChainParameters(); + }, '[TronNetwork] Cannot get chain parameters', RETRY_COUNT); + for (let aParam of chainParams) { + if (aParam.key == 'getEnergyFee') { + this.energyFee = Number(aParam.value); + return this.energyFee; + } + } + + console.warn(`Cannot get energy fee: no such key in chain parameters (getEnergyFee). Will using defaul ${DEFAULT_ENERGY_FEE}`); + } catch(err) { + console.warn(`Cannot get energy fee: ${err}`); + } + } + + return this.energyFee ?? DEFAULT_ENERGY_FEE; + + } + + private async getAccountEnergy(address: string): Promise { + try { + const accResources = await this.commonRpcRetry(async () => { + return this.activeTronweb().trx.getAccountResources(address); + }, '[TronNetwork] Cannot get account resources', RETRY_COUNT); + return Number(accResources.EnergyLimit ?? 0) - Number(accResources.EnergyUsed ?? 0); + } catch(err) { + console.warn(`Cannot get account energy: ${err}`); + } + + return 0; + } + + private async verifyAndSendTx( + contractAddress: string, + selector: string, + parameters: Array, + privateKey: string, + feeLimit: number = 100_000_000, + validateBalance: boolean = true, + ): Promise { + // create tx to validate it's correct + const signerAddress = TronWeb.address.fromPrivateKey(privateKey); + let tx = await this.activeTronweb().transactionBuilder.triggerConstantContract(contractAddress, selector, { feeLimit }, parameters, signerAddress) + .catch((err: string) => { + throw new Error(`Tx validation error: ${err}`); + }); + + if (validateBalance) { + // Check is sufficient resources for the fee + const sender = TronWeb.address.fromPrivateKey(truncateHexPrefix(privateKey)); + const energyCost = await this.getEnergyCost();; + const accEnergy = await this.getAccountEnergy(sender); + const accBalance = Number(await this.getNativeBalance(sender)); + const neededForFee = tx.energy_used * energyCost; + // TODO: take into account bandwidth consumption + if ((accBalance + energyCost * accEnergy) < neededForFee) { + throw new Error(`Insufficient balance for fee (available ${accBalance} sun + ${accEnergy} energy, needed at least ${neededForFee})`) + }; + } + + // create actual tx with feeLimit field + // it's a tronweb bug: triggerConstantContract doesn't include feeLimit in the transaction + // so it can be reverted in case of out-of-energy + tx = await this.activeTronweb().transactionBuilder.triggerSmartContract(contractAddress, selector, { feeLimit }, parameters, signerAddress); + // sign and send + const signedTx = await this.activeTronweb().trx.sign(tx.transaction, privateKey); + const result = await this.activeTronweb().trx.sendRawTransaction(signedTx); + + return result.txid; + } + + // ----------------------=========< Syncing >=========---------------------- + // | Getting block number, waiting for a block... | + // ------------------------------------------------------------------------- + + public async getBlockNumber(): Promise { + return this.commonRpcRetry(async () => { + const block = await this.activeTronweb().trx.getCurrentBlock(); + return block.block_header.raw_data.number; + }, '[TronNetwork] Cannot get block number', RETRY_COUNT); + } + + public async getBlockNumberFrom(rpcurl: string): Promise { + const tmpTronweb = new TronWeb({ + fullHost: rpcurl, + privateKey: '01', + }); + return this.commonRpcRetry(async () => { + const block = await tmpTronweb.trx.getCurrentBlock(); + return block.block_header.raw_data.number; + }, `[TronNetwork] Cannot get block number from ${rpcurl}`, 2); + } + + public async waitForBlock(blockNumber: number, timeoutSec?: number): Promise { + const startTime = Date.now(); + const SWITCH_RPC_DELAY = 60; + let curBlock: number; + let waitMsgLogged = false; + do { + curBlock = await this.getBlockNumber().catch(() => 0); + + if (Date.now() > startTime + (timeoutSec ?? Number.MAX_SAFE_INTEGER) * 1000) { + console.warn(`[TronNetwork]: timeout reached while waiting for a block ${blockNumber} (current block ${curBlock})`) + return false; + } + + if (curBlock < blockNumber) { + if (!waitMsgLogged) { + console.warn(`[EvmNetwork]: waiting for a block ${blockNumber} (current ${curBlock})...`); + waitMsgLogged = true; + } + + if (Date.now() > startTime + SWITCH_RPC_DELAY * 1000) { + if (await this.switchToTheBestRPC()) { + console.warn(`[TronNetwork]: RPC was auto switched because the block ${blockNumber} was not reached yet`); + } + } else { + await new Promise(resolve => setTimeout(resolve, 1000)); + } + } + } while(curBlock < blockNumber); + + if (waitMsgLogged) { + console.log(`[EvmNetwork]: internal provider was synced with block ${blockNumber}`); + } + + return true; + } + +} \ No newline at end of file diff --git a/src/services/relayer.ts b/src/services/relayer.ts index 27da3e53..e22f734b 100644 --- a/src/services/relayer.ts +++ b/src/services/relayer.ts @@ -1,4 +1,4 @@ -import { TxType } from "../tx"; +import { RegularTxType } from "../tx"; import { hexToNode } from "../utils"; import { InternalError, ServiceError } from "../errors"; import { IZkBobService, ServiceType, @@ -10,7 +10,7 @@ import { Proof, TreeNode } from 'libzkbob-rs-wasm-web'; const RELAYER_VERSION_REQUEST_THRESHOLD = 3600; // relayer's version expiration (in seconds) export interface TxToRelayer { - txType: TxType; + txType: RegularTxType; memo: string; proof: Proof; depositSignature?: string diff --git a/src/signers/abstract-signer.ts b/src/signers/abstract-signer.ts index 35042afc..8a06a875 100644 --- a/src/signers/abstract-signer.ts +++ b/src/signers/abstract-signer.ts @@ -1,7 +1,5 @@ -import { NetworkBackend } from "../networks/network"; +import { NetworkBackend } from "../networks"; import { InternalError, TxDepositDeadlineExpiredError, TxInsufficientFundsError } from ".."; -import { recoverTypedSignature, signTypedData, SignTypedDataVersion, - personalSign, recoverPersonalSignature } from '@metamask/eth-sig-util' import { addHexPrefix, hexToBuf } from "../utils"; @@ -63,24 +61,15 @@ export abstract class DepositSigner { public async signRequest(privateKey: string, request: SignatureRequest): Promise { if (privateKey) { - let keyBuf = Buffer.from(hexToBuf(privateKey)); let signature; try { switch (request.type) { case SignatureType.TypedDataV4: - // typedSig is canonical signature (65 bytes long, LSByte: 1b or 1c) - signature = signTypedData({ - privateKey: keyBuf, - data: request.data, - version: SignTypedDataVersion.V4 - }); + signature = this.network.signTypedData(request.data, privateKey); break; case SignatureType.PersonalSign: - signature = personalSign({ - privateKey: keyBuf, - data: request.data, - }); + signature = this.network.sign(request.data, privateKey); break; default: @@ -91,9 +80,6 @@ export abstract class DepositSigner { throw new InternalError(`Cannot sign typed data: ${err}`); } - // cleanup intermediate sensitive data - keyBuf.fill(0); - return signature; } else { throw new InternalError(`Cannot sign typed data: no private key provided`); @@ -106,18 +92,11 @@ export abstract class DepositSigner { try { switch (request.type) { case SignatureType.TypedDataV4: - signerAddress = recoverTypedSignature({ - data: request.data, - signature: addHexPrefix(signature), - version: SignTypedDataVersion.V4 - }); - break; + signerAddress = this.network.recoverSignerTypedData(request.data, signature); + break; case SignatureType.PersonalSign: - signerAddress = recoverPersonalSignature({ - data: request.data, - signature: addHexPrefix(signature) - }); + signerAddress = this.network.recoverSigner(request.data, signature); break; default: @@ -128,7 +107,7 @@ export abstract class DepositSigner { throw new InternalError(`Cannot sign typed data: ${err}`); } - return addHexPrefix(signerAddress); + return signerAddress; } } \ No newline at end of file diff --git a/src/signers/signer-factory.ts b/src/signers/signer-factory.ts index 54dff8be..839f6383 100644 --- a/src/signers/signer-factory.ts +++ b/src/signers/signer-factory.ts @@ -1,5 +1,5 @@ import { DepositType, InternalError } from ".."; -import { NetworkBackend } from "../networks/network"; +import { NetworkBackend } from "../networks"; import { DepositSigner } from "./abstract-signer"; import { ApproveSigner } from "./approve-signer"; import { DepositPermitSigner } from "./permit-signer"; diff --git a/src/state.ts b/src/state.ts index 718e6d8c..9ffd8a7b 100644 --- a/src/state.ts +++ b/src/state.ts @@ -5,7 +5,7 @@ import { IDepositData, IDepositPermittableData, ITransferData, IWithdrawData, Note, } from 'libzkbob-rs-wasm-web'; import { HistoryStorage } from './history' -import { bufToHex, isRangesIntersected } from './utils'; +import { bufToHex, forceDecimal, isRangesIntersected } from './utils'; import { hash } from 'tweetnacl'; import { EphemeralPool } from './ephemeral'; import { NetworkType } from './network-type'; @@ -13,7 +13,8 @@ import { ColdStorageConfig } from './coldstorage'; import { InternalError } from './errors'; import { ZkBobRelayer } from './services/relayer'; import { CONSTANTS } from './constants'; -import { NetworkBackend } from './networks/network'; +import { NetworkBackend } from './networks'; +import { ZkBobSubgraph } from './subgraph'; const LOG_STATE_HOTSYNC = false; @@ -82,8 +83,8 @@ interface ColdSyncResult { export class ZkBobState { public stateId: string; // should depends on pool and sk private sk: Uint8Array; - private birthIndex?: number; private network: NetworkBackend; + private birthIndex?: number; public history?: HistoryStorage; // should work synchronically with the state private ephemeralAddrPool?: EphemeralPool; // depends on sk so we placed it here private worker: any; @@ -109,8 +110,8 @@ export class ZkBobState { sk: Uint8Array, birthIndex: number | undefined, network: NetworkBackend, + subgraph: ZkBobSubgraph | undefined, networkName: string, - rpcUrl: string, denominator: bigint, poolId: number, tokenAddress: string, @@ -118,20 +119,18 @@ export class ZkBobState { ): Promise { const zpState = new ZkBobState(); zpState.sk = new Uint8Array(sk); + zpState.network = network; zpState.birthIndex = birthIndex; const userId = bufToHex(hash(zpState.sk)).slice(0, 32); zpState.stateId = `${networkName}.${poolId.toString(16).padStart(6, '0')}.${userId}`; // database name identifier - zpState.network = network; - await worker.createAccount(zpState.stateId, zpState.sk, poolId, networkName); zpState.worker = worker; - zpState.history = await HistoryStorage.init(zpState.stateId, rpcUrl, zpState); - - - zpState.ephemeralAddrPool = await EphemeralPool.init(zpState.sk, tokenAddress, networkName as NetworkType, rpcUrl, denominator); + zpState.history = await HistoryStorage.init(zpState.stateId, network, zpState, subgraph); + + zpState.ephemeralAddrPool = await EphemeralPool.init(zpState.sk, tokenAddress, networkName as NetworkType, network, denominator); return zpState; } @@ -141,12 +140,14 @@ export class ZkBobState { public static async createNaked( sk: Uint8Array, birthIndex: number | undefined, + network: NetworkBackend, networkName: string, poolId: number, worker: any, ): Promise { const zpState = new ZkBobState(); zpState.sk = new Uint8Array(sk); + zpState.network = network; zpState.birthIndex = birthIndex; const userId = bufToHex(hash(zpState.sk)).slice(0, 32); @@ -267,7 +268,7 @@ export class ZkBobState { } public async assembleAddress(d: string, p_d: string): Promise { - return this.worker.assembleAddress(this.stateId, d, p_d); + return this.worker.assembleAddress(this.stateId, forceDecimal(d), forceDecimal(p_d)); } // Converts zk-addresss from the old prefixless format to the new chain-specific one @@ -560,7 +561,7 @@ export class ZkBobState { // 3. Get txHash const txHash = tx.slice(1, 65); - txHashes[memo_idx] = '0x' + txHash; + txHashes[memo_idx] = this.network.txHashFromHexString(txHash); // 4. Get mined flag if (tx.slice(0, 1) === '1') { @@ -583,6 +584,10 @@ export class ZkBobState { maxPendingIndex, txHashes, } + }) + .catch((err) => { + console.log(`🔥[HotSync] cannot get txs batch from index ${fromIndex}: ${err.message}`) + throw new InternalError(`Cannot fetch txs from the relayer: ${err.message}`); }); } diff --git a/src/subgraph/dd-query.graphql b/src/subgraph/dd-query.graphql new file mode 100644 index 00000000..b534bd16 --- /dev/null +++ b/src/subgraph/dd-query.graphql @@ -0,0 +1,43 @@ +query DirectDepositById($id: ID!) { + directDeposit(id: $id) { + id + pending + refunded + completed + zkAddress_pk + zkAddress_diversifier + deposit + fee + fallbackUser + sender + tsInit + tsClosed + txInit + txClosed + payment { + note + sender + token + } + } +} + +query PendingDirectDeposits { + directDeposits(orderBy: bnInit, where: {pending: true}) { + id + pending + zkAddress_pk + zkAddress_diversifier + deposit + fee + fallbackUser + sender + tsInit + txInit + payment { + note + sender + token + } + } +} \ No newline at end of file diff --git a/src/subgraph/index.ts b/src/subgraph/index.ts new file mode 100644 index 00000000..32706597 --- /dev/null +++ b/src/subgraph/index.ts @@ -0,0 +1,230 @@ +import PromiseThrottle from 'promise-throttle'; +import { getBuiltGraphSDK } from "../.graphclient"; +import { hostedServiceDefaultURL } from "./resolvers"; +import { ZkBobState } from "../state"; +import { InternalError } from "../errors"; +import { DDBatchTxDetails, DirectDeposit, DirectDepositState, + PoolTxDetails, PoolTxType, RegularTxDetails, RegularTxType + } from "../tx"; +import { decodeEvmCalldata } from '../networks/evm/calldata'; +import { DepositSignerFactory } from '../signers/signer-factory'; +import { NetworkBackend } from '../networks'; +import { DepositType } from '../config'; +import { DepositData } from '../signers/abstract-signer'; +import { toTwosComplementHex, truncateHexPrefix } from '../utils'; + +const SUBGRAPH_REQUESTS_PER_SECOND = 10; +const SUBGRAPH_MAX_ITEMS_IN_RESPONSE = 100; +const SUBGRAPH_ID_INDEX_DELTA = 0; + + +export class ZkBobSubgraph { + protected subgraph: string; // a name on the Hosted Service or full URL + protected sdk; + throttle: PromiseThrottle; + + constructor(subgraphNameOrUrl: string) { + this.subgraph = subgraphNameOrUrl; + + this.sdk = getBuiltGraphSDK({ + subgraphEndpoint: this.subgraphEndpoint(), + }); + + this.throttle = new PromiseThrottle({ + requestsPerSecond: SUBGRAPH_REQUESTS_PER_SECOND, + promiseImplementation: Promise, + }); + } + + protected subgraphEndpoint(): string | undefined { + if (this.subgraph) { + if (this.subgraph.indexOf('/') == -1) { + return `${hostedServiceDefaultURL}${this.subgraph}`; + } + } + + return this.subgraph; + } + + protected async parseSubraphDD(subraphDD: any, state: ZkBobState): Promise { + let ddState: DirectDepositState; + if (subraphDD.pending) { + ddState = DirectDepositState.Queued; + } else if (subraphDD.refunded) { + ddState = DirectDepositState.Refunded; + } else if (subraphDD.completed) { + ddState = DirectDepositState.Deposited; + } else { + throw new InternalError(`Incorrect state for direct deposit ${subraphDD.id}`); + } + + const d = BigInt(subraphDD.zkAddress_diversifier); + const p_d = BigInt(subraphDD.zkAddress_pk); + const zkAddress = await state.assembleAddress(d.toString(), p_d.toString()); + + const appDD: DirectDeposit = { + id: BigInt(subraphDD.id), + state: ddState, + amount: BigInt(subraphDD.deposit), + destination: zkAddress, + fee: BigInt(subraphDD.fee), + fallback: subraphDD.fallbackUser, + sender: subraphDD.sender, + queueTimestamp: Number(subraphDD.tsInit), + queueTxHash: subraphDD.txInit, + timestamp: subraphDD.tsClosed ? Number(subraphDD.tsClosed) : undefined, + txHash: subraphDD.txClosed, + payment: subraphDD.payment, + }; + + return appDD; + } + + public async fetchDirectDeposit(id: bigint, state: ZkBobState): Promise { + const requestedDD = await this.throttle.add(() => { + return this.sdk.DirectDepositById({ 'id': id }, { + subgraphEndpoint: this.subgraphEndpoint(), + }) + .then((data) => data.directDeposit) + .catch((err) => { + console.warn(`[Subgraph]: Cannot fetch DD with id ${id} (${err.message})`); + return null; + }); + }); + + if (requestedDD) { + return this.parseSubraphDD(requestedDD, state); + } + + return undefined; + } + + public async pendingDirectDeposits(state: ZkBobState): Promise { + const allPendingDDs = await this.throttle.add(() => { + return this.sdk.PendingDirectDeposits({}, { + subgraphEndpoint: this.subgraphEndpoint(), + }).then((data) => data.directDeposits) + .catch((err) => { + console.warn(`[Subgraph]: Cannot fetch pending DDs (${err.message})`); + return null; + }); + }); + + if (Array.isArray(allPendingDDs)) { + const myPendingDDs = (await Promise.all(allPendingDDs.map(async (subgraphDD) => { + const dd = await this.parseSubraphDD(subgraphDD, state); + const isOwn = await state.isOwnAddress(dd.destination); + + return {dd, isOwn}; + }))) + .filter((dd) => dd.isOwn) + .map((myDD) => myDD.dd); + + return myPendingDDs; + } else { + throw new InternalError(`Unexpected response from the DD subgraph: ${allPendingDDs}`); + } + } + + // NetworkBackendd needed only for approve-deposit sender address recovering + public async getTxesDetails(indexes: number[], state: ZkBobState, network: NetworkBackend): Promise { + const chunksPromises: Promise[] = []; + for (let i = 0; i < indexes.length; i += SUBGRAPH_MAX_ITEMS_IN_RESPONSE) { + const chunk = indexes.slice(i, i + SUBGRAPH_MAX_ITEMS_IN_RESPONSE); + chunksPromises.push(this.throttle.add(() => { + const preparedIdxs = chunk.map((aIdx) => String(aIdx + SUBGRAPH_ID_INDEX_DELTA)); + return this.sdk.PoolTxesByIndexes({ 'index_in': preparedIdxs, 'first': SUBGRAPH_MAX_ITEMS_IN_RESPONSE }, { + subgraphEndpoint: this.subgraphEndpoint(), + }) + .then((data) => data.poolTxes) + .catch((err) => { + console.warn(`[Subgraph]: Cannot fetch txes @ [${preparedIdxs.join(', ')}] (${err.message})`); + return []; + }); + })); + } + + const txs: any[] = []; + const chunksReady = await Promise.all(chunksPromises); + chunksReady.forEach((aChunk) => { + txs.push(...aChunk); + }) + + return Promise.all(txs.map(async (tx) => { + if (tx.type != 100) { + // regular pool transaction + const txDetails = new RegularTxDetails(); + txDetails.txHash = tx.tx; + txDetails.isMined = true; // subgraph returns only mined txs + txDetails.timestamp = Number(tx.ts); + txDetails.feeAmount = BigInt(tx.operation.fee); + //toTwosComplementHex(BigInt(txData.public.nullifier), 32) + txDetails.nullifier = '0x' + toTwosComplementHex(BigInt((tx.operation.nullifier)), 32); + txDetails.commitment = '0x' + toTwosComplementHex(BigInt((tx.zk.out_commit)), 32); + txDetails.ciphertext = tx.message + if (tx.type == 0) { + // deposit via approve + txDetails.txType = RegularTxType.Deposit; + txDetails.tokenAmount = BigInt(tx.operation.token_amount) + // Due to the subgraph doesn't have ecrecover ability we should recover depositor address manually + // Please keep in mind non-evm networks possible incompatibilities + if (tx.operation.pooltx.calldata) { + const shieldedTx = decodeEvmCalldata(tx.operation.pooltx.calldata) + if (shieldedTx.extra && shieldedTx.extra.length >= 128) { + const approveSigner = DepositSignerFactory.createSigner(network, DepositType.Approve); + const depositData: DepositData = { + // this stub needed to recover approve signature (just a nullifier make sense here) + tokenAddress: '', owner: '', spender: '', amount: 0n, deadline: 0n, nullifier: txDetails.nullifier + } + const signature = shieldedTx.extra.slice(0, 128); + txDetails.depositAddr = await approveSigner.recoverAddress(depositData, signature); + } else { + // incorrect signature + console.warn(`Cannot recover depositor address from the signature for tx ${tx.tx}`); + } + } + } else if (tx.type == 1) { + // transfer + txDetails.txType = RegularTxType.Transfer; + txDetails.tokenAmount = -txDetails.feeAmount; + } else if (tx.type == 2) { + // withdrawal + txDetails.txType = RegularTxType.Withdraw; + txDetails.tokenAmount = BigInt(tx.operation.token_amount); + txDetails.withdrawAddr = tx.operation.receiver; + } else if (tx.type == 3) { + // deposit via permit + txDetails.txType = RegularTxType.BridgeDeposit; + txDetails.tokenAmount = BigInt(tx.operation.token_amount); + txDetails.depositAddr = tx.operation.permit_holder; + } else { + throw new InternalError(`Incorrect tx type from subgraph (${tx.type})`) + } + + return { poolTxType: PoolTxType.Regular, details: txDetails, index: Number(tx.index) - SUBGRAPH_ID_INDEX_DELTA }; + } else { + // direct deposit batch + const txDetails = new DDBatchTxDetails(); + txDetails.txHash = tx.tx; + txDetails.isMined = true; // subgraph returns only mined txs + txDetails.timestamp = Number(tx.ts); + + const DDs = tx.operation.delegated_deposits + if (Array.isArray(DDs)) { + txDetails.deposits = (await Promise.all(DDs.map(async (subgraphDD) => { + const dd = await this.parseSubraphDD(subgraphDD, state); + const isOwn = await state.isOwnAddress(dd.destination); + + return {dd, isOwn}; + }))) + .filter((dd) => dd.isOwn) // grab the own DDs only + .map((myDD) => myDD.dd); + } else { + throw new InternalError(`Incorrect tx type from subgraph (${tx.type})`) + } + + return { poolTxType: PoolTxType.DirectDepositBatch, details: txDetails, index: Number(tx.index) - SUBGRAPH_ID_INDEX_DELTA }; + } + })); + } +} \ No newline at end of file diff --git a/src/dd/dd-resolvers.ts b/src/subgraph/resolvers.ts similarity index 100% rename from src/dd/dd-resolvers.ts rename to src/subgraph/resolvers.ts diff --git a/src/subgraph/tx-query.graphql b/src/subgraph/tx-query.graphql new file mode 100644 index 00000000..6a83bea9 --- /dev/null +++ b/src/subgraph/tx-query.graphql @@ -0,0 +1,63 @@ +query PoolTxesByIndexes($index_in: [BigInt!], $first: Int = 100) { + poolTxes(where: {index_in: $index_in}, first: $first) { + index + type + zk { + out_commit + } + ts + tx + message + operation { + ... on DepositOperation { + fee + nullifier + token_amount + pooltx { + calldata + } + } + ... on PermittableDepositOperation { + fee + nullifier + permit_holder + token_amount + } + ... on TransferOperation { + fee + nullifier + } + ... on WithdrawalOperation { + fee + native_amount + nullifier + receiver + token_amount + } + ... on DDBatchOperation { + id + delegated_deposits { + id + pending + refunded + completed + zkAddress_pk + zkAddress_diversifier + deposit + fee + fallbackUser + sender + tsInit + tsClosed + txInit + txClosed + payment { + note + sender + token + } + } + } + } + } +} \ No newline at end of file diff --git a/src/tx.ts b/src/tx.ts index 2897c4e1..000ffb83 100644 --- a/src/tx.ts +++ b/src/tx.ts @@ -1,241 +1,108 @@ -import Web3 from 'web3'; - -import { TransactionData, SnarkProof, UserAccount } from 'libzkbob-rs-wasm-web'; -import { HexStringReader, HexStringWriter } from './utils'; -import { CONSTANTS } from './constants'; -import { InternalError } from './errors'; - -// Sizes in bytes -const MEMO_META_DEFAULT_SIZE: number = 8; // fee (u64) -const MEMO_META_WITHDRAW_SIZE: number = 8 + 8 + 20; // fee (u64) + amount + address (u160) -const MEMO_META_PERMITDEPOSIT_SIZE: number = 8 + 8 + 20; // fee (u64) + amount + address (u160) - -export const CALLDATA_BASE_LENGTH: number = 644; -export const CALLDATA_MEMO_APPROVE_DEPOSIT_BASE_LENGTH: number = 210; -export const CALLDATA_MEMO_DEPOSIT_BASE_LENGTH: number = 238; -export const CALLDATA_MEMO_TRANSFER_BASE_LENGTH: number = 210; -export const CALLDATA_MEMO_NOTE_LENGTH: number = 172; -export const CALLDATA_MEMO_WITHDRAW_BASE_LENGTH: number = 238; -export const CALLDATA_DEPOSIT_SIGNATURE_LENGTH: number = 64; - -export enum TxType { +export enum RegularTxType { Deposit = '0000', Transfer = '0001', Withdraw = '0002', BridgeDeposit = '0003', } -export function txTypeToString(txType: TxType): string { - switch (txType) { - case TxType.Deposit: return 'deposit'; - case TxType.Transfer: return 'transfer'; - case TxType.Withdraw: return 'withdraw'; - case TxType.BridgeDeposit: return 'bridge-deposit'; - } -} - -export function estimateCalldataLength(txType: TxType, notesCnt: number, extraDataLen: number = 0): number { - let txSpecificLen = 0; +export function txTypeToString(txType: RegularTxType): string { switch (txType) { - case TxType.Deposit: - txSpecificLen = CALLDATA_MEMO_APPROVE_DEPOSIT_BASE_LENGTH + CALLDATA_DEPOSIT_SIGNATURE_LENGTH; - break; - - case TxType.BridgeDeposit: - txSpecificLen = CALLDATA_MEMO_DEPOSIT_BASE_LENGTH + CALLDATA_DEPOSIT_SIGNATURE_LENGTH; - break; - - case TxType.Transfer: - txSpecificLen = CALLDATA_MEMO_TRANSFER_BASE_LENGTH; - break; - - case TxType.Withdraw: - txSpecificLen = CALLDATA_MEMO_WITHDRAW_BASE_LENGTH; - break; + case RegularTxType.Deposit: return 'deposit'; + case RegularTxType.Transfer: return 'transfer'; + case RegularTxType.Withdraw: return 'withdraw'; + case RegularTxType.BridgeDeposit: return 'bridge-deposit'; } - - return CALLDATA_BASE_LENGTH + txSpecificLen + extraDataLen + notesCnt * CALLDATA_MEMO_NOTE_LENGTH; } -/** The universal transaction data format used on most networks. */ +// The raw low-level transaction data used on most networks export class ShieldedTx { - public selector: string; - public nullifier: bigint; - public outCommit: bigint; - public transferIndex: bigint; - public energyAmount: bigint; - public tokenAmount: bigint; - public transactProof: bigint[]; - public rootAfter: bigint; - public treeProof: bigint[]; - public txType: TxType; - public memo: string; - public extra: string; - - static async fromData( - txData: TransactionData, - txType: TxType, - acc: UserAccount, - web3: Web3, - worker: any, - ): Promise { - const tx = new ShieldedTx(); - - const nextIndex = acc.nextTreeIndex() as bigint; - let curIndex = nextIndex - BigInt(CONSTANTS.OUT + 1); - if (curIndex < BigInt(0)) { - curIndex = BigInt(0); - } - - const prevCommitmentIndex = curIndex / BigInt(2 ** CONSTANTS.OUTLOG); - const nextCommitmentIndex = acc.nextTreeIndex() as bigint / BigInt(2 ** CONSTANTS.OUTLOG); - - const proofFilled = acc.getCommitmentMerkleProof(prevCommitmentIndex); - const proofFree = acc.getCommitmentMerkleProof(nextCommitmentIndex); - - const prevLeaf = acc.getMerkleNode(CONSTANTS.OUTLOG, prevCommitmentIndex); - const rootBefore = acc.getRoot(); - const rootAfter = acc.getMerkleRootAfterCommitment(nextCommitmentIndex, txData.commitment_root); - - const txProof = await worker.proveTx(txData.public, txData.secret); - const treeProof = await worker.proveTree({ - root_before: rootBefore, - root_after: rootAfter, - leaf: txData.commitment_root, - }, { - proof_filled: proofFilled, - proof_free: proofFree, - prev_leaf: prevLeaf, - }); - - const txValid = worker.verifyTxProof(txProof.inputs, txProof.proof); - if (!txValid) { - throw new InternalError('invalid tx proof'); - } - - const treeValid = worker.verifyTreeProof(treeProof.inputs, treeProof.proof); - if (!treeValid) { - throw new InternalError('invalid tree proof'); - } - - tx.selector = web3.eth.abi.encodeFunctionSignature('transact()').slice(2); - tx.nullifier = BigInt(txData.public.nullifier); - tx.outCommit = BigInt(txData.public.out_commit); - - tx.transferIndex = BigInt(txData.parsed_delta.index); - tx.energyAmount = BigInt(txData.parsed_delta.e); - tx.tokenAmount = BigInt(txData.parsed_delta.v); - - tx.transactProof = flattenSnarkProof(txProof.proof); - tx.rootAfter = BigInt(rootAfter); - tx.treeProof = flattenSnarkProof(treeProof.proof); - tx.txType = txType; - - tx.memo = txData.memo; - - tx.extra = ""; - - return tx; - } - - get ciphertext(): string { - if (this.txType === TxType.Withdraw) { - return this.memo.slice(MEMO_META_WITHDRAW_SIZE * 2); - } else if (this.txType === TxType.BridgeDeposit) { - return this.memo.slice(MEMO_META_PERMITDEPOSIT_SIZE * 2); - } - - return this.memo.slice(MEMO_META_DEFAULT_SIZE * 2); - } - - get hashes(): string[] { - const ciphertext = this.ciphertext; - return parseHashes(ciphertext); - } - - /** - * Returns encoded transaction ready to use as data for the smart contract. - */ - encode(): string { - const writer = new HexStringWriter(); - - writer.writeHex(this.selector); - writer.writeBigInt(this.nullifier, 32); - writer.writeBigInt(this.outCommit, 32); - writer.writeBigInt(this.transferIndex, 6); - writer.writeBigInt(this.energyAmount, 14); - writer.writeBigInt(this.tokenAmount, 8); - writer.writeBigIntArray(this.transactProof, 32); - writer.writeBigInt(this.rootAfter, 32); - writer.writeBigIntArray(this.treeProof, 32); - writer.writeHex(this.txType.toString()); - writer.writeNumber(this.memo.length / 2, 2); - writer.writeHex(this.memo); - - if (this.extra.length > 0) { - writer.writeHex(this.extra); - } - - return writer.toString(); - } - - static decode(data: string): ShieldedTx { - const tx = new ShieldedTx(); - const reader = new HexStringReader(data); - - tx.selector = reader.readHex(4)!; - assertNotNull(tx.selector); - tx.nullifier = reader.readBigInt(32)!; - assertNotNull(tx.nullifier); - tx.outCommit = reader.readBigInt(32)!; - assertNotNull(tx.outCommit); - tx.transferIndex = reader.readBigInt(6)!; - assertNotNull(tx.transferIndex); - tx.energyAmount = reader.readSignedBigInt(14)!; - assertNotNull(tx.energyAmount); - tx.tokenAmount = reader.readSignedBigInt(8)!; - assertNotNull(tx.tokenAmount); - tx.transactProof = reader.readBigIntArray(8, 32); - tx.rootAfter = reader.readBigInt(32)!; - assertNotNull(tx.rootAfter); - tx.treeProof = reader.readBigIntArray(8, 32); - tx.txType = reader.readHex(2) as TxType; - assertNotNull(tx.txType); - const memoSize = reader.readNumber(2); - assertNotNull(memoSize); - tx.memo = reader.readHex(memoSize)!; - assertNotNull(tx.memo); + nullifier: bigint; + outCommit: bigint; + transferIndex: bigint; + energyAmount: bigint; + tokenAmount: bigint; + transactProof: bigint[]; + rootAfter: bigint; + treeProof: bigint[]; + txType: RegularTxType; + memo: string; + extra: string; +} - // Extra data - // It contains deposit holder signature for deposit transactions - // or any other data which user can append - tx.extra = reader.readHexToTheEnd()!; - assertNotNull(tx.extra); +// The raw low-level append direct deposit calldata +/*export class AppendDDTx { + nullifier: bigint; + outCommit: bigint; + transferIndex: bigint; + energyAmount: bigint; + tokenAmount: bigint; + transactProof: bigint[]; + rootAfter: bigint; + treeProof: bigint[]; + txType: RegularTxType; + memo: string; + extra: string; +}*/ + +// The top-level transaction details needed in the client library (HistoryStorage for example) +export enum PoolTxType { + Regular, + DirectDepositBatch, +} - return tx; - } +export interface PoolTxDetails { + poolTxType: PoolTxType, + details: RegularTxDetails | DDBatchTxDetails, + index: number, // index of the first tx leaf in the Merkle tree } -export function parseHashes(ciphertext: string): string[] { - const reader = new HexStringReader(ciphertext); - const numItems = reader.readNumber(4, true); - if (!numItems || numItems > CONSTANTS.OUT + 1) { - throw new InternalError(`Invalid transaction: invalid number of outputs ${numItems}`); - } +// These fields belongs to the concrete transaction which are extracted +// from the blockchain (or subraph) and needed to create a HistoryRecord +export class CommonTxDetails { + txHash: string; // to the pool contract + isMined: boolean; + timestamp: number; +} - const hashes = reader.readBigIntArray(numItems, 32, true).map(num => num.toString()); +export class RegularTxDetails extends CommonTxDetails { + txType: RegularTxType; // deposit, transfer, withdraw, permit deposit + tokenAmount: bigint; + feeAmount: bigint; // relayer's reward + depositAddr?: string; // for deposit txs only + withdrawAddr?: string; // for withdraw txs only + // The following fields are needed for compliance report + commitment: string; // 0x-prefixed hex format + nullifier: string; // 0x-prefixed hex format + ciphertext: string; // 0x-prefixed hex format +} - return hashes; +export enum DirectDepositState { + Queued, + Deposited, + Refunded, } -export function flattenSnarkProof(p: SnarkProof): bigint[] { - return [p.a, p.b.flat(), p.c].flat().map(n => { - return BigInt(n); - }); +export interface DDPaymentInfo { + note: string | null; + sender: string; + token: string; } -function assertNotNull(val: T): asserts val is NonNullable { - if (val === undefined || val === null) { - throw new InternalError('Unexpected null'); - } +export interface DirectDeposit { + id: bigint; // DD queue unique identifier + state: DirectDepositState; + amount: bigint; // in pool resolution + destination: string; // zk-addresss + fee: bigint; // relayer fee + fallback: string; // 0x-address to refund DD + sender: string; // 0x-address of sender [to the queue] + queueTimestamp: number;// when it was created + queueTxHash: string; // transaction hash to the queue + timestamp?: number; // when it was sent to the pool + txHash?: string; // transaction hash to the pool + payment?: DDPaymentInfo; } + +export class DDBatchTxDetails extends CommonTxDetails { + deposits: DirectDeposit[]; +} \ No newline at end of file diff --git a/src/utils.ts b/src/utils.ts index 1c2dd062..a21817a1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -82,10 +82,6 @@ export function addHexPrefix(data: string): string { return data; } -export function ethAddrToBuf(address: string): Uint8Array { - return hexToBuf(address, 20); -} - // Convert input hex number to the bytes array // extend (leading zero-bytes) or trim (trailing bytes) // output buffer to the bytesCnt bytes (only when bytesCnt > 0) @@ -112,6 +108,14 @@ export function hexToBuf(hex: string, bytesCnt: number = 0): Uint8Array { return buffer; } +export function forceDecimal(hexOrDec: string): string { + if (hexOrDec.startsWith('0x')) { + return BigInt(hexOrDec).toString(10); + } + + return hexOrDec; +} + export function isEqualBuffers(buf1: Uint8Array, buf2: Uint8Array): boolean { if (buf1.length != buf2.length) { return false; @@ -220,7 +224,7 @@ export class HexStringReader { const elements: bigint[] = []; for (let i = 0; i < numElements; ++i) { const num = this.readBigInt(numBytesPerElement, le); - if (!num) { + if (num == null) { break; } @@ -253,75 +257,6 @@ export function toTwosComplementHex(num: bigint, numBytes: number): string { return padLeft(hex, numBytes * 2); } -export function toCompactSignature(signature: string): string { - signature = truncateHexPrefix(signature); - - if (signature.length > 128) { - // it seems it's an extended signature, let's compact it! - const v = signature.substr(128, 2); - if (v == "1c") { - return `${signature.slice(0, 64)}${(parseInt(signature[64], 16) | 8).toString(16)}${signature.slice(65, 128)}`; - } else if (v != "1b") { - throw new InternalError("invalid signature: v should be 27 or 28"); - } - - return signature.slice(0, 128); - } else if (signature.length < 128) { - throw new InternalError("invalid signature: it should consist at least 64 bytes (128 chars)"); - } - - // it seems the signature already compact - return signature; -} - -export function parseCompactSignature(signature: string): {v: string, r: string, s: string} { - signature = truncateHexPrefix(signature); - - if (signature.length == 128) { - const r = `0x${signature.substr(0, 64)}`; - let s = `0x${signature.slice(64)}`; - - let v = `0x1b`; - const sHiDigit = parseInt(s[0], 16); - if (sHiDigit > 7) { - v = `0x1c`; - s = `0x${(sHiDigit & 7).toString(16)}${s.slice(1)}`; - } - - return {v, r, s}; - - }else { - throw ("invalid signature length"); - } - -} - -export function toCanonicalSignature(signature: string): string { - let sig = truncateHexPrefix(signature); - - let v = "1b"; - if (parseInt(sig[64], 16) > 7) { - v = "1c"; - sig = sig.substr(0, 64) + `${(parseInt(sig[64], 16) & 7).toString(16)}` + sig.slice(65); - } - return `0x` + sig + v; -} - -export function addressFromSignature(signature: string, signedData: string): string { - const sigFields = util.fromRpcSig(addHexPrefix(signature)); - - const dataBuf = hexToBuf(signedData); - const prefix = Buffer.from("\x19Ethereum Signed Message:\n"); - const prefixedSignedData = util.keccak( - Buffer.concat([prefix, Buffer.from(String(dataBuf.length)), dataBuf]) - ); - - const pub = util.ecrecover(prefixedSignedData, sigFields.v, sigFields.r, sigFields.s); - const addrBuf = util.pubToAddress(pub); - - return addHexPrefix(bufToHex(addrBuf)); -} - export function nodeToHex(node: TreeNode): string { const writer = new HexStringWriter(); writer.writeNumber(node.height, 1); @@ -362,4 +297,19 @@ export function rangesIntersectionLength(r1from: number, r1to: number, r2from: n } return 0; +} + +export function assertNotNull(val: T): asserts val is NonNullable { + if (val === undefined || val === null) { + throw new InternalError('Unexpected null'); + } +} + +export function removeDuplicates(array: T[]): T[] { + return array.reduce((acc: T[], cur: T) => { + if (!acc.includes(cur)) { + acc.push(cur); + } + return acc; + }, []) } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0dab3e22..25ed184d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@adraffy/ens-normalize@1.9.2": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz#60111a5d9db45b2e5cbb6231b0bb8d97e8659316" + integrity sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg== + "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -622,7 +627,7 @@ async "^3.2.4" ethereum-cryptography "^1.1.2" -"@ethersproject/abi@^5.6.3": +"@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -1560,21 +1565,43 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" +"@noble/curves@1.1.0", "@noble/curves@~1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" + integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== + dependencies: + "@noble/hashes" "1.3.1" + "@noble/hashes@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== +"@noble/hashes@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" + integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== + "@noble/hashes@~1.1.1", "@noble/hashes@~1.1.3": version "1.1.5" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.5.tgz#1a0377f3b9020efe2fae03290bd2a12140c95c11" integrity sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ== +"@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": version "1.6.3" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== +"@noble/secp256k1@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + "@noble/secp256k1@~1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1" @@ -1661,6 +1688,15 @@ "@noble/secp256k1" "~1.7.0" "@scure/base" "~1.1.0" +"@scure/bip32@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" + integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== + dependencies: + "@noble/curves" "~1.1.0" + "@noble/hashes" "~1.3.1" + "@scure/base" "~1.1.0" + "@scure/bip39@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" @@ -1669,6 +1705,14 @@ "@noble/hashes" "~1.1.1" "@scure/base" "~1.1.0" +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" + "@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": version "4.6.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" @@ -1688,6 +1732,11 @@ dependencies: defer-to-connect "^2.0.1" +"@tronweb3/google-protobuf@^3.21.2": + version "3.21.2" + resolved "https://registry.yarnpkg.com/@tronweb3/google-protobuf/-/google-protobuf-3.21.2.tgz#0964cf83ed7826d31c3cb4e4ecf07655681631c9" + integrity sha512-IVcT2GfWX3K6tHUVhs14NP5uzKhQt4KeDya1g9ACxuZsUzsaoGUIGzceK2Ltu7xp1YV94AaHOf4yxLAivlvEkQ== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -1790,6 +1839,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== +"@types/node@18.15.13": + version "18.15.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" + integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== + "@types/node@^12.12.6": version "12.20.55" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" @@ -1807,6 +1861,13 @@ dependencies: "@types/node" "*" +"@types/promise-retry@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@types/promise-retry/-/promise-retry-1.1.3.tgz#baab427419da9088a1d2f21bf56249c21b3dd43c" + integrity sha512-LxIlEpEX6frE3co3vCO2EUJfHIta1IOmhDlcAsR4GMMv9hev1iTI9VwberVGkePJAuLZs5rMucrV8CziCfuJMw== + dependencies: + "@types/retry" "*" + "@types/responselike@1.0.0", "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -1814,6 +1875,11 @@ dependencies: "@types/node" "*" +"@types/retry@*": + version "0.12.2" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.2.tgz#ed279a64fa438bb69f2480eda44937912bb7480a" + integrity sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow== + "@types/secp256k1@^4.0.1": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" @@ -2080,6 +2146,11 @@ acorn@^8.5.0, acorn@^8.7.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== +aes-js@4.0.0-beta.5: + version "4.0.0-beta.5" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" + integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== + ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" @@ -2279,6 +2350,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== +axios@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== + dependencies: + follow-redirects "^1.14.8" + b4a@^1.0.1: version "1.6.1" resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.1.tgz#9effac93a469a868d024e16fd77162c653544cbd" @@ -2373,7 +2451,7 @@ bignumber.js@7.2.1: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== -bignumber.js@^9.0.0: +bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== @@ -3385,6 +3463,11 @@ envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -3633,6 +3716,16 @@ ethereum-cryptography@^1.1.2: "@scure/bip32" "1.1.0" "@scure/bip39" "1.1.0" +ethereum-cryptography@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" + integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== + dependencies: + "@noble/curves" "1.1.0" + "@noble/hashes" "1.3.1" + "@scure/bip32" "1.3.1" + "@scure/bip39" "1.2.1" + ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" @@ -3644,6 +3737,19 @@ ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereu ethereum-cryptography "^0.1.3" rlp "^2.2.4" +ethers@^6.6.0: + version "6.7.1" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.7.1.tgz#9c65e8b5d8e9ad77b7e8cf1c46099892cfafad49" + integrity sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA== + dependencies: + "@adraffy/ens-normalize" "1.9.2" + "@noble/hashes" "1.1.2" + "@noble/secp256k1" "1.7.1" + "@types/node" "18.15.13" + aes-js "4.0.0-beta.5" + tslib "2.4.0" + ws "8.5.0" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -3665,6 +3771,11 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== +eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -3937,6 +4048,11 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +follow-redirects@^1.14.8: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -4457,6 +4573,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +injectpromise@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/injectpromise/-/injectpromise-1.0.0.tgz#c621f7df2bbfc1164d714f1fb229adec2079da39" + integrity sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA== + inquirer@^6.2.2: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" @@ -4865,15 +4986,15 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -libzkbob-rs-wasm-web-mt@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/libzkbob-rs-wasm-web-mt/-/libzkbob-rs-wasm-web-mt-1.4.1.tgz#6b2e42d78eca4b1f8a5ce592507092c7ac760e3c" - integrity sha512-zaNPMC+53YsAP765oDxPb3sljR7vIFuut/RLWpArXeZ8llQbRLbjJS1hquv6Mv5jqIUqOn99jnX/3hPMcCPCGA== +libzkbob-rs-wasm-web-mt@1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/libzkbob-rs-wasm-web-mt/-/libzkbob-rs-wasm-web-mt-1.4.2.tgz#134140557a23f251a40995f64102d9b1091b94a2" + integrity sha512-2jvdNy20Va2e9IAlPbmewZ/7aeZMH1NBEQFhfH9BVObhVqNpNWWhna82zRXT0ebfu+HJwaZGJ1w4n6UzzYO4cw== -libzkbob-rs-wasm-web@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/libzkbob-rs-wasm-web/-/libzkbob-rs-wasm-web-1.4.1.tgz#5bbf5e3ccef279c71a49ff304ef11b107c27895d" - integrity sha512-JZZXZ33V9UrEVGDAehfhl3sI5I+8thtAN2xSRbS0Tsv/qWz42cZZNT/uSw+rJtwdMd1anoQC6QVFN6aTICO+VQ== +libzkbob-rs-wasm-web@1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/libzkbob-rs-wasm-web/-/libzkbob-rs-wasm-web-1.4.2.tgz#c69453f387817eb5d0e335d9b6a2bead28ce5b49" + integrity sha512-CJDe7lpxsS70Z/eSvVmufSq4nQZ25M59a49ZIXEyTG86hJ9xCNkCjIiSvJSZh0+UwVQI87PSkmMeQY+AefqDSQ== lie@3.1.1: version "3.1.1" @@ -5735,6 +5856,19 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + +promise-throttle@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/promise-throttle/-/promise-throttle-1.1.2.tgz#8a59d0424b6f9673aa8405c8b6bd4b5e4f7f71db" + integrity sha512-dij7vjyXNewuuN/gyr+TX2KRjw48mbV5FEtgyXaIoJjGYAKT0au23/voNvy9eS4UNJjx2KUdEcO5Yyfc1h7vWQ== + promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -5823,6 +5957,11 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +querystring-es3@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -6008,6 +6147,11 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -6109,6 +6253,11 @@ semver@^5.5.0, semver@^5.5.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@^5.6.0: + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -6629,6 +6778,25 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tronweb@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/tronweb/-/tronweb-5.3.0.tgz#b40c4aa68f81b70bac4d8de52960b82b61f9ab04" + integrity sha512-i03+3UviQacqdrr3VgXHDL8h/2E24BeULak4w6+yRkJaCuEyxjWOtEn1dq87ulTkHzS/vKK0zIyvW7rSxuISOA== + dependencies: + "@babel/runtime" "^7.0.0" + "@ethersproject/abi" "^5.7.0" + "@tronweb3/google-protobuf" "^3.21.2" + axios "^0.26.1" + bignumber.js "^9.0.1" + ethereum-cryptography "^2.0.0" + ethers "^6.6.0" + eventemitter3 "^3.1.0" + injectpromise "^1.0.0" + lodash "^4.17.21" + querystring-es3 "^0.2.1" + semver "^5.6.0" + validator "^13.7.0" + ts-algebra@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/ts-algebra/-/ts-algebra-1.2.0.tgz#f91c481207a770f0d14d055c376cbee040afdfc9" @@ -6672,6 +6840,11 @@ tsconfig-paths@^4.2.0: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -6888,6 +7061,11 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +validator@^13.7.0: + version "13.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" + integrity sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ== + value-or-promise@1.0.12, value-or-promise@^1.0.11, value-or-promise@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.12.tgz#0e5abfeec70148c78460a849f6b003ea7986f15c" @@ -7580,6 +7758,11 @@ ws@8.13.0, ws@^8.12.0, ws@^8.13.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" From 01f8ed619ee280c6860cf29427c76f8a91cabdfb Mon Sep 17 00:00:00 2001 From: Evgen Date: Wed, 11 Oct 2023 15:13:45 +0300 Subject: [PATCH 3/3] Removing `beta` suffix from the package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bf7be8d..ab268e7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zkbob-client-js", - "version": "5.3.0-beta7", + "version": "5.3.0", "description": "zkBob integration library", "repository": "git@github.com:zkBob/libzkbob-client-js.git", "author": "Dmitry Vdovin ",