From 63db850c22865cfc1a61ccb6454ee5966df13a7e Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Thu, 21 Nov 2024 09:16:54 -0500 Subject: [PATCH] remove DAI injection feature --- README.md | 7 - docs/networks/arbitrum-one.md | 1 - docs/networks/arbitrum-sepolia.md | 1 - ...arbitrum-sepolia-indexer-agent-config.yaml | 3 - .../sepolia-indexer-agent-config.yaml | 3 - network-configs/config.yaml | 3 - packages/indexer-agent/README.md | 7 - packages/indexer-agent/package.json | 1 - packages/indexer-agent/src/commands/start.ts | 37 ---- packages/indexer-agent/src/cost.ts | 118 ------------ .../src/__tests__/indexer/cost.test.ts | 34 ---- packages/indexer-cli/src/__tests__/util.ts | 7 - .../invalid-address.yml | 36 ---- .../invalid-base58.yml | 2 - .../invalid-epoch-subgraph.yml | 2 - .../invalid-extra-field.yml | 2 - .../invalid-missing-field.yml | 2 - .../invalid-negative-max-block-distance.yml | 2 - .../invalid-network-identifier.yml | 2 - .../valid-missing.yml | 2 - .../network-specification-files/valid.yml | 2 - .../__tests__/network-specification.test.ts | 5 - .../__tests__/resolvers/actions.test.ts | 2 +- .../__tests__/resolvers/cost-models.test.ts | 172 ------------------ .../resolvers/indexing-rules.test.ts | 2 +- .../__tests__/resolvers/poi-disputes.test.ts | 2 +- .../src/indexer-management/__tests__/util.ts | 2 - .../src/indexer-management/client.ts | 45 +---- .../resolvers/cost-models.ts | 79 +------- .../src/network-specification.ts | 16 -- yarn.lock | 48 ----- 31 files changed, 8 insertions(+), 639 deletions(-) delete mode 100644 packages/indexer-agent/src/cost.ts delete mode 100644 packages/indexer-common/src/__tests__/network-specification-files/invalid-address.yml diff --git a/README.md b/README.md index 09137b986..e5769d5ed 100644 --- a/README.md +++ b/README.md @@ -206,10 +206,6 @@ Protocol --epoch-subgraph-endpoint Endpoint to query epoch start blocks from [string] [required] -Cost Models - --inject-dai Inject the GRT to DAI/USDC conversion rate into cost model - variables [boolean] [default: true] - Postgres --postgres-host Postgres host [string] [required] --postgres-port Postgres port [number] [default: 5432] @@ -238,9 +234,6 @@ Query Fees Options: --version Show version number [boolean] --help Show help [boolean] - --dai-contract Address of the DAI or USDC contract to use for the - --inject-dai conversion rate - [string] [default: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"] --offchain-subgraphs Subgraphs to index that are not on chain (comma-separated) [array] [default: []] ``` diff --git a/docs/networks/arbitrum-one.md b/docs/networks/arbitrum-one.md index 699ee2150..b3a666fa5 100644 --- a/docs/networks/arbitrum-one.md +++ b/docs/networks/arbitrum-one.md @@ -45,7 +45,6 @@ Other network contracts can be found in [graphprotocol/contracts](https://github | `INDEXER_AGENT_MNEMONIC` | `--mnemonic` | Ethereum mnemonic for mainnet operator | | `INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT` | `--network-subgraph-deployment` | [![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fthegraph.com%2Fexplorer%2F_next%2Fdata%2F5PBypsdmUEy39BcWLsyp0%2Fsubgraphs%2FDZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp.json%3Fview%3DAbout%26chain%3Darbitrum-one%26id%3DDZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp&query=%24.pageProps.subgraph.currentVersion.subgraphDeployment.ipfsHash&label=deployment-id)](https://thegraph.com/explorer/subgraphs/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp) | | `INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT` | `--network-subgraph-endpoint` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp` | -| `INDEXER_AGENT_DAI_CONTRACT` | `--dai-contract` | TBD | | `INDEXER_AGENT_GATEWAY_ENDPOINT` | `--gateway-endpoint` | `https://gateway-arbitrum.network.thegraph.com/` | | `INDEXER_AGENT_GAS_PRICE_MAX` | `--gas-price-max` | `50` | | `INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT` | `--epoch-subgraph-endpoint` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/4KFYqUWRTZQ9gn7GPHC6YQ2q15chJfVrX43ezYcwkgxB` | diff --git a/docs/networks/arbitrum-sepolia.md b/docs/networks/arbitrum-sepolia.md index b94159e72..f43b3cd64 100644 --- a/docs/networks/arbitrum-sepolia.md +++ b/docs/networks/arbitrum-sepolia.md @@ -51,7 +51,6 @@ testnet (for now) are Mainnet subgraphs. This means: | `INDEXER_AGENT_MNEMONIC` | `--mnemonic` | Ethereum mnemonic for testnet operator | | `INDEXER_AGENT_NETWORK_SUBGRAPH_DEPLOYMENT` | `--network-subgraph-deployment` | `QmXnGVrg6DvscnvJd86aHAPLGyGrkM17weMrAsFAEMmQLL` | | `INDEXER_AGENT_NETWORK_SUBGRAPH_ENDPOINT` | `--network-subgraph-endpoint` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV` | -| `INDEXER_AGENT_DAI_CONTRACT` | `--dai-contract` | `0x9e7e607afd22906f7da6f1ec8f432d6f244278be` (GDAI) | | `INDEXER_AGENT_GATEWAY_ENDPOINT` | `--gateway-endpoint` | `https://gateway-arbitrum.testnet.thegraph.com/` | | `INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT` | `--epoch-subgraph-endpoint` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/BhnsdeZihU4SuokxZMLF4FQBVJ3jgtZf6v51gHvz3bSS` | | `INDEXER_AGENT_TAP_SUBGRAPH_ENDPOINT` | `--tap-subgraph-endpoint` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/7ubx365MiqBH5iUz6XWXWT8PTof5BVAyEzdb8m17RvbD` | diff --git a/docs/networks/config-examples/arbitrum-sepolia-indexer-agent-config.yaml b/docs/networks/config-examples/arbitrum-sepolia-indexer-agent-config.yaml index 3b88c63fd..049025f69 100644 --- a/docs/networks/config-examples/arbitrum-sepolia-indexer-agent-config.yaml +++ b/docs/networks/config-examples/arbitrum-sepolia-indexer-agent-config.yaml @@ -31,6 +31,3 @@ transactionMonitoring: gasIncreaseTimeout: 90 gasIncreaseFactor: 1.5 maxTransactionAttempts: 20 -dai: - contractAddress: '0x9e7e607afd22906f7da6f1ec8f432d6f244278be' - inject: true diff --git a/docs/networks/config-examples/sepolia-indexer-agent-config.yaml b/docs/networks/config-examples/sepolia-indexer-agent-config.yaml index 9fc03fb13..b76aedd10 100644 --- a/docs/networks/config-examples/sepolia-indexer-agent-config.yaml +++ b/docs/networks/config-examples/sepolia-indexer-agent-config.yaml @@ -29,6 +29,3 @@ transactionMonitoring: gasIncreaseTimeout: 90 gasIncreaseFactor: 1.5 maxTransactionAttempts: 20 -dai: - contractAddress: '0x9e7e607afd22906f7da6f1ec8f432d6f244278be' - inject: true diff --git a/network-configs/config.yaml b/network-configs/config.yaml index 9651e55a2..65943541d 100644 --- a/network-configs/config.yaml +++ b/network-configs/config.yaml @@ -25,6 +25,3 @@ tapAddressBook: TAPVerifier: "0xf56b5d582920E4527A818FBDd801C0D80A394CB8" AllocationIDTracker: "0xf56b5d582920E4527A818FBDd801C0D80A394CB8" Escrow: "0xf56b5d582920E4527A818FBDd801C0D80A394CB8" -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" - inject: false diff --git a/packages/indexer-agent/README.md b/packages/indexer-agent/README.md index 7ec9589cf..a0173135d 100644 --- a/packages/indexer-agent/README.md +++ b/packages/indexer-agent/README.md @@ -114,10 +114,6 @@ Query Fees --gateway-endpoint, Gateway endpoint base URL --collect-receipts-endpoint [string] [required] -Cost Models - --inject-dai Inject the GRT to DAI/USDC conversion rate into cost model - variables [boolean] [default: true] - Postgres --postgres-host Postgres host [string] [required] --postgres-port Postgres port [number] [default: 5432] @@ -137,9 +133,6 @@ Options: --help Show help [boolean] --offchain-subgraphs Subgraphs to index that are not on chain (comma-separated) [array] [default: []] - --dai-contract Address of the DAI or USDC contract to use for the - --inject-dai conversion rate - [string] [default: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"] ``` diff --git a/packages/indexer-agent/package.json b/packages/indexer-agent/package.json index acf7e1b53..433a4a0dd 100644 --- a/packages/indexer-agent/package.json +++ b/packages/indexer-agent/package.json @@ -32,7 +32,6 @@ "@graphprotocol/common-ts": "2.0.11", "@graphprotocol/indexer-common": "^0.21.7", "@thi.ng/heaps": "^1.3.1", - "@uniswap/sdk": "3.0.3", "axios": "0.26.1", "bs58": "5.0.0", "delay": "^5.0.0", diff --git a/packages/indexer-agent/src/commands/start.ts b/packages/indexer-agent/src/commands/start.ts index 3dc90e9e3..08dc0a5ff 100644 --- a/packages/indexer-agent/src/commands/start.ts +++ b/packages/indexer-agent/src/commands/start.ts @@ -26,7 +26,6 @@ import { specification as spec, } from '@graphprotocol/indexer-common' import { Agent } from '../agent' -import { startCostModelAutomation } from '../cost' import { createSyncingServer } from '../syncing-server' import { injectCommonStartupOptions } from './common-options' import pMap from 'p-map' @@ -235,13 +234,6 @@ export const start = { default: 100, group: 'Query Fees', }) - .option('inject-dai', { - description: - 'Inject the GRT to DAI/USDC conversion rate into cost model variables', - type: 'boolean', - default: false, - group: 'Cost Models', - }) .option('address-book', { description: 'Graph contracts address book file path', type: 'string', @@ -257,13 +249,6 @@ export const start = { type: 'number', default: 3600, }) - .option('dai-contract', { - description: - 'Address of the DAI or USDC contract to use for the --inject-dai conversion rate', - type: 'string', - // Default to USDC - default: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - }) .option('register', { description: 'Whether to register the indexer on chain', type: 'boolean', @@ -394,11 +379,6 @@ export async function createNetworkSpecification( }, } - const dai = { - contractAddress: argv.daiContractAddress, - inject: argv.injectDai, - } - const networkProvider = { url: argv.networkProvider, pollingInterval: argv.ethereumPollingInterval, @@ -441,12 +421,6 @@ export async function createNetworkSpecification( } } - if (chainId !== 1 && dai.inject) { - throw new Error( - `The DAI injection feature for cost models is only supported on Ethereum Mainnet`, - ) - } - const tapAddressBook = loadFile(argv.tapAddressBook) try { @@ -459,7 +433,6 @@ export async function createNetworkSpecification( networkProvider, addressBook: argv.addressBook, tapAddressBook, - dai, }) } catch (parsingError) { displayZodParsingError(parsingError) @@ -633,16 +606,6 @@ export async function run( }) logger.info(`Successfully launched indexer management API server`) - // -------------------------------------------------------------------------------- - // * Cost Model Automation - // -------------------------------------------------------------------------------- - await startCostModelAutomation({ - logger, - networks, - indexerManagement: indexerManagementClient, - metrics, - }) - // -------------------------------------------------------------------------------- // * Syncing Server // -------------------------------------------------------------------------------- diff --git a/packages/indexer-agent/src/cost.ts b/packages/indexer-agent/src/cost.ts deleted file mode 100644 index a97677d91..000000000 --- a/packages/indexer-agent/src/cost.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Token, Fetcher, Route } from '@uniswap/sdk' -import { Gauge } from 'prom-client' - -import { - Logger, - Metrics, - NetworkContracts, - timer, - Address, -} from '@graphprotocol/common-ts' -import { IndexerManagementClient, Network } from '@graphprotocol/indexer-common' -import { Contract, providers } from 'ethers' - -interface CostModelAutomationMetrics { - grtPerDai: Gauge - daiPerGrt: Gauge -} - -const registerMetrics = (metrics: Metrics): CostModelAutomationMetrics => ({ - grtPerDai: new metrics.client.Gauge({ - name: 'cost_model_automation_grt_per_dai', - help: 'Conversion rate from GRT to DAI', - registers: [metrics.registry], - }), - - daiPerGrt: new metrics.client.Gauge({ - name: 'cost_model_automation_dai_per_grt', - help: 'Conversion rate from DAI to GRT', - registers: [metrics.registry], - }), -}) - -// Public API -export interface StartCostModelAutomationOptions { - logger: Logger - networks: Network[] - indexerManagement: IndexerManagementClient - metrics: Metrics -} - -// Internal API -interface CostModelAutomationOptions { - logger: Logger - ethereum: providers.BaseProvider - contracts: NetworkContracts - indexerManagement: IndexerManagementClient - daiContractAddress: Address - metrics: CostModelAutomationMetrics -} - -export const startCostModelAutomation = async ({ - logger, - networks, - indexerManagement, - metrics, -}: StartCostModelAutomationOptions): Promise => { - logger = logger.child({ component: 'CostModelAutomation' }) - - const automationMetrics = registerMetrics(metrics) - - // We could have this run per network but we probably only need to run it for Mainnet - const mainnet = networks.find( - n => n.specification.networkIdentifier === 'eip155:1', - ) - if (mainnet && mainnet.specification.dai.inject) { - await monitorAndInjectDai({ - logger, - ethereum: mainnet.networkProvider, - contracts: mainnet.contracts, - indexerManagement, - metrics: automationMetrics, - daiContractAddress: mainnet.specification.dai.contractAddress, - }) - } -} - -const ERC20_ABI = ['function decimals() view returns (uint8)'] - -const monitorAndInjectDai = async ({ - logger, - ethereum, - contracts, - indexerManagement, - metrics, - daiContractAddress, -}: CostModelAutomationOptions): Promise => { - // Identify the decimals used by the DAI or USDC contract - const chainId = ethereum.network.chainId - const stableCoin = new Contract(daiContractAddress, ERC20_ABI, ethereum) - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const decimals = await stableCoin.decimals().catch((error: any) => { - logger.warn( - `Failed to call 'decimals()' on '${daiContractAddress}', defaulting to '18'`, - { - error, - }, - ) - return 18 - }) - - const DAI = new Token(chainId, daiContractAddress, decimals) - const GRT = new Token(chainId, contracts.token.address, 18) - - // Update the GRT per DAI conversion rate every 15 minutes - timer(15 * 60 * 1000).pipe(async () => { - const pair = await Fetcher.fetchPairData(GRT, DAI, ethereum) - const route = new Route([pair], DAI) - const grtPerDai = route.midPrice.toSignificant(18) - const daiPerGrt = route.midPrice.invert().toSignificant(18) - - // Observe conversion rate in metrics - metrics.daiPerGrt.set(parseFloat(daiPerGrt)) - metrics.grtPerDai.set(parseFloat(grtPerDai)) - - logger.info('Update $DAI variable', { value: grtPerDai }) - await indexerManagement.setDai(grtPerDai) - }) -} diff --git a/packages/indexer-cli/src/__tests__/indexer/cost.test.ts b/packages/indexer-cli/src/__tests__/indexer/cost.test.ts index f4963968a..4b08860c7 100644 --- a/packages/indexer-cli/src/__tests__/indexer/cost.test.ts +++ b/packages/indexer-cli/src/__tests__/indexer/cost.test.ts @@ -53,23 +53,6 @@ describe('Indexer cost tests singleNetwork', () => { timeout: 10000, }, ) - cliTest( - 'Indexer cost set variable deployment id - success', - [ - 'indexer', - 'cost', - 'set', - 'variables', - 'QmQ44hgrWWt3Qf2X9XEX2fPyTbmQbChxwNm5c1t4mhKpGt', - `'{"DAI": "0.5"}'`, - ], - 'references/indexer-cost-variables-deployment', - { - expectedExitCode: 0, - cwd: baseDir, - timeout: 10000, - }, - ) cliTest( 'Indexer cost set model deployment id - no arg', [ @@ -257,22 +240,5 @@ describe('Indexer cost tests multiNetworks', () => { timeout: 10000, }, ) - cliTest( - 'Indexer cost set variable deployment id - reject multinetwork mode', - [ - 'indexer', - 'cost', - 'set', - 'variables', - 'QmQ44hgrWWt3Qf2X9XEX2fPyTbmQbChxwNm5c1t4mhKpGt', - `'{"DAI": "0.5"}'`, - ], - 'references/indexer-cost-variables-deployment-multinetworks', - { - expectedExitCode: 1, - cwd: baseDir, - timeout: 10000, - }, - ) }) }) diff --git a/packages/indexer-cli/src/__tests__/util.ts b/packages/indexer-cli/src/__tests__/util.ts index 4d5813fbc..273a3d649 100644 --- a/packages/indexer-cli/src/__tests__/util.ts +++ b/packages/indexer-cli/src/__tests__/util.ts @@ -9,7 +9,6 @@ import stripAnsi from 'strip-ansi' import { ActionStatus, ActionType, - CostModelVariables, createIndexerManagementClient, createIndexerManagementServer, defineIndexerManagementModels, @@ -255,12 +254,6 @@ export const seedCostModels = async () => { ).toString(), model: 'default => 0.00025;', }) - await models.CostModel.create({ - deployment: new SubgraphDeploymentID( - 'QmQ44hgrWWt3Qf2X9XEX2fPyTbmQbChxwNm5c1t4mhKpGt', - ).toString(), - variables: { DAI: '0.5' } as CostModelVariables, - }) } catch (e) { logger.error('Failed to seed CostModel table', { error: e }) process.exit(1) diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-address.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-address.yml deleted file mode 100644 index 3f48da721..000000000 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-address.yml +++ /dev/null @@ -1,36 +0,0 @@ -networkIdentifier: mainnet -gateway: - url: http://gateway -indexerOptions: - address: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" - mnemonic: word ivory whale diesel slab pelican voyage oxygen chat find tobacco sport - url: http://indexer - geoCoordinates: [25.1, -71.2] - restakeRewards: true - rebateClaimThreshold: 400 - rebateClaimBatchThreshold: 5000 - rebateClaimMaxBatchSize: 10 - poiDisputeMonitoring: false - poiDisputableEpochs: 5 - defaultAllocationAmount: 0.05 - voucherRedemptionThreshold: 2 - voucherRedemptionBatchThreshold: 2000 - voucherRedemptionMaxBatchSize: 15 - allocationManagementMode: "auto" - autoAllocationMinBatchSize: 20 -transactionMonitoring: - gasIncreaseTimeout: 10 - gasIncreaseFactor: 10 - baseFeePerGasMax: 10 - maxTransactionAttempts: 10 -subgraphs: - networkSubgraph: - deployment: QmPK1s3pNYLi9ERiq3BDxKa4XosgWwFRQUydHUtz4YgpqB - epochSubgraph: - url: http://subgraph - tapSubgraph: - url: http://subgraph -networkProvider: - url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448 " diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-base58.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-base58.yml index 35840379e..b29445bf1 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-base58.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-base58.yml @@ -32,5 +32,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-epoch-subgraph.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-epoch-subgraph.yml index b22e8a787..a8c082880 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-epoch-subgraph.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-epoch-subgraph.yml @@ -33,5 +33,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-extra-field.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-extra-field.yml index b38e847d9..e4e4baa53 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-extra-field.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-extra-field.yml @@ -34,5 +34,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-missing-field.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-missing-field.yml index a4074c90a..02bf212a1 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-missing-field.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-missing-field.yml @@ -33,5 +33,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-negative-max-block-distance.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-negative-max-block-distance.yml index 9a0db4b8c..6ea39f26c 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-negative-max-block-distance.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-negative-max-block-distance.yml @@ -33,5 +33,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/invalid-network-identifier.yml b/packages/indexer-common/src/__tests__/network-specification-files/invalid-network-identifier.yml index 0e560429b..d51d3f4cf 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/invalid-network-identifier.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/invalid-network-identifier.yml @@ -33,5 +33,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/valid-missing.yml b/packages/indexer-common/src/__tests__/network-specification-files/valid-missing.yml index fe4213719..76c051f50 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/valid-missing.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/valid-missing.yml @@ -28,5 +28,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification-files/valid.yml b/packages/indexer-common/src/__tests__/network-specification-files/valid.yml index 1aba9ab1c..51538b31a 100644 --- a/packages/indexer-common/src/__tests__/network-specification-files/valid.yml +++ b/packages/indexer-common/src/__tests__/network-specification-files/valid.yml @@ -32,5 +32,3 @@ subgraphs: url: http://subgraph networkProvider: url: http://provider -dai: - contractAddress: "0x4e8a4C63Df58bf59Fef513aB67a76319a9faf448" diff --git a/packages/indexer-common/src/__tests__/network-specification.test.ts b/packages/indexer-common/src/__tests__/network-specification.test.ts index 303c38c0d..6c8afefe2 100644 --- a/packages/indexer-common/src/__tests__/network-specification.test.ts +++ b/packages/indexer-common/src/__tests__/network-specification.test.ts @@ -65,11 +65,6 @@ describe('Failed deserialization', () => { path: ['subgraphs', 'networkSubgraph', 'deployment'], message: 'Invalid IPFS hash', }, - { - file: 'invalid-address.yml', - path: ['dai', 'contractAddress'], - message: 'Invalid contract address', - }, { file: 'invalid-negative-max-block-distance.yml', path: ['subgraphs', 'maxBlockDistance'], diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts index 1bce61e46..47f77aa99 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts @@ -199,7 +199,7 @@ const setup = async () => { async: false, level: __LOG_LEVEL__ ?? 'error', }) - client = await createTestManagementClient(__DATABASE__, logger, true, metrics) + client = await createTestManagementClient(__DATABASE__, logger, metrics) } const setupEach = async () => { diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/cost-models.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/cost-models.test.ts index 98c510a06..62fc788cc 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/cost-models.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/cost-models.test.ts @@ -95,7 +95,6 @@ const setupAll = async () => { client = await createTestManagementClient( __DATABASE__, logger, - true, metrics, 'eip155:1', // Override with mainnet to enable the Cost Model feature ) @@ -576,177 +575,6 @@ describe('Cost models', () => { }) }) -describe('Feature: Inject $DAI variable', () => { - beforeEach(setupAll) - afterEach(teardownAll) - - test('$DAI variable is preserved when clearing variables', async () => { - const initial = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ DAI: '10.0' }), - } - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: initial }).toPromise() - - const update = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: null, - variables: JSON.stringify({}), - } - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise() - - await expect( - client.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [initial]) - }) - - test('$DAI variable can be overwritten', async () => { - const initial = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ DAI: '10.0' }), - } - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: initial }).toPromise() - const update = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: initial.model, - variables: JSON.stringify({ DAI: '15.0' }), - } - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise() - await expect( - client.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [update]) - }) - - test('$DAI updates are applied to all cost models', async () => { - const inputs = [ - { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ n: 100, DAI: '10.0' }), - }, - { - deployment: '0x1111111111111111111111111111111111111111111111111111111111111111', - model: 'query { proposals } => 30 * $n;', - variables: JSON.stringify({ n: 10 }), - }, - ] - - for (const input of inputs) { - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: input }).toPromise() - } - - await client.setDai('15.3') - - await expect( - client.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [ - { - ...inputs[0], - // DAI was replaced here - variables: JSON.stringify({ n: 100, DAI: '15.3' }), - }, - { - ...inputs[1], - // DAI was added here - variables: JSON.stringify({ n: 10, DAI: '15.3' }), - }, - ]) - }) - - test('$DAI is added to new models', async () => { - const inputs = [ - { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ n: 100, DAI: '10.0' }), - }, - { - deployment: '0x1111111111111111111111111111111111111111111111111111111111111111', - model: 'query { proposals } => 30 * $n;', - variables: JSON.stringify({ n: 10 }), - }, - ] - - // This time, set the DAI value first - await client.setDai('15.3') - - // THEN add new cost models - for (const input of inputs) { - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: input }).toPromise() - } - - await expect( - client.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [ - { - ...inputs[0], - // DAI was replaced here - variables: JSON.stringify({ n: 100, DAI: '15.3' }), - }, - { - ...inputs[1], - // DAI was added here - variables: JSON.stringify({ n: 10, DAI: '15.3' }), - }, - ]) - }) - - test('$DAI is preserved when cost model is updated', async () => { - const initial = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ n: 5, DAI: '10.0' }), - } - - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: initial }).toPromise() - const update = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'default => 1;', - variables: null, - } - await client.mutation(SET_COST_MODEL_MUTATION, { costModel: update }).toPromise() - await expect( - client.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [ - { - ...update, - variables: initial.variables, - }, - ]) - }) - - test('If feature is disabled, $DAI variable is not preserved', async () => { - const clientNoInjectDai = await createTestManagementClient( - __DATABASE__, - logger, - false, - metrics, - 'eip155:1', // Override with mainnet to enable the Cost Model feature - ) - - const initial = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: 'query { votes } => 10 * $n;', - variables: JSON.stringify({ n: 5, DAI: '10.0' }), - } - await clientNoInjectDai - .mutation(SET_COST_MODEL_MUTATION, { costModel: initial }) - .toPromise() - const update = { - deployment: '0x0000000000000000000000000000000000000000000000000000000000000000', - model: initial.model, - variables: JSON.stringify({}), - } - await clientNoInjectDai - .mutation(SET_COST_MODEL_MUTATION, { costModel: update }) - .toPromise() - await expect( - clientNoInjectDai.query(GET_COST_MODELS_QUERY, undefined).toPromise(), - ).resolves.toHaveProperty('data.costModels', [update]) - }) -}) - describe('Cost model validation', () => { test('Invalid cost models are rejected', async () => { const costModel = { diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts index bf92003b7..066e17ec6 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts @@ -124,7 +124,7 @@ const setupAll = async () => { async: false, level: __LOG_LEVEL__ ?? 'error', }) - client = await createTestManagementClient(__DATABASE__, logger, true, metrics) + client = await createTestManagementClient(__DATABASE__, logger, metrics) } const teardownAll = async () => { diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/poi-disputes.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/poi-disputes.test.ts index 7ec174af4..4d3405b0d 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/poi-disputes.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/poi-disputes.test.ts @@ -195,7 +195,7 @@ const setupAll = async () => { async: false, level: __LOG_LEVEL__ ?? 'error', }) - client = await createTestManagementClient(__DATABASE__, logger, true, metrics) + client = await createTestManagementClient(__DATABASE__, logger, metrics) logger.info('Finished setting up Test Indexer Management Client') } diff --git a/packages/indexer-common/src/indexer-management/__tests__/util.ts b/packages/indexer-common/src/indexer-management/__tests__/util.ts index 1e08fda22..a4a14c605 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/util.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/util.ts @@ -23,7 +23,6 @@ export const createTestManagementClient = async ( // eslint-disable-next-line @typescript-eslint/no-explicit-any databaseOptions: any, logger: Logger, - injectDai: boolean, metrics: Metrics, networkIdentifierOverride?: string, ): Promise => { @@ -44,7 +43,6 @@ export const createTestManagementClient = async ( ) const networkSpecification = { ...testNetworkSpecification } - networkSpecification.dai.inject = injectDai const defaults: IndexerManagementDefaults = { globalIndexingRule: { diff --git a/packages/indexer-common/src/indexer-management/client.ts b/packages/indexer-common/src/indexer-management/client.ts index 164aa404f..280eb62cb 100644 --- a/packages/indexer-common/src/indexer-management/client.ts +++ b/packages/indexer-common/src/indexer-management/client.ts @@ -2,7 +2,7 @@ import { buildSchema, print } from 'graphql' import gql from 'graphql-tag' import { executeExchange } from '@urql/exchange-execute' import { Client, ClientOptions } from '@urql/core' -import { equal, Logger, mutable, WritableEventual } from '@graphprotocol/common-ts' +import { Logger } from '@graphprotocol/common-ts' import { IndexerManagementModels, IndexingRuleCreationAttributes } from './models' @@ -13,7 +13,6 @@ import indexingRuleResolvers from './resolvers/indexing-rules' import poiDisputeResolvers from './resolvers/poi-disputes' import statusResolvers from './resolvers/indexer-status' import { BigNumber } from 'ethers' -import { Op, Sequelize } from 'sequelize' import { GraphNode } from '../graph-node' import { ActionManager, MultiNetworks, Network } from '@graphprotocol/indexer-common' @@ -24,7 +23,6 @@ export interface IndexerManagementResolverContext { defaults: IndexerManagementDefaults actionManager: ActionManager | undefined multiNetworks: MultiNetworks | undefined - dai: WritableEventual } const SCHEMA_SDL = gql` @@ -461,44 +459,12 @@ export interface IndexerManagementClientOptions { export class IndexerManagementClient extends Client { private logger?: Logger private models: IndexerManagementModels - private dai: WritableEventual - constructor( - clientOptions: ClientOptions, - options: IndexerManagementClientOptions, - featureOptions: { dai: WritableEventual }, - ) { + constructor(clientOptions: ClientOptions, options: IndexerManagementClientOptions) { super(clientOptions) this.logger = options.logger this.models = options.models - this.dai = featureOptions.dai - } - - public async setDai(value: string): Promise { - // Get current value - const oldValue = this.dai.valueReady ? await this.dai.value() : undefined - - // Don't do anything if there is no change - if (equal(oldValue, value)) { - return - } - - // Notify others of the new value - this.dai.push(value) - - // Update DAI in all cost models - const update = `'${JSON.stringify({ DAI: value })}'::jsonb` - await this.models.CostModel.update( - { - // This merges DAI into the variables, overwriting existing values - variables: Sequelize.literal(`coalesce(variables, '{}'::jsonb) || ${update}`), - }, - { - // TODO: update to match all rows?? - where: { model: { [Op.not]: null } }, - }, - ) } } @@ -518,8 +484,6 @@ export const createIndexerManagementClient = async ( ...actionResolvers, } - const dai: WritableEventual = mutable() - const actionManager = multiNetworks ? await ActionManager.create(multiNetworks, logger, models, graphNode) : undefined @@ -529,7 +493,6 @@ export const createIndexerManagementClient = async ( graphNode, defaults, logger: logger.child({ component: 'IndexerManagementClient' }), - dai, multiNetworks, actionManager, } @@ -540,7 +503,5 @@ export const createIndexerManagementClient = async ( context, }) - return new IndexerManagementClient({ url: 'no-op', exchanges: [exchange] }, options, { - dai, - }) + return new IndexerManagementClient({ url: 'no-op', exchanges: [exchange] }, options) } diff --git a/packages/indexer-common/src/indexer-management/resolvers/cost-models.ts b/packages/indexer-common/src/indexer-management/resolvers/cost-models.ts index e33bff707..45587363e 100644 --- a/packages/indexer-common/src/indexer-management/resolvers/cost-models.ts +++ b/packages/indexer-common/src/indexer-management/resolvers/cost-models.ts @@ -1,50 +1,10 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/ban-types */ -import { - CostModelVariables, - COST_MODEL_GLOBAL, - GraphQLCostModel, - parseGraphQLCostModel, -} from '../models' +import { COST_MODEL_GLOBAL, GraphQLCostModel, parseGraphQLCostModel } from '../models' import { IndexerManagementResolverContext } from '../client' import { compileAsync } from '@graphprotocol/cost-model' -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getVariable = (vars: CostModelVariables | null, name: string): any | undefined => { - if (vars === null) { - return undefined - } else { - try { - if (Object.prototype.hasOwnProperty.call(vars, name)) { - return vars[name] - } else { - return undefined - } - } catch (e) { - return undefined - } - } -} - -const setVariable = ( - vars: CostModelVariables | null, - name: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: any, -): CostModelVariables => { - if (vars === null) { - return { [name]: value } - } else { - try { - vars[name] = value - return vars - } catch (e) { - return vars - } - } -} - export default { costModel: async ( { deployment }: { deployment: string }, @@ -120,7 +80,7 @@ export default { setCostModel: async ( { costModel }: { deployment: string; costModel: GraphQLCostModel }, - { models, multiNetworks, dai }: IndexerManagementResolverContext, + { models, multiNetworks }: IndexerManagementResolverContext, ): Promise => { if (!multiNetworks) { throw new Error('No network configuration available') @@ -128,13 +88,6 @@ export default { if (Object.keys(multiNetworks.inner).length !== 1) { throw Error('Must be in single network mode to set cost models') } - const network = Object.values(multiNetworks.inner)[0] - const injectDai = network.specification.dai.inject - if (network.specification.networkIdentifier !== 'eip155:1' && injectDai) { - throw new Error( - `Can't set cost model: DAI injection enabled but not on Ethereum Mainnet`, - ) - } const update = parseGraphQLCostModel(costModel) // Validate cost model @@ -154,34 +107,6 @@ export default { model: update.model || oldModel?.model, variables: update.variables || oldModel?.variables, }) - if (oldModel) { - let variables = update.variables || oldModel!.variables - if (injectDai) { - const oldDai = getVariable(oldModel!.variables, 'DAI') - const newDai = getVariable(update.variables, 'DAI') - - // Inject the latest DAI value if available - if (dai.valueReady) { - variables = setVariable(variables, 'DAI', await dai.value()) - } else if (newDai === undefined && oldDai !== undefined) { - // Otherwise preserve the old DAI value if there is one; - // this ensures it's never dropped - variables = setVariable(variables, 'DAI', oldDai) - } - // Apply new variables - model.variables = variables - } - } else { - let variables = update.variables - if (injectDai) { - // Inject the latest DAI value if available - if (dai.valueReady) { - variables = setVariable(variables, 'DAI', await dai.value()) - } - // Apply new variables - model.variables = variables - } - } return (await model.save()).toGraphQL() }, diff --git a/packages/indexer-common/src/network-specification.ts b/packages/indexer-common/src/network-specification.ts index 1ce04a162..f683cdec5 100644 --- a/packages/indexer-common/src/network-specification.ts +++ b/packages/indexer-common/src/network-specification.ts @@ -167,21 +167,6 @@ export const NetworkProvider = z .strict() export type NetworkProvider = z.infer -export const Dai = z - .object({ - contractAddress: z - .string() - .default('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48') - .refine((val) => utils.isAddress(val), { - message: 'Invalid contract address', - }) - .transform(toAddress), - inject: z.boolean().default(true), - }) - .strict() - .default({}) // defaults will be used for instantiation when the Dai group is absent. -export type Dai = z.infer - // All necessary information to describe a Protocol Network export const NetworkSpecification = z .object({ @@ -194,7 +179,6 @@ export const NetworkSpecification = z addressBook: z.string().optional(), tapAddressBook: TapContracts.optional(), allocationSyncInterval: positiveNumber().default(120000), - dai: Dai, }) .strict() diff --git a/yarn.lock b/yarn.lock index 91e522701..59d7a1d7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3627,24 +3627,6 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@uniswap/sdk@3.0.3": - version "3.0.3" - resolved "https://registry.npmjs.org/@uniswap/sdk/-/sdk-3.0.3.tgz" - integrity sha512-t4s8bvzaCFSiqD2qfXIm3rWhbdnXp+QjD3/mRaeVDHK7zWevs6RGEb1ohMiNgOCTZANvBayb4j8p+XFdnMBadQ== - dependencies: - "@uniswap/v2-core" "^1.0.0" - big.js "^5.2.2" - decimal.js-light "^2.5.0" - jsbi "^3.1.1" - tiny-invariant "^1.1.0" - tiny-warning "^1.0.3" - toformat "^2.0.0" - -"@uniswap/v2-core@^1.0.0": - version "1.0.1" - resolved "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz" - integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== - "@urql/core@3.1.0", "@urql/core@>=3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@urql/core/-/core-3.1.0.tgz#b77c6e444da35507b234645caed383cbb04d8ac9" @@ -4458,11 +4440,6 @@ before-after-hook@^2.1.0, before-after-hook@^2.2.0: resolved "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.2" resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz" @@ -5402,11 +5379,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decimal.js-light@^2.5.0: - version "2.5.1" - resolved "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz" - integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== - decode-uri-component@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" @@ -8359,11 +8331,6 @@ js2xmlparser@^4.0.2: dependencies: xmlcreate "^2.0.4" -jsbi@^3.1.1: - version "3.2.5" - resolved "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz" - integrity sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ== - jsdoc@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-4.0.3.tgz#bfee86c6a82f6823e12b5e8be698fd99ae46c061" @@ -11978,21 +11945,11 @@ through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tiny-invariant@^1.1.0: - version "1.3.1" - resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz" - integrity sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw== - tiny-lru@^7.0.0: version "7.0.6" resolved "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.6.tgz" integrity sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow== -tiny-warning@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" - integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== - tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" @@ -12059,11 +12016,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toformat@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/toformat/-/toformat-2.0.0.tgz" - integrity sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ== - toidentifier@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"